1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GemAI-OFlEoiSB.js","assets/InviteContactModal-eJvvz2_d.js","assets/index-BjqtNt-N.js","assets/Combination-HGhFtX4F.js","assets/index-BiHj8eX2.js","assets/chevron-right-vNJNS7I3.js","assets/external-link-GaWiUDyf.js","assets/IntegrationsModal-CihhAZhY.js","assets/WarmIntros-BxqUoXaP.js","assets/ProfileNameTrigger-DzNiW3JR.js","assets/MyNetwork-CCiuMloP.js","assets/linkedin-csv-upload-flow-D1etFt0g.js","assets/MuteContactModal-D95J0zhy.js","assets/AddConnectorModal-B1Vne4p5.js","assets/InviteTeammatesModal-B4Of1wFK.js","assets/home-checkin-people-BVy6E0N1.js","assets/use-resolved-title-company-BlONIib3.js","assets/MyNetwork-Cx8YQaZM.css","assets/Settings-CX0nnhVf.js","assets/QrSheet-CzugcYO3.js","assets/QrCode-Bvvwo3ZD.js","assets/api-DzEwHsS8.js","assets/use-mobile-DyHfV21u.js","assets/HomeDashboard-CCT0M1o7.js","assets/team-account-paths-CUi8cX7V.js","assets/arrow-right-Bk4D0LF-.js","assets/AddAccountsModal-CNVwM4E2.js","assets/accounts-Dq7TYPam.js","assets/HomeDashboard-BC2hUdZX.css","assets/EnterpriseSearch-DDER1bYJ.js","assets/card-DbH3HPdJ.js","assets/select-CwLWroP5.js","assets/textarea-DsOhmRUW.js","assets/map-pin-Bs8yA5Hl.js","assets/briefcase-DoSn8kXa.js","assets/CRM-fzF1VH0r.js","assets/tabs-sgZtMKX6.js","assets/ProfilePopup-acBF9Pse.js","assets/AdminCRM-mHx1PYMV.js","assets/AdminWeeklyDigest-CTWKcVvO.js","assets/plus-B0nFezmJ.js","assets/DigestActionConfirm-DMHpcYTJ.js","assets/Accounts-DmOkYe9b.js","assets/DrawerExpandCaret-Dc6Xcdz8.js","assets/OfferIntroModal-BsoaPZhY.js","assets/Team-BZcC6i_M.js","assets/useConnectorOfferIntro-BJOa_3PG.js","assets/ConnectorInviteAccept-d6x9HSay.js","assets/invite-door-Cw_3KQw6.js","assets/api-CykbWEt-.js","assets/ConnectorInviteAccept-DyxHh9yH.css","assets/HomeLeagueEvent-BwGnR4By.js","assets/HomeLeagueEvent-FytkeLkZ.css","assets/RoomsView-DoG0SJRA.js","assets/sf-tech-week-CWiSP6r6.js","assets/sf-tech-week-J27F3_Fg.css","assets/rooms-CCSfaVVF.js","assets/rooms-BfG1r7Ij.css","assets/InviteLanding-hWclHuvT.js","assets/HostLanding-DFVA_S2c.js","assets/HostLanding-uoUbD576.css","assets/SFTechWeek-DGI66wYe.js","assets/SFTW-CdxDbt_f.js","assets/SFTW-kf_63Htm.css"])))=>i.map(i=>d[i]); 2var IA=Object.defineProperty;var Dw=e=>{throw TypeError(e)};var AA=(e,t,n)=>t in e?IA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var st=(e,t,n)=>AA(e,typeof t!="symbol"?t+"":t,n),xm=(e,t,n)=>t.has(e)||Dw("Cannot "+n);var Z=(e,t,n)=>(xm(e,t,"read from private field"),n?n.call(e):t.get(e)),lt=(e,t,n)=>t.has(e)?Dw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ve=(e,t,n,r)=>(xm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),pn=(e,t,n)=>(xm(e,t,"access private method"),n);var qu=(e,t,n,r)=>({set _(s){Ve(e,t,s,n)},get _(){return Z(e,t,r)}});function RA(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cq=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vj={exports:{}},bf={},zj={exports:{}},tt={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var pu=Symbol.for("react.element"),_A=Symbol.for("react.portal"),OA=Symbol.for("react.fragment"),MA
vendor: 9,819 bytes, lines 10-26
10=Symbol.for("react.strict_mode"),LA=Symbol.for("react.profiler"),$A=Symbol.for("react.provider"),DA=Symbol.for("react.context"),FA=Symbol.for("react.forward_ref"),BA=Symbol.for("react.suspense"),UA=Symbol.for("react.memo"),VA=Symbol.for("react.lazy"),Fw=Symbol.iterator;function zA(e){return e===null||typeof e!="object"?null:(e=Fw&&e[Fw]||e["@@iterator"],typeof e=="function"?e:null)}var Wj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gj=Object.assign,Hj={};function yl(e,t,n){this.props=e,this.context=t,this.refs=Hj,this.updater=n||Wj}yl.prototype.isReactComponent={};yl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qj(){}qj.prototype=yl.prototype;function Xy(e,t,n){this.props=e,this.context=t,this.refs=Hj,this.updater=n||Wj}var Zy=Xy.prototype=new qj;Zy.constructor=Xy;Gj(Zy,yl.prototype);Zy.isPureReactComponent=!0;var Bw=Array.isArray,Kj=Object.prototype.hasOwnProperty,ev={current:null},Yj={key:!0,ref:!0,__self:!0,__source:!0};function Jj(e,t,n){var r,s={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Kj.call(t,r)&&!Yj.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:pu,type:e,key:o,ref:a,props:s,_owner:ev.current}}function WA(e,t){return{$$typeof:pu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tv(e){return typeof e=="object"&&e!==null&&e.$$typeof===pu}function GA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Uw=/\/+/g;function wm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?GA(""+e.key):t.toString(36)}function Fd(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case pu:case _A:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+wm(a,0):r,Bw(s)?(n="",e!=null&&(n=e.replace(Uw,"$&/")+"/"),Fd(s,t,n,"",function(u){return u})):s!=null&&(tv(s)&&(s=WA(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Uw,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Bw(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+wm(o,l);a+=Fd(o,t,n,c,s)}else if(c=zA(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+wm(o,l++),a+=Fd(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Ku(e,t,n){if(e==null)return e;var r=[],s=0;return Fd(e,r,"","",function(o){return t.call(n,o,s++)}),r}function HA(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var On={current:null},Bd={transition:null},qA={ReactCurrentDispatcher:On,ReactCurrentBatchConfig:Bd,ReactCurrentOwner:ev};function Qj(){throw Error("act(...) is not supported in production builds of React.")}tt.Children={map:Ku,forEach:function(e,t,n){Ku(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ku(e,function(){t++}),t},toArray:function(e){return Ku(e,function(t){return t})||[]},only:function(e){if(!tv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};tt.Component=yl;tt.Fragment=OA;tt.Profiler=LA;tt.PureComponent=Xy;tt.StrictMode=MA;tt.Suspense=BA;tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qA;tt.act=Qj;tt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Gj({},e.props),s=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=ev.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Kj.call(t,c)&&!Yj.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:pu,type:e.type,key:s,ref:o,props:r,_owner:a}};tt.createContext=function(e){return e={$$typeof:DA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$A,_context:e},e.Consumer=e};tt.createElement=Jj;tt.createFactory=function(e){var t=Jj.bind(null,e);return t.type=e,t};tt.createRef=function(){return{current:null}};tt.forwardRef=function(e){return{$$typeof:FA,render:e}};tt.isValidElement=tv;tt.lazy=function(e){return{$$typeof:VA,_payload:{_status:-1,_result:e},_init:HA}};tt.memo=function(e,t){return{$$typeof:UA,type:e,compare:t===void 0?null:t}};tt.startTransition=function(e){var t=Bd.transition;Bd.transition={};try{e()}finally{Bd.transition=t}};tt.unstable_act=Qj;tt.useCallback=function(e,t){return On.current.useCallback(e,t)};tt.useContext=function(e){return On.current.useContext(e)};tt.useDebugValue=function(){};tt.useDeferredValue=function(e){return On.current.useDeferredValue(e)};tt.useEffect=function(e,t){return On.current.useEffect(e,t)};tt.useId=function(){return On.current.useId()};tt.useImperativeHandle=function(e,t,n){return On.current.useImperativeHandle(e,t,n)};tt.useInsertionEffect=function(e,t){return On.current.useInsertionEffect(e,t)};tt.useLayoutEffect=function(e,t){return On.current.useLayoutEffect(e,t)};tt.useMemo=function(e,t){return On.current.useMemo(e,t)};tt.useReducer=function(e,t,n){return On.current.useReducer(e,t,n)};tt.useRef=function(e){return On.current.useRef(e)};tt.useState=function(e){return On.current.useState(e)};tt.useSyncExternalStore=function(e,t,n){return On.current.useSyncExternalStore(e,t,n)};tt.useTransition=function(){return On.current.useTransition()};tt.version="18.3.1";zj.exports=tt;var m=zj.exports;const ce=Uj(m),Xj=RA({__proto__:null,default:ce},[m]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var KA=m,YA=Symbol.for("react.element"),JA=Symbol.for("react.fragment"),QA=Object.prototype.hasOwnProperty,XA=KA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ZA={key:!0,ref:!0,__self:!0,__source:!0};function Zj(e,t,n){var r,s={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)QA.call(t,r)&&!ZA.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:YA,type:e,key:o,ref:a,props:s,_owner:XA.current}}bf.Fragment=JA;bf.jsx=Zj;bf.jsxs=Zj;Vj.exports=bf;var i=Vj.exports,ek={exports:{}},lr={},tk={exports:{}},nk={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(P,_){var k=P.length;P.push(_);e:for(;0<k;){var N=k-1>>>1,B=P[N];if(0<s(B,_))P[N]=_,P[k]=B,k=N;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var _=P[0],k=P.pop();if(k!==_){P[0]=k;e:for(var N=0,B=P.length,L=B>>>1;N<L;){var z=2*(N+1)-1,ee=P[z],X=z+1,G=P[X];if(0>s(ee,k))X<B&&0>s(G,ee)?(P[N]=G,P[X]=k,N=X):(P[N]=ee,P[z]=k,N=z);else if(X<B&&0>s(G,k))P[N]=G,P[X]=k,N=X;else break e}}return _}function s(P,_){var k=P.sortIndex-_.sortIndex;return k!==0?k:P.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],h=1,f=null,p=3,d=!1,w=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(P){for(var _=n(u);_!==null;){if(_.callback===null)r(u);else if(_.startTime<=P)r(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=n(u)}}function S(P){if(v=!1,b(P),!w)if(n(c)!==null)w=!0,W(j);else{var _=n(u);_!==null&&H(S,_.startTime-P)}}function j(P,_){w=!1,v&&(v=!1,y(E),E=-1),d=!0;var k=p;try{for(b(_),f=n(c);f!==null&&(!(f.expirationTime>_)||P&&!V());){var N=f.callback;if(typeof N=="function"){f.callback=null,p=f.priorityLevel;var B=N(f.expirationTime<=_);_=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(_)}else r(c);f=n(c)}if(f!==null)var L=!0;else{var z=n(u);z!==null&&H(S,z.startTime-_),L=!1}return L}finally{f=null,p=k,d=!1}}var T=!1,C=null,E=-1,A=5,R=-1;function V(){return!(e.unstable_now()-R<A)}function D(){if(C!==null){var P=e.unstable_now();R=P;var _=!0;try{_=C(!0,P)}finally{_?J():(T=!1,C=null)}}else T=!1}var J;if(typeof g=="function")J=function(){g(D)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Y=F.port2;F.port1.onmessage=D,J=function(){Y.postMessage(null)}}
vendor: 8,509 bytes, lines 26-35
26else J=function(){x(D,0)};function W(P){C=P,T||(T=!0,J())}function H(P,_){E=x(function(){P(e.unstable_now())},_)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){w||d||(w=!0,W(j))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var _=3;break;default:_=p}var k=p;p=_;try{return P()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,_){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var k=p;p=P;try{return _()}finally{p=k}},e.unstable_scheduleCallback=function(P,_,k){var N=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?N+k:N):k=N,P){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=k+B,P={id:h++,callback:_,priorityLevel:P,startTime:k,expirationTime:B,sortIndex:-1},k>N?(P.sortIndex=k,t(u,P),n(c)===null&&P===n(u)&&(v?(y(E),E=-1):v=!0,H(S,k-N))):(P.sortIndex=B,t(c,P),w||d||(w=!0,W(j))),P},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(P){var _=p;return function(){var k=p;p=_;try{return P.apply(this,arguments)}finally{p=k}}}})(nk);tk.exports=nk;var e2=tk.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var t2=m,ar=e2;function se(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rk=new Set,Ec={};function Bo(e,t){Ka(e,t),Ka(e+"Capture",t)}function Ka(e,t){for(Ec[e]=t,e=0;e<t.length;e++)rk.add(t[e])}var Ms=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yp=Object.prototype.hasOwnProperty,n2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Vw={},zw={};function r2(e){return Yp.call(zw,e)?!0:Yp.call(Vw,e)?!1:n2.test(e)?zw[e]=!0:(Vw[e]=!0,!1)}function s2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function i2(e,t,n,r){if(t===null||typeof t>"u"||s2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mn(e,t,n,r,s,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new Mn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new Mn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new Mn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new Mn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new Mn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new Mn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new Mn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new Mn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new Mn(e,5,!1,e.toLowerCase(),null,!1,!1)});var nv=/[\-:]([a-z])/g;function rv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nv,rv);cn[t]=new Mn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nv,rv);cn[t]=new Mn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nv,rv);cn[t]=new Mn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new Mn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new Mn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new Mn(e,1,!1,e.toLowerCase(),null,!0,!0)});function sv(e,t,n,r){var s=cn.hasOwnProperty(t)?cn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(i2(t,n,s,r)&&(n=null),r||s===null?r2(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Gs=t2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Yu=Symbol.for("react.element"),ra=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),iv=Symbol.for("react.strict_mode"),Jp=Symbol.for("react.profiler"),sk=Symbol.for("react.provider"),ik=Symbol.for("react.context"),ov=Symbol.for("react.forward_ref"),Qp=Symbol.for("react.suspense"),Xp=Symbol.for("react.suspense_list"),av=Symbol.for("react.memo"),ii=Symbol.for("react.lazy"),ok=Symbol.for("react.offscreen"),Ww=Symbol.iterator;function Ol(e){return e===null||typeof e!="object"?null:(e=Ww&&e[Ww]||e["@@iterator"],typeof e=="function"?e:null)}var _t=Object.assign,bm;function ql(e){if(bm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bm=t&&t[1]||""}return` 35`+bm+e}var Sm=!1;function jm(e,t){if(!e||Sm)return"";Sm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 15,818 bytes, lines 35-38
35catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),o=r.stack.split(` 37`),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l]){var c=` 38`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{Sm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ql(e):""}function o2(e){switch(e.tag){case 5:return ql(e.type);case 16:return ql("Lazy");case 13:return ql("Suspense");case 19:return ql("SuspenseList");case 0:case 2:case 15:return e=jm(e.type,!1),e;case 11:return e=jm(e.type.render,!1),e;case 1:return e=jm(e.type,!0),e;default:return""}}function Zp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sa:return"Fragment";case ra:return"Portal";case Jp:return"Profiler";case iv:return"StrictMode";case Qp:return"Suspense";case Xp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ik:return(e.displayName||"Context")+".Consumer";case sk:return(e._context.displayName||"Context")+".Provider";case ov:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case av:return t=e.displayName||null,t!==null?t:Zp(e.type)||"Memo";case ii:t=e._payload,e=e._init;try{return Zp(e(t))}catch{}}return null}function a2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zp(t);case 8:return t===iv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ak(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function l2(e){var t=ak(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ju(e){e._valueTracker||(e._valueTracker=l2(e))}function lk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ak(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function eg(e,t){var n=t.checked;return _t({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Fi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ck(e,t){t=t.checked,t!=null&&sv(e,"checked",t,!1)}function tg(e,t){ck(e,t);var n=Fi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ng(e,t.type,n):t.hasOwnProperty("defaultValue")&&ng(e,t.type,Fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ng(e,t,n){(t!=="number"||mh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kl=Array.isArray;function Sa(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Fi(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function rg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(se(91));return _t({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(se(92));if(Kl(n)){if(1<n.length)throw Error(se(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Fi(n)}}function uk(e,t){var n=Fi(t.value),r=Fi(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Kw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function dk(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function sg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dk(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qu,hk=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Qu=Qu||document.createElement("div"),Qu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},c2=["Webkit","ms","Moz","O"];Object.keys(nc).forEach(function(e){c2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nc[t]=nc[e]})});function fk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||nc.hasOwnProperty(e)&&nc[e]?(""+t).trim():t+"px"}function mk(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=fk(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var u2=_t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ig(e,t){if(t){if(u2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(se(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(se(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(se(61))}if(t.style!=null&&typeof t.style!="object")throw Error(se(62))}}function og(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ag=null;function lv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lg=null,ja=null,ka=null;function Yw(e){if(e=vu(e)){if(typeof lg!="function")throw Error(se(280));var t=e.stateNode;t&&(t=Cf(t),lg(e.stateNode,e.type,t))}}function pk(e){ja?ka?ka.push(e):ka=[e]:ja=e}function gk(){if(ja){var e=ja,t=ka;if(ka=ja=null,Yw(e),t)for(e=0;e<t.length;e++)Yw(t[e])}}function yk(e,t){return e(t)}function vk(){}var km=!1;function xk(e,t,n){if(km)return e(t,n);km=!0;try{return yk(e,t,n)}finally{km=!1,(ja!==null||ka!==null)&&(vk(),gk())}}function Pc(e,t){var n=e.stateNode;if(n===null)return null;var r=Cf(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(se(231,t,typeof n));return n}var cg=!1;if(Ms)try{var Ml={};Object.defineProperty(Ml,"passive",{get:function(){cg=!0}}),window.addEventListener("test",Ml,Ml),window.removeEventListener("test",Ml,Ml)}catch{cg=!1}function d2(e,t,n,r,s,o,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var rc=!1,ph=null,gh=!1,ug=null,h2={onError:function(e){rc=!0,ph=e}};function f2(e,t,n,r,s,o,a,l,c){rc=!1,ph=null,d2.apply(h2,arguments)}function m2(e,t,n,r,s,o,a,l,c){if(f2.apply(this,arguments),rc){if(rc){var u=ph;rc=!1,ph=null}else throw Error(se(198));gh||(gh=!0,ug=u)}}function Uo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function wk(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Jw(e){if(Uo(e)!==e)throw Error(se(188))}function p2(e){var t=e.alternate;if(!t){if(t=Uo(e),t===null)throw Error(se(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Jw(s),e;if(o===r)return Jw(s),t;o=o.sibling}throw Error(se(188))}if(n.return!==r.return)n=s,r=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a)throw Error(se(189))}}if(n.alternate!==r)throw Error(se(190))}if(n.tag!==3)throw Error(se(188));return n.stateNode.current===n?e:t}function bk(e){return e=p2(e),e!==null?Sk(e):null}function Sk(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Sk(e);if(t!==null)return t;e=e.sibling}return null}var jk=ar.unstable_scheduleCallback,Qw=ar.unstable_cancelCallback,g2=ar.unstable_shouldYield,y2=ar.unstable_requestPaint,$t=ar.unstable_now,v2=ar.unstable_getCurrentPriorityLevel,cv=ar.unstable_ImmediatePriority,kk=ar.unstable_UserBlockingPriority,yh=ar.unstable_NormalPriority,x2=ar.unstable_LowPriority,Nk=ar.unstable_IdlePriority,Sf=null,cs=null;function w2(e){if(cs&&typeof cs.onCommitFiberRoot=="function")try{cs.onCommitFiberRoot(Sf,e,void 0,(e.current.flags&128)===128)}catch{}}var Vr=Math.clz32?Math.clz32:j2,b2=Math.log,S2=Math.LN2;function j2(e){return e>>>=0,e===0?32:31-(b2(e)/S2|0)|0}var Xu=64,Zu=4194304;function Yl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=Yl(l):(o&=a,o!==0&&(r=Yl(o)))}else a=n&~s,a!==0?r=Yl(a):o!==0&&(r=Yl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Vr(t),s=1<<n,r|=e[n],t&=~s;return r}function k2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function N2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Vr(o),l=1<<a,c=s[a];c===-1?(!(l&n)||l&r)&&(s[a]=k2(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function dg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ck(){var e=Xu;return Xu<<=1,!(Xu&4194240)&&(Xu=64),e}function Nm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vr(t),e[t]=n}function C2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Vr(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function uv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Vr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ht=0;function Ek(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Tk,dv,Pk,Ik,Ak,hg=!1,ed=[],Ci=null,Ei=null,Ti=null,Ic=new Map,Ac=new Map,ai=[],E2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Xw(e,t){switch(e){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Ti=null;break;case"pointerover":case"pointerout":Ic.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ac.delete(t.pointerId)}}function Ll(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=vu(t),t!==null&&dv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function T2(e,t,n,r,s){switch(t){case"focusin":return Ci=Ll(Ci,e,t,n,r,s),!0;case"dragenter":return Ei=Ll(Ei,e,t,n,r,s),!0;case"mouseover":return Ti=Ll(Ti,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;
vendor: 1,081 bytes, line 38
38return Ic.set(o,Ll(Ic.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Ac.set(o,Ll(Ac.get(o)||null,e,t,n,r,s)),!0}return!1}function Rk(e){var t=go(e.target);if(t!==null){var n=Uo(t);if(n!==null){if(t=n.tag,t===13){if(t=wk(n),t!==null){e.blockedOn=t,Ak(e.priority,function(){Pk(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ud(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ag=r,n.target.dispatchEvent(r),ag=null}else return t=vu(n),t!==null&&dv(t),e.blockedOn=n,!1;t.shift()}return!0}function Zw(e,t,n){Ud(e)&&n.delete(t)}function P2(){hg=!1,Ci!==null&&Ud(Ci)&&(Ci=null),Ei!==null&&Ud(Ei)&&(Ei=null),Ti!==null&&Ud(Ti)&&(Ti=null),Ic.forEach(Zw),Ac.forEach(Zw)}function $l(e,t){e.blockedOn===t&&(e.blockedOn=null,hg||(hg=!0,ar.unstable_scheduleCallback(ar.unstable_NormalPriority,P2)))}
vendor: 13,472 bytes, line 38
38function Rc(e){function t(s){return $l(s,e)}if(0<ed.length){$l(ed[0],e);for(var n=1;n<ed.length;n++){var r=ed[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ci!==null&&$l(Ci,e),Ei!==null&&$l(Ei,e),Ti!==null&&$l(Ti,e),Ic.forEach(t),Ac.forEach(t),n=0;n<ai.length;n++)r=ai[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ai.length&&(n=ai[0],n.blockedOn===null);)Rk(n),n.blockedOn===null&&ai.shift()}var Na=Gs.ReactCurrentBatchConfig,xh=!0;function I2(e,t,n,r){var s=ht,o=Na.transition;Na.transition=null;try{ht=1,hv(e,t,n,r)}finally{ht=s,Na.transition=o}}function A2(e,t,n,r){var s=ht,o=Na.transition;Na.transition=null;try{ht=4,hv(e,t,n,r)}finally{ht=s,Na.transition=o}}function hv(e,t,n,r){if(xh){var s=fg(e,t,n,r);if(s===null)Mm(e,t,r,wh,n),Xw(e,r);else if(T2(s,e,t,n,r))r.stopPropagation();else if(Xw(e,r),t&4&&-1<E2.indexOf(e)){for(;s!==null;){var o=vu(s);if(o!==null&&Tk(o),o=fg(e,t,n,r),o===null&&Mm(e,t,r,wh,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Mm(e,t,r,null,n)}}var wh=null;function fg(e,t,n,r){if(wh=null,e=lv(r),e=go(e),e!==null)if(t=Uo(e),t===null)e=null;else if(n=t.tag,n===13){if(e=wk(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wh=e,null}function _k(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(v2()){case cv:return 1;case kk:return 4;case yh:case x2:return 16;case Nk:return 536870912;default:return 16}default:return 16}}var vi=null,fv=null,Vd=null;function Ok(){if(Vd)return Vd;var e,t=fv,n=t.length,r,s="value"in vi?vi.value:vi.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[o-r];r++);return Vd=s.slice(e,1<r?1-r:void 0)}function zd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function td(){return!0}function eb(){return!1}function cr(e){function t(n,r,s,o,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?td:eb,this.isPropagationStopped=eb,this}return _t(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=td)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=td)},persist:function(){},isPersistent:td}),t}var vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mv=cr(vl),yu=_t({},vl,{view:0,detail:0}),R2=cr(yu),Cm,Em,Dl,jf=_t({},yu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Dl&&(Dl&&e.type==="mousemove"?(Cm=e.screenX-Dl.screenX,Em=e.screenY-Dl.screenY):Em=Cm=0,Dl=e),Cm)},movementY:function(e){return"movementY"in e?e.movementY:Em}}),tb=cr(jf),_2=_t({},jf,{dataTransfer:0}),O2=cr(_2),M2=_t({},yu,{relatedTarget:0}),Tm=cr(M2),L2=_t({},vl,{animationName:0,elapsedTime:0,pseudoElement:0}),$2=cr(L2),D2=_t({},vl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),F2=cr(D2),B2=_t({},vl,{data:0}),nb=cr(B2),U2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},z2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=z2[e])?!!t[e]:!1}function pv(){return W2}var G2=_t({},yu,{key:function(e){if(e.key){var t=U2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?V2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pv,charCode:function(e){return e.type==="keypress"?zd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),H2=cr(G2),q2=_t({},jf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rb=cr(q2),K2=_t({},yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pv}),Y2=cr(K2),J2=_t({},vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q2=cr(J2),X2=_t({},jf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Z2=cr(X2),eR=[9,13,27,32],gv=Ms&&"CompositionEvent"in window,sc=null;Ms&&"documentMode"in document&&(sc=document.documentMode);var tR=Ms&&"TextEvent"in window&&!sc,Mk=Ms&&(!gv||sc&&8<sc&&11>=sc),sb=" ",ib=!1;function Lk(e,t){switch(e){case"keyup":return eR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $k(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ia=!1;function nR(e,t){switch(e){case"compositionend":return $k(t);case"keypress":return t.which!==32?null:(ib=!0,sb);case"textInput":return e=t.data,e===sb&&ib?null:e;default:return null}}function rR(e,t){if(ia)return e==="compositionend"||!gv&&Lk(e,t)?(e=Ok(),Vd=fv=vi=null,ia=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mk&&t.locale!=="ko"?null:t.data;default:return null}}var sR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ob(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sR[e.type]:t==="textarea"}function Dk(e,t,n,r){pk(r),t=bh(t,"onChange"),0<t.length&&(n=new mv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ic=null,_c=null;function iR(e){Yk(e,0)}function kf(e){var t=la(e);if(lk(t))return e}function oR(e,t){if(e==="change")return t}var Fk=!1;if(Ms){var Pm;if(Ms){var Im="oninput"in document;if(!Im){var ab=document.createElement("div");ab.setAttribute("oninput","return;"),Im=typeof ab.oninput=="function"}Pm=Im}else Pm=!1;Fk=Pm&&(!document.documentMode||9<document.documentMode)}function lb(){ic&&(ic.detachEvent("onpropertychange",Bk),_c=ic=null)}function Bk(e){if(e.propertyName==="value"&&kf(_c)){var t=[];Dk(t,_c,e,lv(e)),xk(iR,t)}}function aR(e,t,n){e==="focusin"?(lb(),ic=t,_c=n,ic.attachEvent("onpropertychange",Bk)):e==="focusout"&&lb()}function lR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kf(_c)}function cR(e,t){if(e==="click")return kf(t)}function uR(e,t){if(e==="input"||e==="change")return kf(t)}function dR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wr=typeof Object.is=="function"?Object.is:dR;function Oc(e,t){if(Wr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Yp.call(t,s)||!Wr(e[s],t[s]))return!1}return!0}function cb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ub(e,t){var n=cb(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cb(n)}}function Uk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vk(){for(var e=window,t=mh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mh(e.document)}return t}function yv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function hR(e){var t=Vk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uk(n.ownerDocument.documentElement,n)){if(r!==null&&yv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=ub(n,o);var a=ub(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fR=Ms&&"documentMode"in document&&11>=document.documentMode,oa=null,mg=null,oc=null,pg=!1;function db(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pg||oa==null||oa!==mh(r)||(r=oa,"selectionStart"in r&&yv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),oc&&Oc(oc,r)||(oc=r,r=bh(mg,"onSelect"),0<r.length&&(t=new mv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=oa)))}function nd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var aa={animationend:nd("Animation","AnimationEnd"),animationiteration:nd("Animation","AnimationIteration"),animationstart:nd("Animation","AnimationStart"),transitionend:nd("Transition","TransitionEnd")},Am={},zk={};Ms&&(zk=document.createElement("div").style,"AnimationEvent"in window||(delete aa.animationend.animation,delete aa.animationiteration.animation,delete aa.animationstart.animation),"TransitionEvent"in window||delete aa.transitionend.transition);function Nf(e){if(Am[e])return Am[e];if(!aa[e])return e;var t=aa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zk)return Am[e]=t[n];return e}var Wk=Nf("animationend"),Gk=Nf("animationiteration"),Hk=Nf("animationstart"),qk=Nf("transitionend"),Kk=new Map,hb="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Yi(e,t){Kk.set(e,t),Bo(t,[e])}for(var Rm=0;Rm<hb.length;Rm++){var _m=hb[Rm],mR=_m.toLowerCase(),pR=_m[0].toUpperCase()+_m.slice(1);
vendor: 5,251 bytes, line 38
38Yi(mR,"on"+pR)}Yi(Wk,"onAnimationEnd");Yi(Gk,"onAnimationIteration");Yi(Hk,"onAnimationStart");Yi("dblclick","onDoubleClick");Yi("focusin","onFocus");Yi("focusout","onBlur");Yi(qk,"onTransitionEnd");Ka("onMouseEnter",["mouseout","mouseover"]);Ka("onMouseLeave",["mouseout","mouseover"]);Ka("onPointerEnter",["pointerout","pointerover"]);Ka("onPointerLeave",["pointerout","pointerover"]);Bo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gR=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jl));function fb(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,m2(r,t,void 0,e),e.currentTarget=null}function Yk(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;fb(s,l,u),o=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;fb(s,l,u),o=c}}}if(gh)throw e=ug,gh=!1,ug=null,e}function kt(e,t){var n=t[wg];n===void 0&&(n=t[wg]=new Set);var r=e+"__bubble";n.has(r)||(Jk(t,e,2,!1),n.add(r))}function Om(e,t,n){var r=0;t&&(r|=4),Jk(n,e,r,t)}var rd="_reactListening"+Math.random().toString(36).slice(2);function Mc(e){if(!e[rd]){e[rd]=!0,rk.forEach(function(n){n!=="selectionchange"&&(gR.has(n)||Om(n,!1,e),Om(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rd]||(t[rd]=!0,Om("selectionchange",!1,t))}}function Jk(e,t,n,r){switch(_k(t)){case 1:var s=I2;break;case 4:s=A2;break;default:s=hv}n=s.bind(null,t,n,e),s=void 0,!cg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Mm(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=go(l),a===null)return;if(c=a.tag,c===5||c===6){r=o=a;continue e}l=l.parentNode}}r=r.return}xk(function(){var u=o,h=lv(n),f=[];e:{var p=Kk.get(e);if(p!==void 0){var d=mv,w=e;switch(e){case"keypress":if(zd(n)===0)break e;case"keydown":case"keyup":d=H2;break;case"focusin":w="focus",d=Tm;break;case"focusout":w="blur",d=Tm;break;case"beforeblur":case"afterblur":d=Tm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=tb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=O2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Y2;break;case Wk:case Gk:case Hk:d=$2;break;case qk:d=Q2;break;case"scroll":d=R2;break;case"wheel":d=Z2;break;case"copy":case"cut":case"paste":d=F2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=rb}var v=(t&4)!==0,x=!v&&e==="scroll",y=v?p!==null?p+"Capture":null:p;v=[];for(var g=u,b;g!==null;){b=g;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=Pc(g,y),S!=null&&v.push(Lc(g,S,b)))),x)break;g=g.return}0<v.length&&(p=new d(p,w,null,n,h),f.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",p&&n!==ag&&(w=n.relatedTarget||n.fromElement)&&(go(w)||w[Ls]))break e;if((d||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,d?(w=n.relatedTarget||n.toElement,d=u,w=w?go(w):null,w!==null&&(x=Uo(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(d=null,w=u),d!==w)){if(v=tb,S="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=rb,S="onPointerLeave",y="onPointerEnter",g="pointer"),x=d==null?p:la(d),b=w==null?p:la(w),p=new v(S,g+"leave",d,n,h),p.target=x,p.relatedTarget=b,S=null,go(h)===u&&(v=new v(y,g+"enter",w,n,h),v.target=b,v.relatedTarget=x,S=v),x=S,d&&w)t:{for(v=d,y=w,g=0,b=v;b;b=Xo(b))g++;for(b=0,S=y;S;S=Xo(S))b++;for(;0<g-b;)v=Xo(v),g--;for(;0<b-g;)y=Xo(y),b--;for(;g--;){if(v===y||y!==null&&v===y.alternate)break t;v=Xo(v),y=Xo(y)}v=null}else v=null;d!==null&&mb(f,p,d,v,!1),w!==null&&x!==null&&mb(f,x,w,v,!0)}}
vendor: 4,437 bytes, lines 38-39
38e:{if(p=u?la(u):window,d=p.nodeName&&p.nodeName.toLowerCase(),d==="select"||d==="input"&&p.type==="file")var j=oR;else if(ob(p))if(Fk)j=uR;else{j=lR;var T=aR}else(d=p.nodeName)&&d.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=cR);if(j&&(j=j(e,u))){Dk(f,j,n,h);break e}T&&T(e,p,u),e==="focusout"&&(T=p._wrapperState)&&T.controlled&&p.type==="number"&&ng(p,"number",p.value)}switch(T=u?la(u):window,e){case"focusin":(ob(T)||T.contentEditable==="true")&&(oa=T,mg=u,oc=null);break;case"focusout":oc=mg=oa=null;break;case"mousedown":pg=!0;break;case"contextmenu":case"mouseup":case"dragend":pg=!1,db(f,n,h);break;case"selectionchange":if(fR)break;case"keydown":case"keyup":db(f,n,h)}var C;if(gv)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else ia?Lk(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Mk&&n.locale!=="ko"&&(ia||E!=="onCompositionStart"?E==="onCompositionEnd"&&ia&&(C=Ok()):(vi=h,fv="value"in vi?vi.value:vi.textContent,ia=!0)),T=bh(u,E),0<T.length&&(E=new nb(E,e,null,n,h),f.push({event:E,listeners:T}),C?E.data=C:(C=$k(n),C!==null&&(E.data=C)))),(C=tR?nR(e,n):rR(e,n))&&(u=bh(u,"onBeforeInput"),0<u.length&&(h=new nb("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:u}),h.data=C))}Yk(f,t)})}function Lc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bh(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Pc(e,n),o!=null&&r.unshift(Lc(e,o,s)),o=Pc(e,t),o!=null&&r.push(Lc(e,o,s))),e=e.return}return r}function Xo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mb(e,t,n,r,s){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Pc(n,o),c!=null&&a.unshift(Lc(n,c,l))):s||(c=Pc(n,o),c!=null&&a.push(Lc(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var yR=/\r\n?/g,vR=/\u0000|\uFFFD/g;function pb(e){return(typeof e=="string"?e:""+e).replace(yR,` 39`).replace(vR,"")}function sd(e,t,n){if(t=pb(t),pb(e)!==t&&n)throw Error(se(425))}function Sh(){}var gg=null,yg=null;function vg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xg=typeof setTimeout=="function"?setTimeout:void 0,xR=typeof clearTimeout=="function"?clearTimeout:void 0,gb=typeof Promise=="function"?Promise:void 0,wR=typeof queueMicrotask=="function"?queueMicrotask:typeof gb<"u"?function(e){return gb.resolve(null).then(e).catch(bR)}:xg;function bR(e){setTimeout(function(){throw e})}function Lm(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Rc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Rc(t)}function Pi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function yb(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var xl=Math.random().toString(36).slice(2),is="__reactFiber$"+xl,$c="__reactProps$"+xl,Ls="__reactContainer$"+xl,wg="__reactEvents$"+xl,SR="__reactListeners$"+xl,jR="__reactHandles$"+xl;function go(e){var t=e[is];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ls]||n[is]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yb(e);e!==null;){if(n=e[is])return n;e=yb(e)}return t}e=n,n=e.parentNode}return null}function vu(e){return e=e[is]||e[Ls],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function la(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(se(33))}function Cf(e){return e[$c]||null}var bg=[],ca=-1;function Ji(e){return{current:e}}function Nt(e){0>ca||(e.current=bg[ca],bg[ca]=null,ca--)}function vt(e,t){ca++,bg[ca]=e.current,e.current=t}var Bi={},jn=Ji(Bi),Kn=Ji(!1),Ro=Bi;function Ya(e,t){var n=e.type.contextTypes;if(!n)return Bi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;
vendor: 14,769 bytes, line 39
39for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Yn(e){return e=e.childContextTypes,e!=null}function jh(){Nt(Kn),Nt(jn)}function vb(e,t,n){if(jn.current!==Bi)throw Error(se(168));vt(jn,t),vt(Kn,n)}function Qk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(se(108,a2(e)||"Unknown",s));return _t({},n,r)}function kh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bi,Ro=jn.current,vt(jn,e),vt(Kn,Kn.current),!0}function xb(e,t,n){var r=e.stateNode;if(!r)throw Error(se(169));n?(e=Qk(e,t,Ro),r.__reactInternalMemoizedMergedChildContext=e,Nt(Kn),Nt(jn),vt(jn,e)):Nt(Kn),vt(Kn,n)}var Es=null,Ef=!1,$m=!1;function Xk(e){Es===null?Es=[e]:Es.push(e)}function kR(e){Ef=!0,Xk(e)}function Qi(){if(!$m&&Es!==null){$m=!0;var e=0,t=ht;try{var n=Es;for(ht=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Es=null,Ef=!1}catch(s){throw Es!==null&&(Es=Es.slice(e+1)),jk(cv,Qi),s}finally{ht=t,$m=!1}}return null}var ua=[],da=0,Nh=null,Ch=0,vr=[],xr=0,_o=null,Ps=1,Is="";function co(e,t){ua[da++]=Ch,ua[da++]=Nh,Nh=e,Ch=t}function Zk(e,t,n){vr[xr++]=Ps,vr[xr++]=Is,vr[xr++]=_o,_o=e;var r=Ps;e=Is;var s=32-Vr(r)-1;r&=~(1<<s),n+=1;var o=32-Vr(t)+s;if(30<o){var a=s-s%5;o=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Ps=1<<32-Vr(t)+s|n<<s|r,Is=o+e}else Ps=1<<o|n<<s|r,Is=e}function vv(e){e.return!==null&&(co(e,1),Zk(e,1,0))}function xv(e){for(;e===Nh;)Nh=ua[--da],ua[da]=null,Ch=ua[--da],ua[da]=null;for(;e===_o;)_o=vr[--xr],vr[xr]=null,Is=vr[--xr],vr[xr]=null,Ps=vr[--xr],vr[xr]=null}var sr=null,nr=null,Et=!1,Lr=null;function eN(e,t){var n=wr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function wb(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,sr=e,nr=Pi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,sr=e,nr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_o!==null?{id:Ps,overflow:Is}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=wr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,sr=e,nr=null,!0):!1;default:return!1}}function Sg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jg(e){if(Et){var t=nr;if(t){var n=t;if(!wb(e,t)){if(Sg(e))throw Error(se(418));t=Pi(n.nextSibling);var r=sr;t&&wb(e,t)?eN(r,n):(e.flags=e.flags&-4097|2,Et=!1,sr=e)}}else{if(Sg(e))throw Error(se(418));e.flags=e.flags&-4097|2,Et=!1,sr=e}}}function bb(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;sr=e}function id(e){if(e!==sr)return!1;if(!Et)return bb(e),Et=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vg(e.type,e.memoizedProps)),t&&(t=nr)){if(Sg(e))throw tN(),Error(se(418));for(;t;)eN(e,t),t=Pi(t.nextSibling)}if(bb(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(se(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){nr=Pi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nr=null}}else nr=sr?Pi(e.stateNode.nextSibling):null;return!0}function tN(){for(var e=nr;e;)e=Pi(e.nextSibling)}function Ja(){nr=sr=null,Et=!1}function wv(e){Lr===null?Lr=[e]:Lr.push(e)}var NR=Gs.ReactCurrentBatchConfig;function Fl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(se(309));var r=n.stateNode}if(!r)throw Error(se(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=s.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(se(284));if(!n._owner)throw Error(se(290,e))}return e}function od(e,t){throw e=Object.prototype.toString.call(t),Error(se(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sb(e){var t=e._init;return t(e._payload)}function nN(e){function t(y,g){if(e){var b=y.deletions;b===null?(y.deletions=[g],y.flags|=16):b.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function s(y,g){return y=_i(y,g),y.index=0,y.sibling=null,y}function o(y,g,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<g?(y.flags|=2,g):b):(y.flags|=2,g)):(y.flags|=1048576,g)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,g,b,S){return g===null||g.tag!==6?(g=Wm(b,y.mode,S),g.return=y,g):(g=s(g,b),g.return=y,g)}function c(y,g,b,S){var j=b.type;return j===sa?h(y,g,b.props.children,S,b.key):g!==null&&(g.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ii&&Sb(j)===g.type)?(S=s(g,b.props),S.ref=Fl(y,g,b),S.return=y,S):(S=Jd(b.type,b.key,b.props,null,y.mode,S),S.ref=Fl(y,g,b),S.return=y,S)}function u(y,g,b,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Gm(b,y.mode,S),g.return=y,g):(g=s(g,b.children||[]),g.return=y,g)}function h(y,g,b,S,j){return g===null||g.tag!==7?(g=To(b,y.mode,S,j),g.return=y,g):(g=s(g,b),g.return=y,g)}function f(y,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Wm(""+g,y.mode,b),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Yu:return b=Jd(g.type,g.key,g.props,null,y.mode,b),b.ref=Fl(y,null,g),b.return=y,b;case ra:return g=Gm(g,y.mode,b),g.return=y,g;case ii:var S=g._init;return f(y,S(g._payload),b)}if(Kl(g)||Ol(g))return g=To(g,y.mode,b,null),g.return=y,g;od(y,g)}return null}function p(y,g,b,S){var j=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(y,g,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Yu:return b.key===j?c(y,g,b,S):null;case ra:return b.key===j?u(y,g,b,S):null;case ii:return j=b._init,p(y,g,j(b._payload),S)}if(Kl(b)||Ol(b))return j!==null?null:h(y,g,b,S,null);od(y,b)}return null}function d(y,g,b,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,l(g,y,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Yu:return y=y.get(S.key===null?b:S.key)||null,c(g,y,S,j);case ra:return y=y.get(S.key===null?b:S.key)||null,u(g,y,S,j);case ii:var T=S._init;return d(y,g,b,T(S._payload),j)}if(Kl(S)||Ol(S))return y=y.get(b)||null,h(g,y,S,j,null);od(g,S)}return null}function w(y,g,b,S){for(var j=null,T=null,C=g,E=g=0,A=null;C!==null&&E<b.length;E++){C.index>E?(A=C,C=null):A=C.sibling;var R=p(y,C,b[E],S);if(R===null){C===null&&(C=A);break}e&&C&&R.alternate===null&&t(y,C),g=o(R,g,E),T===null?j=R:T.sibling=R,T=R,C=A}if(E===b.length)return n(y,C),Et&&co(y,E),j;if(C===null){for(;E<b.length;E++)C=f(y,b[E],S),C!==null&&(g=o(C,g,E),T===null?j=C:T.sibling=C,T=C);return Et&&co(y,E),j}for(C=r(y,C);E<b.length;E++)A=d(C,y,E,b[E],S),A!==null&&(e&&A.alternate!==null&&C.delete(A.key===null?E:A.key),g=o(A,g,E),T===null?j=A:T.sibling=A,T=A);return e&&C.forEach(function(V){return t(y,V)}),Et&&co(y,E),j}function v(y,g,b,S){var j=Ol(b);if(typeof j!="function")throw Error(se(150));if(b=j.call(b),b==null)throw Error(se(151));for(var T=j=null,C=g,E=g=0,A=null,R=b.next();C!==null&&!R.done;E++,R=b.next()){C.index>E?(A=C,C=null):A=C.sibling;var V=p(y,C,R.value,S);if(V===null){C===null&&(C=A);break}e&&C&&V.alternate===null&&t(y,C),g=o(V,g,E),T===null?j=V:T.sibling=V,T=V,C=A}if(R.done)return n(y,C),Et&&co(y,E),j;if(C===null){for(;!R.done;E++,R=b.next())R=f(y,R.value,S),R!==null&&(g=o(R,g,E),T===null?j=R:T.sibling=R,T=R);return Et&&co(y,E),j}for(C=r(y,C);!R.done;E++,R=b.next())R=d(C,y,E,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?E:R.key),g=o(R,g,E),T===null?j=R:T.sibling=R,T=R);return e&&C.forEach(function(D){return t(y,D)}),Et&&co(y,E),j}function x(y,g,b,S){if(typeof b=="object"&&b!==null&&b.type===sa&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Yu:e:{for(var j=b.key,T=g;T!==null;){if(T.key===j){if(j=b.type,j===sa){if(T.tag===7){n(y,T.sibling),g=s(T,b.props.children),g.return=y,y=g;break e}}else if(T.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ii&&Sb(j)===T.type){n(y,T.sibling),g=s(T,b.props),g.ref=Fl(y,T,b),g.return=y,y=g;break e}n(y,T);break}else t(y,T);T=T.sibling}b.type===sa?(g=To(b.props.children,y.mode,S,b.key),g.return=y,y=g):(S=Jd(b.type,b.key,b.props,null,y.mode,S),S.ref=Fl(y,g,b),S.return=y,y=S)}return a(y);case ra:e:{for(T=b.key;g!==null;){if(g.key===T)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(y,g.sibling),g=s(g,b.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=Gm(b,y.mode,S),g.return=y,y=g}return a(y);case ii:return T=b._init,x(y,g,T(b._payload),S)}if(Kl(b))return w(y,g,b,S);if(Ol(b))return v(y,g,b,S);od(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,b),g.return=y,y=g):(n(y,g),g=Wm(b,y.mode,S),g.return=y,y=g),a(y)):n(y,g)}return x}var Qa=nN(!0),rN=nN(!1),Eh=Ji(null),Th=null,ha=null,bv=null;function Sv(){bv=ha=Th=null}function jv(e){var t=Eh.current;Nt(Eh),e._currentValue=t}function kg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ca(e,t){Th=e,bv=ha=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Hn=!0),e.firstContext=null)}function jr(e){var t=e._currentValue;if(bv!==e)if(e={context:e,memoizedValue:t,next:null},ha===null){if(Th===null)throw Error(se(308));ha=e,Th.dependencies={lanes:0,firstContext:e}}else ha=ha.next=e;return t}var yo=null;function kv(e){yo===null?yo=[e]:yo.push(e)}function sN(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,kv(t)):(n.next=s.next,s.next=n),t.interleaved=n,$s(e,r)}function $s(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oi=!1;function Nv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Os(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ii(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ot&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,$s(e,n)}return s=r.interleaved,s===null?(t.next=t,kv(r)):(t.next=s.next,s.next=t),r.interleaved=t,$s(e,n)}function Wd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uv(e,n)}}function jb(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ph(e,t,n,r){var s=e.updateQueue;oi=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==a&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;a=0,h=u=c=null,l=o;do{var p=l.lane,d=l.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:d,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var w=e,v=l;switch(p=t,d=n,v.tag){case 1:if(w=v.payload,typeof w=="function"){f=w.call(d,f,p);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,p=typeof w=="function"?w.call(d,f,p):w,p==null)break e;f=_t({},f,p);break e;case 2:oi=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else d={eventTime:d,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=d,c=f):h=h.next=d,a|=p;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(h===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Mo|=a,e.lanes=a,e.memoizedState=f}}function kb(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(se(191,s));s.call(r)}}}var xu={},us=Ji(xu),Dc=Ji(xu),Fc=Ji(xu);function vo(e){if(e===xu)throw Error(se(174));return e}function Cv(e,t){switch(vt(Fc,t),vt(Dc,e),vt(us,xu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sg(t,e)}Nt(us),vt(us,t)}function Xa(){Nt(us),Nt(Dc),Nt(Fc)}function oN(e){vo(Fc.current);var t=vo(us.current),n=sg(t,e.type);t!==n&&(vt(Dc,e),vt(us,n))}function Ev(e){Dc.current===e&&(Nt(us),Nt(Dc))}var It=Ji(0);function Ih(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dm=[];function Tv(){for(var e=0;e<Dm.length;e++)Dm[e]._workInProgressVersionPrimary=null;Dm.length=0}var Gd=Gs.ReactCurrentDispatcher,Fm=Gs.ReactCurrentBatchConfig,Oo=0,Rt=null,Jt=null,nn=null,Ah=!1,ac=!1,Bc=0,CR=0;function gn(){throw Error(se(321))}function Pv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wr(e[n],t[n]))return!1;return!0}function Iv(e,t,n,r,s,o){if(Oo=o,Rt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gd.current=e===null||e.memoizedState===null?IR:AR,e=n(r,s),ac){o=0;
vendor: 5,761 bytes, line 39
39do{if(ac=!1,Bc=0,25<=o)throw Error(se(301));o+=1,nn=Jt=null,t.updateQueue=null,Gd.current=RR,e=n(r,s)}while(ac)}if(Gd.current=Rh,t=Jt!==null&&Jt.next!==null,Oo=0,nn=Jt=Rt=null,Ah=!1,t)throw Error(se(300));return e}function Av(){var e=Bc!==0;return Bc=0,e}function ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nn===null?Rt.memoizedState=nn=e:nn=nn.next=e,nn}function kr(){if(Jt===null){var e=Rt.alternate;e=e!==null?e.memoizedState:null}else e=Jt.next;var t=nn===null?Rt.memoizedState:nn.next;if(t!==null)nn=t,Jt=e;else{if(e===null)throw Error(se(310));Jt=e,e={memoizedState:Jt.memoizedState,baseState:Jt.baseState,baseQueue:Jt.baseQueue,queue:Jt.queue,next:null},nn===null?Rt.memoizedState=nn=e:nn=nn.next=e}return nn}function Uc(e,t){return typeof t=="function"?t(e):t}function Bm(e){var t=kr(),n=t.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=e;var r=Jt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=a=null,c=null,u=o;do{var h=u.lane;if((Oo&h)===h)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,a=r):c=c.next=f,Rt.lanes|=h,Mo|=h}u=u.next}while(u!==null&&u!==o);c===null?a=r:c.next=l,Wr(r,t.memoizedState)||(Hn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Rt.lanes|=o,Mo|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Um(e){var t=kr(),n=t.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do o=e(o,a.action),a=a.next;while(a!==s);Wr(o,t.memoizedState)||(Hn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function aN(){}function lN(e,t){var n=Rt,r=kr(),s=t(),o=!Wr(r.memoizedState,s);if(o&&(r.memoizedState=s,Hn=!0),r=r.queue,Rv(dN.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||nn!==null&&nn.memoizedState.tag&1){if(n.flags|=2048,Vc(9,uN.bind(null,n,r,s,t),void 0,null),sn===null)throw Error(se(349));Oo&30||cN(n,t,s)}return s}function cN(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Rt.updateQueue,t===null?(t={lastEffect:null,stores:null},Rt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uN(e,t,n,r){t.value=n,t.getSnapshot=r,hN(t)&&fN(e)}function dN(e,t,n){return n(function(){hN(t)&&fN(e)})}function hN(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wr(e,n)}catch{return!0}}function fN(e){var t=$s(e,1);t!==null&&zr(t,e,1,-1)}function Nb(e){var t=ts();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uc,lastRenderedState:e},t.queue=e,e=e.dispatch=PR.bind(null,Rt,e),[t.memoizedState,e]}function Vc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Rt.updateQueue,t===null?(t={lastEffect:null,stores:null},Rt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function mN(){return kr().memoizedState}function Hd(e,t,n,r){var s=ts();Rt.flags|=e,s.memoizedState=Vc(1|t,n,void 0,r===void 0?null:r)}function Tf(e,t,n,r){var s=kr();r=r===void 0?null:r;var o=void 0;if(Jt!==null){var a=Jt.memoizedState;if(o=a.destroy,r!==null&&Pv(r,a.deps)){s.memoizedState=Vc(t,n,o,r);return}}Rt.flags|=e,s.memoizedState=Vc(1|t,n,o,r)}function Cb(e,t){return Hd(8390656,8,e,t)}function Rv(e,t){return Tf(2048,8,e,t)}function pN(e,t){return Tf(4,2,e,t)}function gN(e,t){return Tf(4,4,e,t)}function yN(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vN(e,t,n){return n=n!=null?n.concat([e]):null,Tf(4,4,yN.bind(null,t,e),n)}function _v(){}function xN(e,t){var n=kr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Pv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wN(e,t){var n=kr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Pv(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function bN(e,t,n){return Oo&21?(Wr(n,t)||(n=Ck(),Rt.lanes|=n,Mo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Hn=!0),e.memoizedState=n)}function ER(e,t){var n=ht;ht=n!==0&&4>n?n:4,e(!0);var r=Fm.transition;Fm.transition={};try{e(!1),t()}finally{ht=n,Fm.transition=r}}function SN(){return kr().memoizedState}function TR(e,t,n){var r=Ri(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jN(e))kN(t,n);else if(n=sN(e,t,n,r),n!==null){var s=Rn();zr(n,e,r,s),NN(n,t,r)}}function PR(e,t,n){var r=Ri(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jN(e))kN(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(s.hasEagerState=!0,s.eagerState=l,Wr(l,a)){var c=t.interleaved;c===null?(s.next=s,kv(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=sN(e,t,s,r),n!==null&&(s=Rn(),zr(n,e,r,s),NN(n,t,r))}}function jN(e){var t=e.alternate;return e===Rt||t!==null&&t===Rt}function kN(e,t){ac=Ah=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function NN(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uv(e,n)}}var Rh={readContext:jr,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef
vendor: 5,605 bytes, lines 39-41
39:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},IR={readContext:jr,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:jr,useEffect:Cb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hd(4194308,4,yN.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hd(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hd(4,2,e,t)},useMemo:function(e,t){var n=ts();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ts();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=TR.bind(null,Rt,e),[r.memoizedState,e]},useRef:function(e){var t=ts();return e={current:e},t.memoizedState=e},useState:Nb,useDebugValue:_v,useDeferredValue:function(e){return ts().memoizedState=e},useTransition:function(){var e=Nb(!1),t=e[0];return e=ER.bind(null,e[1]),ts().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rt,s=ts();if(Et){if(n===void 0)throw Error(se(407));n=n()}else{if(n=t(),sn===null)throw Error(se(349));Oo&30||cN(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Cb(dN.bind(null,r,o,e),[e]),r.flags|=2048,Vc(9,uN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ts(),t=sn.identifierPrefix;if(Et){var n=Is,r=Ps;n=(r&~(1<<32-Vr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=CR++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},AR={readContext:jr,useCallback:xN,useContext:jr,useEffect:Rv,useImperativeHandle:vN,useInsertionEffect:pN,useLayoutEffect:gN,useMemo:wN,useReducer:Bm,useRef:mN,useState:function(){return Bm(Uc)},useDebugValue:_v,useDeferredValue:function(e){var t=kr();return bN(t,Jt.memoizedState,e)},useTransition:function(){var e=Bm(Uc)[0],t=kr().memoizedState;return[e,t]},useMutableSource:aN,useSyncExternalStore:lN,useId:SN,unstable_isNewReconciler:!1},RR={readContext:jr,useCallback:xN,useContext:jr,useEffect:Rv,useImperativeHandle:vN,useInsertionEffect:pN,useLayoutEffect:gN,useMemo:wN,useReducer:Um,useRef:mN,useState:function(){return Um(Uc)},useDebugValue:_v,useDeferredValue:function(e){var t=kr();return Jt===null?t.memoizedState=e:bN(t,Jt.memoizedState,e)},useTransition:function(){var e=Um(Uc)[0],t=kr().memoizedState;return[e,t]},useMutableSource:aN,useSyncExternalStore:lN,useId:SN,unstable_isNewReconciler:!1};function Ar(e,t){if(e&&e.defaultProps){t=_t({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ng(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:_t({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Pf={isMounted:function(e){return(e=e._reactInternals)?Uo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rn(),s=Ri(e),o=Os(r,s);o.payload=t,n!=null&&(o.callback=n),t=Ii(e,o,s),t!==null&&(zr(t,e,s,r),Wd(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rn(),s=Ri(e),o=Os(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ii(e,o,s),t!==null&&(zr(t,e,s,r),Wd(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rn(),r=Ri(e),s=Os(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ii(e,s,r),t!==null&&(zr(t,e,r,n),Wd(t,e,r))}};function Eb(e,t,n,r,s,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Oc(n,r)||!Oc(s,o):!0}function CN(e,t,n){var r=!1,s=Bi,o=t.contextType;return typeof o=="object"&&o!==null?o=jr(o):(s=Yn(t)?Ro:jn.current,r=t.contextTypes,o=(r=r!=null)?Ya(e,s):Bi),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Tb(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Pf.enqueueReplaceState(t,t.state,null)}function Cg(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Nv(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=jr(o):(o=Yn(t)?Ro:jn.current,s.context=Ya(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ng(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Pf.enqueueReplaceState(s,s.state,null),Ph(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Za(e,t){try{var n="",r=t;do n+=o2(r),r=r.return;while(r);var s=n}catch(o){s=` 40Error generating stack: `+o.message+` 41`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Vm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Eg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var _R=typeof WeakMap=="function"?WeakMap:Map;function EN(e,t,n){n=Os(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Oh||(Oh=!0,$g=r),Eg(e,t)},n}
vendor: 11,415 bytes, line 41
41function TN(e,t,n){n=Os(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Eg(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Eg(e,t),typeof r!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Pb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new _R;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=qR.bind(null,e,t,n),t.then(e,e))}function Ib(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ab(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Os(-1,1),t.tag=2,Ii(n,t,1))),n.lanes|=1),e)}var OR=Gs.ReactCurrentOwner,Hn=!1;function En(e,t,n,r){t.child=e===null?rN(t,null,n,r):Qa(t,e.child,n,r)}function Rb(e,t,n,r,s){n=n.render;var o=t.ref;return Ca(t,s),r=Iv(e,t,n,r,o,s),n=Av(),e!==null&&!Hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ds(e,t,s)):(Et&&n&&vv(t),t.flags|=1,En(e,t,r,s),t.child)}function _b(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Uv(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,PN(e,t,o,r,s)):(e=Jd(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Oc,n(a,r)&&e.ref===t.ref)return Ds(e,t,s)}return t.flags|=1,e=_i(o,r),e.ref=t.ref,e.return=t,t.child=e}function PN(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Oc(o,r)&&e.ref===t.ref)if(Hn=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Hn=!0);else return t.lanes=e.lanes,Ds(e,t,s)}return Tg(e,t,n,r,s)}function IN(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(ma,er),er|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,vt(ma,er),er|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,vt(ma,er),er|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,vt(ma,er),er|=r;return En(e,t,s,n),t.child}function AN(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tg(e,t,n,r,s){var o=Yn(n)?Ro:jn.current;return o=Ya(t,o),Ca(t,s),n=Iv(e,t,n,r,o,s),r=Av(),e!==null&&!Hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ds(e,t,s)):(Et&&r&&vv(t),t.flags|=1,En(e,t,n,s),t.child)}function Ob(e,t,n,r,s){if(Yn(n)){var o=!0;kh(t)}else o=!1;if(Ca(t,s),t.stateNode===null)qd(e,t),CN(t,n,r),Cg(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=jr(u):(u=Yn(n)?Ro:jn.current,u=Ya(t,u));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||c!==u)&&Tb(t,a,r,u),oi=!1;var p=t.memoizedState;a.state=p,Ph(t,r,a,s),c=t.memoizedState,l!==r||p!==c||Kn.current||oi?(typeof h=="function"&&(Ng(t,n,h,r),c=t.memoizedState),(l=oi||Eb(t,n,l,r,p,c,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,iN(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ar(t.type,l),a.props=u,f=t.pendingProps,p=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=jr(c):(c=Yn(n)?Ro:jn.current,c=Ya(t,c));var d=n.getDerivedStateFromProps;(h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||p!==c)&&Tb(t,a,r,c),oi=!1,p=t.memoizedState,a.state=p,Ph(t,r,a,s);var w=t.memoizedState;l!==f||p!==w||Kn.current||oi?(typeof d=="function"&&(Ng(t,n,d,r),w=t.memoizedState),(u=oi||Eb(t,n,u,r,p,w,c)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,w,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,w,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),a.props=r,a.state=w,a.context=c,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Pg(e,t,n,r,o,s)}function Pg(e,t,n,r,s,o){AN(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&xb(t,n,!1),Ds(e,t,o);r=t.stateNode,OR.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Qa(t,e.child,null,o),t.child=Qa(t,null,l,o)):En(e,t,l,o),t.memoizedState=r.state,s&&xb(t,n,!0),t.child}function RN(e){var t=e.stateNode;t.pendingContext?vb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vb(e,t.context,!1),Cv(e,t.containerInfo)}function Mb(e,t,n,r,s){return Ja(),wv(s),t.flags|=256,En(e,t,n,r),t.child}var Ig={dehydrated:null,treeContext:null,retryLane:0};function Ag(e){return{baseLanes:e,cachePool:null,transitions:null}}function _N(e,t,n){var r=t.pendingProps,s=It.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),vt(It,s&1),e===null)return jg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Rf(a,r,0,null),e=To(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ag(n),t.memoizedState=Ig,e):Ov(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return MR(e,t,a,r,l,s,n);if(o){o=r.fallback,a=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=_i(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=_i(l,o):(o=To(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Ag(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=Ig,r}return o=e.child,e=o.sibling,r=_i(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ov(e,t){return t=Rf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ad(e,t,n,r){return r!==null&&wv(r),Qa(t,e.child,null,n),e=Ov(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function MR(e,t,n,r,s,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Vm(Error(se(422))),ad(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Rf({mode:"visible",children:r.children},s,0,null),o=To(o,s,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Qa(t,e.child,null,a),t.child.memoizedState=Ag(a),t.memoizedState=Ig,o);if(!(t.mode&1))return ad(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(se(419)),r=Vm(o,r,void 0),ad(e,t,a,r)}if(l=(a&e.childLanes)!==0,Hn||l){if(r=sn,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,$s(e,s),zr(r,e,s,-1))}return Bv(),r=Vm(Error(se(421))),ad(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=KR.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,nr=Pi(s.nextSibling),sr=t,Et=!0,Lr=null,e!==null&&(vr[xr++]=Ps,vr[xr++]=Is,vr[xr++]=_o,Ps=e.id,Is=e.overflow,_o=t),t=Ov(t,r.children),t.flags|=4096,t)}function Lb(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),kg(e.return,t,n)}function zm(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function ON(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(En(e,t,r.children,n),r=It.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lb(e,n,t);else if(e.tag===19)Lb(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(vt(It,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Ih(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),zm(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ih(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}zm(t,!0,n,null,o);break;case"together":zm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ds(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Mo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(se(153));if(t.child!==null){for(e=t.child,n=_i(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_i(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function LR(e,t,n){switch(t.tag){case 3:RN(t),Ja();break;case 5:oN(t);break;case 1:Yn(t.type)&&kh(t);break;case 4:Cv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;vt(Eh,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(vt(It,It.current&1),t.flags|=128,null):n&t.child.childLanes?_N(e,t,n
vendor: 4,075 bytes, line 41
41):(vt(It,It.current&1),e=Ds(e,t,n),e!==null?e.sibling:null);vt(It,It.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ON(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),vt(It,It.current),r)break;return null;case 22:case 23:return t.lanes=0,IN(e,t,n)}return Ds(e,t,n)}var MN,Rg,LN,$N;MN=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rg=function(){};LN=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,vo(us.current);var o=null;switch(n){case"input":s=eg(e,s),r=eg(e,r),o=[];break;case"select":s=_t({},s,{value:void 0}),r=_t({},r,{value:void 0}),o=[];break;case"textarea":s=rg(e,s),r=rg(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Sh)}ig(n,r);var a;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ec.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ec.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&kt("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};$N=function(e,t,n,r){n!==r&&(t.flags|=4)};function Bl(e,t){if(!Et)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $R(e,t,n){var r=t.pendingProps;switch(xv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(t),null;case 1:return Yn(t.type)&&jh(),yn(t),null;case 3:return r=t.stateNode,Xa(),Nt(Kn),Nt(jn),Tv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(id(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Lr!==null&&(Bg(Lr),Lr=null))),Rg(e,t),yn(t),null;case 5:Ev(t);var s=vo(Fc.current);if(n=t.type,e!==null&&t.stateNode!=null)LN(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(se(166));return yn(t),null}if(e=vo(us.current),id(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[is]=t,r[$c]=o,e=(t.mode&1)!==0,n){case"dialog":kt("cancel",r),kt("close",r);break;case"iframe":case"object":case"embed":kt("load",r);break;case"video":case"audio":for(s=0;s<Jl.length;s++)kt(Jl[s],r);break;case"source":kt("error",r);break;case"img":case"image":case"link":kt("error",r),kt("load",r);break;case"details":kt("toggle",r);break;case"input":Gw(r,o),kt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},kt("invalid",r);break;
vendor: 29,092 bytes, line 41
41case"textarea":qw(r,o),kt("invalid",r)}ig(n,o),s=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&sd(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&sd(r.textContent,l,e),s=["children",""+l]):Ec.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&kt("scroll",r)}switch(n){case"input":Ju(r),Hw(r,o,!0);break;case"textarea":Ju(r),Kw(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Sh)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dk(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[is]=t,e[$c]=r,MN(e,t,!1,!1),t.stateNode=e;e:{switch(a=og(n,r),n){case"dialog":kt("cancel",e),kt("close",e),s=r;break;case"iframe":case"object":case"embed":kt("load",e),s=r;break;case"video":case"audio":for(s=0;s<Jl.length;s++)kt(Jl[s],e);s=r;break;case"source":kt("error",e),s=r;break;case"img":case"image":case"link":kt("error",e),kt("load",e),s=r;break;case"details":kt("toggle",e),s=r;break;case"input":Gw(e,r),s=eg(e,r),kt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=_t({},r,{value:void 0}),kt("invalid",e);break;case"textarea":qw(e,r),s=rg(e,r),kt("invalid",e);break;default:s=r}ig(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?mk(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&hk(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Tc(e,c):typeof c=="number"&&Tc(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ec.hasOwnProperty(o)?c!=null&&o==="onScroll"&&kt("scroll",e):c!=null&&sv(e,o,c,a))}switch(n){case"input":Ju(e),Hw(e,r,!1);break;case"textarea":Ju(e),Kw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Fi(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Sa(e,!!r.multiple,o,!1):r.defaultValue!=null&&Sa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Sh)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yn(t),null;case 6:if(e&&t.stateNode!=null)$N(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(se(166));if(n=vo(Fc.current),vo(us.current),id(t)){if(r=t.stateNode,n=t.memoizedProps,r[is]=t,(o=r.nodeValue!==n)&&(e=sr,e!==null))switch(e.tag){case 3:sd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&sd(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[is]=t,t.stateNode=r}return yn(t),null;case 13:if(Nt(It),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Et&&nr!==null&&t.mode&1&&!(t.flags&128))tN(),Ja(),t.flags|=98560,o=!1;else if(o=id(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(se(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(se(317));o[is]=t}else Ja(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yn(t),o=!1}else Lr!==null&&(Bg(Lr),Lr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||It.current&1?Xt===0&&(Xt=3):Bv())),t.updateQueue!==null&&(t.flags|=4),yn(t),null);case 4:return Xa(),Rg(e,t),e===null&&Mc(t.stateNode.containerInfo),yn(t),null;case 10:return jv(t.type._context),yn(t),null;case 17:return Yn(t.type)&&jh(),yn(t),null;case 19:if(Nt(It),o=t.memoizedState,o===null)return yn(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Bl(o,!1);else{if(Xt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Ih(e),a!==null){for(t.flags|=128,Bl(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return vt(It,It.current&1|2),t.child}e=e.sibling}o.tail!==null&&$t()>el&&(t.flags|=128,r=!0,Bl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ih(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Et)return yn(t),null}else 2*$t()-o.renderingStartTime>el&&n!==1073741824&&(t.flags|=128,r=!0,Bl(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=$t(),t.sibling=null,n=It.current,vt(It,r?n&1|2:n&1),t):(yn(t),null);case 22:case 23:return Fv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?er&1073741824&&(yn(t),t.subtreeFlags&6&&(t.flags|=8192)):yn(t),null;case 24:return null;case 25:return null}throw Error(se(156,t.tag))}function DR(e,t){switch(xv(t),t.tag){case 1:return Yn(t.type)&&jh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xa(),Nt(Kn),Nt(jn),Tv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ev(t),null;case 13:if(Nt(It),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(se(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(It),null;case 4:return Xa(),null;case 10:return jv(t.type._context),null;case 22:case 23:return Fv(),null;case 24:return null;default:return null}}var ld=!1,xn=!1,FR=typeof WeakSet=="function"?WeakSet:Set,we=null;function fa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Lt(e,t,r)}else n.current=null}function _g(e,t,n){try{n()}catch(r){Lt(e,t,r)}}var $b=!1;function BR(e,t){if(gg=xh,e=Vk(),yv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,h=0,f=e,p=null;t:for(;;){for(var d;f!==n||s!==0&&f.nodeType!==3||(l=a+s),f!==o||r!==0&&f.nodeType!==3||(c=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(d=f.firstChild)!==null;)p=f,f=d;for(;;){if(f===e)break t;if(p===n&&++u===s&&(l=a),p===o&&++h===r&&(c=a),(d=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=d}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(yg={focusedElem:e,selectionRange:n},xh=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,x=w.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ar(t.type,v),x);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(S){Lt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return w=$b,$b=!1,w}function lc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&_g(t,n,o)}s=s.next}while(s!==r)}}function If(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Og(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function DN(e){var t=e.alternate;t!==null&&(e.alternate=null,DN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[is],delete t[$c],delete t[wg],delete t[SR],delete t[jR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function FN(e){return e.tag===5||e.tag===3||e.tag===4}function Db(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Sh));else if(r!==4&&(e=e.child,e!==null))for(Mg(e,t,n),e=e.sibling;e!==null;)Mg(e,t,n),e=e.sibling}function Lg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lg(e,t,n),e=e.sibling;e!==null;)Lg(e,t,n),e=e.sibling}var on=null,Mr=!1;function Qs(e,t,n){for(n=n.child;n!==null;)BN(e,t,n),n=n.sibling}function BN(e,t,n){if(cs&&typeof cs.onCommitFiberUnmount=="function")try{cs.onCommitFiberUnmount(Sf,n)}catch{}switch(n.tag){case 5:xn||fa(n,t);case 6:var r=on,s=Mr;on=null,Qs(e,t,n),on=r,Mr=s,on!==null&&(Mr?(e=on,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):on.removeChild(n.stateNode));break;case 18:on!==null&&(Mr?(e=on,n=n.stateNode,e.nodeType===8?Lm(e.parentNode,n):e.nodeType===1&&Lm(e,n),Rc(e)):Lm(on,n.stateNode));break;case 4:r=on,s=Mr,on=n.stateNode.containerInfo,Mr=!0,Qs(e,t,n),on=r,Mr=s;break;case 0:case 11:case 14:case 15:if(!xn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&_g(n,t,a),s=s.next}while(s!==r)}Qs(e,t,n);break;case 1:if(!xn&&(fa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Lt(n,t,l)}Qs(e,t,n);break;case 21:Qs(e,t,n);break;case 22:n.mode&1?(xn=(r=xn)||n.memoizedState!==null,Qs(e,t,n),xn=r):Qs(e,t,n);break;default:Qs(e,t,n)}}function Fb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new FR),t.forEach(function(r){var s=YR.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Er(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:on=l.stateNode,Mr=!1;break e;case 3:on=l.stateNode.containerInfo,Mr=!0;break e;case 4:on=l.stateNode.containerInfo,Mr=!0;break e}l=l.return}if(on===null)throw Error(se(160));BN(o,a,s),on=null,Mr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Lt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)UN(t,e),t=t.sibling}function UN(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Er(t,e),es(e),r&4){try{lc(3,e,e.return),If(3,e)}catch(v){Lt(e,e.return,v)}try{lc(5,e,e.return)}catch(v){Lt(e,e.return,v)}}break;case 1:Er(t,e),es(e),r&512&&n!==null&&fa(n,n.return);break;case 5:if(Er(t,e),es(e),r&512&&n!==null&&fa(n,n.return),e.flags&32){var s=e.stateNode;try{Tc(s,"")}catch(v){Lt(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&ck(s,o),og(l,a);var u=og(l,o);for(a=0;a<c.length;a+=2){var h=c[a],f=c[a+1];h==="style"?mk(s,f):h==="dangerouslySetInnerHTML"?hk(s,f):h==="children"?Tc(s,f):sv(s,h,f,u)}switch(l){case"input":tg(s,o);break;case"textarea":uk(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?Sa(s,!!o.multiple,d,!1):p!==!!o.multiple&&(o.defaultValue!=null?Sa(s,!!o.multiple,o.defaultValue,!0):Sa(s,!!o.multiple,o.multiple?[]:"",!1))}s[$c]=o}catch(v){Lt(e,e.return,v)}}break;case 6:if(Er(t,e),es(e),r&4){if(e.stateNode===null)throw Error(se(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){Lt(e,e.return,v)}}break;case 3:if(Er(t,e),es(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rc(t.containerInfo)}catch(v){Lt(e,e.return,v)}break;case 4:Er(t,e),es(e);break;case 13:Er(t,e),es(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||($v=$t())),r&4&&Fb(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(xn=(u=xn)||h,Er(t,e),xn=u):Er(t,e),es(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&e.mode&1)for(we=e,h=e.child;h!==null;){for(f=we=h;we!==null;){switch(p=we,d=p.child,p.tag){case 0:case 11:case 14:case 15:lc(4,p,p.return);break;case 1:fa(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){Lt(r,n,v)}}break;case 5:fa(p,p.return);break;case 22:if(p.memoizedState!==null){Ub(f);continue}}d!==null?(d.return=p,we=d):Ub(f)}h=h.sibling}e:for(h=null,f=e;;){if(f.tag===5){if(h===null){h=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=fk("display",a))}catch(v){Lt(e,e.return,v)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){Lt(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Er(t,e),es(e),r&4&&Fb(e);break;case 21:break;default:Er(t,e),es(e)}}function es(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(FN(n)){var r=n;break e}n=n.return}throw Error(se(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Tc(s,""),r.flags&=-33);var o=Db(e);Lg(e,o,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Db(e);Mg(e,l,a);break;default:throw Error(se(161))}}catch(c){Lt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function UR(e,t,n){we=e,VN(e)}function VN(e,t,n){for(var r=(e.mode&1)!==0;we!==null;){var s=we,o=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||ld;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||xn;l=ld;var u=xn;if(ld=a,(xn=c)&&!u)for(we=s;we!==null;)a=we,c=a.child,a.tag===22&&a.memoizedState!==null?Vb(s):c!==null?(c.return=a,we=c):Vb(s);for(;o!==null;)we=o,VN(o),o=o.sibling;we=s,ld=l,xn=u}Bb(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,we=o):Bb(e)}}function Bb(e){for(;we!==null;){var t=we;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xn||If(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!xn)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Ar(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&kb(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}kb(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&Rc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(se(163))}xn||t.flags&512&&Og(t)}catch(p){Lt(t,t.return,p)}}if(t===e){we=null;break}if(n=t.sibling,n!==null){n.return=t.return,we=n;break}we=t.return}}function Ub(e){for(;we!==null;){var t=we;if(t===e){we=null;break}var n=t.sibling;if(n!==null){n.return=t.return,we=n;break}we=t.return}}function Vb(e){for(;we!==null;){var t=we;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{If(4,t)}catch(c){Lt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Lt(t,s,c)}}var o=t.return;try{Og(t)}catch(c){Lt(t,o,c)}break;case 5:var a=t.return;try{Og(t)}catch(c){Lt(t,a,c)}}}catch(c){Lt(t,t.return,c)}if(t===e){we=null;break}var l=t.sibling;if(l!==null){l.return=t.return,we=l;break}we=t.return}}var VR=Math.ceil,_h=Gs.ReactCurrentDispatcher,Mv=Gs.ReactCurrentOwner,Sr=Gs.ReactCurrentBatchConfig,ot=0,sn=null,Wt=null,ln=0,er=0,ma=Ji(0),Xt=0,zc=null,Mo=0,Af=0,Lv=0,cc=null,zn=null,$v=0,el=1/0,Cs=null,Oh=!1,$g=null,Ai=null,cd=!1,xi=null,Mh=0,uc=0,Dg=null,Kd=-1,Yd=0;function Rn(){return ot&6?$t():Kd!==-1?Kd:Kd=$t()}function Ri(e){return e.mode&1?ot&2&&ln!==0?ln&-ln:NR.transition!==null?(Yd===0&&(Yd=Ck()),Yd):(e=ht,e!==0||(e=window.event,e=e===void 0?16:_k(e.type)),e):1}function zr(e,t,n,r){if(50<uc)throw uc=0,Dg=null,Error(se(185));gu(e,n,r),(!(ot&2)||e!==sn)&&(e===sn&&(!(ot&2)&&(Af|=n),Xt===4&&li(e,ln)),Jn(e,r),n===1&&ot===0&&!(t.mode&1)&&(el=$t()+500,Ef&&Qi()))}function Jn(e,t){var n=e.callbackNode;N2(e,t);var r=vh(e,e===sn?ln:0);if(r===0)n!==null&&Qw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Qw(n),t===1)e.tag===0?kR(zb.bind(null,e)):Xk(zb.bind(null,e)),wR(function(){!(ot&6)&&Qi()}),n=null;else{switch(Ek(r)){case 1:n=cv;break;case 4:n=kk;break;case 16:n=yh;break;case 536870912:n=Nk;break;default:n=yh}n=JN(n,zN.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zN(e,t){if(Kd=-1,Yd=0,ot&6)throw Error(se(327));var n=e.callbackNode;if(Ea()&&e.callbackNode!==n)return null;var r=vh(e,e===sn?ln:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Lh(e,r);else{t=r;var s=ot;ot|=2;var o=GN();(sn!==e||ln!==t)&&(Cs=null,el=$t()+500,Eo(e,t));do try{GR();break}catch(l){WN(e,l)}while(!0);Sv(),_h.current=o,ot=s,Wt!==null?t=0:(sn=null,ln=0,t=Xt)}if(t!==0){if(t===2&&(s=dg(e),s!==0&&(r=s,t=Fg(e,s))),t===1)throw n=zc,Eo(e,0),li(e,r),Jn(e,$t()),n;if(t===6)li(e,r);else{if(s=e.current.alternate,!(r&30)&&!zR(s)&&(t=Lh(e,r),t===2&&(o=dg(e),o!==0&&(r=o,t=Fg(e,o))),t===1))throw n=zc,Eo(e,0),li(e,r),Jn(e,$t()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(se(345));case 2:uo(e,zn,Cs);break;case 3:if(li(e,r),(r&130023424)===r&&(t=$v+500-$t(),10<t)){if(vh(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Rn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=xg(uo.bind(null,e,zn,Cs),t);break}uo(e,zn,Cs);break;case 4:if(li(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-Vr(r);o=1<<a,a=t[a],a>s&&(s=a),r&=~o}if(r=s,r=$t()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*VR(r/1960))-r,10<r){e.timeoutHandle=xg(uo.bind(null,e,zn,Cs),r);break}uo(e,zn,Cs);break;case 5:uo(e,zn,Cs);break;default:throw Error(se(329))}}}return Jn(e,$t()),e.callbackNode===n?zN.bind(null,e):null}function Fg(e,t){var n=cc;return e.current.memoizedState.isDehydrated&&(Eo(e,t).flags|=256),e=Lh(e,t),e!==2&&(t=zn,zn=n,t!==null&&Bg(t)),e}function Bg(e){zn===null?zn=e:zn.push.apply(zn,e)}function zR(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Wr(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function li(e,t){for(t&=~Lv,t&=~Af,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vr(t),r=1<<n;e[n]=-1,t&=~r}}function zb(e){if(ot&6)throw Error(se(327));Ea();var t=vh(e,0);if(!(t&1))return Jn(e,$t()),null;var n=Lh(e,t);if(e.tag!==0&&n===2){var r=dg(e);r!==0&&(t=r,n=Fg(e,r))}if(n===1)throw n=zc,Eo(e,0),li(e,t),Jn(e,$t()),n;if(n===6)throw Error(se(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,uo(e,zn,Cs),Jn(e,$t()),null}function Dv(e,t){var n=ot;ot|=1;try{return e(t)}finally{ot=n,ot===0&&(el=$t()+500,Ef&&Qi())}}function Lo(e){xi!==null&&xi.tag===0&&!(ot&6)&&Ea();var t=ot;ot|=1;var n=Sr.transition,r=ht;try{if(Sr.transition=null,ht=1,e)return e()}finally{ht=r,Sr.transition=n,ot=t,!(ot&6)&&Qi()}}function Fv(){er=ma.current,Nt(ma)}function Eo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xR(n)),Wt!==null)for(n=Wt.return;n!==null;){var r=n;switch(xv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&jh();break;case 3:Xa(),Nt(Kn),Nt(jn),Tv();break;case 5:Ev(r);break;case 4:Xa();break;case 13:Nt(It);break;case 19:Nt(It);break;case 10:jv(r.type._context);break;case 22:case 23:Fv()}n=n.return}if(sn=e,Wt=e=_i(e.current,null),ln=er=t,Xt=0,zc=null,Lv=Af=Mo=0,zn=cc=null,yo!==null){for(t=0;t<yo.length;t++)if(n=yo[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=s,r.next=a}n.pending=r}yo=null}return e}function WN(e,t){do{var n=Wt;try{if(Sv(),Gd.current=Rh,Ah){for(var r=Rt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ah=!1}if(Oo=0,nn=Jt=Rt=null,ac=!1,Bc=0,Mv.current=null,n===null||n.return===null){Xt=1,zc=t,Wt=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=ln,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,h=l,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var d=Ib(a);if(d!==null){d.flags&=-257,Ab(d,a,l,o,t),d.mode&1&&Pb(o,u,t),t=d,c=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(c),t.updateQueue=v}else w.add(c);break e}else{if(!(t&1)){Pb(o,u,t),Bv();break e}c=Error(se(426))}}else if(Et&&l.mode&1){var x=Ib(a);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Ab(x,a,l,o,t),wv(Za(c,l));break e}}o=c=Za(c,l),Xt!==4&&(Xt=2),cc===null?cc=[o]:cc.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=EN(o,c,t);jb(o,y);break e;case 1:l=c;var g=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ai===null||!Ai.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=TN(o,l,t);jb(o,S);break e}}o=o.return}while(o!==null)}qN(n)}catch(j){t=j,Wt===n&&n!==null&&(Wt=n=n.return);continue}break}while(!0)}function GN(){var e=_h.current;return _h.current=Rh,e===null?Rh:e}function Bv(){(Xt===0||Xt===3||Xt===2)&&(Xt=4),sn===null||!(Mo&268435455)&&!(Af&268435455)||li(sn,ln)}function Lh(e,t){var n=ot;ot|=2;var r=GN();(sn!==e||ln!==t)&&(Cs=null,Eo(e,t));do try{WR();break}catch(s){WN(e,s)}while(!0);if(Sv(),ot=n,_h.current=r,Wt!==null)throw Error(se(261));return sn=null,ln=0,Xt}function WR(){for(;Wt!==null;)HN(Wt)}function GR(){for(;Wt!==null&&!g2();)HN(Wt)}function HN(e){var t=YN(e.alternate,e,er);e.memoizedProps=e.pendingProps,t===null?qN(e):Wt=t,Mv.current=null}function qN(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=DR(n,t),n!==null){n.flags&=32767,Wt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xt=6,Wt=null;return}}else if(n=$R(n,t,er),n!==null){Wt=n;return}if(t=t.sibling,t!==null){Wt=t;return}Wt=t=e}while(t!==null);Xt===0&&(Xt=5)}function uo(e,t,n){var r=ht,s=Sr.transition;try{Sr.transition=null,ht=1,HR(e,t,n,r)}finally{Sr.transition=s,ht=r}return null}function HR(e,t,n,r){do Ea();while(xi!==null);if(ot&6)throw Error(se(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(se(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(C2(e,o),e===sn&&(Wt=sn=null,ln=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cd||(cd=!0,JN(yh,function(){return Ea(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Sr.transition,Sr.transition=null;var a=ht;ht=1;var l=ot;ot|=4,Mv.current=null,BR(e,n),UN(n,e),hR(yg),xh=!!gg,yg=gg=null,e.current=n,UR(n),y2(),ot=l,ht=a,Sr.transition=o}else e.current=n;if(cd&&(cd=!1,xi=e,Mh=s),o=e.pendingLanes,o===0&&(Ai=null),w2(n.stateNode),Jn(e,$t()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Oh)throw Oh=!1,e=$g,$g=null,e;return Mh&1&&e.tag!==0&&Ea(),o=e.pendingLanes,o&1?e===Dg?uc++:(uc=0,Dg=e):uc=0,Qi(),null}function Ea(){if(xi!==null){var e=Ek(Mh),t=Sr.transition,n=ht;try{if(Sr.transition=null,ht=16>e?16:e,xi===null)var r=!1;else{if(e=xi,xi=null,Mh=0,ot&6)throw Error(se(331));var s=ot;for(ot|=4,we=e.current;we!==null;){var o=we,a=o.child;if(we.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(we=u;we!==null;){var h=we;switch(h.tag){case 0:case 11:case 15:lc(8,h,o)}var f=h.child;if(f!==null)f.return=h,we=f;else for(;we!==null;){h=we;var p=h.sibling,d=h.return;if(DN(h),h===u){we=null;break}if(p!==null){p.return=d,we=p;break}we=d}}}var w=o.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}we=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,we=a;else e:for(;we!==null;){if(o=we,o.flags&2048)switch(o.tag){case 0:case 11:case 15:lc(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,we=y;break e}we=o.return}}var g=e.current;for(we=g;we!==null;){a=we;var b=a.child;if(a.subtreeFlags&2064&&b!==null)b.return=a,we=b;else e:for(a=g;we!==null;){if(l=we,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:If(9,l)}}catch(j){Lt(l,l.return,j)}if(l===a){we=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,we=S;break e}we=l.return}}if(ot=s,Qi(),cs&&typeof cs.onPostCommitFiberRoot=="function")try{cs.onPostCommitFiberRoot(Sf,e)}catch{}r=!0}return r}finally{ht=n,Sr.transition=t}}return!1}function Wb(e,t,n){t=Za(n,t),t=EN(e,t,1),e=Ii(e,t,1),t=Rn(),e!==null&&(gu(e,1,t),Jn(e,t))}function Lt(e,t,n){if(e.tag===3)Wb(e,e,n);else for(;t!==null;){if(t.tag===3){Wb(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ai===null||!Ai.has(r))){e=Za(n,e),e=TN(t,e,1),t=Ii(t,e,1),e=Rn(),t!==null&&(gu(t,1,e),Jn(t,e));break}}t=t.return}}function qR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rn(),e.pingedLanes|=e.suspendedLanes&n,sn===e&&(ln&n)===n&&(Xt===4||Xt===3&&(ln&130023424)===ln&&500>$t()-$v?Eo(e,0):Lv|=n),Jn(e,t)}function KN(e,t){t===0&&(e.mode&1?(t=Zu,Zu<<=1,!(Zu&130023424)&&(Zu=4194304)):t=1);var n=Rn();e=$s(e,t),e!==null&&(gu(e,t,n),Jn(e,n))}function KR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KN(e,n)}function YR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(se(314))}r!==null&&r.delete(t),KN(e,n)}var YN;YN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)Hn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Hn=!1,LR(e,t,n);Hn=!!(e.flags&131072)}else Hn=!1,Et&&t.flags&1048576&&Zk(t,Ch,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qd(e,t),e=t.pendingProps;var s=Ya(t,jn.current);Ca(t,n),s=Iv(null,t,r,e,s,n);var o=Av();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Yn(r)?(o=!0,kh(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Nv(t),s.updater=Pf,t.stateNode=s,s._reactInternals=t,Cg(t,r,e,n),t=Pg(null,t,r,!0,o,n)):(t.tag=0,Et&&o&&vv(t),En(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=QR(r),e=Ar(r,e),s){case 0:t=Tg(null,t,r,e,n);break e;case 1:t=Ob(null,t,r,e,n);break e;case 11:t=Rb(null,t,r,e,n);break e;case 14:t=_b(null,t,r,Ar(r.type,e),n);break e}throw Error(se(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ar(r,s),Tg(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ar(r,s),Ob(e,t,r,s,n);case 3:e:{if(RN(t),e===null)throw Error(se(387));
vendor: 4,111 bytes, line 41
41r=t.pendingProps,o=t.memoizedState,s=o.element,iN(e,t),Ph(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Za(Error(se(423)),t),t=Mb(e,t,r,n,s);break e}else if(r!==s){s=Za(Error(se(424)),t),t=Mb(e,t,r,n,s);break e}else for(nr=Pi(t.stateNode.containerInfo.firstChild),sr=t,Et=!0,Lr=null,n=rN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ja(),r===s){t=Ds(e,t,n);break e}En(e,t,r,n)}t=t.child}return t;case 5:return oN(t),e===null&&jg(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,a=s.children,vg(r,s)?a=null:o!==null&&vg(r,o)&&(t.flags|=32),AN(e,t),En(e,t,a,n),t.child;case 6:return e===null&&jg(t),null;case 13:return _N(e,t,n);case 4:return Cv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):En(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ar(r,s),Rb(e,t,r,s,n);case 7:return En(e,t,t.pendingProps,n),t.child;case 8:return En(e,t,t.pendingProps.children,n),t.child;case 12:return En(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,vt(Eh,r._currentValue),r._currentValue=a,o!==null)if(Wr(o.value,a)){if(o.children===s.children&&!Kn.current){t=Ds(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Os(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),kg(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(se(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),kg(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}En(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ca(t,n),s=jr(s),r=r(s),t.flags|=1,En(e,t,r,n),t.child;case 14:return r=t.type,s=Ar(r,t.pendingProps),s=Ar(r.type,s),_b(e,t,r,s,n);case 15:return PN(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ar(r,s),qd(e,t),t.tag=1,Yn(r)?(e=!0,kh(t)):e=!1,Ca(t,n),CN(t,r,s),Cg(t,r,s,n),Pg(null,t,r,!0,e,n);case 19:return ON(e,t,n);case 22:return IN(e,t,n)}throw Error(se(156,t.tag))};function JN(e,t){return jk(e,t)}function JR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wr(e,t,n,r){return new JR(e,t,n,r)}function Uv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QR(e){if(typeof e=="function")return Uv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ov)return 11;if(e===av)return 14}return 2}function _i(e,t){var n=e.alternate;return n===null?(n=wr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jd(e,t,n,r,s,o){var a=2;if(r=e,typeof e=="function")Uv(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case sa:return To(n.children,s,o,t);case iv:a=8,s|=8;break;case Jp:return e=wr(12,n,t,s|2),e.elementType=Jp,e.lanes=o,e;
vendor: 4,236 bytes, line 41
41case Qp:return e=wr(13,n,t,s),e.elementType=Qp,e.lanes=o,e;case Xp:return e=wr(19,n,t,s),e.elementType=Xp,e.lanes=o,e;case ok:return Rf(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sk:a=10;break e;case ik:a=9;break e;case ov:a=11;break e;case av:a=14;break e;case ii:a=16,r=null;break e}throw Error(se(130,e==null?e:typeof e,""))}return t=wr(a,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function To(e,t,n,r){return e=wr(7,e,r,t),e.lanes=n,e}function Rf(e,t,n,r){return e=wr(22,e,r,t),e.elementType=ok,e.lanes=n,e.stateNode={isHidden:!1},e}function Wm(e,t,n){return e=wr(6,e,null,t),e.lanes=n,e}function Gm(e,t,n){return t=wr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XR(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nm(0),this.expirationTimes=Nm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Vv(e,t,n,r,s,o,a,l,c){return e=new XR(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=wr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nv(o),e}function ZR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ra,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function QN(e){if(!e)return Bi;e=e._reactInternals;e:{if(Uo(e)!==e||e.tag!==1)throw Error(se(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(se(171))}if(e.tag===1){var n=e.type;if(Yn(n))return Qk(e,n,t)}return t}function XN(e,t,n,r,s,o,a,l,c){return e=Vv(n,r,!0,e,s,o,a,l,c),e.context=QN(null),n=e.current,r=Rn(),s=Ri(n),o=Os(r,s),o.callback=t??null,Ii(n,o,s),e.current.lanes=s,gu(e,s,r),Jn(e,r),e}function _f(e,t,n,r){var s=t.current,o=Rn(),a=Ri(s);return n=QN(n),t.context===null?t.context=n:t.pendingContext=n,t=Os(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ii(s,t,a),e!==null&&(zr(e,s,a,o),Wd(e,s,a)),a}function $h(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Gb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zv(e,t){Gb(e,t),(e=e.alternate)&&Gb(e,t)}function e_(){return null}var ZN=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wv(e){this._internalRoot=e}Of.prototype.render=Wv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(se(409));_f(e,t,null,null)};Of.prototype.unmount=Wv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lo(function(){_f(null,e,null,null)}),t[Ls]=null}};function Of(e){this._internalRoot=e}Of.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ik();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ai.length&&t!==0&&t<ai[n].priority;n++);ai.splice(n,0,e),n===0&&Rk(e)}};function Gv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Hb(){}function t_(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=$h(a);o.call(u)}}var a=XN(t,r,e,0,null,!1,!1,"",Hb);return e._reactRootContainer=a,e[Ls]=a.current,Mc(e.nodeType===8?e.parentNode:e),Lo(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=$h(c);l.call(u)}}var c=Vv(e,0,!1,null,null,!1,!1,"",Hb);return e._reactRootContainer=c,e[Ls]=c.current,Mc(e.nodeType===8?e.parentNode:e),Lo(function(){_f(t,c,n,r)}),c}
41function Lf(e,t,n,r,s){var o=n._reactRootContainer;if(o){var a=o;if(typeof s=="function"){var l=s;s=function(){var c=$h(a);l.call(c)}}_f(t,a,e,s)}else a=t_(n,t,e,s,r);return $h(a)}Tk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Yl(t.pendingLanes);n!==0&&(uv(t,n|1),Jn(t,$t()),!(ot&6)&&(el=$t()+500,Qi()))}break;case 13:Lo(function(){var r=$s(e,1);if(r!==null){var s=Rn();zr(r,e,1,s)}}),zv(e,1)}};dv=function(e){if(e.tag===13){var t=$s(e,134217728);if(t!==null){var n=Rn();zr(t,e,134217728,n)}zv(e,134217728)}};Pk=function(e){if(e.tag===13){var t=Ri(e),n=$s(e,t);if(n!==null){var r=Rn();zr(n,e,t,r)}zv(e,t)}};Ik=function(){return ht};Ak=function(e,t){var n=ht;try{return ht=e,t()}finally{ht=n}};lg=function(e,t,n){switch(t){case"input":if(tg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Cf(r);if(!s)throw Error(se(90));lk(r),tg(r,s)}}}break;case"textarea":uk(e,n);break;case"select":t=n.value,t!=null&&Sa(e,!!n.multiple,t,!1)}};yk=Dv;vk=Lo;var n_={usingClientEntryPoint:!1,Events:[vu,la,Cf,pk,gk,Dv]},Ul={findFiberByHostInstance:go,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},r_={bundleType:Ul.bundleType,version:Ul.version,rendererPackageName:Ul.rendererPackageName,rendererConfig:Ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bk(e),e===null?null:e.stateNode},findFiberByHostInstance:Ul.findFiberByHostInstance||e_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ud=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ud.isDisabled&&ud.supportsFiber)try{Sf=ud.inject(r_),cs=ud}catch{}}lr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n_;lr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gv(t))throw Error(se(200));return ZR(e,t,null,n)};lr.createRoot=function(e,t){if(!Gv(e))throw Error(se(299));var n=!1,r="",s=ZN;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Vv(e,1,!1,null,null,n,!1,r,s),e[Ls]=t.current,Mc(e.nodeType===8?e.parentNode:e),new Wv(t)};lr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(se(188)):(e=Object.keys(e).join(","),Error(se(268,e)));return e=bk(t),e=e===null?null:e.stateNode,e};lr.flushSync=function(e){return Lo(e)};lr.hydrate=function(e,t,n){if(!Mf(t))throw Error(se(200));return Lf(null,e,t,!0,n)};lr.hydrateRoot=function(e,t,n){if(!Gv(e))throw Error(se(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",a=ZN;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=XN(t,null,e,1,n??null,s,!1,o,a),e[Ls]=t.current,Mc(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Of(t)};lr.render=function(e,t,n){if(!Mf(t))throw Error(se(200));return Lf(null,e,t,!1,n)};lr.unmountComponentAtNode=function(e){if(!Mf(e))throw Error(se(40));return e._reactRootContainer?(Lo(function(){Lf(null,null,e,!1,function(){e._reactRootContainer=null,e[Ls]=null})}),!0):!1};lr.unstable_batchedUpdates=Dv;lr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Mf(n))throw Error(se(200));if(e==null||e._reactInternals===void 0)throw Error(se(38));return Lf(e,t,n,!1,r)};lr.version="18.3.1-next-f1338f8080-20240426";function eC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eC)}catch(e){console.error(e)}}eC(),ek.exports=lr;var wl=ek.exports;const tC=Uj(wl);var nC,qb=wl;nC=qb.createRoot,qb.hydrateRoot;const s_="modulepreload",i_=function(e){return"/"+e},Kb={},Gt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=i_(c),c in Kb)return;Kb[c]=!0;const u=c.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":s_,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,d)=>{f.addEventListener("load",p),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return s.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},o_=1,a_=1e6;let Hm=0;function l_(){return Hm=(Hm+1)%Number.MAX_SAFE_INTEGER,Hm.toString()}const qm=new Map,Yb=e=>{if(qm.has(e))return;const t=setTimeout(()=>{qm.delete(e),dc({type:"REMOVE_TOAST",toastId:e})},a_);qm.set(e,t)},c_=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,o_)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;
41return n?Yb(n):e.toasts.forEach(r=>{Yb(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Qd=[];let Xd={toasts:[]};function dc(e){Xd=c_(Xd,e),Qd.forEach(t=>{t(Xd)})}function u_({...e}){const t=l_(),n=s=>dc({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>dc({type:"DISMISS_TOAST",toastId:t});return dc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function d_(){const[e,t]=m.useState(Xd);return m.useEffect(()=>(Qd.push(t),()=>{const n=Qd.indexOf(t);n>-1&&Qd.splice(n,1)}),[e]),{...e,toast:u_,dismiss:n=>dc({type:"DISMISS_TOAST",toastId:n})}}function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Jb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rC(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Jb(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Jb(e[s],null)}}}}function Gr(...e){return m.useCallback(rC(...e),e)}function Eq(e,t){const n=m.createContext(t),r=o=>{const{children:a,...l}=o,c=m.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function s(o){const a=m.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function $f(e,t=[]){let n=[];function r(o,a){const l=m.createContext(a),c=n.length;n=[...n,a];const u=f=>{var y;const{scope:p,children:d,...w}=f,v=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,x=m.useMemo(()=>w,Object.values(w));return i.jsx(v.Provider,{value:x,children:d})};u.displayName=o+"Provider";function h(f,p){var v;const d=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,w=m.useContext(d);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,h]}const s=()=>{const o=n.map(a=>m.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,h_(s,...t)]}function h_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((l,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...l,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Dh(e){const t=m_(e),n=m.forwardRef((r,s)=>{const{children:o,...a}=r,l=m.Children.toArray(o),c=l.find(g_);if(c){const u=c.props.children,h=l.map(f=>f===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:f);return i.jsx(t,{...a,ref:s,children:m.isValidElement(u)?m.cloneElement(u,void 0,h):null})}return i.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var f_=Dh("Slot");function m_(e){const t=m.forwardRef((n,r)=>{const{children:s,...o}=n;if(m.isValidElement(s)){const a=v_(s),l=y_(o,s.props);return s.type!==m.Fragment&&(l.ref=r?rC(r,a):a),m.cloneElement(s,l)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sC=Symbol("radix.slottable");function p_(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sC,t}function g_(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sC}function y_(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...l)=>{const c=o(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function v_(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function x_(e){const t=e+"CollectionProvider",[n,r]=$f(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:x,children:y}=v,g=ce.useRef(null),b=ce.useRef(new Map).current;return i.jsx(s,{scope:x,itemMap:b,collectionRef:g,children:y})};a.displayName=t;const l=e+"CollectionSlot",c=Dh(l),u=ce.forwardRef((v,x)=>{const{scope:y,children:g}=v,b=o(l,y),S=Gr(x,b.collectionRef);return i.jsx(c,{ref:S,children:g})});u.displayName=l;const h=e+"CollectionItemSlot",f="data-radix-collection-item",p=Dh(h),d=ce.forwardRef((v,x)=>{const{scope:y,children:g,...b}=v,S=ce.useRef(null),j=Gr(x,S),T=o(h,y);return ce.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),i.jsx(p,{[f]:"",ref:j,children:g})});d.displayName=h;function w(v){const x=o(e+"CollectionConsumer",v);return ce.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:u,ItemSlot:d},w,r]}var w_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ln=w_.reduce((e,t)=>
vendor: 8,608 bytes, line 41
41{const n=Dh(`Primitive.${t}`),r=m.forwardRef((s,o)=>{const{asChild:a,...l}=s,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function iC(e,t){e&&wl.flushSync(()=>e.dispatchEvent(t))}function Ui(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function b_(e,t=globalThis==null?void 0:globalThis.document){const n=Ui(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var S_="DismissableLayer",Ug="dismissableLayer.update",j_="dismissableLayer.pointerDownOutside",k_="dismissableLayer.focusOutside",Qb,oC=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hv=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=e,u=m.useContext(oC),[h,f]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=m.useState({}),w=Gr(t,C=>f(C)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(x),g=h?v.indexOf(h):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=y,j=C_(C=>{const E=C.target,A=[...u.branches].some(R=>R.contains(E));!S||A||(s==null||s(C),a==null||a(C),C.defaultPrevented||l==null||l())},p),T=E_(C=>{const E=C.target;[...u.branches].some(R=>R.contains(E))||(o==null||o(C),a==null||a(C),C.defaultPrevented||l==null||l())},p);return b_(C=>{g===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},p),m.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Xb(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Qb)}},[h,p,n,u]),m.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Xb())},[h,u]),m.useEffect(()=>{const C=()=>d({});return document.addEventListener(Ug,C),()=>document.removeEventListener(Ug,C)},[]),i.jsx(Ln.div,{...c,ref:w,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,j.onPointerDownCapture)})});Hv.displayName=S_;var N_="DismissableLayerBranch",aC=m.forwardRef((e,t)=>{const n=m.useContext(oC),r=m.useRef(null),s=Gr(t,r);return m.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),i.jsx(Ln.div,{...e,ref:s})});aC.displayName=N_;function C_(e,t=globalThis==null?void 0:globalThis.document){const n=Ui(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){lC(j_,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function E_(e,t=globalThis==null?void 0:globalThis.document){const n=Ui(e),r=m.useRef(!1);return m.useEffect(()=>{const s=o=>{o.target&&!r.current&&lC(k_,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xb(){const e=new CustomEvent(Ug);document.dispatchEvent(e)}function lC(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?iC(s,o):s.dispatchEvent(o)}var T_=Hv,P_=aC,Vi=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},I_="Portal",cC=m.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,o]=m.useState(!1);Vi(()=>o(!0),[]);const a=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?tC.createPortal(i.jsx(Ln.div,{...r,ref:t}),a):null});cC.displayName=I_;function A_(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var qv=e=>{const{present:t,children:n}=e,r=R_(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),o=Gr(r.ref,__(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:o}):null};qv.displayName="Presence";function R_(e){const[t,n]=m.useState(),r=m.useRef(null),s=m.useRef(e),o=m.useRef("none"),a=e?"mounted":"unmounted",[l,c]=A_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=dd(r.current);o.current=l==="mounted"?u:"none"},[l]),Vi(()=>{const u=r.current,h=s.current;if(h!==e){const p=o.current,d=dd(u);e?c("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(h&&p!==d?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Vi(()=>{if(t){let u;const h=t.ownerDocument.defaultView??window,f=d=>{const v=dd(r.current).includes(d.animationName);if(d.target===t&&v&&(c("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=d=>{d.target===t&&(o.current=dd(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function dd(e){return(e==null?void 0:e.animationName)||"none"}function __(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var O_=Xj[" useInsertionEffect ".trim().toString()]||Vi;function M_({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,a]=L_({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const h=m.useRef(e!==void 0);m.useEffect(()=>{const f=h.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,r])}const u=m.useCallback(h=>{var f;if(l){const p=$_(h)?h(e):h;p!==e&&((f=a.current)==null||f.call(a,p))}else o(h)},[l,e,o,a]);return[c,u]}function L_({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),o=m.useRef(t);return O_(()=>{o.current=t},[t]),m.useEffect(()=>{var a;s.current!==n&&((a=o.current)==null||a.call(o,n),s.current=n)},[n,s]),[n,r,o]}function $_(e){return typeof e=="function"}var D_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),F_="VisuallyHidden",Df=m.forwardRef((e,t)=>i.jsx(Ln.span,{...e,ref:t,style:{...D_,...e.style}}));Df.displayName=F_;var B_=Df,Kv="ToastProvider",[Yv,U_,V_]=x_("Toast"),[uC,Tq]=$f("Toast",[V_]),[z_,Ff]=uC(Kv),dC=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:a}=e,[l,c]=m.useState(null),[u,h]=m.useState(0),f=m.useRef(!1),p=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Kv}\`. Expected non-empty \`string\`.`),i.jsx(Yv.Provider,{scope:t,children:i.jsx(z_,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:m.useCallback(()=>h(d=>d+1),[]),onToastRemove:m.useCallback(()=>h(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:a})})};dC.displayName=Kv;var hC="ToastViewport",W_=["F8"],Vg="toast.viewportPause",zg="toast.viewportResume",fC=m.forwardRef((e,t)=>
41{const{__scopeToast:n,hotkey:r=W_,label:s="Notifications ({hotkey})",...o}=e,a=Ff(hC,n),l=U_(n),c=m.useRef(null),u=m.useRef(null),h=m.useRef(null),f=m.useRef(null),p=Gr(t,f,a.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;m.useEffect(()=>{const x=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),m.useEffect(()=>{const x=c.current,y=f.current;if(w&&x&&y){const g=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(Vg);y.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(zg);y.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!x.contains(T.relatedTarget)&&b()},j=()=>{x.contains(document.activeElement)||b()};return x.addEventListener("focusin",g),x.addEventListener("focusout",S),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",j),window.addEventListener("blur",g),window.addEventListener("focus",b),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",j),window.removeEventListener("blur",g),window.removeEventListener("focus",b)}}},[w,a.isClosePausedRef]);const v=m.useCallback(({tabbingDirection:x})=>{const g=l().map(b=>{const S=b.ref.current,j=[S,...rO(S)];return x==="forwards"?j:j.reverse()});return(x==="forwards"?g.reverse():g).flat()},[l]);return m.useEffect(()=>{const x=f.current;if(x){const y=g=>{var j,T,C;const b=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!b){const E=document.activeElement,A=g.shiftKey;if(g.target===x&&A){(j=u.current)==null||j.focus();return}const D=v({tabbingDirection:A?"backwards":"forwards"}),J=D.findIndex(F=>F===E);Km(D.slice(J+1))?g.preventDefault():A?(T=u.current)==null||T.focus():(C=h.current)==null||C.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[l,v]),i.jsxs(P_,{ref:c,role:"region","aria-label":s.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&i.jsx(Wg,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});Km(x)}}),i.jsx(Yv.Slot,{scope:n,children:i.jsx(Ln.ol,{tabIndex:-1,...o,ref:p})}),w&&i.jsx(Wg,{ref:h,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});Km(x)}})]})});fC.displayName=hC;var mC="ToastFocusProxy",Wg=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Ff(mC,n);return i.jsx(Df,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const l=a.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&r()}})});Wg.displayName=mC;var wu="Toast",G_="toast.swipeStart",H_="toast.swipeMove",q_="toast.swipeCancel",K_="toast.swipeEnd",pC=m.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...a}=e,[l,c]=M_({prop:r,defaultProp:s??!0,onChange:o,caller:wu});return i.jsx(qv,{present:n||l,children:i.jsx(Q_,{open:l,...a,ref:t,onClose:()=>c(!1),onPause:Ui(e.onPause),onResume:Ui(e.onResume),onSwipeStart:Qt(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(e.onSwipeMove,u=>{const{x:h,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Qt(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qt(e.onSwipeEnd,u=>{const{x:h,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});pC.displayName=wu;var[Y_,J_]=uC(wu,{onClose(){}}),Q_=m.forwardRef((e,t)=>
41{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:a,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:h,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:d,...w}=e,v=Ff(wu,n),[x,y]=m.useState(null),g=Gr(t,F=>y(F)),b=m.useRef(null),S=m.useRef(null),j=s||v.duration,T=m.useRef(0),C=m.useRef(j),E=m.useRef(0),{onToastAdd:A,onToastRemove:R}=v,V=Ui(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=v.viewport)==null||Y.focus()),a()}),D=m.useCallback(F=>{!F||F===1/0||(window.clearTimeout(E.current),T.current=new Date().getTime(),E.current=window.setTimeout(V,F))},[V]);m.useEffect(()=>{const F=v.viewport;if(F){const Y=()=>{D(C.current),u==null||u()},W=()=>{const H=new Date().getTime()-T.current;C.current=C.current-H,window.clearTimeout(E.current),c==null||c()};return F.addEventListener(Vg,W),F.addEventListener(zg,Y),()=>{F.removeEventListener(Vg,W),F.removeEventListener(zg,Y)}}},[v.viewport,j,c,u,D]),m.useEffect(()=>{o&&!v.isClosePausedRef.current&&D(j)},[o,j,v.isClosePausedRef,D]),m.useEffect(()=>(A(),()=>R()),[A,R]);const J=m.useMemo(()=>x?SC(x):null,[x]);return v.viewport?i.jsxs(i.Fragment,{children:[J&&i.jsx(X_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:J}),i.jsx(Y_,{scope:n,onClose:V,children:wl.createPortal(i.jsx(Yv.ItemSlot,{scope:n,children:i.jsx(T_,{asChild:!0,onEscapeKeyDown:Qt(l,()=>{v.isFocusedToastEscapeKeyDownRef.current||V(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(Ln.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,F=>{F.key==="Escape"&&(l==null||l(F.nativeEvent),F.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Qt(e.onPointerDown,F=>{F.button===0&&(b.current={x:F.clientX,y:F.clientY})}),onPointerMove:Qt(e.onPointerMove,F=>{if(!b.current)return;const Y=F.clientX-b.current.x,W=F.clientY-b.current.y,H=!!S.current,P=["left","right"].includes(v.swipeDirection),_=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,k=P?_(0,Y):0,N=P?0:_(0,W),B=F.pointerType==="touch"?10:2,L={x:k,y:N},z={originalEvent:F,delta:L};H?(S.current=L,hd(H_,f,z,{discrete:!1})):Zb(L,v.swipeDirection,B)?(S.current=L,hd(G_,h,z,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(Y)>B||Math.abs(W)>B)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,F=>{const Y=S.current,W=F.target;if(W.hasPointerCapture(F.pointerId)&&W.releasePointerCapture(F.pointerId),S.current=null,b.current=null,Y){const H=F.currentTarget,P={originalEvent:F,delta:Y};Zb(Y,v.swipeDirection,v.swipeThreshold)?hd(K_,d,P,{discrete:!0}):hd(q_,p,P,{discrete:!0}),H.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),X_=e=>{const{__scopeToast:t,children:n,...r}=e,s=Ff(wu,t),[o,a]=m.useState(!1),[l,c]=m.useState(!1);return tO(()=>a(!0)),m.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:i.jsx(cC,{asChild:!0,children:i.jsx(Df,{...r,children:o&&i.jsxs(i.Fragment,{children:[s.label," ",n]})})})},Z_="ToastTitle",gC=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Ln.div,{...r,ref:t})});gC.displayName=Z_;var eO="ToastDescription",yC=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Ln.div,{...r,ref:t})});yC.displayName=eO;var vC="ToastAction",xC=m.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?i.jsx(bC,{altText:n,asChild:!0,children:i.jsx(Jv,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${vC}\`. Expected non-empty \`string\`.`),null)});xC.displayName=vC;var wC="ToastClose",Jv=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=J_(wC,n);return i.jsx(bC,{asChild:!0,children:i.jsx(Ln.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,s.onClose)})})});Jv.displayName=wC;var bC=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return i.jsx(Ln.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function SC(e){const t=[];
vendor: 5,537 bytes, lines 41-81
41return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),nO(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...SC(r))}}),t}function hd(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?iC(s,o):s.dispatchEvent(o)}var Zb=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function tO(e=()=>{}){const t=Ui(e);Vi(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function nO(e){return e.nodeType===e.ELEMENT_NODE}function rO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Km(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var sO=dC,jC=fC,kC=pC,NC=gC,CC=yC,EC=xC,TC=Jv;function PC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=PC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function IC(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=PC(e))&&(r&&(r+=" "),r+=t);return r}const e0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,t0=IC,Qv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return t0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(u=>{const h=n==null?void 0:n[u],f=o==null?void 0:o[u];if(h===null)return null;const p=e0(h)||e0(f);return s[u][p]}),l=n&&Object.entries(n).reduce((u,h)=>{let[f,p]=h;return p===void 0||(u[f]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,h)=>{let{class:f,className:p,...d}=h;return Object.entries(d).every(w=>{let[v,x]=w;return Array.isArray(x)?x.includes({...o,...l}[v]):{...o,...l}[v]===x})?[...u,f,p]:u},[]);return t0(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const iO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AC=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var oO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const aO=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...l},c)=>m.createElement("svg",{ref:c,...oO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:AC("lucide",s),...l},[...a.map(([u,h])=>m.createElement(u,h)),...Array.isArray(o)?o:[o]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const ft=(e,t)=>{const n=m.forwardRef(({className:r,...s},o)=>m.createElement(aO,{ref:o,iconNode:t,className:AC(`lucide-${iO(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const Gg=ft("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const tl=ft("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const lO=ft("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const cO=ft("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
81],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const Xv=ft("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const uO=ft("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const Zv=ft("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const ex=ft("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const dO=ft("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const n0=ft("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const hO=ft("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const bn=ft("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const RC=ft("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const fO=ft("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const mO=ft("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const r0=ft("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const pO=ft("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const s0=ft("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const tx=ft("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const gO=ft("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const yO=ft("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 4,250 bytes, lines 166-206
166y:"oel41y"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const vO=ft("Slack",[["rect",{width:"3",height:"8",x:"13",y:"2",rx:"1.5",key:"diqz80"}],["path",{d:"M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5",key:"183iwg"}],["rect",{width:"3",height:"8",x:"8",y:"14",rx:"1.5",key:"hqg7r1"}],["path",{d:"M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5",key:"76g71w"}],["rect",{width:"8",height:"3",x:"14",y:"13",rx:"1.5",key:"1kmz0a"}],["path",{d:"M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5",key:"jc4sz0"}],["rect",{width:"8",height:"3",x:"2",y:"8",rx:"1.5",key:"1omvl4"}],["path",{d:"M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5",key:"16f3cl"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const xO=ft("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const Fh=ft("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 182 * @license lucide-react v0.462.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const wO=ft("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 187 * @license lucide-react v0.462.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const _C=ft("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 192 * @license lucide-react v0.462.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const i0=ft("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 197 * @license lucide-react v0.462.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const OC=ft("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 202 * @license lucide-react v0.462.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const bu=ft("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),nx="-",bO=e=>{const t=jO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(nx);return l[0]===""&&l.length!==1&&l.shift(),MC(l,t)||SO(a)},getConflictingClassGroupIds:(a,l)=>{const c=n[a]||[];return l&&r[a]?[...c,...r[a]]:c}}},MC=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?MC(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(nx);return(a=t.validators.find(({validator:l})=>l(o)))==null?void 0:a.classGroupId},o0=/^\[(.+)\]$/,SO=e=>{if(o0.test(e)){const t=o0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,120 bytes, line 206
206return NO(Object.entries(e.classGroups),n).forEach(([o,a])=>{Hg(a,r,o,t)}),r},Hg=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:a0(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(kO(s)){Hg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{Hg(a,a0(t,o),n,r)})})},a0=(e,t)=>{let n=e;return t.split(nx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},kO=e=>e.isThemeGetter,NO=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,l])=>[t+a,l])):o);return[n,s]}):e,CO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},LC="!",EO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,a=l=>{const c=[];let u=0,h=0,f;for(let x=0;x<l.length;x++){let y=l[x];if(u===0){if(y===s&&(r||l.slice(x,x+o)===t)){c.push(l.slice(h,x)),h=x+o;continue}if(y==="/"){f=x;continue}}y==="["?u++:y==="]"&&u--}const p=c.length===0?l:l.substring(h),d=p.startsWith(LC),w=d?p.substring(1):p,v=f&&f>h?f-h:void 0;return{modifiers:c,hasImportantModifier:d,baseClassName:w,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:a}):a},TO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},PO=e=>({cache:CO(e.cacheSize),parseClassName:EO(e),...bO(e)}),IO=/\s+/,AO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],a=e.trim().split(IO);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:h,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:d}=n(u);let w=!!d,v=r(w?p.substring(0,d):p);if(!v){if(!w){l=u+(l.length>0?" "+l:l);continue}if(v=r(p),!v){l=u+(l.length>0?" "+l:l);continue}w=!1}const x=TO(h).join(":"),y=f?x+LC:x,g=y+v;if(o.includes(g))continue;o.push(g);const b=s(v,w);for(let S=0;S<b.length;++S){const j=b[S];o.push(y+j)}l=u+(l.length>0?" "+l:l)}return l};function RO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$C(t))&&(r&&(r+=" "),r+=n);return r}const $C=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$C(e[r]))&&(n&&(n+=" "),n+=t);return n};function _O(e,...t){let n,r,s,o=a;function a(c){const u=t.reduce((h,f)=>f(h),e());return n=PO(u),r=n.cache.get,s=n.cache.set,o=l,l(c)}function l(c){const u=r(c);if(u)return u;const h=AO(c,n);return s(c,h),h}return function(){return o(RO.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},DC=/^\[(?:([a-z-]+):)?(.+)\]$/i,OO=/^\d+\/\d+$/,MO=new Set(["px","full","screen"]),LO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$O=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,DO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,FO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>Ta(e)||MO.has(e)||OO.test(e),Xs=e=>bl(e,"length",KO),Ta=e=>!!e&&!Number.isNaN(Number(e)),Ym=e=>bl(e,"number",Ta),Vl=e=>!!e&&Number.isInteger(Number(e)),UO=e=>e.endsWith("%")&&Ta(e.slice(0,-1)),Ke=e=>DC.test(e),Zs=e=>LO.test(e),VO=new Set(["length","size","percentage"]),zO=e=>bl(e,VO,FC),WO=e=>bl(e,"position",FC),GO=new Set(["image","url"]),HO=e=>bl(e,GO,JO),qO=e=>bl(e,"",YO),zl=()=>!0,bl=(e,t,n)=>{const r=DC.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},KO=e=>$O.test(e)&&!DO.test(e),FC=()=>!1,YO=e=>FO.test(e),JO=e=>BO.test(e),QO=()=>{const e=jt("colors"),t=jt("spacing"),n=jt("blur"),r=jt("brightness"),s=jt("borderColor"),o=jt("borderRadius"),a=jt("borderSpacing"),l=jt("borderWidth"),c=jt("contrast"),u=jt("grayscale"),h=jt("hueRotate"),f=jt("invert"),p=jt("gap"),d=jt("gradientColorStops"),w=jt("gradientColorStopPositions"),v=jt("inset"),x=jt("margin"),y=jt("opacity"),g=jt("padding"),b=jt("saturate"),S=jt("scale"),j=jt("sepia"),T=jt("skew"),C=jt("space"),E=jt("translate"),A=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",Ke,t],D=()=>[Ke,t],J=()=>["",Ss,Xs],F=()=>["auto",Ta,Ke],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",Ke],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ta,Ke];return{cacheSize:500,separator:":",theme:{colors:[zl],spacing:[Ss,Xs],blur:["none","",Zs,Ke],brightness:N(),borderColor:[e],borderRadius:["n
206one","","full",Zs,Ke],borderSpacing:D(),borderWidth:J(),contrast:N(),grayscale:_(),hueRotate:N(),invert:_(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[UO,Xs],inset:V(),margin:V(),opacity:N(),padding:D(),saturate:N(),scale:N(),sepia:_(),skew:N(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Ke]}],container:["container"],columns:[{columns:[Zs]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),Ke]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vl,Ke]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ke]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Vl,Ke]}],"grid-cols":[{"grid-cols":[zl]}],"col-start-end":[{col:["auto",{span:["full",Vl,Ke]},Ke]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[zl]}],"row-start-end":[{row:["auto",{span:[Vl,Ke]},Ke]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ke]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ke,t]}],"min-w":[{"min-w":[Ke,t,"min","max","fit"]}],"max-w":[{"max-w":[Ke,t,"none","full","min","max","fit","prose",{screen:[Zs]},Zs]}],h:[{h:[Ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zs,Xs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ym]}],"font-family":[{font:[zl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ke]}],"line-clamp":[{"line-clamp":["none",Ta,Ym]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ss,Ke]}],"list-image":[{"list-image":["none",Ke]}],"list-style-type":[{list:["none","disc","decimal",Ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ss,Xs]}],"underline-offset":[{"underline-offset":["auto",Ss,Ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),WO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
206],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,467 bytes, line 206
206],"divide-style":[{divide:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Ss,Ke]}],"outline-w":[{outline:[Ss,Xs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ss,Xs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zs,qO]}],"shadow-color":[{shadow:[zl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Zs,Ke]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ke]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",Ke]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Vl,Ke]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ss,Xs,Ym]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
206none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},XO=_O(QO);function rn(...e){return XO(IC(e))}const ZO=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,eM=7,tM=15;function Wc(e){const t=e.trim();return t.length>0&&ZO.test(t)}function nl(e,t){const n=e.replace(/\D/g,"");return n.length>=eM&&n.length<=tM}const nM=new Set(["gmail.com","googlemail.com","yahoo.com","yahoo.co.uk","yahoo.co.in","ymail.com","rocketmail.com","hotmail.com","hotmail.co.uk","live.com","outlook.com","msn.com","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","pm.me","gmx.com","gmx.net","gmx.de","mail.com","zoho.com","fastmail.com","tutanota.com","yandex.com","yandex.ru","qq.com","163.com","126.com","rediffmail.com"]);function rM(e){const t=String(e||"").trim().toLowerCase();if(!Wc(t))return null;const n=t.lastIndexOf("@");return n===-1||n===t.length-1?null:t.substring(n+1)}function qg(e){const t=rM(e);return t?!nM.has(t):!1}const sM="Please use your work email â personal Gmail, Outlook, Yahoo, iCloud, etc. addresses aren't supported. Your work email is how we connect you to your firm.",iM=sO,BC=m.forwardRef(({className:e,...t},n)=>i.jsx(jC,{ref:n,className:rn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));BC.displayName=jC.displayName;const oM=Qv("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),UC=m.forwardRef(({className:e,variant:t,...n},r)=>i.jsx(kC,{ref:r,className:rn(oM({variant:t}),e),...n}));UC.displayName=kC.displayName;const aM=m.forwardRef(({className:e,...t},n)=>i.jsx(EC,{ref:n,className:rn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));aM.displayName=EC.displayName;const VC=m.forwardRef(({className:e,...t},n)=>i.jsx(TC,{ref:n,className:rn("absolute right-2 top-2 rounded-md p-1 text-foreground
206/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:i.jsx(bu,{className:"h-4 w-4"})}));VC.displayName=TC.displayName;const zC=m.forwardRef(({className:e,...t},n)=>i.jsx(NC,{ref:n,className:rn("text-sm font-semibold",e),...t}));zC.displayName=NC.displayName;const WC=m.forwardRef(({className:e,...t},n)=>i.jsx(CC,{ref:n,className:rn("text-sm opacity-90",e),...t}));WC.displayName=CC.displayName;function lM(){const{toasts:e}=d_();return i.jsxs(iM,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return i.jsxs(UC,{...o,children:[i.jsxs("div",{className:"grid gap-1",children:[n&&i.jsx(zC,{children:n}),r&&i.jsx(WC,{children:r})]}),s,i.jsx(VC,{})]},t)}),i.jsx(BC,{})]})}var l0=["light","dark"],cM="(prefers-color-scheme: dark)",uM=m.createContext(void 0),dM={setTheme:e=>{},themes:[]},hM=()=>{var e;return(e=m.useContext(uM))!=null?e:dM};m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:a,attrs:l,nonce:c})=>{let u=o==="system",h=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=s?l0.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(w,v=!1,x=!0)=>{let y=a?a[w]:w,g=v?w+"|| ''":`'${y}'`,b="";return s&&x&&!v&&l0.includes(w)&&(b+=`d.style.colorScheme = '${w}';`),n==="class"?v||y?b+=`c.add(${g})`:b+="null":y&&(b+=`d[s](n,${g})`),b},d=e?`!function(){${h}${p(e)}}()`:r?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${cM}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${p(a?"x[e]":"e",!0)}}${u?"":"else{"+p(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${p(a?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${f}}catch(t){}}();`;return m.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:d}})});var fM=e=>{switch(e){case"success":return gM;case"info":return vM;case"warning":return yM;case"error":return xM;default:return null}},mM=Array(12).fill(0),pM=({visible:e,className:t})=>ce.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ce.createElement("div",{className:"sonner-spinner"},mM.map((n,r)=>ce.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),gM=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),yM=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),vM=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),xM=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),wM=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ce.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ce.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bM=()=>{let[e,t]=ce.useState(document.hidden);return ce.useEffect(()=>{let n=()=>{t(document.hidden)};
206return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Kg=1,SM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Kg++,o=this.toasts.find(l=>l.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
206this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,o,a=r.then(async c=>{if(o=["resolve",c],ce.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(kM(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:h})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,h=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:h})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,h=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:h})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>a.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Kg++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Vn=new SM,jM=(e,t)=>{let n=(t==null?void 0:t.id)||Kg++;return Vn.addToast({title:e,...t,id:n}),n},kM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",NM=jM,CM=()=>Vn.toasts,EM=()=>Vn.getActiveToasts(),c0=Object.assign(NM,{success:Vn.success,info:Vn.info,warning:Vn.warning,error:Vn.error,custom:Vn.custom,message:Vn.message,promise:Vn.promise,dismiss:Vn.dismiss,loading:Vn.loading},{getHistory:CM,getToasts:EM});function TM(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}TM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
206left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
206:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
206--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 207`);function fd(e){return e.label!==void 0}var PM=3,IM="32px",AM="16px",u0=4e3,RM=356,_M=14,OM=20,MM=200;function Tr(...e){return e.filter(Boolean).join(" ")}function LM(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var $M=e=>{var t,n,r,s,o,a,l,c,u,h,f;let{invert:p,toast:d,unstyled:w,interacting:v,setHeights:x,visibleToasts:y,heights:g,index:b,toasts:S,expanded:j,removeToast:T,defaultRichColors:C,closeButton:E,style:A,cancelButtonStyle:R,actionButtonStyle:V,className:D="",descriptionClassName:J="",duration:F,position:Y,gap:W,loadingIcon:H,expandByDefault:P,classNames:_,icons:k,closeButtonAriaLabel:N="Close toast",pauseWhenPageIsHidden:B}=e,[L,z]=ce.useState(null),[ee,X]=ce.useState(null),[G,ne]=ce.useState(!1),[te,je]=ce.useState(!1),[q,ie]=ce.useState(!1),[me,he]=ce.useState(!1),[fe,ae]=ce.useState(!1),[Se,_e]=ce.useState(0),[Ce,Fe]=ce.useState(0),Le=ce.useRef(d.duration||F||u0),Ot=ce.useRef(null),ct=ce.useRef(null),xt=b===0,Oe=b+1<=y,Xe=d.type,wt=d.dismissible!==!1,He=d.className||"",at=d.descriptionClassName||"",$=ce.useMemo(()=>g.findIndex(U=>U.toastId===d.id)||0,[g,d.id]),xe=ce.useMemo(()=>{var U;return(U=d.closeButton)!=null?U:E},[d.closeButton,E]),Re=ce.useMemo(()=>d.duration||F||u0,[d.duration,F]),ke=ce.useRef(0),Ye=ce.useRef(0),yt=ce.useRef(0),Te=ce.useRef(null),[Je,ze]=Y.split("-"),Ct=ce.useMemo(()=>g.reduce((U,ue,Pe)=>Pe>=$?U:U+ue.height,0),[g,$]),Ft=bM(),dn=d.invert||p,qe=Xe==="loading";Ye.current=ce.useMemo(()=>$*W+Ct,[$,Ct]),ce.useEffect(()=>{Le.current=Re},[Re]),ce.useEffect(()=>{ne(!0)},[]),ce.useEffect(()=>{let U=ct.current;if(U){let ue=U.getBoundingClientRect().height;return Fe(ue),x(Pe=>[{toastId:d.id,height:ue,position:d.position},...Pe]),()=>x(Pe=>Pe.filter(Ie=>Ie.toastId!==d.id))}},[x,d.id]),ce.useLayoutEffect(()=>{if(!G)return;let U=ct.current,ue=U.style.height;U.style.height="auto";let Pe=U.getBoundingClientRect().height;U.style.height=ue,Fe(Pe),x(Ie=>Ie.find(mt=>mt.toastId===d.id)?Ie.map(mt=>mt.toastId===d.id?{...mt,height:Pe}:mt):[{toastId:d.id,height:Pe,position:d.position},...Ie])},[G,d.title,d.description,x,d.id]);let bt=ce.useCallback(()=>{je(!0),_e(Ye.current),x(U=>U.filter(ue=>ue.toastId!==d.id)),setTimeout(()=>{T(d)},MM)},[d,T,x,Ye]);ce.useEffect(()=>{if(d.promise&&Xe==="loading"||d.duration===1/0||d.type==="loading")return;let U;return j||v||B&&Ft?(()=>{if(yt.current<ke.current){let ue=new Date().getTime()-ke.current;Le.current=Le.current-ue}
207yt.current=new Date().getTime()})():Le.current!==1/0&&(ke.current=new Date().getTime(),U=setTimeout(()=>{var ue;(ue=d.onAutoClose)==null||ue.call(d,d),bt()},Le.current)),()=>clearTimeout(U)},[j,v,d,Xe,B,Ft,bt]),ce.useEffect(()=>{d.delete&&bt()},[bt,d.delete]);function Zn(){var U,ue,Pe;return k!=null&&k.loading?ce.createElement("div",{className:Tr(_==null?void 0:_.loader,(U=d==null?void 0:d.classNames)==null?void 0:U.loader,"sonner-loader"),"data-visible":Xe==="loading"},k.loading):H?ce.createElement("div",{className:Tr(_==null?void 0:_.loader,(ue=d==null?void 0:d.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":Xe==="loading"},H):ce.createElement(pM,{className:Tr(_==null?void 0:_.loader,(Pe=d==null?void 0:d.classNames)==null?void 0:Pe.loader),visible:Xe==="loading"})}return ce.createElement("li",{tabIndex:0,ref:ct,className:Tr(D,He,_==null?void 0:_.toast,(t=d==null?void 0:d.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[Xe],(n=d==null?void 0:d.classNames)==null?void 0:n[Xe]),"data-sonner-toast":"","data-rich-colors":(r=d.richColors)!=null?r:C,"data-styled":!(d.jsx||d.unstyled||w),"data-mounted":G,"data-promise":!!d.promise,"data-swiped":fe,"data-removed":te,"data-visible":Oe,"data-y-position":Je,"data-x-position":ze,"data-index":b,"data-front":xt,"data-swiping":q,"data-dismissible":wt,"data-type":Xe,"data-invert":dn,"data-swipe-out":me,"data-swipe-direction":ee,"data-expanded":!!(j||P&&G),style:{"--index":b,"--toasts-before":b,"--z-index":S.length-b,"--offset":`${te?Se:Ye.current}px`,"--initial-height":P?"auto":`${Ce}px`,...A,...d.style},onDragEnd:()=>{ie(!1),z(null),Te.current=null},onPointerDown:U=>{qe||!wt||(Ot.current=new Date,_e(Ye.current),U.target.setPointerCapture(U.pointerId),U.target.tagName!=="BUTTON"&&(ie(!0),Te.current={x:U.clientX,y:U.clientY}))},onPointerUp:()=>{var U,ue,Pe,Ie;if(me||!wt)return;Te.current=null;let mt=Number(((U=ct.current)==null?void 0:U.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((ue=ct.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Tt=new Date().getTime()-((Pe=Ot.current)==null?void 0:Pe.getTime()),We=L==="x"?mt:Nn,hn=Math.abs(We)/Tt;if(Math.abs(We)>=OM||hn>.11){_e(Ye.current),(Ie=d.onDismiss)==null||Ie.call(d,d),X(L==="x"?mt>0?"right":"left":Nn>0?"down":"up"),bt(),he(!0),ae(!1);return}ie(!1),z(null)},onPointerMove:U=>{var ue,Pe,Ie,mt;if(!Te.current||!wt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;let Nn=U.clientY-Te.current.y,Tt=U.clientX-Te.current.x,We=(Pe=e.swipeDirections)!=null?Pe:LM(Y);!L&&(Math.abs(Tt)>1||Math.abs(Nn)>1)&&z(Math.abs(Tt)>Math.abs(Nn)?"x":"y");let hn={x:0,y:0};L==="y"?(We.includes("top")||We.includes("bottom"))&&(We.includes("top")&&Nn<0||We.includes("bottom")&&Nn>0)&&(hn.y=Nn):L==="x"&&(We.includes("left")||We.includes("right"))&&(We.includes("left")&&Tt<0||We.includes("right")&&Tt>0)&&(hn.x=Tt),(Math.abs(hn.x)>0||Math.abs(hn.y)>0)&&ae(!0),(Ie=ct.current)==null||Ie.style.setProperty("--swipe-amount-x",`${hn.x}px`),(mt=ct.current)==null||mt.style.setProperty("--swipe-amount-y",`${hn.y}px`)}},xe&&!d.jsx?ce.createElement("button",{"aria-label":N,"data-disabled":qe,"data-close-button":!0,onClick:qe||!wt?()=>{}:()=>{var U;bt(),(U=d.onDismiss)==null||U.call(d,d)},className:Tr(_==null?void 0:_.closeButton,(s=d==null?void 0:d.classNames)==null?void 0:s.closeButton)},(o=k==null?void 0:k.close)!=null?o:wM):null,d.jsx||m.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:ce.createElement(ce.Fragment,null,Xe||d.icon||d.promise?ce.createElement("div",{"data-icon":"",className:Tr(_==null?void 0:_.icon,(a=d==null?void 0:d.classNames)==null?void 0:a.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Zn():null,d.type!=="loading"?d.icon||(k==null?void 0:k[Xe])||fM(Xe):null):null,ce.createElement("div",{"data-content":"",className:Tr(_==null?void 0:_.content,(l=d==null?void 0:d.classNames)==null?void 0:l.content)},ce.createElement("div",{"data-title":"",className:Tr(_==null?void 0:_.title,(c=d==null?void 0:d.classNames)==null?void 0:c.title)},typeof d.title=="function"?d.title():d.title),d.description?ce.createElement("div",{"data-description":"",className:Tr(J,at,_==null?void 0:_.description,(u=d==null?void 0:d.classNames)==null?void 0:u.description)},typeof d.description=="function"?d.description():d.description):null),m.isValidElement(d.cancel)?d.cancel:d.cancel&&fd(d.cancel)?ce.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||R,onClick:U=>{var ue,Pe;fd(d.cancel)&&wt&&((Pe=(ue=d.cancel).onClick)==null||Pe.call(ue,U),bt())},className:Tr(_==null?void 0:_.cancelButton,(h=d==null?void 0:d.classNames)==null?void 0:h.cancelButton)},d.cancel.label):null,m.isValidElement(d.action)?d.action:d.action&&fd(d.action)?ce.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||V,onClick:U=>{var ue,Pe;fd(d.action)&&((Pe=(ue=d.action).onClick)==null||Pe.call(ue,U),!U.defaultPrevented&&bt())},className:Tr(_==null?void 0:_.actionButton,(f=d==null?void 0:d.classNames)==null?void 0:f.actionButton)},d.action.label):null))};function d0(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function DM(e,t){let n={};return[e,t].forEach((r,s)=>{let o=s===1,a=o?"--mobile-offset":"--offset",l=o?AM:IM;function c(u){["top","right","bottom","left"].forEach(h=>{n[`${a}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=l:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var FM=m.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:u,theme:h="light",richColors:f,duration:p,style:d,visibleToasts:w=PM,toastOptions:v,dir:x=d0(),gap:y=_M,loadingIcon:g,icons:b,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:j}=e,[T,C]=ce.useState([]),E=ce.useMemo(()=>Array.from(new Set([r].concat(T.filter(B=>B.position).map(B=>B.position)))),[T,r]),[A,R]=ce.useState([]),[V,D]=ce.useState(!1),[J,F]=ce.useState(!1),[Y,W]=ce.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
207k":"light"),H=ce.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=ce.useRef(null),k=ce.useRef(!1),N=ce.useCallback(B=>{C(L=>{var z;return(z=L.find(ee=>ee.id===B.id))!=null&&z.delete||Vn.dismiss(B.id),L.filter(({id:ee})=>ee!==B.id)})},[]);return ce.useEffect(()=>Vn.subscribe(B=>{if(B.dismiss){C(L=>L.map(z=>z.id===B.id?{...z,delete:!0}:z));return}setTimeout(()=>{tC.flushSync(()=>{C(L=>{let z=L.findIndex(ee=>ee.id===B.id);return z!==-1?[...L.slice(0,z),{...L[z],...B},...L.slice(z+1)]:[B,...L]})})})}),[]),ce.useEffect(()=>{if(h!=="system"){W(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:L})=>{W(L?"dark":"light")})}catch{B.addListener(({matches:z})=>{try{W(z?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),ce.useEffect(()=>{T.length<=1&&D(!1)},[T]),ce.useEffect(()=>{let B=L=>{var z,ee;s.every(X=>L[X]||L.code===X)&&(D(!0),(z=H.current)==null||z.focus()),L.code==="Escape"&&(document.activeElement===H.current||(ee=H.current)!=null&&ee.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),ce.useEffect(()=>{if(H.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,k.current=!1)}},[H.current]),ce.createElement("section",{ref:t,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((B,L)=>{var z;let[ee,X]=B.split("-");return T.length?ce.createElement("ol",{key:B,dir:x==="auto"?d0():x,tabIndex:-1,ref:H,className:l,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":ee,"data-lifted":V&&T.length>1&&!o,"data-x-position":X,style:{"--front-toast-height":`${((z=A[0])==null?void 0:z.height)||0}px`,"--width":`${RM}px`,"--gap":`${y}px`,...d,...DM(c,u)},onBlur:G=>{k.current&&!G.currentTarget.contains(G.relatedTarget)&&(k.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||k.current||(k.current=!0,_.current=G.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{J||D(!1)},onDragEnd:()=>D(!1),onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},T.filter(G=>!G.position&&L===0||G.position===B).map((G,ne)=>{var te,je;return ce.createElement($M,{key:G.id,icons:b,index:ne,toast:G,defaultRichColors:f,duration:(te=v==null?void 0:v.duration)!=null?te:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:w,closeButton:(je=v==null?void 0:v.closeButton)!=null?je:a,interacting:J,position:B,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:N,toasts:T.filter(q=>q.position==G.position),heights:A.filter(q=>q.position==G.position),setHeights:R,expandByDefault:o,gap:y,loadingIcon:g,expanded:V,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const BM=({...e})=>{const{theme:t="system"}=hM();return i.jsx(FM,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},UM=["top","right","bottom","left"],zi=Math.min,tr=Math.max,Bh=Math.round,md=Math.floor,ds=e=>({x:e,y:e}),VM={left:"right",right:"left",bottom:"top",top:"bottom"},zM={start:"end",end:"start"};function Yg(e,t,n){return tr(e,zi(t,n))}function Fs(e,t){return typeof e=="function"?e(t):e}function Bs(e){return e.split("-")[0]}function Sl(e){return e.split("-")[1]}function rx(e){return e==="x"?"y":"x"}function sx(e){return e==="y"?"height":"width"}const WM=new Set(["top","bottom"]);function as(e){return WM.has(Bs(e))?"y":"x"}function ix(e){return rx(as(e))}function GM(e,t,n){n===void 0&&(n=!1);const r=Sl(e),s=ix(e),o=sx(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Uh(a)),[a,Uh(a)]}function HM(e){const t=Uh(e);return[Jg(e),t,Jg(t)]}function Jg(e){return e.replace(/start|end/g,t=>zM[t])}const h0=["left","right"],f0=["right","left"],qM=["top","bottom"],KM=["bottom","top"];function YM(e,t,n){switch(e){case"top":case"bottom":return n?t?f0:h0:t?h0:f0;case"left":case"right":return t?qM:KM;default:return[]}}function JM(e,t,n,r){const s=Sl(e);let o=YM(Bs(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(Jg)))),o}function Uh(e){return e.replace(/left|right|bottom|top/g,t=>VM[t])}function QM(e){return{top:0,right:0,bottom:0,left:0,...e}}function GC(e){return typeof e!="number"?QM(e):{top:e,right:e,bottom:e,left:e}}function Vh(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function m0(e,t,n){let{reference:r,floating:s}=e;const o=as(t),a=ix(t),l=sx(a),c=Bs(t),u=o==="y",h=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,p=r[l]/2-s[l]/2;let d;switch(c){case"top":d={x:h,y:r.y-s.height};break;case"bottom":d={x:h,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-s.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Sl(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const XM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}
vendor: 9,931 bytes, line 207
207=n,l=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:f}=m0(u,r,c),p=r,d={},w=0;for(let v=0;v<l.length;v++){const{name:x,fn:y}=l[v],{x:g,y:b,data:S,reset:j}=await y({x:h,y:f,initialPlacement:r,placement:p,strategy:s,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});h=g??h,f=b??f,d={...d,[x]:{...d[x],...S}},j&&w<=50&&(w++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(u=j.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:h,y:f}=m0(u,p,c)),v=-1)}return{x:h,y:f,placement:p,strategy:s,middlewareData:d}};async function Gc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Fs(t,e),w=GC(d),x=l[p?f==="floating"?"reference":"floating":f],y=Vh(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:h,strategy:c})),g=f==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),S=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},j=Vh(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:b,strategy:c}):g);return{top:(y.top-j.top+w.top)/S.y,bottom:(j.bottom-y.bottom+w.bottom)/S.y,left:(y.left-j.left+w.left)/S.x,right:(j.right-y.right+w.right)/S.x}}const ZM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:h=0}=Fs(e,t)||{};if(u==null)return{};const f=GC(h),p={x:n,y:r},d=ix(s),w=sx(d),v=await a.getDimensions(u),x=d==="y",y=x?"top":"left",g=x?"bottom":"right",b=x?"clientHeight":"clientWidth",S=o.reference[w]+o.reference[d]-p[d]-o.floating[w],j=p[d]-o.reference[d],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=l.floating[b]||o.floating[w]);const E=S/2-j/2,A=C/2-v[w]/2-1,R=zi(f[y],A),V=zi(f[g],A),D=R,J=C-v[w]-V,F=C/2-v[w]/2+E,Y=Yg(D,F,J),W=!c.arrow&&Sl(s)!=null&&F!==Y&&o.reference[w]/2-(F<D?R:V)-v[w]/2<0,H=W?F<D?F-D:F-J:0;return{[d]:p[d]+H,data:{[d]:Y,centerOffset:F-Y-H,...W&&{alignmentOffset:H}},reset:W}}}),eL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...x}=Fs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Bs(s),g=as(l),b=Bs(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=p||(b||!v?[Uh(l)]:HM(l)),T=w!=="none";!p&&T&&j.push(...JM(l,v,w,S));const C=[l,...j],E=await Gc(t,x),A=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&A.push(E[y]),f){const F=GM(s,a,S);A.push(E[F[0]],E[F[1]])}if(R=[...R,{placement:s,overflows:A}],!A.every(F=>F<=0)){var V,D;const F=(((V=o.flip)==null?void 0:V.index)||0)+1,Y=C[F];if(Y&&(!(f==="alignment"?g!==as(Y):!1)||R.every(P=>P.overflows[0]>0&&as(P.placement)===g)))return{data:{index:F,overflows:R},reset:{placement:Y}};let W=(D=R.filter(H=>H.overflows[0]<=0).sort((H,P)=>H.overflows[1]-P.overflows[1])[0])==null?void 0:D.placement;if(!W)switch(d){case"bestFit":{var J;const H=(J=R.filter(P=>{if(T){const _=as(P.placement);return _===g||_==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(_=>_>0).reduce((_,k)=>_+k,0)]).sort((P,_)=>P[1]-_[1])[0])==null?void 0:J[0];H&&(W=H);break}case"initialPlacement":W=l;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function p0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function g0(e){return UM.some(t=>e[t]>=0)}const tL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Fs(e,t);switch(r){case"referenceHidden":{const o=await Gc(t,{...s,elementContext:"reference"}),a=p0(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:g0(a)}}}case"escaped":{const o=await Gc(t,{...s,altBoundary:!0}),a=p0(o,n.floating);return{data:{escapedOffsets:a,escaped:g0(a)}}}default:return{}}}}},HC=new Set(["left","top"]);async function nL(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Bs(n),l=Sl(n),c=as(n)==="y",u=HC.has(a)?-1:1,h=o&&c?-1:1,f=Fs(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof w=="number"&&(d=l==="end"?w*-1:w),c?{x:d*h,y:p*u}:{x:p*u,y:d*h}}const rL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:l}=t,c=await nL(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},sL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:y,y:g}=x;return{x:y,y:g}}},...c}=Fs(e,t),u={x:n,y:r},h=await Gc(t,c),f=as(Bs(s)),p=rx(f);let d=u[p],w=u[f];if(o){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=d+h[x],b=d-h[y];d=Yg(g,d,b)}if(a){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",g=w+h[x],b=w-h[y];w=Yg(g,w,b)}const v=l.fn({...t,[p]:d,[f]:w});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[f]:a}}}}}},iL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Fs(e,t),h={x:n,y:r},f=as(s),p=rx(f);let d=h[p],w=h[f];const v=Fs(l,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const b=p==="y"?"height":"width",S=o.reference[p]-o.floating[b]+x.mainAxis,j=o.reference[p]+o.reference[b]-x.mainAxis;d<S?d=S:d>j&&(d=j)}if(u){var y,g;const b=p==="y"?"width":"height",S=HC.has(Bs(s)),j=o.reference[f]-o.floating[b]+(S&&((y=a.offset)==null?void 0:y[f])||0)+(S?0:x.crossAxis),T=o.reference[f]+o.reference[b]+(S?0:((g=a.offset)==null?void 0:g[f])||0)-(S?x.crossAxis:0);w<j?w=j:w>T&&(w=T)}return{[p]:d,[f]:w}}}},oL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:a,elements:l}=t,{apply:c=()=>{},...u}=Fs(e,t),h=await Gc(t,u),f=Bs(s),p=Sl(s),d=as(s)==="y",{width:w,height:v}=o.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,x=p==="end"?"top":"bottom");const g=v-h.top-h.bottom,b=w-h.left-h.right,S=zi(v-h[x],g),j=zi(w-h[y],b),T=!t.middlewareData.shift;let C=S,E=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=g),T&&!p){const R=tr(h.left,0),V=tr(h.right,0),D=tr(h.top,0),J=tr(h.bottom,0);d?E=w-2*(R!==0||V!==0?R+V:tr(h.left,h.right)):C=v-2*(D!==0||J!==0?D+J:tr(h.top,h.bottom))}await c({...t,availableWidth:E,availableHeight:C});const A=await a.getDimensions(l.floating);return w!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function Bf(){return typeof window<"u"}function jl(e){return qC(e)?(e.nodeName||"").toLowerCase():"#document"}function ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ys(e){var t;return(t=(qC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qC(e){return Bf()?e instanceof Node||e instanceof ir(e).Node:!1}function Hr(e){return Bf()?e instanceof Element||e instanceof ir(e).Element:!1}function ps(e){return Bf()?e instanceof HTMLElement||e instanceof ir(e).HTMLElement:!1}function y0(e){return!Bf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ir(e).ShadowRoot}const aL=new Set(["inline","contents"]);function Su(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!aL.has(s)}const lL=new Set(["table","td","th"]);function cL(e){return lL.has(jl(e))}const uL=[":popover-open",":modal"];function Uf(e){return uL.some(t=>{try{return e.matches(t)}catch{return!1}})}const dL=["transform","translate","scale","rotate","perspective"],hL=["transform","translate","scale","rotate","perspective","filter"],fL=["paint","layout","strict","content"];function ox(e){const t=ax(),n=Hr(e)?qr(e):e;return dL.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||hL.some(r=>(n.willChange||"").includes(r))||fL.some(r=>(n.contain||"").includes(r))}function mL(e){let t=Wi(e);for(;ps(t)&&!rl(t);){if(ox(t))return t;if(Uf(t))return null;t=Wi(t)}return null}function ax(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pL=new Set(["html","body","#document"]);function rl(e){return pL.has(jl(e))}function qr(e){return ir(e).getComputedStyle(e)}function Vf(e){return Hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wi(e){if(jl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||y0(e)&&e.host||ys(e);return y0(t)?t.host:t}function KC(e){const t=Wi(e);return rl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ps(t)&&Su(t)?t:KC(t)}function Hc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=KC(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=ir(s);if(o){const l=Qg(a);
vendor: 4,772 bytes, line 207
207return t.concat(a,a.visualViewport||[],Su(s)?s:[],l&&n?Hc(l):[])}return t.concat(s,Hc(s,[],n))}function Qg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YC(e){const t=qr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ps(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,l=Bh(n)!==o||Bh(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function lx(e){return Hr(e)?e:e.contextElement}function Pa(e){const t=lx(e);if(!ps(t))return ds(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=YC(t);let a=(o?Bh(n.width):n.width)/r,l=(o?Bh(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const gL=ds(0);function JC(e){const t=ir(e);return!ax()||!t.visualViewport?gL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ir(e)?!1:t}function $o(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=lx(e);let a=ds(1);t&&(r?Hr(r)&&(a=Pa(r)):a=Pa(e));const l=yL(o,n,r)?JC(o):ds(0);let c=(s.left+l.x)/a.x,u=(s.top+l.y)/a.y,h=s.width/a.x,f=s.height/a.y;if(o){const p=ir(o),d=r&&Hr(r)?ir(r):r;let w=p,v=Qg(w);for(;v&&r&&d!==w;){const x=Pa(v),y=v.getBoundingClientRect(),g=qr(v),b=y.left+(v.clientLeft+parseFloat(g.paddingLeft))*x.x,S=y.top+(v.clientTop+parseFloat(g.paddingTop))*x.y;c*=x.x,u*=x.y,h*=x.x,f*=x.y,c+=b,u+=S,w=ir(v),v=Qg(w)}}return Vh({width:h,height:f,x:c,y:u})}function cx(e,t){const n=Vf(e).scrollLeft;return t?t.left+n:$o(ys(e)).left+n}function QC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:cx(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function vL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=ys(r),l=t?Uf(t.floating):!1;if(r===a||l&&o)return n;let c={scrollLeft:0,scrollTop:0},u=ds(1);const h=ds(0),f=ps(r);if((f||!f&&!o)&&((jl(r)!=="body"||Su(a))&&(c=Vf(r)),ps(r))){const d=$o(r);u=Pa(r),h.x=d.x+r.clientLeft,h.y=d.y+r.clientTop}const p=a&&!f&&!o?QC(a,c,!0):ds(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+h.x+p.x,y:n.y*u.y-c.scrollTop*u.y+h.y+p.y}}function xL(e){return Array.from(e.getClientRects())}function wL(e){const t=ys(e),n=Vf(e),r=e.ownerDocument.body,s=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cx(e);const l=-n.scrollTop;return qr(r).direction==="rtl"&&(a+=tr(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:l}}function bL(e,t){const n=ir(e),r=ys(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(s){o=s.width,a=s.height;const u=ax();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:a,x:l,y:c}}const SL=new Set(["absolute","fixed"]);function jL(e,t){const n=$o(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=ps(e)?Pa(e):ds(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:a,height:l,x:c,y:u}}function v0(e,t,n){let r;if(t==="viewport")r=bL(e,n);else if(t==="document")r=wL(ys(e));else if(Hr(t))r=jL(t,n);else{const s=JC(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Vh(r)}function XC(e,t){const n=Wi(e);return n===t||!Hr(n)||rl(n)?!1:qr(n).position==="fixed"||XC(n,t)}function kL(e,t){const n=t.get(e);if(n)return n;let r=Hc(e,[],!1).filter(l=>Hr(l)&&jl(l)!=="body"),s=null;const o=qr(e).position==="fixed";let a=o?Wi(e):e;for(;Hr(a)&&!rl(a);){const l=qr(a),c=ox(a);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&SL.has(s.position)||Su(a)&&!c&&XC(e,a))?r=r.filter(h=>h!==a):s=l,a=Wi(a)}return t.set(e,r),r}function NL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?Uf(t)?[]:kL(t,this._c):[].concat(n),r],l=a[0],c=a.reduce((u,h)=>{const f=v0(t,h,s);return u.top=tr(f.top,u.top),u.right=zi(f.right,u.right),u.bottom=zi(f.bottom,u.bottom),u.left=tr(f.left,u.left),u},v0(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function CL(e){const{width:t,height:n}=YC(e);return{width:t,height:n}}function EL(e,t,n){const r=ps(t),s=ys(t),o=n==="fixed",a=$o(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=ds(0);function u(){c.x=cx(s)}if(r||!r&&!o)if((jl(t)!=="body"||Su(s))&&(l=Vf(t)),r){const d=$o(t,!0,o,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else s&&u();o&&!r&&s&&u();const h=s&&!r&&!o?QC(s,l):ds(0),f=a.left+l.scrollLeft-c.x-h.x,p=a.top+l.scrollTop-c.y-h.y;return{x:f,y:p,width:a.width,height:a.height}}function Jm(e){return qr(e).position==="static"}function x0(e,t){if(!ps(e)||qr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function ZC(e,t){const n=ir(e);
vendor: 9,133 bytes, line 207
207if(Uf(e))return n;if(!ps(e)){let s=Wi(e);for(;s&&!rl(s);){if(Hr(s)&&!Jm(s))return s;s=Wi(s)}return n}let r=x0(e,t);for(;r&&cL(r)&&Jm(r);)r=x0(r,t);return r&&rl(r)&&Jm(r)&&!ox(r)?n:r||mL(e)||n}const TL=async function(e){const t=this.getOffsetParent||ZC,n=this.getDimensions,r=await n(e.floating);return{reference:EL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PL(e){return qr(e).direction==="rtl"}const IL={convertOffsetParentRelativeRectToViewportRelativeRect:vL,getDocumentElement:ys,getClippingRect:NL,getOffsetParent:ZC,getElementRects:TL,getClientRects:xL,getDimensions:CL,getScale:Pa,isElement:Hr,isRTL:PL};function eE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AL(e,t){let n=null,r;const s=ys(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:h,top:f,width:p,height:d}=u;if(l||t(),!p||!d)return;const w=md(f),v=md(s.clientWidth-(h+p)),x=md(s.clientHeight-(f+d)),y=md(h),b={rootMargin:-w+"px "+-v+"px "+-x+"px "+-y+"px",threshold:tr(0,zi(1,c))||1};let S=!0;function j(T){const C=T[0].intersectionRatio;if(C!==c){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!eE(u,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(j,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,b)}n.observe(e)}return a(!0),o}function RL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=lx(e),h=s||o?[...u?Hc(u):[],...Hc(t)]:[];h.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&l?AL(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[g]=y;g&&g.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(t)})),n()}),u&&!c&&d.observe(u),d.observe(t));let w,v=c?$o(e):null;c&&x();function x(){const y=$o(e);v&&!eE(v,y)&&n(),v=y,w=requestAnimationFrame(x)}return n(),()=>{var y;h.forEach(g=>{s&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),f==null||f(),(y=d)==null||y.disconnect(),d=null,c&&cancelAnimationFrame(w)}}const _L=rL,OL=sL,ML=eL,LL=oL,$L=tL,w0=ZM,DL=iL,FL=(e,t,n)=>{const r=new Map,s={platform:IL,...n},o={...s.platform,_c:r};return XM(e,t,{...s,platform:o})};var BL=typeof document<"u",UL=function(){},Zd=BL?m.useLayoutEffect:UL;function zh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zh(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!zh(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function tE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function b0(e,t){const n=tE(e);return Math.round(t*n)/n}function Qm(e){const t=m.useRef(e);return Zd(()=>{t.current=e}),t}function VL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[h,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=m.useState(r);zh(p,r)||d(r);const[w,v]=m.useState(null),[x,y]=m.useState(null),g=m.useCallback(P=>{P!==T.current&&(T.current=P,v(P))},[]),b=m.useCallback(P=>{P!==C.current&&(C.current=P,y(P))},[]),S=o||w,j=a||x,T=m.useRef(null),C=m.useRef(null),E=m.useRef(h),A=c!=null,R=Qm(c),V=Qm(s),D=Qm(u),J=m.useCallback(()=>{if(!T.current||!C.current)return;const P={placement:t,strategy:n,middleware:p};V.current&&(P.platform=V.current),FL(T.current,C.current,P).then(_=>{const k={..._,isPositioned:D.current!==!1};F.current&&!zh(E.current,k)&&(E.current=k,wl.flushSync(()=>{f(k)}))})},[p,t,n,V,D]);Zd(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[u]);const F=m.useRef(!1);Zd(()=>(F.current=!0,()=>{F.current=!1}),[]),Zd(()=>{if(S&&(T.current=S),j&&(C.current=j),S&&j){if(R.current)return R.current(S,j,J);J()}},[S,j,J,R,A]);const Y=m.useMemo(()=>({reference:T,floating:C,setReference:g,setFloating:b}),[g,b]),W=m.useMemo(()=>({reference:S,floating:j}),[S,j]),H=m.useMemo(()=>{const P={position:n,left:0,top:0};if(!W.floating)return P;const _=b0(W.floating,h.x),k=b0(W.floating,h.y);return l?{...P,transform:"translate("+_+"px, "+k+"px)",...tE(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:k}},[n,l,W.floating,h.x,h.y]);return m.useMemo(()=>({...h,update:J,refs:Y,elements:W,floatingStyles:H}),[h,J,Y,W,H])}const zL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?w0({element:r.current,padding:s}).fn(n):{}:r?w0({element:r,padding:s}).fn(n):{}}}},WL=(e,t)=>({..._L(e),options:[e,t]}),GL=(e,t)=>({...OL(e),options:[e,t]}),HL=(e,t)=>({...DL(e),options:[e,t]}),qL=(e,t)=>({...ML(e),options:[e,t]}),KL=(e,t)=>({...LL(e),options:[e,t]}),YL=(e,t)=>({...$L(e),options:[e,t]}),JL=(e,t)=>({...zL(e),options:[e,t]});var QL="Arrow",nE=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return i.jsx(Ln.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});nE.displayName=QL;var XL=nE;function ZL(e){const[t,n]=m.useState(void 0);return Vi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ux="Popper",[rE,sE]=$f(ux),[e4,iE]=rE(ux),oE=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return i.jsx(e4,{scope:t,anchor:r,onAnchorChange:s,children:n})};oE.displayName=ux;var aE="PopperAnchor",lE=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=iE(aE,n),a=m.useRef(null),l=Gr(t,a);return m.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:i.jsx(Ln.div,{...s,ref:l})});lE.displayName=aE;var dx="PopperContent",[t4,n4]=rE(dx),cE=m.forwardRef((e,t)=>{var G,ne,te,je,q,ie;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:d="optimized",onPlaced:w,...v}=e,x=iE(dx,n),[y,g]=m.useState(null),b=Gr(t,me=>g(me)),[S,j]=m.useState(null),T=ZL(S),C=(T==null?void 0:T.width)??0,E=(T==null?void 0:T.height)??0,A=r+(o!=="center"?"-"+o:""),R=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},V=Array.isArray(u)?u:[u],D=V.length>0,J={padding:R,boundary:V.filter(s4),altBoundary:D},{refs:F,floatingStyles:Y,placement:W,isPositioned:H,middlewareData:P}=VL({strategy:"fixed",placement:A,whileElementsMounted:(...me)=>RL(...me,{animationFrame:d==="always"}),elements:{reference:x.anchor},middleware:[WL({mainAxis:s+E,alignmentAxis:a}),c&&GL({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?HL():void 0,...J}),c&&qL({...J}),KL({...J,apply:({elements:me,rects:he,availableWidth:fe,availableHeight:ae})=>{const{width:Se,height:_e}=he.reference,Ce=me.floating.style;Ce.setProperty("--radix-popper-available-width",`${fe}px`),Ce.setProperty("--radix-popper-available-height",`${ae}px`),Ce.setProperty("--radix-popper-anchor-width",`${Se}px`),Ce.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),S&&JL({element:S,padding:l}),i4({arrowWidth:C,arrowHeight:E}),p&&YL({strategy:"referenceHidden",...J})]}),[_,k]=hE(W),N=Ui(w);Vi(()=>{H&&(N==null||N())},[H,N]);const B=(G=P.arrow)==null?void 0:G.x,L=(ne=P.arrow)==null?void 0:ne.y,z=((te=P.arrow)==null?void 0:te.centerOffset)!==0,[ee,X]=m.useState();return Vi(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(je=P.transformOrigin)==null?void 0:je.x,(q=P.transformOrigin)==null?void 0:q.y].join(" "),...((ie=P.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(t4,{scope:n,placedSide:_,onArrowChange:j,arrowX:B,arrowY:L,shouldHideArrow:z,children:i.jsx(Ln.div,{"data-side":_,"data-align":k,...v,ref:b,style:{...v.style,animation:H?void 0:"none"}})})})});cE.displayName=dx;var uE="PopperArrow",r4={top:"bottom",right:"left",bottom:"top",left:"r
207ight"},dE=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=n4(uE,r),a=r4[o.placedSide];return i.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i.jsx(XL,{...s,ref:n,style:{...s.style,display:"block"}})})});dE.displayName=uE;function s4(e){return e!==null}var i4=e=>({name:"transformOrigin",options:e,fn(t){var x,y,g;const{placement:n,rects:r,middlewareData:s}=t,a=((x=s.arrow)==null?void 0:x.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,h]=hE(n),f={start:"0%",center:"50%",end:"100%"}[h],p=(((y=s.arrow)==null?void 0:y.x)??0)+l/2,d=(((g=s.arrow)==null?void 0:g.y)??0)+c/2;let w="",v="";return u==="bottom"?(w=a?f:`${p}px`,v=`${-c}px`):u==="top"?(w=a?f:`${p}px`,v=`${r.floating.height+c}px`):u==="right"?(w=`${-c}px`,v=a?f:`${d}px`):u==="left"&&(w=`${r.floating.width+c}px`,v=a?f:`${d}px`),{data:{x:w,y:v}}}});function hE(e){const[t,n="center"]=e.split("-");return[t,n]}var Pq=oE,o4=lE,a4=cE,l4=dE,[zf,Iq]=$f("Tooltip",[sE]),hx=sE(),fE="TooltipProvider",c4=700,S0="tooltip.open",[u4,mE]=zf(fE),pE=e=>{const{__scopeTooltip:t,delayDuration:n=c4,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,a=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(u4,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:o})};pE.displayName=fE;var gE="Tooltip",[Aq,Wf]=zf(gE),Xg="TooltipTrigger",d4=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Wf(Xg,n),o=mE(Xg,n),a=hx(n),l=m.useRef(null),c=Gr(t,l,s.onTriggerChange),u=m.useRef(!1),h=m.useRef(!1),f=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),i.jsx(o4,{asChild:!0,...a,children:i.jsx(Ln.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:Qt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),h.current=!0)}),onPointerLeave:Qt(e.onPointerLeave,()=>{s.onTriggerLeave(),h.current=!1}),onPointerDown:Qt(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Qt(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:Qt(e.onBlur,s.onClose),onClick:Qt(e.onClick,s.onClose)})})});d4.displayName=Xg;var h4="TooltipPortal",[Rq,f4]=zf(h4,{forceMount:void 0}),sl="TooltipContent",yE=m.forwardRef((e,t)=>{const n=f4(sl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,a=Wf(sl,e.__scopeTooltip);return i.jsx(qv,{present:r||a.open,children:a.disableHoverableContent?i.jsx(vE,{side:s,...o,ref:t}):i.jsx(m4,{side:s,...o,ref:t})})}),m4=m.forwardRef((e,t)=>{const n=Wf(sl,e.__scopeTooltip),r=mE(sl,e.__scopeTooltip),s=m.useRef(null),o=Gr(t,s),[a,l]=m.useState(null),{trigger:c,onClose:u}=n,h=s.current,{onPointerInTransitChange:f}=r,p=m.useCallback(()=>{l(null),f(!1)},[f]),d=m.useCallback((w,v)=>{const x=w.currentTarget,y={x:w.clientX,y:w.clientY},g=x4(y,x.getBoundingClientRect()),b=w4(y,g),S=b4(v.getBoundingClientRect()),j=j4([...b,...S]);l(j),f(!0)},[f]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(c&&h){const w=x=>d(x,h),v=x=>d(x,c);return c.addEventListener("pointerleave",w),h.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",w),h.removeEventListener("pointerleave",v)}}},[c,h,d,p]),m.useEffect(()=>{if(a){const w=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},g=(c==null?void 0:c.contains(x))||(h==null?void 0:h.contains(x)),b=!S4(y,a);g?p():b&&(p(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,h,a,u,p]),i.jsx(vE,{...e,ref:o})}),[p4,g4]=zf(gE,{isInside:!1}),y4=p_("TooltipContent"),vE=m.forwardRef((e,t)=>
207{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...l}=e,c=Wf(sl,n),u=hx(n),{onClose:h}=c;return m.useEffect(()=>(document.addEventListener(S0,h),()=>document.removeEventListener(S0,h)),[h]),m.useEffect(()=>{if(c.trigger){const f=p=>{const d=p.target;d!=null&&d.contains(c.trigger)&&h()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,h]),i.jsx(Hv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:h,children:i.jsxs(a4,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(y4,{children:r}),i.jsx(p4,{scope:n,isInside:!0,children:i.jsx(B_,{id:c.contentId,role:"tooltip",children:s||r})})]})})});yE.displayName=sl;var xE="TooltipArrow",v4=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=hx(n);return g4(xE,n).isInside?null:i.jsx(l4,{...s,...r,ref:t})});v4.displayName=xE;function x4(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function w4(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function b4(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function S4(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o],c=t[a],u=l.x,h=l.y,f=c.x,p=c.y;h>r!=p>r&&n<(f-u)*(r-h)/(p-h)+u&&(s=!s)}return s}function j4(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),k4(t)}function k4(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var N4=pE,wE=yE;const C4=N4,E4=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(wE,{ref:r,sideOffset:t,className:rn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));E4.displayName=wE.displayName;var Gf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Hf=typeof window>"u"||"Deno"in globalThis;function Rr(){}function T4(e,t){return typeof e=="function"?e(t):e}function P4(e){return typeof e=="number"&&e>=0&&e!==1/0}function I4(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zg(e,t){return typeof e=="function"?e(t):e}function A4(e,t){return typeof e=="function"?e(t):e}function j0(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==fx(a,t.options))return!1}else if(!Kc(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||o&&!o(t))}function k0(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!Kc(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function fx(e,t){return((t==null?void 0:t.queryKeyHashFn)||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>ey(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Kc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Kc(e[n],t[n])):!1}function bE(e,t){if(e===t)return e;const n=N0(e)&&N0(t);if(n||ey(e)&&ey(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),a=o.length,l=n?[]:{},c=new Set(r);let u=0;for(let h=0;h<a;h++){const f=n?h:o[h];(!n&&c.has(f)||n)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,u++):(l[f]=bE(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&u++)}return s===a&&u===s?e:l}return t}function N0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ey(e){if(!C0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!C0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function C0(e){return Object.prototype.toString.call(e)==="[object Object]"}function R4(e){return new Promise(t=>{setTimeout(t,e)})}function _4(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?bE(e,t):t}function O4(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function M4(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var mx=Symbol();function SE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===mx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var bo,fi,Ba,_j,L4=(_j=class extends Gf{constructor(){super();lt(this,bo);lt(this,fi);lt(this,Ba);Ve(this,Ba,t=>{if(!Hf&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Z(this,fi)||this.setEventListener(Z(this,Ba))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,fi))==null||t.call(this),Ve(this,fi,void 0))}setEventListener(t){var n;Ve(this,Ba,t),(n=Z(this,fi))==null||n.call(this),Ve(this,fi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Z(this,bo)!==t&&(Ve(this,bo,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 10,626 bytes, line 207
207this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Z(this,bo)=="boolean"?Z(this,bo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},bo=new WeakMap,fi=new WeakMap,Ba=new WeakMap,_j),jE=new L4,Ua,mi,Va,Oj,$4=(Oj=class extends Gf{constructor(){super();lt(this,Ua,!0);lt(this,mi);lt(this,Va);Ve(this,Va,t=>{if(!Hf&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Z(this,mi)||this.setEventListener(Z(this,Va))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,mi))==null||t.call(this),Ve(this,mi,void 0))}setEventListener(t){var n;Ve(this,Va,t),(n=Z(this,mi))==null||n.call(this),Ve(this,mi,t(this.setOnline.bind(this)))}setOnline(t){Z(this,Ua)!==t&&(Ve(this,Ua,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Z(this,Ua)}},Ua=new WeakMap,mi=new WeakMap,Va=new WeakMap,Oj),Wh=new $4;function D4(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function F4(e){return Math.min(1e3*2**e,3e4)}function kE(e){return(e??"online")==="online"?Wh.isOnline():!0}var NE=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xm(e){return e instanceof NE}function CE(e){let t=!1,n=0,r=!1,s;const o=D4(),a=v=>{var x;r||(p(new NE(v)),(x=e.abort)==null||x.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>jE.isFocused()&&(e.networkMode==="always"||Wh.isOnline())&&e.canRun(),h=()=>kE(e.networkMode)&&e.canRun(),f=v=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,v),s==null||s(),o.resolve(v))},p=v=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,v),s==null||s(),o.reject(v))},d=()=>new Promise(v=>{var x;s=y=>{(r||u())&&v(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;s=void 0,r||(v=e.onContinue)==null||v.call(e)}),w=()=>{if(r)return;let v;const x=n===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(f).catch(y=>{var T;if(r)return;const g=e.retry??(Hf?0:3),b=e.retryDelay??F4,S=typeof b=="function"?b(n,y):b,j=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,y);if(t||!j){p(y);return}n++,(T=e.onFail)==null||T.call(e,n,y),R4(S).then(()=>u()?void 0:d()).then(()=>{t?p(y):w()})})};return{promise:o,cancel:a,continue:()=>(s==null||s(),o),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?w():d().then(w),o)}}var B4=e=>setTimeout(e,0);function U4(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=B4;const o=l=>{t?e.push(l):s(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Tn=U4(),So,Mj,EE=(Mj=class{constructor(){lt(this,So)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),P4(this.gcTime)&&Ve(this,So,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hf?1/0:5*60*1e3))}clearGcTimeout(){Z(this,So)&&(clearTimeout(Z(this,So)),Ve(this,So,void 0))}},So=new WeakMap,Mj),za,jo,gr,ko,vn,fu,No,_r,ks,Lj,V4=(Lj=class extends EE{constructor(t){super();lt(this,_r);lt(this,za);lt(this,jo);lt(this,gr);lt(this,ko);lt(this,vn);lt(this,fu);lt(this,No);Ve(this,No,!1),Ve(this,fu,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ve(this,ko,t.client),Ve(this,gr,Z(this,ko).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ve(this,za,W4(this.options)),this.state=t.state??Z(this,za),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Z(this,vn))==null?void 0:t.promise}setOptions(t){this.options={...Z(this,fu),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,gr).remove(this)}setData(t,n){const r=_4(this.state.data,t,this.options);return pn(this,_r,ks).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){pn(this,_r,ks).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=Z(this,vn))==null?void 0:r.promise;return(s=Z(this,vn))==null||s.cancel(t),n?n.then(Rr).catch(Rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,za))}isActive(){return this.observers.some(t=>A4(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zg(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!I4(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,vn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,vn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Z(this,gr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Z(this,vn)&&(Z(this,No)?Z(this,vn).cancel({revert:!0}):Z(this,vn).cancelRetry()),this.scheduleGc()),Z(this,gr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||pn(this,_r,ks).call(this,{type:"invalidate"})}fetch(t,n){var u,h,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Z(this,vn))return Z(this,vn).continueRetry(),Z(this,vn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(d=>d.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Ve(this,No,!0),r.signal)})},o=()=>{const p=SE(this.options,n),w=(()=>{const v={client:Z(this,ko),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return Ve(this,No,!1),this.options.persister?this.options.persister(p,w,this):p(w)},l=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Z(this,ko),state:this.state,fetchFn:o};return s(p),p})();(u=this.options.behavior)==null||u.onFetch(l,this),Ve(this,jo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&pn(this,_r,ks).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta});const c=p=>{var d,w,v,x;Xm(p)&&p.silent||pn(this,_r,ks).call(this,{type:"error",error:p}),Xm(p)||((w=(d=Z(this,gr).config).onError)==null||w.call(d,p,this),(x=(v=Z(this,gr).config).onSettled)==null||x.call(v,this.state.data,p,this)),this.scheduleGc()};return Ve(this,vn,CE({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var d,w,v,x;if(p===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(y){c(y);return}(w=(d=Z(this,gr).config).onSuccess)==null||w.call(d,p,this),(x=(v=Z(this,gr).config).onSettled)==null||x.call(v,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,d)=>{pn(this,_r,ks).call(this,{type:"failed",failureCount:p,error:d})},onPause:()=>{pn(this,_r,ks).call(this,{type:"pause"})},onContinue:()=>{pn(this,_r,ks).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),Z(this,vn).start()}},za=new WeakMap,jo=new WeakMap,gr=new WeakMap,ko=new WeakMap,vn=new WeakMap,fu=new WeakMap,No=new WeakMap,_r=new WeakSet,ks=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...z4(r.data,this.options),fetchMeta:t.meta??null};case"success":return Ve(this,jo,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Xm(s)&&s.revert&&Z(this,jo)?{...Z(this,jo),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Tn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Z(this,gr).notify({query:this,type:"updated",action:t})})},Lj);function z4(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function W4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ns,$j,G4=($j=class extends Gf{constructor(t={}){super();lt(this,ns);this.config=t,Ve(this,ns,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??fx(s,n);let a=this.get(o);return a||(a=new V4({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){Z(this,ns).has(t.queryHash)||(Z(this,ns).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Z(this,ns).get(t.queryHash);n&&(t.destroy(),n===t&&Z(this,ns).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tn.batch(()=>
207{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Z(this,ns).get(t)}getAll(){return[...Z(this,ns).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>j0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>j0(t,r)):n}notify(t){Tn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Tn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ns=new WeakMap,$j),rs,Cn,Co,ss,ni,Dj,H4=(Dj=class extends EE{constructor(t){super();lt(this,ss);lt(this,rs);lt(this,Cn);lt(this,Co);this.mutationId=t.mutationId,Ve(this,Cn,t.mutationCache),Ve(this,rs,[]),this.state=t.state||q4(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Z(this,rs).includes(t)||(Z(this,rs).push(t),this.clearGcTimeout(),Z(this,Cn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ve(this,rs,Z(this,rs).filter(n=>n!==t)),this.scheduleGc(),Z(this,Cn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Z(this,rs).length||(this.state.status==="pending"?this.scheduleGc():Z(this,Cn).remove(this))}continue(){var t;return((t=Z(this,Co))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,c,u,h,f,p,d,w,v,x,y,g,b,S,j,T,C,E;const n=()=>{pn(this,ss,ni).call(this,{type:"continue"})};Ve(this,Co,CE({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,R)=>{pn(this,ss,ni).call(this,{type:"failed",failureCount:A,error:R})},onPause:()=>{pn(this,ss,ni).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,Cn).canRun(this)}));const r=this.state.status==="pending",s=!Z(this,Co).canStart();try{if(r)n();else{pn(this,ss,ni).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(o=Z(this,Cn).config).onMutate)==null?void 0:a.call(o,t,this));const R=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));R!==this.state.context&&pn(this,ss,ni).call(this,{type:"pending",context:R,variables:t,isPaused:s})}const A=await Z(this,Co).start();return await((h=(u=Z(this,Cn).config).onSuccess)==null?void 0:h.call(u,A,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,A,t,this.state.context)),await((w=(d=Z(this,Cn).config).onSettled)==null?void 0:w.call(d,A,null,this.state.variables,this.state.context,this)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,A,null,t,this.state.context)),pn(this,ss,ni).call(this,{type:"success",data:A}),A}catch(A){try{throw await((g=(y=Z(this,Cn).config).onError)==null?void 0:g.call(y,A,t,this.state.context,this)),await((S=(b=this.options).onError)==null?void 0:S.call(b,A,t,this.state.context)),await((T=(j=Z(this,Cn).config).onSettled)==null?void 0:T.call(j,void 0,A,this.state.variables,this.state.context,this)),await((E=(C=this.options).onSettled)==null?void 0:E.call(C,void 0,A,t,this.state.context)),A}finally{pn(this,ss,ni).call(this,{type:"error",error:A})}}finally{Z(this,Cn).runNext(this)}}},rs=new WeakMap,Cn=new WeakMap,Co=new WeakMap,ss=new WeakSet,ni=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Tn.batch(()=>{Z(this,rs).forEach(r=>{r.onMutationUpdate(t)}),Z(this,Cn).notify({mutation:this,type:"updated",action:t})})},Dj);function q4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ts,Or,mu,Fj,K4=(Fj=class extends Gf{constructor(t={}){super();lt(this,Ts);lt(this,Or);lt(this,mu);this.config=t,Ve(this,Ts,new Set),Ve(this,Or,new Map),Ve(this,mu,0)}build(t,n,r){const s=new H4({mutationCache:this,mutationId:++qu(this,mu)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){Z(this,Ts).add(t);const n=pd(t);if(typeof n=="string"){const r=Z(this,Or).get(n);r?r.push(t):Z(this,Or).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Z(this,Ts).delete(t)){const n=pd(t);if(typeof n=="string"){const r=Z(this,Or).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&Z(this,Or).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pd(t);if(typeof n=="string"){const r=Z(this,Or).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=pd(t);if(typeof n=="string"){const s=(r=Z(this,Or).get(n))==null?void 0:r.find(o=>
vendor: 4,094 bytes, line 207
207o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Tn.batch(()=>{Z(this,Ts).forEach(t=>{this.notify({type:"removed",mutation:t})}),Z(this,Ts).clear(),Z(this,Or).clear()})}getAll(){return Array.from(Z(this,Ts))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>k0(n,r))}findAll(t={}){return this.getAll().filter(n=>k0(t,n))}notify(t){Tn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Tn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Rr))))}},Ts=new WeakMap,Or=new WeakMap,mu=new WeakMap,Fj);function pd(e){var t;return(t=e.options.scope)==null?void 0:t.id}function E0(e){return{onFetch:(t,n)=>{var h,f,p,d,w;const r=t.options,s=(p=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,o=((d=t.state.data)==null?void 0:d.pages)||[],a=((w=t.state.data)==null?void 0:w.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},y=SE(t.options,t.fetchOptions),g=async(b,S,j)=>{if(v)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const C=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return x(V),V})(),E=await y(C),{maxPages:A}=t.options,R=j?M4:O4;return{pages:R(b.pages,E,A),pageParams:R(b.pageParams,S,A)}};if(s&&o.length){const b=s==="backward",S=b?Y4:T0,j={pages:o,pageParams:a},T=S(r,j);l=await g(j,T,b)}else{const b=e??o.length;do{const S=c===0?a[0]??r.initialPageParam:T0(r,l);if(c>0&&S==null)break;l=await g(l,S),c++}while(c<b)}return l};t.options.persister?t.fetchFn=()=>{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function T0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Y4(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Mt,pi,gi,Wa,Ga,yi,Ha,qa,Bj,J4=(Bj=class{constructor(e={}){lt(this,Mt);lt(this,pi);lt(this,gi);lt(this,Wa);lt(this,Ga);lt(this,yi);lt(this,Ha);lt(this,qa);Ve(this,Mt,e.queryCache||new G4),Ve(this,pi,e.mutationCache||new K4),Ve(this,gi,e.defaultOptions||{}),Ve(this,Wa,new Map),Ve(this,Ga,new Map),Ve(this,yi,0)}mount(){qu(this,yi)._++,Z(this,yi)===1&&(Ve(this,Ha,jE.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,Mt).onFocus())})),Ve(this,qa,Wh.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,Mt).onOnline())})))}unmount(){var e,t;qu(this,yi)._--,Z(this,yi)===0&&((e=Z(this,Ha))==null||e.call(this),Ve(this,Ha,void 0),(t=Z(this,qa))==null||t.call(this),Ve(this,qa,void 0))}isFetching(e){return Z(this,Mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Z(this,pi).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,Mt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Z(this,Mt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Zg(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Z(this,Mt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=Z(this,Mt).get(r.queryHash),o=s==null?void 0:s.state.data,a=T4(t,o);if(a!==void 0)return Z(this,Mt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Tn.batch(()=>Z(this,Mt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,Mt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Z(this,Mt);Tn.batch(()=>
207{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Z(this,Mt);return Tn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Tn.batch(()=>Z(this,Mt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Rr).catch(Rr)}invalidateQueries(e,t={}){return Tn.batch(()=>(Z(this,Mt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Tn.batch(()=>Z(this,Mt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Rr)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Rr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Z(this,Mt).build(this,t);return n.isStaleByTime(Zg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rr).catch(Rr)}fetchInfiniteQuery(e){return e.behavior=E0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rr).catch(Rr)}ensureInfiniteQueryData(e){return e.behavior=E0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Wh.isOnline()?Z(this,pi).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,Mt)}getMutationCache(){return Z(this,pi)}getDefaultOptions(){return Z(this,gi)}setDefaultOptions(e){Ve(this,gi,e)}setQueryDefaults(e,t){Z(this,Wa).set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Z(this,Wa).values()],n={};return t.forEach(r=>{Kc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Z(this,Ga).set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Z(this,Ga).values()],n={};return t.forEach(r=>{Kc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Z(this,gi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===mx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Z(this,gi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Z(this,Mt).clear(),Z(this,pi).clear()}},Mt=new WeakMap,pi=new WeakMap,gi=new WeakMap,Wa=new WeakMap,Ga=new WeakMap,yi=new WeakMap,Ha=new WeakMap,qa=new WeakMap,Bj),Q4=m.createContext(void 0),X4=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(Q4.Provider,{value:e,children:t}));/** 208 * @remix-run/router v1.23.0 209 * 210 * Copyright (c) Remix Software Inc. 211 * 212 * This source code is licensed under the MIT license found in the 213 * LICENSE.md file in the root directory of this source tree. 214 * 215 * @license MIT 216 */function Yc(){return Yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yc.apply(this,arguments)}var wi;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(wi||(wi={}));const P0="popstate";function Z4(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:a,hash:l}=r.location;return ty("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Gh(s)}return t$(t,n,null,e)}function Dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function TE(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function e$(){return Math.random().toString(36).substr(2,8)}function I0(e,t){return{usr:e.state,key:e.key,idx:t}}function ty(e,t,n,r){return n===void 0&&(n=null),Yc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?kl(t):t,{state:n,key:t&&t.key||r||e$()})}function Gh(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function kl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function t$(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,a=s.history,l=wi.Pop,c=null,u=h();u==null&&(u=0,a.replaceState(Yc({},a.state,{idx:u}),""));function h(){return(a.state||{idx:null}).idx}function f(){l=wi.Pop;let x=h(),y=x==null?null:x-u;u=x,c&&c({action:l,location:v.location,delta:y})}function p(x,y){l=wi.Push;let g=ty(v.location,x,y);u=h()+1;let b=I0(g,u),S=v.createHref(g);try{a.pushState(b,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(S)}o&&c&&c({action:l,location:v.location,delta:1})}function d(x,y){l=wi.Replace;let g=ty(v.location,x,y);u=h();let b=I0(g,u),S=v.createHref(g);a.replaceState(b,"",S),o&&c&&c({action:l,location:v.location,delta:0})}function w(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof x=="str
216ing"?x:Gh(x);return g=g.replace(/ $/,"%20"),Dt(y,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,y)}let v={get action(){return l},get location(){return e(s,a)},listen(x){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(P0,f),c=x,()=>{s.removeEventListener(P0,f),c=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let y=w(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:d,go(x){return a.go(x)}};return v}var A0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(A0||(A0={}));function n$(e,t,n){return n===void 0&&(n="/"),r$(e,t,n,!1)}function r$(e,t,n,r){let s=typeof t=="string"?kl(t):t,o=px(s.pathname||"/",n);if(o==null)return null;let a=PE(e);s$(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=p$(o);l=f$(a[c],u,r)}return l}function PE(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,a,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(Dt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Oi([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(Dt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),PE(o.children,t,h,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:d$(u,o.index),routesMeta:h})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of IE(o.path))s(o,a,c)}),t}function IE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let a=IE(r.join("/")),l=[];return l.push(...a.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function s$(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:h$(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const i$=/^:[\w-]+$/,o$=3,a$=2,l$=1,c$=10,u$=-2,R0=e=>e==="*";function d$(e,t){let n=e.split("/"),r=n.length;return n.some(R0)&&(r+=u$),t&&(r+=a$),n.filter(s=>!R0(s)).reduce((s,o)=>s+(i$.test(o)?o$:o===""?l$:c$),r)}function h$(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function f$(e,t,n){let{routesMeta:r}=e,s={},o="/",a=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,h=o==="/"?t:t.slice(o.length)||"/",f=_0({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),p=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=_0({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!f)return null;
vendor: 6,917 bytes, lines 216-225
216Object.assign(s,f.params),a.push({params:s,pathname:Oi([o,f.pathname]),pathnameBase:x$(Oi([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=Oi([o,f.pathnameBase]))}return a}function _0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=m$(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,h,f)=>{let{paramName:p,isOptional:d}=h;if(p==="*"){let v=l[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const w=l[f];return d&&!w?u[p]=void 0:u[p]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function m$(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),TE(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function p$(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return TE(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function px(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function g$(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?kl(e):e;return{pathname:n?n.startsWith("/")?n:y$(n,t):t,search:w$(r),hash:b$(s)}}function y$(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Zm(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function v$(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function gx(e,t){let n=v$(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function yx(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=kl(e):(s=Yc({},e),Dt(!s.pathname||!s.pathname.includes("?"),Zm("?","pathname","search",s)),Dt(!s.pathname||!s.pathname.includes("#"),Zm("#","pathname","hash",s)),Dt(!s.search||!s.search.includes("#"),Zm("#","search","hash",s)));let o=e===""||s.pathname==="",a=o?"/":s.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}l=f>=0?t[f]:"/"}let c=g$(s,l),u=a&&a!=="/"&&a.endsWith("/"),h=(o||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}const Oi=e=>e.join("/").replace(/\/\/+/g,"/"),x$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),w$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,b$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function S$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const AE=["post","put","patch","delete"];new Set(AE);const j$=["get",...AE];new Set(j$);/** 217 * React Router v6.30.1 218 * 219 * Copyright (c) Remix Software Inc. 220 * 221 * This source code is licensed under the MIT license found in the 222 * LICENSE.md file in the root directory of this source tree. 223 * 224 * @license MIT 225 */function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}const vx=m.createContext(null),k$=m.createContext(null),Xi=m.createContext(null),qf=m.createContext(null),Hs=m.createContext({outlet:null,matches:[],isDataRoute:!1}),RE=m.createContext(null);function N$(e,t){let{relative:n}=t===void 0?{}:t;Nl()||Dt(!1);let{basename:r,navigator:s}=m.useContext(Xi),{hash:o,pathname:a,search:l}=OE(e,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:Oi([r,a])),s.createHref({pathname:c,search:l,hash:o})}function Nl(){return m.useContext(qf)!=null}function Nr(){return Nl()||Dt(!1),m.useContext(qf).location}function _E(e){m.useContext(Xi).static||m.useLayoutEffect(e)}function un(){let{isDataRoute:e}=m.useContext(Hs);return e?D$():C$()}function C$(){Nl()||Dt(!1);let e=m.useContext(vx),{basename:t,future:n,navigator:r}=m.useContext(Xi),{matches:s}=m.useContext(Hs),{pathname:o}=Nr(),a=JSON.stringify(gx(s,n.v7_relativeSplatPath)),l=m.useRef(!1);return _E(()=>{l.current=!0}),m.useCallback(function(u,h){if(h===void 0&&(h={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=yx(u,JSON.parse(a),o,h.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Oi([t,f.pathname])),(h.replace?r.replace:r.push)(f,h.state,h)},[t,r,a,o,e])}function Kf(){let{matches:e}=m.useContext(Hs),t=e[e.length-1];return t?t.params:{}}function OE(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(Xi),{matches:s}=m.useContext(Hs),{pathname:o}=Nr(),a=JSON.stringify(gx(s,r.v7_relativeSplatPath));return m.useMemo(()=>yx(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function E$(e,t){return T$(e,t)}function T$(e,t,n,r){Nl()||Dt(!1);let{navigator:s}=m.useContext(Xi),{matches:o}=m.useContext(Hs),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Nr(),h;if(t){var f;let x=typeof t=="string"?kl(t):t;c==="/"||(f=x.pathname)!=null&&f.startsWith(c)||Dt(!1),h=x}else h=u;let p=h.pathname||"/",d=p;if(c!=="/"){let x=c.replace(/^\//,"").split("/");d="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=n$(e,{pathname:d}),v=_$(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Oi([c,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:Oi([c,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,n,r);return t&&v?m.createElement(qf.Provider,{value:{location:Jc({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:wi.Pop}},v):v}function P$(){let e=$$(),t=S$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
225Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const I$=m.createElement(P$,null);class A$ extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(Hs.Provider,{value:this.props.routeContext},m.createElement(RE.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function R$(e){let{routeContext:t,match:n,children:r}=e,s=m.useContext(vx);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(Hs.Provider,{value:t},r)}function _$(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let h=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);h>=0||Dt(!1),a=a.slice(0,Math.min(a.length,h+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=h),f.route.id){let{loaderData:p,errors:d}=n,w=f.route.loader&&p[f.route.id]===void 0&&(!d||d[f.route.id]===void 0);if(f.route.lazy||w){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((h,f,p)=>{let d,w=!1,v=null,x=null;n&&(d=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||I$,c&&(u<0&&p===0?(w=!0,x=null):u===p&&(w=!0,x=f.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,p+1)),g=()=>{let b;return d?b=v:w?b=x:f.route.Component?b=m.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=h,m.createElement(R$,{match:f,routeContext:{outlet:h,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?m.createElement(A$,{location:n.location,revalidation:n.revalidation,component:v,error:d,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):g()},null)}var ME=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ME||{}),Hh=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Hh||{});function O$(e){let t=m.useContext(vx);return t||Dt(!1),t}function M$(e){let t=m.useContext(k$);return t||Dt(!1),t}function L$(e){let t=m.useContext(Hs);return t||Dt(!1),t}function LE(e){let t=L$(),n=t.matches[t.matches.length-1];return n.route.id||Dt(!1),n.route.id}function $$(){var e;let t=m.useContext(RE),n=M$(Hh.UseRouteError),r=LE(Hh.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function D$(){let{router:e}=O$(ME.UseNavigateStable),t=LE(Hh.UseNavigateStable),n=m.useRef(!1);return _E(()=>{n.current=!0}),m.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Jc({fromRouteId:t},o)))},[e,t])}function F$(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Wn(e){let{to:t,replace:n,state:r,relative:s}=e;Nl()||Dt(!1);let{future:o,static:a}=m.useContext(Xi),{matches:l}=m.useContext(Hs),{pathname:c}=Nr(),u=un(),h=yx(t,gx(l,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(h);return m.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function Me(e){Dt(!1)}function B$(e){let{basename:t="/",children:n=null,location:r,navigationType:s=wi.Pop,navigator:o,static:a=!1,future:l}=e;Nl()&&Dt(!1);let c=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:o,static:a,future:Jc({v7_relativeSplatPath:!1},l)}),[c,l,o,a]);typeof r=="string"&&(r=kl(r));let{pathname:h="/",search:f="",hash:p="",state:d=null,key:w="default"}=r,v=m.useMemo(()=>{let x=px(h,c);return x==null?null:{location:{pathname:x,search:f,hash:p,state:d,key:w},navigationType:s}},[c,h,f,p,d,w,s]);return v==null?null:m.createElement(Xi.Provider,{value:u},m.createElement(qf.Provider,{children:n,value:v}))}function U$(e){let{children:t,location:n}=e;return E$(ny(t),n)}new Promise(()=>{});function ny(e,t){t===void 0&&(t=[]);let n=[];
225return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let o=[...t,s];if(r.type===m.Fragment){n.push.apply(n,ny(r.props.children,o));return}r.type!==Me&&Dt(!1),!r.props.index||!r.props.children||Dt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=ny(r.props.children,o)),n.push(a)}),n}/** 226 * React Router DOM v6.30.1 227 * 228 * Copyright (c) Remix Software Inc. 229 * 230 * This source code is licensed under the MIT license found in the 231 * LICENSE.md file in the root directory of this source tree. 232 * 233 * @license MIT 234 */function ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ry.apply(this,arguments)}function V$(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function z$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function W$(e,t){return e.button===0&&(!t||t==="_self")&&!z$(e)}function sy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function G$(e,t){let n=sy(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const H$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],q$="6";try{window.__reactRouterVersion=q$}catch{}const K$="startTransition",O0=Xj[K$];function Y$(e){let{basename:t,children:n,future:r,window:s}=e,o=m.useRef();o.current==null&&(o.current=Z4({window:s,v5Compat:!0}));let a=o.current,[l,c]=m.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},h=m.useCallback(f=>{u&&O0?O0(()=>c(f)):c(f)},[c,u]);return m.useLayoutEffect(()=>a.listen(h),[a,h]),m.useEffect(()=>F$(r),[r]),m.createElement(B$,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const J$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Q$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fr=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:a,state:l,target:c,to:u,preventScrollReset:h,viewTransition:f}=t,p=V$(t,H$),{basename:d}=m.useContext(Xi),w,v=!1;if(typeof u=="string"&&Q$.test(u)&&(w=u,J$))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),j=px(S.pathname,d);S.origin===b.origin&&j!=null?u=j+S.search+S.hash:v=!0}catch{}let x=N$(u,{relative:s}),y=X$(u,{replace:a,state:l,target:c,preventScrollReset:h,relative:s,viewTransition:f});function g(b){r&&r(b),b.defaultPrevented||y(b)}return m.createElement("a",ry({},p,{href:w||x,onClick:v||o?r:g,ref:n,target:c}))});var M0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(M0||(M0={}));var L0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(L0||(L0={}));function X$(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:a,viewTransition:l}=t===void 0?{}:t,c=un(),u=Nr(),h=OE(e,{relative:a});return m.useCallback(f=>{if(W$(f,n)){f.preventDefault();let p=r!==void 0?r:Gh(u)===Gh(h);c(e,{replace:p,state:s,preventScrollReset:o,relative:a,viewTransition:l})}},[u,c,h,r,s,n,e,o,a,l])}function ur(e){let t=m.useRef(sy(e)),n=m.useRef(!1),r=Nr(),s=m.useMemo(()=>G$(r.search,n.current?null:t.current),[r.search]),o=un(),a=m.useCallback((l,c)=>{const u=sy(typeof l=="function"?l(s):l);n.current=!0,o("?"+u,c)},[o,s]);return[s,a]}const $E=m.createContext({theme:"light",toggleTheme:()=>{}}),_q=()=>m.useContext($E),Z$="light",e5=({children:e})=>{const[t,n]=m.useState(()=>{if(typeof window<"u"){const s=localStorage.getItem("gemphere-theme");if(s==="light"||s==="dark")return s}return Z$});m.useEffect(()=>{const s=document.documentElement;t==="dark"?s.classList.add("dark"):s.classList.remove("dark"),localStorage.setItem("gemphere-theme",t)},[t]);const r=()=>n(s=>s==="light"?"dark":"light");return i.jsx($E.Provider,{value:{theme:t,toggleTheme:r},children:e})},t5={very_strong:"Very Strong",strong:"Strong",solid:"Solid",light:"Light"};function qh(e){return e?t5[e]:""}const xx=24*60*60*1e3,n5=90*xx,r5=180*xx,s5=365*xx,Kh={light:0,solid:1,strong:2,very_strong:3};function i5(e,t){return t?e&&Kh[e]>=Kh.strong?e:"strong":e??null}function o5(e){return e==="strong_connection"||e==="connector"}const Oq={userIds:{},emails:{}};function a5(e){const t=e??{},n={};for(const[s,o]of Object.entries(t.userIds??{})){const a=Number(s);Number.isInteger(a)&&a>0&&o&&(n[a]=String(o))}const r={};for(const[s,o]of Object.entries(t.emails??{})){const a=String(s||"").trim().toLowerCase();a&&o&&(r[a]=String(o))}return{userIds:n,emails:r}}function l5(e,t){if(!e)return null;const n=Number(t.userId||0);if(Number.isInteger(n)&&n>0&&e.userIds[n])return e.userIds[n];const r=(t.email||"").trim().toLowerCase();return r&&e.emails[r]?e.emails[r]:null}function Mq(e,t){return l5(e,t)!=null}function c5(e,t){const n=i5(e,o5(t));return n==="very_strong"||n==="strong"?n:null}function $0(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=new Date(e).getTime();return Number.isFinite(t)&&t>0?t:null}function u5(e,t){return e==null&&t==null?null:e==null?t:t==null?e:Math.max(e,t)}function d5(e,t){const n=t-e;return n<=r5?40:n<=s5?20:5}function h5(e){const t=Math.max(0,Math.floor(e||0));return t<=1?0:t===2?8:t<=4?14:t<=9?22:t<=19?30:35}function f5(e){return e>=40?"strong":e>=20?"solid":"light"}function m5(e){return e==="very_strong"?85:e==="strong"?55:e==="solid"?30:12}function p5(e,t=Date.now()){const n=Math.max(0,Math.floor(e.meetings12mo||0)),r=Math.max(0,Math.floor(e.emailsSent90d||0)),s=Math.max(0,Math.floor(e.emailsReceived90d||0)),o=$0(e.lastMeetingAt),a=$0(e.lastEmailAt),l=u5(o,a);if(n===0&&r===0&&s===0)return{score:0,tier:null,hidden:!0,lastTouchMs:l};if(l==null)return{score:0,tier:null,hidden:!0,lastTouchMs:l};const c=t-l;let u,h=0;if(c<=n5)u="very_strong";
234else{h=h5(n);const p=d5(l,t)+h;u=f5(p)}return{score:Math.max(0,Math.min(100,m5(u)+(u==="very_strong"?0:h))),tier:u,hidden:!1,lastTouchMs:l}}function Lq(e){if(e==null||!Number.isFinite(e))return null;const t=Math.max(0,Math.min(100,e));return t<=0?null:t>=80?"very_strong":t>=60?"strong":t>=35?"solid":"light"}function $q(e){return e.warmthTier??"solid"}function Dq(e){return(e||"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function Fq(e){switch(e){case"very_strong":return 100;case"strong":return 78;case"solid":return 52;case"light":return 28;default:return 12}}function Bq(e,t){return e?(Kh[e]??-1)>=(Kh[t]??0):!1}function DE(e,t){const n={very_strong:0,strong:1,solid:2,light:3},r=e.tier?n[e.tier]:4,s=t.tier?n[t.tier]:4;if(r!==s)return r-s;const o=typeof e.score=="number"?e.score:null,a=typeof t.score=="number"?t.score:null;if(o!=null&&a!=null&&o!==a)return a-o;const l=e.lastTouchMs??0;return(t.lastTouchMs??0)-l}function D0(e){const t=new Set,n=new Set;for(const r of e){if(r.strengthLabel!=="connector")continue;r.id&&r.id>0&&n.add(r.id);const s=Number(r.connectedUserId||0);s>0&&t.add(s)}return{userIds:t,contactIds:n}}function Qc(e,t){if(!e)return!1;if(e.strengthLabel==="connector")return!0;const n=Number(e.userId||0);if(n>0&&(t!=null&&t.userIds.has(n)))return!0;const r=Number(e.contactId||0);return!!(r>0&&(t!=null&&t.contactIds.has(r)))}function ep(e,t,n){return Qc(e,n)||Qc(t,n)?"single":"double"}function Uq(e,t){return Qc(e,t)?"single":"double"}function g5(e,t,n,r,s){return Qc(e,n)?"from":Qc(t,n)?"to":v5(e.roleKind,t.roleKind,r,s)}function y5(e,t){return DE({tier:(e==null?void 0:e.tier)??null,lastTouchMs:(e==null?void 0:e.lastTouchMs)??null},{tier:(t==null?void 0:t.tier)??null,lastTouchMs:(t==null?void 0:t.lastTouchMs)??null})<=0?"from":"to"}function v5(e,t,n,r){const s=e===2,o=t===2;return s&&!o?"to":o&&!s?"from":y5(n,r)}function x5(e,t){return e==="single"?{singleOptIn:!0,singleOptInFirstParty:t??"from"}:e==="disabled"?{disableOptIn:!0}:{}}const bi=new Map;function Jr(e,t,n){const r=Date.now(),s=bi.get(e);if(s){if(s.promise)return s.promise;if(s.expiresAt>r&&s.error===void 0&&s.value!==void 0)return Promise.resolve(s.value)}const o=n().then(a=>(bi.set(e,{value:a,expiresAt:Date.now()+t}),a)).catch(a=>{throw bi.delete(e),a});return bi.set(e,{expiresAt:r+t,promise:o}),o}function Vq(e){const t=bi.get(e);if(!(!t||t.error!==void 0)&&!(t.expiresAt<=Date.now()))return t.value}function Sn(e,t=!1){if(!t){bi.delete(e);return}for(const n of bi.keys())n.startsWith(e)&&bi.delete(n)}const de="https://gem-agent-38ae41bd5367.herokuapp.com".replace(/\/$/,""),qs=45e3,w5=6e4;function zq(){return de}const b5=()=>`${de}/api/gemphere/account`,Yf=()=>b5(),wx=()=>`${de}/api/gemphere`;function bx(e){const t=e instanceof Error?e.message:String(e??"");return t==="Failed to fetch"||t.includes("NetworkError")||t.includes("Load failed")||t.includes("aborted")}function Wq(e){return bx(e)}async function S5(e,t){const n=t.trim();if(!n||!e)return[];const s=await(await fetch(`${wx()}/search`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({search:n})})).json().catch(()=>null);return(Array.isArray(s==null?void 0:s.users)?s.users:[]).filter(a=>(a.userId??a.id)!=null).map(a=>({userId:Number(a.userId??a.id),fullname:String(a.fullname??a.fullName??"").trim()||`User ${a.userId??a.id}`,photo:a.photo??a.profilePhoto??null,role:Number(a.role??0),handle:a.handle??null,title:a.title??null,companyName:a.companyName??null,fundName:a.fundName??null}))}async function FE(e,t=!0){const n=`${Yf()}/phoneLogin`;let r;try{r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phoneNumber:e,rememberMe:t})})}catch(o){throw bx(o)?new Error("Could not reach the server. Check your connection or try again in a few seconds."):o}let s;try{s=await r.json()}catch{throw new Error("Invalid response from server. Please try again.")}if(!r.ok)throw new Error((s==null?void 0:s.message)??(s==null?void 0:s.error)??"Login failed");return s}const Cl=25e3,F0=12e4;async function Qe(e,t,n=Cl){const r=new AbortController,s=setTimeout(()=>r.abort(),n);try{return await fetch(e,{...t,signal:r.signal})}finally{clearTimeout(s)}}async function j5(e){const t=`${Yf()}/signup`,n=JSON.stringify({fullname:e.fullname,email:e.email??null,phoneNumber:e.phoneNumber??null,password:e.password??"OTP",role:e.role,rememberMe:e.rememberMe??!0,...e.googleIdToken&&{googleIdToken:e.googleIdToken}}),r=()=>Qe(t,{method:"POST",headers:{"Content-Type":"application/json"},body:n},Cl);let s;try{s=await r()}catch(a){if(bx(a)||a instanceof Error&&a.name==="AbortError")try{await new Promise(l=>setTimeout(l,2e3)),s=await r()}catch{throw new Error("Could not reach the server. Check your connection, try again in a few seconds, or try in a different browser (e.g. Chrome).")}else throw a}let o;try{o=await s.json()}catch{throw new Error("Invalid response from server. Please try again.")}if(!s.ok)throw new Error((o==null?void 0:o.message)??(o==null?void 0:o.error)??"Signup failed");return o}async function k5(e){const t=await Qe(`${Yf()}/verify-email?token=${encodeURIComponent(e)}`,{method:"GET"},Cl),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.message)||(n==null?void 0:n.error)||"Verification link is invali
234d or expired");return n}async function N5(e){const t=await Qe(`${Yf()}/verify-login-email?token=${encodeURIComponent(e)}`,{method:"GET"},Cl),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.message)||(n==null?void 0:n.error)||"Login link is invalid or expired");return n}async function C5(e,t,n){const r=Math.min(6e5,Math.max(9e4,3e4+Math.ceil(n.length/1024)*2e3)),s=await Qe(`${wx()}/profile/linkedin-csv-upload`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({filename:t,csv:n})},r),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||"LinkedIn CSV upload failed");return o}async function BE(e,t){const n=`${de}/api/gemphere/account/updateUserDetails`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)}),s=await r.json().catch(()=>({}));if(!r.ok||(s==null?void 0:s.success)===!1)throw new Error((s==null?void 0:s.message)||(s==null?void 0:s.error)||"Couldn't update profile");return s}async function Gq(e,t){const n=await fetch(`${de}/api/gemphere/profile/company`,{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({companyName:t})});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||`Save failed (${n.status})`)}}async function Hq(e){const t=`${de}/api/gemphere/account`,n=await fetch(t,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok||(r==null?void 0:r.success)===!1){const s=(r==null?void 0:r.message)||(r==null?void 0:r.error)||`Couldn't delete account (${n.status})`;throw new Error(s)}return r}async function E5(e,t){const r=`${wx()}/profile`,s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)}),o=await s.json();if(!s.ok)throw new Error((o==null?void 0:o.message)||(o==null?void 0:o.error)||"Save profile failed");return o}async function T5(e,t){const n=await fetch(`${de}/api/gemphere/connection/create`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({profileID:t})}),r=await n.json().catch(()=>({}));if(!n.ok||r!=null&&r.error)throw new Error((r==null?void 0:r.message)||(r==null?void 0:r.error)||"Connection request failed");return r}async function qq(e){if(!e)return[];try{const t=await fetch(`${de}/api/gemphere/connection/getPendingConnections`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return[];const n=await t.json().catch(()=>null);return Array.isArray(n)?n:n&&Array.isArray(n.data)?n.data:n&&Array.isArray(n.connections)?n.connections:[]}catch{return[]}}async function P5(e,t){const n=await fetch(`${de}/api/gemphere/connection/delete`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({connectionID:t})}),r=await n.json().catch(()=>({}));if(!n.ok||r!=null&&r.error)throw new Error((r==null?void 0:r.message)||(r==null?void 0:r.error)||"Failed to remove connection");return r}async function I5(e,t,n){const r=await fetch(`${de}/api/gemphere/connection/responseConnection`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({connectionID:t,response:n})}),s=await r.json().catch(()=>({}));if(!r.ok||s!=null&&s.error)throw new Error((s==null?void 0:s.message)||(s==null?void 0:s.error)||"Failed to respond to request");return s}const UE=()=>`${de}/api/gemphere/crm`,Vo=()=>`${de}/api/gemphere/admin/crm`;async function Kq(e){const t=await fetch(`${UE()}/intros`,{headers:{Authorization:`Bearer ${e}`}}),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.message)||(n==null?void 0:n.error)||"Failed to load intros");return n}async function Yq(e,t){const n=await fetch(`${UE()}/intros/${t}`,{headers:{Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.message)||(r==null?void 0:r.error)||"Failed to load intro");return r}async function Jq(e,t){const n=await fetch(`${Vo()}/users/search?q=${encodeURIComponent(t)}`,{headers:{Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.message)||(r==null?void 0:r.error)||"Failed to search users");return r}async function Qq(e,t,n){const r=await fetch(`${Vo()}/users/${t}/access`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({enabled:n})}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.message)||(s==null?void 0:s.error)||"Failed to update access");return s}async function Xq(e,t,n,r){const s=await fetch(`${Vo()}/intros`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({partyAUserId:t,partyBUserId:n,title:r})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.message)||(o==null?void 0:o.error)||"Failed to create intro");return o}async function Zq(e,t,n,r){const s=await fetch(`${Vo()}/intros/${t}/move`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({stageId:n,...r?{note:r}:{}})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.message)||(o==null?void 0:o.error)||"Failed to move stage");return o}
234async function eK(e,t,n){const r=await fetch(`${Vo()}/intros/${t}/notes`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({note:n})}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.message)||(s==null?void 0:s.error)||"Failed to add note");return s}async function tK(e,t){const n=await fetch(`${Vo()}/contacts`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({name:t.name,email:t.email,company:t.company||void 0,position:t.position||void 0,linkedinProfile:t.linkedinProfile||void 0})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.message)||(r==null?void 0:r.error)||"Failed to create CRM contact");return r}async function nK(e,t){const n=await fetch(`${Vo()}/contacts/search?q=${encodeURIComponent(t)}`,{headers:{Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.message)||(r==null?void 0:r.error)||"Failed to search CRM contacts");return r}function A5(e){return`${de}/api/enterprise-search/catalog?limit=${e}`}function R5(){return`${de}/api/enterprise-search/chat-filter`}function _5(e){return`${de}/api/enterprise-search/profile-detail?id=${encodeURIComponent(e)}`}async function rK(e){const t=_5(e),n=await Qe(t,{method:"GET"},Cl),r=await n.text();let s={};try{s=r?JSON.parse(r):{}}catch{s={}}if(!n.ok){const o=typeof s.error=="string"&&s.error||typeof s.message=="string"&&s.message||`Request failed (${n.status})`;throw new Error(o)}return{catalogId:String(s.catalogId??e),anchor:s.anchor??null,portfolioCompanies:Array.isArray(s.portfolioCompanies)?s.portfolioCompanies:[],portfolioFounders:Array.isArray(s.portfolioFounders)?s.portfolioFounders:[],teamPeers:Array.isArray(s.teamPeers)?s.teamPeers:[],companyFounders:Array.isArray(s.companyFounders)?s.companyFounders:[],investorTeamAtFirm:Array.isArray(s.investorTeamAtFirm)?s.investorTeamAtFirm:[],relationshipEdges:Array.isArray(s.relationshipEdges)?s.relationshipEdges:[],warmIntroPaths:Array.isArray(s.warmIntroPaths)?s.warmIntroPaths:[]}}async function sK(e=400){const t=A5(e),n=await Qe(t,{method:"GET"},Cl),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||"Catalog unavailable");return{items:Array.isArray(r.items)?r.items:[],totalApprox:r.totalApprox,limit:r.limit,source:r.source}}async function B0(e,t,n,r){const s=R5(),o=e.map(({id:h,name:f,title:p,company:d,hq:w,region:v,role:x,sectors:y,stage:g})=>({id:h,name:f,title:p,company:d,hq:w,region:v,role:x,sectors:y,stage:g}));let a;try{a=await Qe(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t,items:o,history:n})},r)}catch(h){const f=h instanceof Error?h.message:String(h??"");throw/abort/i.test(f)||h instanceof DOMException&&h.name==="AbortError"?new Error("TIMEOUT"):h}const l=await a.text();let c={};try{c=l?JSON.parse(l):{}}catch{c={}}if(!a.ok){if(a.status===504||a.status===502)throw new Error("TIMEOUT");const h=typeof c.error=="string"&&c.error||typeof c.message=="string"&&c.message||(a.status===413?"Payload too large â server body limit (fixed in latest deploy).":null)||`Request failed (${a.status})`;throw new Error(h)}const u=c.matched_ids;return{reply:String(c.reply??""),matched_ids:Array.isArray(u)?u:[]}}const zo=()=>`${de}/api/gemphere/accounts`;async function iK(e,t,n,r=5){const s=`${de}/api/gemphere/portcos/${n}/shared-targets?viewerUserId=${t}&limit=${r}`,o=await fetch(s,{headers:{Authorization:`Bearer ${e}`}}),a=await o.text().catch(()=>"");let l={};if(a)try{l=JSON.parse(a)}catch{}if(!o.ok){const c=(l==null?void 0:l.error)||(l==null?void 0:l.message);if(c)throw new Error(c);const u=a.trim().slice(0,160)||`HTTP ${o.status}`;throw new Error(`${o.status} at ${s} â ${u}`)}return{founderJoined:!!l.founderJoined,founder:l.founder||null,portcoCompanyName:String(l.portcoCompanyName||""),totalTargets:Number(l.totalTargets||0),targets:Array.isArray(l.targets)?l.targets:[]}}async function oK(e,t){return Jr(`team-portcos-only:${t}`,qs,async()=>{const n=`${de}/api/gemphere/team/portcos-only?viewerUserId=${t}`,r=await fetch(n,{headers:{Authorization:`Bearer ${e}`}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||`Failed (${r.status})`);
234return{team:s.team||{name:"Your team",domain:null,memberCount:0,isAdmin:!1,teamId:null,adminUserId:null},portfolioCompanies:Array.isArray(s.portfolioCompanies)?s.portfolioCompanies:[],portfolioAsks:Array.isArray(s.portfolioAsks)?s.portfolioAsks:[]}})}async function aK(e,t,n=5){const r=`${de}/api/gemphere/portcos/shared-targets/all?viewerUserId=${t}&limit=${n}`,s=await fetch(r,{headers:{Authorization:`Bearer ${e}`}}),o=await s.text().catch(()=>"");let a={};if(o)try{a=JSON.parse(o)}catch{}if(!s.ok){const u=(a==null?void 0:a.error)||(a==null?void 0:a.message);if(u)throw new Error(u);const h=o.trim().slice(0,160)||`HTTP ${s.status}`;throw new Error(`${s.status} at ${r} â ${h}`)}const l=a.results||{},c={};for(const u of Object.keys(l)){const h=Number(u);if(!Number.isInteger(h))continue;const f=l[u];c[h]={founderJoined:!!f.founderJoined,founder:f.founder||null,portcoCompanyName:String(f.portcoCompanyName||""),totalTargets:Number(f.totalTargets||0),targets:Array.isArray(f.targets)?f.targets:[]}}return c}async function lK(e,t,n,r){const s=await fetch(`${de}/api/gemphere/portcos/${n}/intro-offers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,...r})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||`Failed to record offer (${s.status})`);if(!(o!=null&&o.offer))throw new Error("No offer returned");return{...o.offer,emailSent:!!o.emailSent,emailError:o.emailError??null}}async function cK(e,t,n,r){const s=await fetch(`${de}/api/gemphere/accounts/${n}/intro-offers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,...r})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||`Failed to record offer (${s.status})`);if(!(o!=null&&o.offer))throw new Error("No offer returned");return{...o.offer,emailSent:!!o.emailSent,emailError:o.emailError??null}}async function uK(e,t){if(!e||!t||t<=0)return null;try{const n=await fetch(`${de}/api/users?ids=${t}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return null;const r=await n.json().catch(()=>({})),s=(r==null?void 0:r.users)??(r==null?void 0:r.data)??[],o=Array.isArray(s)?s.find(l=>Number(l.id??l.Id)===t):null;return String((o==null?void 0:o.email)??(o==null?void 0:o.Email)??"").trim()||null}catch{return null}}async function dK(e,t,n,r,s){const o=await fetch(`${de}/api/gemphere/connectors/${n}/targets/${r}/intro-offers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,...s})}),a=await o.json().catch(()=>({}));if(!o.ok)throw new Error((a==null?void 0:a.error)||(a==null?void 0:a.message)||`Failed to record offer (${o.status})`);if(!(a!=null&&a.offer))throw new Error("No offer returned");return{...a.offer,emailSent:!!a.emailSent,emailError:a.emailError??null}}async function hK(e,t){const n=await fetch(`${de}/api/gemphere/intro-offers/made?viewerUserId=${t}`,{headers:{Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||`Failed to load offer intros (${n.status})`);return Array.isArray(r==null?void 0:r.offers)?r.offers:[]}async function fK(e,t){const n=await fetch(`${de}/api/gemphere/accounts/message`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||`Failed to send message (${n.status})`);return{success:!0}}async function mK(e,t){const n=async()=>{const o=await fetch(`${zo()}/list?viewerUserId=${t}`,{headers:{Authorization:`Bearer ${e}`}}),a=await o.json().catch(()=>({}));if(!o.ok)throw new Error((a==null?void 0:a.error)||(a==null?void 0:a.message)||"Failed to load accounts");return{accounts:Array.isArray(a.accounts)?a.accounts:[],metrics:a.metrics||{total:0,withPath:0,strong:0,noPath:0},pendingAccountIds:Array.isArray(a.pendingAccountIds)?a.pendingAccountIds:[]}},r=`target-accounts-list:${t}`,s=await Jr(r,qs,n);return s.pendingAccountIds.length&&Sn(r),s}async function O5(e,t){return Jr(`target-accounts-list-only:${t}`,qs,async()=>{const n=await fetch(`${zo()}/list-only?viewerUserId=${t}`,{headers:{Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to load accounts");return{accounts:Array.isArray(r.accounts)?r.accounts:[],metrics:r.metrics||{total:0,withPath:0,strong:0,noPath:0}}})}function VE(e){Sn(`target-accounts-list-only:${e}`),Sn(`target-accounts-list:${e}`),Sn(`home-overview:${e}`)}async function zE(e,t,n,r="manual"){const s=await fetch(zo(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,companies:n,source:r})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to add accounts");return VE(t),{added:Number(o.added||0)}}const M5=5*6e4;function WE(e,t){return`target-account:${e}:${t}`}function Sx(e,t){t!=null?Sn(WE(e,t)):Sn(`target-account:${e}:`,!0),VE(e)}async function pK(e,t,n,r){const s=WE(t,n);return r!=null&&r.bypassCache&&Sn(s),Jr(s,M5,async()=>{const o=await fetch(`${zo()}/${n}?viewerUserId=${t}`,{headers:{Authorization:`Bearer ${e}`}}),a=await o.json().catch(()=>({}));if(!o.ok)throw new Error((a==null?void 0:a.error)||(a==null?void 0:a.message)||"Failed to load account");if(!(a!=null&&a.account))throw new Error("No account returned");return a.account})}async function gK(e,t,n){const r=await fetch(`${zo()}/${n}?viewerUserId=${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to delete account");return Sx(t,n),{deleted:Number(s.deleted||0)}}async function yK(e,t,n,r){const s=await fetch(`${zo()}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,...r})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to update account");return Sx(t,n),o.account}async function vK(e,t,n,r){const s=await fetch(`${zo()}/${n}/icp?viewerUserId=${t}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({icp:r})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to save account ICP");return Sx(t,n),{updated:Number(o.updated||0),icp:o.icp||null}}async function U0(e,t){const n=await fetch(`${de}/api/gemphere/warm-intro/request`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok||r!=null&&r.error){const s=(r==null?void 0:r.message)||(r==null?void 0:r.error)||`Intro request failed (${n.status})`;throw new Error(s)}return{success:!0,data:r}}async function xK(e){const t=await fetch(`${de}/api/gemphere/fuel/seed-portcos`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}),n=await t.json().catch(()=>({}));if(!t.ok||n!=null&&n.error){const r=(n==null?void 0:n.message)||(n==null?void 0:n.error)||`Seed failed (${t.status})`;throw new Error(r)}return n}async function wK(e,t,n){const r=await fetch(`${de}/api/gemphere/connections/for-intro?targetUserId=${t}&viewerUserId=${n}`,{headers:{Authorization:`Bearer ${e}`}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||"Failed to load connectors");const o=s;return{targetUserId:Number(o.targetUserId??t),mutualCount:Number(o.mutualCount??0),totalCount:Number(o.totalCount??0),connectors:Array.isArray(o.connectors)?o.connectors:[]}}const El=()=>`${de}/api/gemphere/team`;function V0(e){return(e||"").replace(/\s*·\s*[\d][\d,.\s]*contacts?\b/gi,"").replace(/^\s*[\d][\d,.\s]*contacts?\s*·?\s*/i,"").replace(/\s*·\s*$/,"").trim()}async function bK(e,t,n){const r=(n==null?void 0:n.useAi)===!0,s=`team-overview:${t}:${r?1:0}`;return n!=null&&n.bypassCache&&Sn(`team-overview:${t}`,!0),Jr(s,qs,async()=>{var h;const o=new URLSearchParams({viewerUserId:String(t)});r&&o.set("useAi","1");const a=await Qe(`${El()}/overview?${o.toString()}`,{headers:{Authorization:`Bearer ${e}`}},45e3),l=await a.json().catch(()=>({}));if(!a.ok)throw new Error((l==null?void 0:l.error)||(l==null?void 0:l.message)||"Failed to load team overview");const c=l??{},u=c.team??{};
234return{...c,team:{name:u.name||"Your team",domain:u.domain??null,memberCount:typeof u.memberCount=="number"?u.memberCount:0,strategy:u.strategy||"none",isAdmin:u.isAdmin===!0,teamId:typeof u.teamId=="number"?u.teamId:null,adminUserId:typeof u.adminUserId=="number"?u.adminUserId:null},billing:{hasPaidAccess:((h=c.billing)==null?void 0:h.hasPaidAccess)===!0},pendingInvites:Array.isArray(c.pendingInvites)?c.pendingInvites:[],discoveredTeammates:Array.isArray(c.discoveredTeammates)?c.discoveredTeammates:[],teammates:Array.isArray(c.teammates)?c.teammates.map(f=>({...f,role:V0(f.role)})):[],portfolioCompanies:Array.isArray(c.portfolioCompanies)?c.portfolioCompanies:[],portfolioAsks:Array.isArray(c.portfolioAsks)?c.portfolioAsks:[],thesis:c.thesis??null,teamTargetAccounts:Array.isArray(c.teamTargetAccounts)?c.teamTargetAccounts:[],gapCount:typeof c.gapCount=="number"?c.gapCount:0,metrics:c.metrics??{introsMade:0,meetingsBooked:0,accountsReached:0,accountsTotal:0,combinedNetwork:0,periodFrom:null,periodTo:null},internalRequests:Array.isArray(c.internalRequests)?c.internalRequests.map(f=>{var p;return{...f,teammate:{...f.teammate,role:V0((p=f.teammate)==null?void 0:p.role)}}}):[],topConnectors:Array.isArray(c.topConnectors)?c.topConnectors:[]}})}async function SK(e,t,n){const r=new URLSearchParams({viewerUserId:String(t)}),s=await Qe(`${El()}/invites/${n}/cancel?${r.toString()}`,{method:"POST",headers:{Authorization:`Bearer ${e}`}},2e4),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to cancel invite");Sn(`team-overview:${t}`,!0)}async function jK(e,t,n){const r=new URLSearchParams({viewerUserId:String(t)}),s=await Qe(`${El()}/invites/${n}/resend?${r.toString()}`,{method:"POST",headers:{Authorization:`Bearer ${e}`}},2e4),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to resend invite");Sn(`team-overview:${t}`,!0)}async function kK(e,t,n){const r=new URLSearchParams({viewerUserId:String(t)}),s=await Qe(`${El()}/members/${n}/remove?${r.toString()}`,{method:"POST",headers:{Authorization:`Bearer ${e}`}},2e4),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to remove teammate");if(Sn(`team-overview:${t}`,!0),o!=null&&o.usage&&typeof o.available=="number")return{usage:o.usage,available:o.available}}async function NK(e,t,n,r){const s=new URLSearchParams({viewerUserId:String(t)}),o=await Qe(`${El()}/members/${n}/role?${s.toString()}`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({role:r})},2e4),a=await o.json().catch(()=>({}));if(!o.ok)throw new Error((a==null?void 0:a.error)||(a==null?void 0:a.message)||"Failed to update teammate role");Sn(`team-overview:${t}`,!0)}async function CK(e,t,n,r){const s=new URLSearchParams({viewerUserId:String(t)}),o=await Qe(`${El()}/invites/${n}/role?${s.toString()}`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({role:r})},2e4),a=await o.json().catch(()=>({}));if(!o.ok)throw new Error((a==null?void 0:a.error)||(a==null?void 0:a.message)||"Failed to update invite role");Sn(`team-overview:${t}`,!0)}async function L5(e,t){const n=new URLSearchParams;t!=null&&t.limit&&n.set("limit",String(t.limit)),t!=null&&t.offset&&n.set("offset",String(t.offset)),t!=null&&t.search&&n.set("search",t.search),t!=null&&t.prioritizeUnmapped&&n.set("prioritizeUnmapped","1");const r=await Qe(`${de}/api/gemphere/linkedin-contacts/curated?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}},25e3),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load LinkedIn contacts");return{success:!0,total:Number(s.total??0),markedCount:Number(s.markedCount??0),limit:Number(s.limit??100),offset:Number(s.offset??0),contacts:Array.isArray(s.contacts)?s.contacts:[]}}async function $5(e){const t=await Qe(`${de}/api/gemphere/public-mapping/status`,{headers:{Authorization:`Bearer ${e}`}},15e3),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||(n==null?void 0:n.message)||"Failed to load mapping status");return n}async function D5(e){const t=await Qe(`${de}/api/gemphere/public-mapping/results`,{headers:{Authorization:`Bearer ${e}`}},2e4),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||(n==null?void 0:n.message)||"Failed to load mapping results");return{success:!0,total:Number(n.total??0),groups:n.groups??{}}}async function EK(e,t,n){const r=await Qe(`${de}/api/gemphere/public-mapping/edges/${t}/strength`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({userSetStrength:n})},15e3),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to update strength");return s}async function z0(e){const t=await fetch(`${de}/api/gemphere/account/user-contacts`,{headers:{Authorization:`Bearer ${e}`}}),n=await t.json().catch(()=>({}));if(!t.ok)return D0([]);const r=Array.isArray(n==null?void 0:n.data)?n.data:Array.isArray(n==null?void 0:n.contacts)?n.contacts:[];return D0(r.map(s=>({id:Number(s.id||0),connectedUserId:Number(s.connectedUserId||s.connected_user_id||0)||null,strengthLabel:s.strengthLabel??s.strength_label})))}async function F5(e,t,n,r){const s=await fetch(`${de}/api/gemphere/linkedin-contacts/mark-strength`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({contactId:t,strengthLabel:n,notes:void 0})}),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to mark contact");return{success:!0,contactId:t,strengthLabel:n}}async function B5(e,t){const n=await fetch(`${de}/api/gemphere/linkedin-contacts/mark-strength`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({contactId:t})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to remove contact strength");return{success:!0,contactId:t}}const GE=()=>`${de}/api/gemphere/home`;async function TK(e,t){const n=new URLSearchParams({viewerUserId:String(t)}),r=await Qe(`${GE()}/checkin-targets?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}},15e3),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load check-in targets");return s}async function PK(e,t){return Jr(`home-overview:${t}`,qs,async()=>{const n=new URLSearchParams({viewerUserId:String(t)}),r=await Qe(`${GE()}/overview?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}},45e3),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load home overview");return s})}
234async function IK(e,t,n){const r=new URLSearchParams({introId:String(t),viewerUserId:String(n)}),s=await Qe(`${de}/api/gemphere/warm-intro/nudge/draft?${r.toString()}`,{headers:{Authorization:`Bearer ${e}`}},25e3),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to load nudge draft");return o}async function AK(e,t){const n=await Qe(`${de}/api/gemphere/warm-intro/nudge`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)},25e3),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to send nudge");return r}async function RK(e,t,n){const r=new URLSearchParams({viewerUserId:String(t)});n.contactUserId&&n.contactUserId>0&&r.set("contactUserId",String(n.contactUserId)),n.contactImportId&&n.contactImportId>0&&r.set("contactImportId",String(n.contactImportId));const s=await Qe(`${de}/api/gemphere/touchpoint/draft?${r.toString()}`,{headers:{Authorization:`Bearer ${e}`}},25e3),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to load touchpoint draft");return o}async function _K(e,t){const n=await Qe(`${de}/api/gemphere/touchpoint/reminder`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)},25e3),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to schedule touchpoint");return r}async function OK(e,t,n){var a,l;const r=new URLSearchParams({viewerUserId:String(t)});n.contactUserId&&n.contactUserId>0&&r.set("contactUserId",String(n.contactUserId)),n.contactImportId&&n.contactImportId>0&&r.set("contactImportId",String(n.contactImportId)),(a=n.targetLabel)!=null&&a.trim()&&r.set("targetLabel",n.targetLabel.trim()),(l=n.targetKind)!=null&&l.trim()&&r.set("targetKind",n.targetKind.trim());const s=await Qe(`${de}/api/gemphere/checkin/draft?${r.toString()}`,{headers:{Authorization:`Bearer ${e}`}},25e3),o=await s.json().catch(()=>({}));if(!s.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to load check-in draft");return o}async function MK(e,t){const n=await Qe(`${de}/api/gemphere/checkin/contact-email`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)},2e4),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to save email");return{success:!!(r!=null&&r.success),email:String((r==null?void 0:r.email)||t.email)}}async function LK(e,t){const n=await Qe(`${de}/api/gemphere/checkin`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)},25e3),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to send check-in");return r}async function $K(e,t){const n=new URLSearchParams({viewerUserId:String(t)}),r=await Qe(`${de}/api/gemphere/stay-in-touch?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}},3e4),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load stay-in-touch list");return s}async function DK(e,t){const n=new URLSearchParams({viewerUserId:String(t)}),r=await Qe(`${de}/api/gemphere/worth-reactivating?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}},3e4),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load worth-reactivating list");return s}async function FK(e,t){return Jr(`strong-relationships:${t}`,qs,async()=>{const n=new URLSearchParams({viewerUserId:String(t)}),r=await fetch(`${de}/api/gemphere/mynetwork/strong-relationships?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load strong relationships");return a5(s)})}async function U5(e,t){return Jr(`mynetwork-count:${t}`,qs,async()=>{const n=new URLSearchParams({viewerUserId:String(t)}),r=await fetch(`${de}/api/gemphere/mynetwork/count?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load network count");return Number((s==null?void 0:s.total)??0)})}async function BK(e,t){return Jr(`mynetwork-overview:${t}`,qs,async()=>{const n=new URLSearchParams({viewerUserId:String(t)}),r=await fetch(`${de}/api/gemphere/mynetwork/overview?${n.toString()}`,{headers:{Authorization:`Bearer ${e}`}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to load network overview");return s})}async function UK(e,t,n=500){return Jr(`nylas-signals:${t}:${n}`,qs,async()=>
234{const r=new URLSearchParams({userId:String(t),limit:String(n),sort:"recent"}),s=await Qe(`${de}/api/gemphere/integrations/nylas/signals?${r.toString()}`,{headers:{Authorization:`Bearer ${e}`}},3e4),o=await s.json().catch(()=>({}));if(!s.ok||!(o!=null&&o.success))return s.status===404?{}:{};const a={};for(const l of o.signals||[]){const c=String(l.contact_email||"").trim().toLowerCase();c&&(a[c]={sentCount:Number(l.sent_count)||0,receivedCount:Number(l.received_count)||0,meetingCount:Number(l.meeting_count)||0,lastSentAt:l.last_sent_at,contactName:l.contact_name,lastReceivedAt:l.last_received_at,lastMeetingAt:l.last_meeting_at})}return a})}function HE(e){return{id:Number(e.id||0),fullName:String(e.fullName||e.name||"").trim(),email:e.email??null,phoneNumber:e.phoneNumber??null,title:e.title??null,companyName:e.companyName??e.company??null,linkedinUrl:e.linkedinUrl??null,location:e.location??null,companyWebsite:e.companyWebsite??null,connectedUserId:Number(e.connectedUserId??e.connected_user_id??0)||null,profilePhotoUrl:e.profilePhotoUrl??null,source:e.source??null,apolloEnrichedAt:e.apolloEnrichedAt??null,strengthLabel:e.strengthLabel??null}}async function VK(e,t){var o;const n=await Qe(`${de}/api/gemphere/account/user-contacts`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)},3e4),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to create contact");const s=((o=r==null?void 0:r.data)==null?void 0:o.contact)||(r==null?void 0:r.contact);if(!s)throw new Error("Contact create succeeded but no contact returned");return HE(s)}async function zK(e,t,n){var a;const r=await Qe(`${de}/api/gemphere/account/user-contacts/${t}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(n)},3e4),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||(s==null?void 0:s.message)||"Failed to update contact");const o=((a=s==null?void 0:s.data)==null?void 0:a.contact)||(s==null?void 0:s.contact);if(!o)throw new Error("Contact update succeeded but no contact returned");return HE(o)}async function WK(e,t){const n=await Qe(`${de}/api/gemphere/account/user-contacts/${t}/archive`,{method:"POST",headers:{Authorization:`Bearer ${e}`}},3e4),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to archive contact");return{success:!!(r!=null&&r.success),contactId:Number((r==null?void 0:r.contactId)||t),archivedAt:(r==null?void 0:r.archivedAt)??null}}async function GK(e,t){const n=await Qe(`${de}/api/gemphere/stay-in-touch/mute`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)},2e4),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||(r==null?void 0:r.message)||"Failed to mute contact");return r}const Jf=()=>`${de}/api/gemphere/onboarding`;function V5(e){const t=typeof e.onboardingState=="number"?e.onboardingState:void 0,n=e.isComplete===!0||t===2;return{...e,onboardingState:t,isComplete:n}}async function Xn(e,t,n,r){const s={Authorization:`Bearer ${e}`},o={method:t,headers:s};r!==void 0&&t!=="GET"&&t!=="DELETE"&&(s["Content-Type"]="application/json",o.body=JSON.stringify(r));const a=await fetch(`${Jf()}${n}`,o),l=await a.text();let c={};try{c=l?JSON.parse(l):{}}catch{c={}}if(!a.ok){const u=(c==null?void 0:c.message)||(c==null?void 0:c.error)||`Request failed (${a.status})`;throw new Error(u)}return n==="/status"||n.endsWith("/status")?V5(c):c}async function qn(e){return Xn(e,"GET","/status")}async function po(e,t){return Xn(e,"POST","/profile",t)}async function Si(e,t){return Xn(e,"POST","/goals",{goals:t})}async function Yh(e,t){return Xn(e,"POST","/targets",{targets:t})}async function qE(e,t,n){const r=await Xn(e,"POST","/teamMembers",{members:t});return n!=null&&n.viewerUserId&&Sn(`team-overview:${n.viewerUserId}`,!0),r}async function HK(e,t){return Xn(e,"DELETE",`/portfolio-companies/${t}`)}async function Jh(e){return Xn(e,"GET","/thesis")}async function Qh(e,t){return Xn(e,"POST","/thesis",t)}async function ju(e,t){return Xn(e,"POST","/integrations",{integrations:t})}async function z5(e,t){return Xn(e,"POST","/cadence",t)}async function ku(e){return Xn(e,"POST","/complete")}async function W5(e){const t=await fetch(`${Jf()}/invite/connector/${encodeURIComponent(e)}`),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error(n.error||n.message||"Invite not found");return n}async function G5(e){const t=await fetch(`${Jf()}/invite/team/${encodeURIComponent(e)}`),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error(n.error||n.message||"Invite not found");return n}async function H5(e){const t=await fetch(`${Jf()}/invite/portfolio/${encodeURIComponent(e)}`),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error(n.error||n.message||"Invite not found");return n}async function q5(e,t){return Xn(e,"POST",`/invite/connector/${encodeURIComponent(t)}/accept`)}async function K5(e,t){return Xn(e,"POST",`/invite/team/${encodeURIComponent(t)}/accept`)}async function Y5(e,t){return Xn(e,"POST",`/invite/portfolio/${encodeURIComponent(t)}/accept`)}async function J5(e,t){if(!e||!Number.isFinite(t)||t<=0)return"";try{const n=await fetch(`${de}/api/gemphere/profile/intro-blurb/by-id?userId=${encodeURIComponent(String(t))}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return"";const r=await n.json().catch(()=>null);return r&&typeof r.blurb=="string"?r.blurb:""}catch{return""}}async function qK(e){const t={hideOutsideCompany:!1,visibleToEveryone:!0};if(!e)return t;try{const n=await fetch(`${de}/api/gemphere/profile/network-visibility`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return t;const r=await n.json().catch(()=>null),s=(r==null?void 0:r.hideOutsideCompany)===!0;return{hideOutsideCompany:s,visibleToEveryone:(r==null?void 0:r.visibleToEveryone)!==!1&&!s}}catch{return t}}async function KK(e,t){const n=await fetch(`${de}/api/gemphere/profile/network-visibility`,{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({hideOutsideCompany:t})});if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s.error||`Save failed (${n.status})`)}const r=await n.json();return{hideOutsideCompany:r.hideOutsideCompany===!0,visibleToEveryone:r.visibleToEveryone!==!1&&r.hideOutsideCompany!==!0}}async function Q5(e){const t=String(e||"").trim();if(!t)return{success:!1,valid:!1,error:"trial token required"};try{const n=await fetch(`${de}/api/gemphere/billing/trial-links/validate?trial=${encodeURIComponent(t)}`),r=await n.json().catch(()=>null);return!n.ok||!r?{success:!1,valid:!1,error:(r==null?void 0:r.error)||`Validate failed (${n.status})`}:r}catch(n){return{success:!1,valid:!1,error:n instanceof Error?n.message:String(n)}}}async function YK(e){try{const t=await fetch(`${de}/api/gemphere/billing/trial-links/generate`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({})}),n=await t.json().catch(()=>null);return!t.ok||!(n!=null&&n.success)?{success:!1,error:(n==null?void 0:n.error)||`Generate failed (${t.status})`}:n}catch(t){return{success:!1,error:t instanceof Error?t.message:String(t)}}}
234async function X5(e,t,n){try{const r=await fetch(`${de}/api/gemphere/billing/trial-links/redeem`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,trialToken:n})}),s=await r.json().catch(()=>null);return!r.ok||!(s!=null&&s.success)||!s.applied?{ok:!1,error:(s==null?void 0:s.error)||`Redeem failed (${r.status})`}:{ok:!0,applied:!0,trialEndsAt:s.trialEndsAt}}catch(r){return{ok:!1,error:r instanceof Error?r.message:String(r)}}}async function Nu(e,t,n){if(!e||!Number.isFinite(t)||t<=0)return null;const r=n!=null&&n.ignorePendingTeamInvite?"1":"0",s=`billing-app-access:${t}:${r}`;return Jr(s,w5,async()=>{const o=new URLSearchParams({viewerUserId:String(t)});n!=null&&n.ignorePendingTeamInvite&&o.set("ignorePendingTeamInvite","1");const a=await fetch(`${de}/api/gemphere/billing/app-access?${o.toString()}`,{headers:{Authorization:`Bearer ${e}`}});if(!a.ok)throw new Error(`billing app-access failed (${a.status})`);const l=await a.json().catch(()=>null);if(!(l!=null&&l.success))throw new Error("billing app-access invalid response");return l}).catch(()=>null)}async function Z5(e,t,n=!1,r){try{const s=await fetch(`${de}/api/gemphere/billing/confirm-onboarding-payment`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,fromStripeReturn:n,stripeSessionId:r||void 0})}),o=await s.json().catch(()=>null);return!s.ok||!o||!o.success?{ok:!1,error:o&&o.error||`Request failed (${s.status})`}:{ok:!0,paid:o.paid===!0,source:o.source}}
234catch(s){return{ok:!1,error:s instanceof Error?s.message:String(s)}}}async function jx(e,t){if(!e||!Number.isFinite(t)||t<=0)return null;try{const n=await fetch(`${de}/api/gemphere/billing/plan-summary?viewerUserId=${encodeURIComponent(String(t))}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return null;const r=await n.json().catch(()=>null);return r&&r.success?r:null}catch{return null}}async function eD(e){const t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");if(!t)return{ok:!1,error:"Invalid offer"};try{const n=await fetch(`${de}/api/gemphere/billing/onboarding-offer/${encodeURIComponent(t)}`),r=await n.json().catch(()=>null);return!n.ok||!r||!r.success?{ok:!1,error:r&&r.error||`Request failed (${n.status})`}:{ok:!0,offer:{slug:r.slug||t,label:r.label||t,price_usd_per_month:Number(r.price_usd_per_month)||0,price_usd_per_quarter:r.price_usd_per_quarter??null,billing_interval:r.billing_interval==="quarterly"?"quarterly":"monthly",hide_free_trial:r.hide_free_trial!==!1}}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}async function Xh(e,t,n,r){try{const s=await fetch(`${de}/api/gemphere/billing/stripe-checkout-link`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,requestedSeats:n,offerSlug:(r==null?void 0:r.offerSlug)||void 0,checkoutContext:(r==null?void 0:r.checkoutContext)||void 0,plan:(r==null?void 0:r.plan)||void 0})}),o=await s.json().catch(()=>null);return!s.ok||!o||!o.success||!o.url?{ok:!1,error:o&&o.error||`Request failed (${s.status})`}:{ok:!0,url:o.url,minSeats:o.minSeats,seats:o.seats,quantityLocked:o.quantityLocked,pricePerSeatUsd:o.pricePerSeatUsd,offerSlug:o.offerSlug,offerLabel:o.offerLabel,hideFreeTrial:o.hideFreeTrial,usage:o.usage}}
234catch(s){return{ok:!1,error:s instanceof Error?s.message:String(s)}}}async function hc(e,t,n){try{const r=await fetch(`${de}/api/gemphere/billing/reconcile-from-stripe`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({viewerUserId:t,stripeSessionId:n||void 0})}),s=await r.json().catch(()=>null);return!r.ok||!s?{ok:!1,applied:!1,error:s&&s.error||`Request failed (${r.status})`}:{ok:s.success!==!1,applied:s.applied===!0,seats:s.seats,previousSeatLimit:s.previousSeatLimit,sessionId:s.sessionId,reason:s.reason,error:s.error}}catch(r){return{ok:!1,applied:!1,error:r instanceof Error?r.message:String(r)}}}async function JK(e){const t=e.history??[],n=e.items;try{return await B0(n,e.message,t,F0)}catch(r){const s=r instanceof Error&&(r.message==="TIMEOUT"||/timeout/i.test(r.message));if(!s||n.length<=80)throw s?new Error("AI filter timed out. Try a more specific query, or narrow with Scope/Region filters first."):r;const o=n.slice(0,Math.min(80,n.length));try{return await B0(o,e.message,t,F0)}catch{throw new Error("AI filter timed out even with fewer items. Try a more specific query, or narrow with Scope/Region filters first.")}}}async function tD(e){if(!e)return null;try{const t=await fetch(`${de}/api/gemphere/me/admin-status`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return null;const n=await t.json().catch(()=>null);return!n||typeof n!="object"?null:{success:!!n.success,userId:Number(n.userId||0),email:typeof n.email=="string"?n.email:"",fullname:typeof n.fullname=="string"?n.fullname:"",isAdmin:!!n.isAdmin}}catch{return null}}async function Cu(e,t,n){const r=await fetch(`${de}${t}`,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`,...(n==null?void 0:n.headers)||{}}}),s=await r.json().catch(()=>({}));if(!r.ok){const o=(s==null?void 0:s.error)||(s==null?void 0:s.message)||`Request failed (${r.status})`;throw new Error(o)}return s}async function QK(e,t,n,r="pool",s){const o=new URLSearchParams({q:t||""});n&&n>0&&o.set("signalsViewerUserId",String(n)),r==="recipient_network"&&(o.set("scope","recipient_network"),s&&s>0&&o.set("recipientUserId",String(s)));const a=`/api/gemphere/admin/weekly-digest/people?${o.toString()}`,l=await Cu(e,a);return{gemUsers:l.gemUsers||[],contacts:l.contacts||[]}}async function XK(e,t){return Cu(e,"/api/gemphere/admin/weekly-digest/preview",{method:"POST",body:JSON.stringify(t)})}async function ZK(e,t){return Cu(e,"/api/gemphere/admin/weekly-digest/send",{method:"POST",body:JSON.stringify(t)})}async function eY(e,t){return Cu(e,`/api/gemphere/digest-action/${encodeURIComponent(t)}`)}async function tY(e,t,n){return Cu(e,`/api/gemphere/digest-action/${encodeURIComponent(t)}/confirm`,{method:"POST",body:JSON.stringify(n||{})})}async function nY(e,t){if(!e||!t)return null;const n=`${de}/api/gemphere/integrations/sync-status?userId=${t}`;try{const r=await fetch(n,{headers:{Authorization:`Bearer ${e}`}});return r.ok?await r.json().catch(()=>null):null}catch{return null}}async function rY(e){if(!e)return null;const t=await fetch(`${de}/api/gemphere/integrations/granola/status`,{headers:{Authorization:`Bearer ${e}`}}),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||"Failed to load Granola status");return n}async function sY(e,t){const n=await fetch(`${de}/api/gemphere/integrations/granola/connect`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({apiKey:t})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||"Could not connect Granola");return r}async function iY(e){const t=await Qe(`${de}/api/gemphere/integrations/granola/sync`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({})},6e4),n=await t.json().catch(()=>({}));if(!t.ok||(n==null?void 0:n.success)===!1)throw new Error((n==null?void 0:n.error)||"Granola sync failed");return n}async function oY(e,t=25){if(!e)return{connected:!1,notes:[]};const n=await fetch(`${de}/api/gemphere/integrations/granola/notes?limit=${t}`,{headers:{Authorization:`Bearer ${e}`}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||"Could not load Granola notes");return r}async function aY(e){const t=await fetch(`${de}/api/gemphere/integrations/granola`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`}}),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||"Could not disconnect Granola")}async function lY(e,t,n){const r=await fetch(`${de}/api/gemphere/integrations/granola/opportunities/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({status:n})}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error((s==null?void 0:s.error)||"Could not update Granola opportunity")}async function nD(e,t,n=500){if(!e||!t)return{};const r=`${de}/api/gemphere/integrations/nylas/signals?userId=${t}&limit=${n}&sort=recent`;let s;try{s=await fetch(r,{headers:{Authorization:`Bearer ${e}`}})}catch{return{}}if(!s.ok)return{};const o=await s.json().catch(()=>null);if(!o||!o.success||!Array.isArray(o.signals))return{};const a={};for(const l of o.signals){const c=String(l.contact_email||"").trim().toLowerCase();c&&(a[c]={sentCount:Number(l.sent_count)||0,receivedCount:Number(l.received_count)||0,meetingCount:Number(l.meeting_count)||0,lastSentAt:l.last_sent_at,lastReceivedAt:l.last_received_at,lastMeetingAt:l.last_meeting_at,lastSignalAt:l.last_signal_at,name:l.contact_name})}return a}
234async function kx(e,t,n){var s,o;const r=`${de}/api/gemphere/whatsapp/send-onboarding-link`;try{const a=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phoneNumber:e,firebaseIdToken:t,fullName:(s=n==null?void 0:n.fullName)==null?void 0:s.trim(),email:(o=n==null?void 0:n.email)==null?void 0:o.trim(),inviteType:(n==null?void 0:n.inviteType)||void 0,inviteToken:(n==null?void 0:n.inviteToken)||void 0})}),l=await a.json().catch(()=>null);return!a.ok||!(l!=null&&l.ok)?{ok:!1,error:(l==null?void 0:l.error)||`Send failed (${a.status})`,details:l==null?void 0:l.details,onboardingUrl:l==null?void 0:l.onboardingUrl}:l}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function rD(e){const t=String(e||"").trim();if(!t)return{ok:!1,error:"token required"};try{const n=await fetch(`${de}/api/gemphere/whatsapp/onboarding-token/${encodeURIComponent(t)}`),r=await n.json().catch(()=>null);return!n.ok||!(r!=null&&r.ok)?{ok:!1,error:(r==null?void 0:r.error)||`Claim failed (${n.status})`}:r}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}class sD extends Error{constructor(n,r,s){super(n);st(this,"code");st(this,"limit");st(this,"used");st(this,"tier");st(this,"requiresUpgrade");this.name="ConnectorRequestError",this.code=r,this.limit=s==null?void 0:s.limit,this.used=s==null?void 0:s.used,this.tier=s==null?void 0:s.tier,this.requiresUpgrade=s==null?void 0:s.requiresUpgrade}}const Nx=()=>`${de}/api/gemphere/connectors`;async function dr(e,t,n,r){const s={method:t,headers:{Authorization:`Bearer ${e}`,...r!==void 0?{"Content-Type":"application/json"}:{}},...r!==void 0?{body:JSON.stringify(r)}:{}},o=await Qe(`${Nx()}${n}`,s,3e4),a=await o.json().catch(()=>({}));if(!o.ok)throw new sD((a==null?void 0:a.error)||(a==null?void 0:a.message)||`Request failed (${o.status})`,(a==null?void 0:a.code)||String(o.status),{limit:typeof(a==null?void 0:a.limit)=="number"?a.limit:void 0,used:typeof(a==null?void 0:a.used)=="number"?a.used:void 0,tier:a==null?void 0:a.tier,requiresUpgrade:(a==null?void 0:a.requiresUpgrade)===!0});return a}async function cY(e,t){return dr(e,"POST","",t)}async function uY(e){return dr(e,"GET","")}async function dY(e,t){return dr(e,"POST",`/${t}/accept`)}async function hY(e,t){return dr(e,"POST",`/${t}/reject`)}async function fY(e,t){return dr(e,"POST",`/${t}/resend`)}async function mY(e,t){return dr(e,"DELETE",`/${t}`)}async function pY(e,t,n){return dr(e,"PATCH",`/${t}/sharing`,{enabled:n})}async function gY(e,t,n){return dr(e,"PATCH",`/${t}/classification`,{classification:n})}async function yY(e,t,n){return dr(e,"PATCH",`/${t}/role`,{role:n})}async function vY(e,t,n=50){return dr(e,"GET",`/${t}/targets?limit=${n}`)}async function xY(e){const t=await Qe(`${Nx()}/invite/${encodeURIComponent(e)}`,{},2e4),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||"Invite not found");return n}async function wY(e){const t=await Qe(`${Nx()}/join/${encodeURIComponent(e)}`,{},2e4),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||"Invite link not found");return n}async function bY(e){return dr(e,"GET","/my-join-link")}async function SY(e,t){return dr(e,"POST",`/invite/${encodeURIComponent(t)}/accept`)}async function jY(e,t){return dr(e,"POST",`/join/${encodeURIComponent(t)}/accept`)}async function kY(e){const t=await Qe(`${de}/api/gemphere/settings/connector-sharing`,{headers:{Authorization:`Bearer ${e}`}},2e4),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error((n==null?void 0:n.error)||"Failed to load sharing default");return n}async function NY(e,t){const n=await Qe(`${de}/api/gemphere/settings/connector-sharing`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({enabled:t})},2e4),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||"Failed to save sharing default");return r}const Xc="gemphere_web_auth",Zh="gemphere_web_user_tier",iy="gemphere:session-expired";let oy=!1,W0=!1;function iD(){try{localStorage.removeItem(Xc),localStorage.removeItem(Zh)}catch{}}function G0(){oy=!1}function oD(e){return e==="/"||e==="/landing"}function aD(){oy||(oy=!0,iD(),!(typeof window>"u")&&(window.dispatchEvent(new Event(iy)),oD(window.location.pathname)||window.location.replace("/")))}function lD(e){if(typeof window>"u")return()=>{};const t=()=>e();return window.addEventListener(iy,t),()=>window.removeEventListener(iy,t)}function H0(e,t){if(!e)return null;const n=t.toLowerCase();if(e instanceof Headers)return e.get(t)??e.get(n);if(Array.isArray(e)){for(const[s,o]of e)if(s.toLowerCase()===n)return o;return null}const r=e;for(const s of Object.keys(r))if(s.toLowerCase()===n)return r[s]??null;return null}function cD(e,t){const n=H0(t==null?void 0:t.headers,"Authorization")||H0(t==null?void 0:t.headers,"authorization");if(n&&/Bearer\s+\S+/i.test(n))return!0;
234if(typeof Request<"u"&&e instanceof Request){const r=e.headers.get("Authorization")||e.headers.get("authorization");if(r&&/Bearer\s+\S+/i.test(r))return!0}return!1}function uD(){if(W0||typeof window>"u")return;W0=!0;const e=window.fetch.bind(window);window.fetch=async(t,n)=>{const r=await e(t,n);return r.status===401&&cD(t,n)&&aD(),r}}function dD(){try{const e=localStorage.getItem(Xc);if(!e)return null;const t=JSON.parse(e);if(t!=null&&t.userId&&(t!=null&&t.fullName)&&(t!=null&&t.accessToken))return t}catch{}return null}function gd(e){e?localStorage.setItem(Xc,JSON.stringify(e)):localStorage.removeItem(Xc)}function hD(e){if(!e)return null;try{const t=localStorage.getItem(Zh);if(!t)return null;const n=JSON.parse(t);if(n&&n.userId===e)return n}catch{}return null}function tp(e){e?localStorage.setItem(Zh,JSON.stringify(e)):localStorage.removeItem(Zh)}const Cx=m.createContext(null);function fD({children:e}){const[t,n]=m.useState(null),[r,s]=m.useState(!1),[o,a]=m.useState(null),[l,c]=m.useState(null),[u,h]=m.useState(!1),[f,p]=m.useState(!1),[d,w]=m.useState(null),[v,x]=m.useState(null),[y,g]=m.useState(!1),[b,S]=m.useState(!1),[j,T]=m.useState(!1);m.useEffect(()=>{uD();const V=dD();if(n(V),V){const D=hD(V.userId);D&&(a(D.accountType),c(D.teamPlan),h(D.hasTeam),p(!!D.isPortfolioCompany),w(D.accountSubType??null),x(D.teamMemberRole??null))}s(!0)},[]),m.useEffect(()=>{const V=()=>{n(null),tp(null),a(null),c(null),h(!1),p(!1),w(null),x(null),g(!1),S(!1),T(!1)},D=lD(V),J=F=>{F.key===Xc&&F.newValue==null&&V()};return window.addEventListener("storage",J),()=>{D(),window.removeEventListener("storage",J)}},[]);const C=m.useCallback(async()=>{var V,D,J,F,Y;if(t!=null&&t.accessToken)try{const W=await qn(t.accessToken),H=W.accountType||"UNSET",P=((V=W.team)==null?void 0:V.plan)??null,_=!!((D=W.team)!=null&&D.id),k=!!((J=W.team)!=null&&J.isPortfolioCompany||W.isPortfolioCompany),B=(Array.isArray(W.goals)?W.goals:[]).find(G=>(G==null?void 0:G.goalType)==="_account_subtype"),L=((B==null?void 0:B.icp)||"").toLowerCase();let z=null;L.includes("vc")?z="vc_firm":(L.includes("b2b")||L.includes("company"))&&(z="b2b_company");const ee=(((F=W.teamMember)==null?void 0:F.role)||"").trim().toLowerCase()||null;a(H),c(P),h(_),p(k),w(z),x(ee),tp({userId:t.userId,accountType:H,teamPlan:P,hasTeam:_,isPortfolioCompany:k,accountSubType:z,teamMemberRole:ee});const X=(((Y=W.profile)==null?void 0:Y.email)||"").trim();X&&n(G=>{if(!G||G.email===X)return G;const ne={...G,email:X};return gd(ne),ne})}catch{}finally{g(!0)}},[t==null?void 0:t.accessToken,t==null?void 0:t.userId]);m.useEffect(()=>{if(!(t!=null&&t.accessToken)){a(null),c(null),h(!1),p(!1),w(null),x(null),g(!1);return}C()},[t==null?void 0:t.accessToken,C]),m.useEffect(()=>{if(!(t!=null&&t.accessToken)){S(!1),T(!1);return}let V=!1;return(async()=>{const D=await tD(t.accessToken);if(V)return;S(!!(D!=null&&D.isAdmin)),T(!0);const J=((D==null?void 0:D.email)||"").trim();J&&n(F=>{if(!F||F.email===J)return F;const Y={...F,email:J};return gd(Y),Y})})(),()=>{V=!0}},[t==null?void 0:t.accessToken]);const E=m.useCallback(V=>{G0(),n(V),gd(V)},[]),A=m.useCallback(()=>{G0(),n(null),gd(null),tp(null),a(null),c(null),h(!1),p(!1),w(null),x(null),g(!1),S(!1),T(!1)},[]),R=m.useMemo(()=>({user:t,isReady:r,login:E,logout:A,accountType:o,teamPlan:l,hasTeam:u,isPortfolioCompany:f,accountSubType:d,teamMemberRole:v,tierReady:y,refreshTier:C,isAdmin:b,adminReady:j,isMailboxConnected:!0}),[t,r,E,A,o,l,u,f,d,v,y,C,b,j]);return i.jsx(Cx.Provider,{value:R,children:e})}function CY(){return m.useContext(Cx)}function Ht(){const e=m.useContext(Cx);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function KE(){const{accountType:e,teamPlan:t,hasTeam:n,isPortfolioCompany:r,accountSubType:s,teamMemberRole:o}=Ht();return m.useMemo(()=>{const a=(t||"").toLowerCase(),l=a===""||a==="free",c=a==="pro",u=!!t&&!l,h=e==="UNSET"||e==null,f=e==="ENTERPRISE",p=e==="CONNECTOR",d=e==="INDIVIDUAL",w=(o||"").trim().toLowerCase(),v=e==="TEAM_MEMBER"||w==="member",x=d&&n&&u,y=d&&(!n||l),g=p||y,b=!0,S=!0,j=!0,T=s==="vc_firm",C=s==null;return{isUnset:h,isEnterprise:f,isConnector:p,isIndividual:d,isTeamMember:v,isFreeSolo:y,isPaidSolo:x,isFreePlan:l,isProPlan:c,isFreeOrConnector:g,isPortfolioCompany:r,isInvestorFirm:T,canManagePortfolioCompanies:!r&&(T||C)&&(f||v||d&&T),canSeeAccounts:b,canSeeTeam:S,canManageConnectors:j}},[e,t,n,r,s,o])}function YE(e){return String((e==null?void 0:e.reason)||"").toLowerCase().includes("team_member")}function mD(e,t){if(!(e!=null&&e.team))return!1;if(e.isAdmin===!1)return!0;const n=e.team.adminUserId;return t!=null&&n!=null&&n>0&&n!==t}function JE(e,t,n={},r=null){return e.isConnector?!1:!!(e.isTeamMember||YE(t)||mD(r,n.viewerUserId)||(n.teamMemberRole||"").trim().toLowerCase()==="member")}function QE(e){if(!(e!=null&&e.paidAccess)||e.requiresUpgrade===!0)return!1;const t=String(e.reason||"").toLowerCase();return t.includes("test_skip")||t.includes("individual_free")?!1:(YE(e),
234!0)}function pD(e){var r,s;if(!(e!=null&&e.success))return!1;if(e.isPro===!0)return!0;const t=String(((r=e.connectorQuota)==null?void 0:r.tier)||"").toLowerCase();if(t==="enterprise"||t==="pro")return!0;const n=String(e.plan||"").trim().toLowerCase();return n==="gemphere"||n==="enterprise"?((s=e.connectorQuota)==null?void 0:s.limit)==null:!1}function gD(e,t=null){return QE(e)||pD(t)}function yD(e,t,n={},r=null,s={}){return s.billingLoaded===!1||JE(e,t,n,r)||e.isConnector||gD(t,r)?!1:(t==null?void 0:t.requiresUpgrade)===!0?!0:!(!(e.isIndividual||e.isEnterprise)||e.isIndividual&&e.isPaidSolo)}const Qf="https://calendly.com/edaciris/";function vD(e){return(e==null?void 0:e.trim())||Qf}const xD=49;function q0(e){return e.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0})}function wD({showPro:e=!0,showEnterprise:t=!0,proPrice:n=xD,bookDemoUrl:r,onBeforeCheckout:s,onCheckoutError:o,className:a=""}){const{user:l}=Ht(),[c,u]=m.useState(!1),h=vD(r),f=async()=>{const p=l==null?void 0:l.accessToken,d=l==null?void 0:l.userId;if(!p||!d){o==null||o("Please sign in again to upgrade.");return}s==null||s(),u(!0);const w=await Xh(p,Number(d),null,{checkoutContext:"pricing",plan:"pro"});if(!w.ok||!w.url){u(!1),o==null||o(w.error||"Could not open Stripe Checkout.");return}window.location.assign(w.url)};return!e&&!t?null:i.jsxs("div",{className:`upgrade-plan-sections ${a}`.trim(),children:[e?i.jsxs("div",{className:"upgrade-plan-card upgrade-plan-card--pro",children:[i.jsxs("div",{className:"upgrade-plan-card-head",children:[i.jsx("span",{className:"upgrade-plan-card-icon","aria-hidden":!0,children:i.jsx(xO,{size:16,strokeWidth:1.75})}),i.jsxs("div",{children:[i.jsx("div",{className:"upgrade-plan-card-name",children:"Pro"}),i.jsx("div",{className:"upgrade-plan-card-tagline",children:"Solo plan â one seat, full warm-intro workflows."})]}),i.jsxs("div",{className:"upgrade-plan-card-price",children:[q0(n),i.jsx("span",{children:"/mo"})]})]}),i.jsx("button",{type:"button",className:"upgrade-plan-card-btn primary",onClick:()=>void f(),disabled:c,children:c?"Opening Stripeâ¦":`Go Pro â ${q0(n)}/mo`})]}):null,t?i.jsxs("div",{className:"upgrade-plan-card upgrade-plan-card--enterprise",children:[i.jsxs("div",{className:"upgrade-plan-card-head",children:[i.jsx("span",{className:"upgrade-plan-card-icon","aria-hidden":!0,children:i.jsx(cO,{size:16,strokeWidth:1.75})}),i.jsxs("div",{children:[i.jsx("div",{className:"upgrade-plan-card-name",children:"Enterprise"}),i.jsx("div",{className:"upgrade-plan-card-tagline",children:"Team seats, shared targets, and admin controls â sold through a quick demo."})]})]}),i.jsx("a",{href:h||Qf,target:"_blank",rel:"noreferrer",className:"upgrade-plan-card-btn secondary",onClick:s,children:"Book a demo"})]}):null]})}const K0={general:{eyebrow:"Go Pro",title:"Unlock Gemphere's full potential",subtitle:"Free Starter is perfect for exploring. Pro unlocks unlimited targets and warm-intro workflows solo â Enterprise adds team seats."},accounts:{eyebrow:"Accounts",title:"Subscribe to use target accounts",subtitle:"Free Starter includes up to 5 target accounts. Go Pro for unlimited companies â or book a demo if you need a team workspace."},portfolio:{eyebrow:"Go Pro",title:"Go Pro to add portfolio companies",subtitle:"Invite portfolio founders into your warm-intro graph and coordinate intros on their asks."},team:{eyebrow:"Team",title:"Want to add your team?",subtitle:"Pro is a solo plan â one seat, no team invites. Team accounts with shared targets and seat pricing are available through Enterprise."},connectors:{eyebrow:"Connectors",title:"Add more connectors",subtitle:"Free Starter includes up to 2 connectors. Go Pro for up to 5 â or book a demo for Enterprise unlimited."},intros:{eyebrow:"Warm intros",title:"Send intros with Pro",subtitle:"Request, offer, and track warm introductions with full visibility across your network."},network:{eyebrow:"Network",title:"Grow faster with full network tools",subtitle:"Map relationships, schedule touchpoints, and act on warm paths without limits."},"gem-ai":{eyebrow:"Gem AI",title:"Get more from Gem AI",subtitle:"Go Pro for deeper search, connectors, and warm-intro workflows."}},bD=[{icon:Fh,label:"Unlimited target accounts & custom ICPs"},{icon:hO,label:"Connectors & reciprocal intro paths"},{icon:Gg,label:"Request & track warm introductions"},{icon:lO,label:"Gem AI & network tools"}];function SD({variant:e,onClose:t}){const n=K0[e]??K0.general,r=e==="team",s=e==="connectors",o=!r;return wl.createPortal(i.jsx("div",{className:"upgrade-modal-overlay open",onClick:t,role:"presentation",children:i.jsxs("div",{className:`upgrade-modal${r?" upgrade-modal--team":""}`,onClick:l=>l.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"upgrade-modal-title",children:[i.jsx("button",{type:"button",className:"upgrade-modal-close",onClick:t,"aria-label":"Close",children:i.jsx(bu,{size:18,strokeWidth:2})}),i.jsx("div",{className:"upgrade-modal-glow","aria-hidden":!0}),i.jsxs("div",{className:"upgrade-modal-head",children:[i.jsx("span",{className:"upgrade-modal-eyebrow",children:n.eyebrow}),i.jsx("h2",{id:"upgrade-modal-title",className:"upgrade-modal-title",children:n.title}),i.jsx("p",{className:"upgrade-modal-subtitle",children:n.subtitle})]}),!r&&!s?i.jsx("ul",{className:"upgrade-modal-features",children:bD.map(({icon:l,label:c})=>i.jsxs("li",{children:[i.jsx("span",{className:"upgrade-modal-feature-icon",children:i.jsx(l,{size:16,strokeWidth:1.75})}),c]},c))}):null,i.jsx("div",{className:"upgrade-modal-plans",children:i.jsx(wD,{showPro:o,showEnterprise:!0,onBeforeCheckout:t})}),i.jsx("div",{className:"upgrade-modal-foot",children:i.jsx("button",{type:"button",className:"upgrade-modal-btn ghost",onClick:t,children:"Keep exploring"})})]})}),document.body)}const jD=new Set(["/","/landing","/sf-tech-week"]),XE=m.createContext(null);function kD({children:e}){const{pathname:t}=Nr(),n=jD.has(t),{user:r,tierReady:s,teamMemberRole:o,hasTeam:a}=Ht(),l=KE(),[c,u]=m.useState(!1),[h,f]=m.useState("general"),[p,d]=m.useState(null),[w,v]=m.useState(null),[x,y]=m.useState(!1);m.useEffect(()=>{if(!(r!=null&&r.accessToken)||!r.userId){d(null),v(null),y(!1);return}if(!s){y(!1);return}let A=!1;return y(!1),Sn(`billing-app-access:${r.userId}:0`),Sn(`billing-app-access:${r.userId}:1`),(async()=>{const[R,V]=await Promise.all([Nu(r.accessToken,r.userId),jx(r.accessToken,r.userId).catch(()=>null)]);A||(d(R),v(V),y(!0))})(),()=>{A=!0}},[r==null?void 0:r.accessToken,r==null?void 0:r.userId,s]);const g=m.useMemo(()=>({teamMemberRole:o,hasTeam:a,viewerUserId:r==null?void 0:r.userId}),[o,a,r==null?void 0:r.userId]),b=!!r&&s&&JE(l,p,g,w),S=!!r&&s&&x&&!b&&yD(l,p,g,w,{billingLoaded:!0}),j=m.useCallback((A="general")=>{b||(f(A),u(!0))},[b]),T=m.useCallback(()=>{u(!1)},[]),C=m.useCallback((A,R="general")=>{if(!S){A();return}j(R)},[S,j]);m.useEffect(()=>{!S&&c&&u(!1)},[S,c]),m.useEffect(()=>{n&&c&&u(!1)},[n,c]);const E=m.useMemo(()=>({needsUpgrade:S,isInvitedTeamMember:b,modalOpen:c,modalVariant:h,openUpgrade:j,closeUpgrade:T,guardPaidAction:C}
234),[S,b,c,h,j,T,C]);return i.jsxs(XE.Provider,{value:E,children:[e,c&&!n?i.jsx(SD,{variant:h,onClose:T}):null]})}function ND(){const e=m.useContext(XE);if(!e)throw new Error("useUpgradePrompt must be used within UpgradePromptProvider");return e}const ZE=m.createContext(null);function CD({children:e}){const t=m.useCallback(()=>{window.open(Qf,"_blank","noopener,noreferrer")},[]),n=m.useCallback(()=>{},[]);return i.jsx(ZE.Provider,{value:{openBookDemo:t,closeBookDemo:n},children:e})}function ED(){const e=m.useContext(ZE);if(!e)throw new Error("useBookDemoModal must be used within BookDemoModalProvider");return e}const Ex=m.createContext({});function Gi(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const eT=typeof window<"u",Xf=eT?m.useLayoutEffect:m.useEffect,Zf=m.createContext(null);function Tx(e,t){e.indexOf(t)===-1&&e.push(t)}function Px(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Kr=(e,t,n)=>n>t?t:n<e?e:n;let em=()=>{},Hi=()=>{};const Us={},tT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nT(e){return typeof e=="object"&&e!==null}const rT=e=>/^0[^.\s]+$/u.test(e);function Ix(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qn=e=>e,TD=(e,t)=>n=>t(e(n)),Eu=(...e)=>e.reduce(TD),il=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ax{constructor(){this.subscriptions=[]}add(t){return Tx(this.subscriptions,t),()=>Px(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hs=e=>e*1e3,br=e=>e/1e3;function Rx(e,t){return t?e*(1e3/t):0}const sT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,PD=1e-7,ID=12;function AD(e,t,n,r,s){let o,a,l=0;do a=t+(n-t)/2,o=sT(a,r,s)-e,o>0?n=a:t=a;while(Math.abs(o)>PD&&++l<ID);return a}function Tu(e,t,n,r){if(e===t&&n===r)return Qn;const s=o=>AD(o,0,1,e,n);return o=>o===0||o===1?o:sT(s(o),t,r)}const iT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oT=e=>t=>1-e(1-t),aT=Tu(.33,1.53,.69,.99),_x=oT(aT),lT=iT(_x),cT=e=>(e*=2)<1?.5*_x(e):.5*(2-Math.pow(2,-10*(e-1))),Ox=e=>1-Math.sin(Math.acos(e)),uT=oT(Ox),dT=iT(Ox),RD=Tu(.42,0,1,1),_D=Tu(0,0,.58,1),hT=Tu(.42,0,.58,1),OD=e=>Array.isArray(e)&&typeof e[0]!="number",fT=e=>Array.isArray(e)&&typeof e[0]=="number",Y0={linear:Qn,easeIn:RD,easeInOut:hT,easeOut:_D,circIn:Ox,circInOut:dT,circOut:uT,backIn:_x,backInOut:lT,backOut:aT,anticipate:cT},MD=e=>typeof e=="string",J0=e=>{if(fT(e)){Hi(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Tu(t,n,r,s)}else if(MD(e))return Hi(Y0[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Y0[e];return e},yd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Q0={value:null,addProjectionMetrics:null};function LD(e,t){let n=new Set,r=new Set,s=!1,o=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(h.schedule(f),e()),c++,f(l)}const h={schedule:(f,p=!1,d=!1)=>{const v=d&&s?n:r;return p&&a.add(f),v.has(f)||v.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),t&&Q0.value&&Q0.value.frameloop[t].push(c),c=0,n.clear(),s=!1,o&&(o=!1,h.process(f))}};return h}const $D=40;function mT(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=yd.reduce((b,S)=>(b[S]=LD(o,t?S:void 0),b),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:f,preRender:p,render:d,postRender:w}=a,v=()=>{const b=Us.useManualTiming?s.timestamp:performance.now();n=!1,Us.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,$D),1)),s.timestamp=b,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),f.process(s),p.process(s),d.process(s),w.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},x=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:yd.reduce((b,S)=>{const j=a[S];return b[S]=(T,C=!1,E=!1)=>(n||x(),j.schedule(T,C,E)),b},{}),cancel:b=>{for(let S=0;S<yd.length;S++)a[yd[S]].cancel(b)},state:s,steps:a}}const{schedule:ut,cancel:Yr,state:tn,steps:np}=mT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qn,!0);let eh;function DD(){eh=void 0}const Pn={now:()=>(eh===void 0&&Pn.set(tn.isProcessing||Us.useManualTiming?tn.timestamp:performance.now()),eh),set:e=>{eh=e,queueMicrotask(DD)}},pT=e=>t=>typeof t=="string"&&t.startsWith(e),gT=pT("--"),FD=pT("var(--"),Mx=e=>FD(e)?BD.test(e.split("/*")[0].trim()):!1,BD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function X0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Tl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zc={...Tl,transform:e=>Kr(0,1,e)},vd={...Tl,default:1},fc=e=>Math.round(e*1e5)/1e5,Lx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function UD(e){return e==null}const VD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$x=(e,t)=>n=>!!(typeof n=="string"&&VD.test(n)&&n.startsWith(e)||t&&!UD(n)&&Object.prototype.hasOwnProperty.call(n,t)),yT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,a,l]=r.match(Lx);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},zD=e=>Kr(0,255,e),rp={...Tl,transform:e=>Math.round(zD(e))},xo={test:$x("rgb","red"),parse:yT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rp.transform(e)+", "+rp.transform(t)+", "+rp.transform(n)+", "+fc(Zc.transform(r))+")"};function WD(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alph
vendor: 2,157 bytes, line 234
234a:s?parseInt(s,16)/255:1}}const ay={test:$x("#"),parse:WD,transform:xo.transform},Pu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ri=Pu("deg"),fs=Pu("%"),ve=Pu("px"),GD=Pu("vh"),HD=Pu("vw"),Z0={...fs,parse:e=>fs.parse(e)/100,transform:e=>fs.transform(e*100)},pa={test:$x("hsl","hue"),parse:yT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fs.transform(fc(t))+", "+fs.transform(fc(n))+", "+fc(Zc.transform(r))+")"},Ut={test:e=>xo.test(e)||ay.test(e)||pa.test(e),parse:e=>xo.test(e)?xo.parse(e):pa.test(e)?pa.parse(e):ay.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xo.transform(e):pa.transform(e),getAnimatableNone:e=>{const t=Ut.parse(e);return t.alpha=0,Ut.transform(t)}},qD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function KD(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Lx))==null?void 0:t.length)||0)+(((n=e.match(qD))==null?void 0:n.length)||0)>0}const vT="number",xT="color",YD="var",JD="var(",e1="${}",QD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const l=t.replace(QD,c=>(Ut.test(c)?(r.color.push(o),s.push(xT),n.push(Ut.parse(c))):c.startsWith(JD)?(r.var.push(o),s.push(YD),n.push(c)):(r.number.push(o),s.push(vT),n.push(parseFloat(c))),++o,e1)).split(e1);return{values:n,split:l,indexes:r,types:s}}function wT(e){return eu(e).values}function bT(e){const{split:t,types:n}=eu(e),r=t.length;return s=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],s[a]!==void 0){const l=n[a];l===vT?o+=fc(s[a]):l===xT?o+=Ut.transform(s[a]):o+=s[a]}return o}}const XD=e=>typeof e=="number"?0:Ut.test(e)?Ut.getAnimatableNone(e):e;function ZD(e){const t=wT(e);return bT(e)(t.map(XD))}const qi={test:KD,parse:wT,createTransformer:bT,getAnimatableNone:ZD};
vendor: 16,638 bytes, line 234
234function sp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eF({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,a=0;if(!t)s=o=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=sp(c,l,e+1/3),o=sp(c,l,e),a=sp(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function ef(e,t){return n=>n>0?t:e}const At=(e,t,n)=>e+(t-e)*n,ip=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},tF=[ay,xo,pa],nF=e=>tF.find(t=>t.test(e));function t1(e){const t=nF(e);if(em(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===pa&&(n=eF(n)),n}const n1=(e,t)=>{const n=t1(e),r=t1(t);if(!n||!r)return ef(e,t);const s={...n};return o=>(s.red=ip(n.red,r.red,o),s.green=ip(n.green,r.green,o),s.blue=ip(n.blue,r.blue,o),s.alpha=At(n.alpha,r.alpha,o),xo.transform(s))},ly=new Set(["none","hidden"]);function rF(e,t){return ly.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sF(e,t){return n=>At(e,t,n)}function Dx(e){return typeof e=="number"?sF:typeof e=="string"?Mx(e)?ef:Ut.test(e)?n1:aF:Array.isArray(e)?ST:typeof e=="object"?Ut.test(e)?n1:iF:ef}function ST(e,t){const n=[...e],r=n.length,s=e.map((o,a)=>Dx(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=s[a](o);return n}}function iF(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Dx(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function oF(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],a=e.indexes[o][r[o]],l=e.values[a]??0;n[s]=l,r[o]++}return n}const aF=(e,t)=>{const n=qi.createTransformer(t),r=eu(e),s=eu(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?ly.has(e)&&!s.values.length||ly.has(t)&&!r.values.length?rF(e,t):Eu(ST(oF(r,s),s.values),n):(em(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ef(e,t))};function jT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?At(e,t,n):Dx(e)(e,t)}const lF=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ut.update(t,n),stop:()=>Yr(t),now:()=>tn.isProcessing?tn.timestamp:Pn.now()}},kT=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},tf=2e4;function Fx(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<tf;)t+=n,r=e.next(t);return t>=tf?1/0:t}function cF(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Fx(r),tf);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:br(s)}}const uF=5;function NT(e,t,n){const r=Math.max(t-uF,0);return Rx(n-e(r),t-r)}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},op=.001;function dF({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let s,o;em(e<=hs(Pt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kr(Pt.minDamping,Pt.maxDamping,a),e=Kr(Pt.minDuration,Pt.maxDuration,br(e)),a<1?(s=u=>{const h=u*a,f=h*e,p=h-n,d=cy(u,a),w=Math.exp(-f);return op-p/d*w},o=u=>{const f=u*a*e,p=f*n+n,d=Math.pow(a,2)*Math.pow(u,2)*e,w=Math.exp(-f),v=cy(Math.pow(u,2),a);return(-s(u)+op>0?-1:1)*((p-d)*w)/v}):(s=u=>{const h=Math.exp(-u*e),f=(u-n)*e+1;return-op+h*f},o=u=>{const h=Math.exp(-u*e),f=(n-u)*(e*e);return h*f});const l=5/e,c=fF(s,o,l);if(e=hs(e),isNaN(c))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const hF=12;function fF(e,t,n){let r=n;for(let s=1;s<hF;s++)r=r-e(r)/t(r);return r}function cy(e,t){return e*Math.sqrt(1-t*t)}const mF=["duration","bounce"],pF=["stiffness","damping","mass"];function r1(e,t){return t.some(n=>e[n]!==void 0)}function gF(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!r1(e,pF)&&r1(e,mF))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Kr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Pt.mass,stiffness:s,damping:o}}else{const n=dF(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function nf(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:u,mass:h,duration:f,velocity:p,isResolvedFromDuration:d}=gF({...n,velocity:-br(n.velocity||0)}),w=p||0,v=u/(2*Math.sqrt(c*h)),x=a-o,y=br(Math.sqrt(c/h)),g=Math.abs(x)<5;r||(r=g?Pt.restSpeed.granular:Pt.restSpeed.default),s||(s=g?Pt.restDelta.granular:Pt.restDelta.default);let b;if(v<1){const j=cy(y,v);b=T=>{const C=Math.exp(-v*y*T);return a-C*((w+v*y*x)/j*Math.sin(j*T)+x*Math.cos(j*T))}}else if(v===1)b=j=>a-Math.exp(-y*j)*(x+(w+y*x)*j);else{const j=y*Math.sqrt(v*v-1);b=T=>{const C=Math.exp(-v*y*T),E=Math.min(j*T,300);return a-C*((w+v*y*x)*Math.sinh(E)+j*x*Math.cosh(E))/j}}const S={calculatedDuration:d&&f||null,next:j=>{const T=b(j);if(d)l.done=j>=f;else{let C=j===0?w:0;v<1&&(C=j===0?hs(w):NT(b,j,T));const E=Math.abs(C)<=r,A=Math.abs(a-T)<=s;l.done=E&&A}return l.value=l.done?a:T,l},toString:()=>{const j=Math.min(Fx(S),tf),T=kT(C=>S.next(j*C).value,j,30);return j+"ms "+T},toTransition:()=>{}};return S}nf.applyToOptions=e=>{const t=cF(e,100,nf);return e.ease=t.ease,e.duration=hs(t.duration),e.type="keyframes",e};function uy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:h}){const f=e[0],p={done:!1,value:f},d=E=>l!==void 0&&E<l||c!==void 0&&E>c,w=E=>l===void 0?c:c===void 0||Math.abs(l-E)<Math.abs(c-E)?l:c;let v=n*t;const x=f+v,y=a===void 0?x:a(x);y!==x&&(v=y-f);const g=E=>-v*Math.exp(-E/r),b=E=>y+g(E),S=E=>{const A=g(E),R=b(E);p.done=Math.abs(A)<=u,p.value=p.done?y:R};let j,T;const C=E=>{d(p.value)&&(j=E,T=nf({keyframes:[p.value,w(p.value)],velocity:NT(b,E,p.value),damping:s,stiffness:o,restDelta:u,restSpeed:h}))};return C(0),{calculatedDuration:null,next:E=>{let A=!1;return!T&&j===void 0&&(A=!0,S(E),C(E)),j!==void 0&&E>=j?T.next(E-j):(!A&&S(E),p)}}}function yF(e,t,n){const r=[],s=n||Us.mix||jT,o=e.length-1;for(let a=0;a<o;a++){let l=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Qn:t;l=Eu(c,l)}r.push(l)}return r}function Bx(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Hi(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=yF(t,r,s),c=l.length,u=h=>{if(a&&h<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(h<e[f+1]);f++);const p=il(e[f],e[f+1],h);return l[f](p)};return n?h=>u(Kr(e[0],e[o-1],h)):u}function vF(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=il(0,t,r);e.push(At(n,1,s))}}function CT(e){const t=[0];return vF(t,e.length-1),t}function xF(e,t){return e.map(n=>n*t)}function wF(e,t){return e.map(()=>t||hT).splice(0,e.length-1)}function mc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=OD(r)?r.map(J0):J0(r),o={done:!1,value:t[0]},a=xF(n&&n.length===t.length?n:CT(t),e),l=Bx(a,t,{ease:Array.isArray(s)?s:wF(t,s)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const bF=e=>e!==null;function Ux(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(bF),l=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||r===void 0?o[l]:r}const SF={decay:uy,inertia:uy,tween:mc,keyframes:mc,spring:nf};function ET(e){typeof e.type=="string"&&(e.type=SF[e.type])}class Vx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const jF=e=>e/100;class zx extends Vx{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Pn.now()&&this.tick(Pn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ET(t);const{type:n=mc,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=t;let{keyframes:l}=t;const c=n||mc;c!==mc&&typeof l[0]!="number"&&(this.mixKeyframes=Eu(jF,jT(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=Fx(u));const{calculatedDuration:h}=u;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:h,repeat:f,repeatType:p,repeatDelay:d,type:w,onUpdate:v,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let b=this.currentTime,S=r;if(f){const E=Math.min(this.currentTime,s)/l;let A=Math.floor(E),R=E%1;!R&&E>=1&&(R=1),R===1&&A--,A=Math.min(A,f+1),!!(A%2)&&(p==="reverse"?(R=1-R,d&&(R-=d/l)):p==="mirror"&&(S=a)),b=Kr(0,1,R)*l}const j=g?{done:!1,value:h[0]}:S.next(b);o&&(j.value=o(j.value));let{done:T}=j;!g&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&w!==uy&&(j.value=Ux(h,this.options,x,this.speed)),v&&v(j.value),C&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return br(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+br(t)}get time(){return br(this.currentTime)}set time(t){var n;t=hs(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Pn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=br(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=lF,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Pn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function kF(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wo=e=>e*180/Math.PI,dy=e=>{const t=wo(Math.atan2(e[1],e[0]));return hy(t)},NF={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:dy,rotateZ:dy,skewX:e=>wo(Math.atan(e[1])),skewY:e=>wo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},hy=e=>(e=e%360,e<0&&(e+=360),e),s1=dy,i1=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),o1=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CF={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:i1,scaleY:o1,scale:e=>(i1(e)+o1(e))/2,rotateX:e=>hy(wo(Math.atan2(e[6],e[5]))),rotateY:e=>hy(wo(Math.atan2(-e[2],e[0]))),rotateZ:s1,rotate:s1,skewX:e=>wo(Math.atan(e[4])),skewY:e=>wo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fy(e){return e.includes("scale")?1:0}function my(e,t){if(!e||e==="none")return fy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=CF,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=NF,s=l}if(!s)return fy(t);const o=r[t],a=s[1].split(",").map(TF);return typeof o=="function"?o(a):a[o]}const EF=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return my(n,t)};function TF(e){return parseFloat(e.trim())}const Pl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Il=new Set(Pl),a1=e=>e===Tl||e===ve,PF=new Set(["x","y","z"]),IF=Pl.filter(e=>!PF.has(e));function AF(e){const t=[];return IF.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ji={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>my(t,"x"),y:(e,{transform:t})=>my(t,"y")};ji.translateX=ji.x;ji.translateY=ji.y;const Po=new Set;let py=!1,gy=!1,yy=!1;function TT(){if(gy){const e=Array.from(Po).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=AF(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,a])=>{var l;(l=r.getValue(o))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}gy=!1,py=!1,Po.forEach(e=>e.complete(yy)),Po.clear()}function PT(){Po.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gy=!0)})}function RF(){yy=!0,PT(),TT(),yy=!1}class Wx{constructor(t,n,r,s,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Po.add(this),py||(py=!0,ut.read(PT),ut.resolveKeyframes(TT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}kF(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Po.delete(this)}cancel(){this.state==="scheduled"&&(Po.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const _F=e=>e.startsWith("--");function OF(e,t,n){_F(t)?e.style.setProperty(t,n):e.style[t]=n}const IT=Ix(()=>window.ScrollTimeline!==void 0),MF={};function LF(e,t){const n=Ix(e);return()=>MF[t]??n()}const AT=LF(()=>{try{document.createElement("div").animate({opacity:0}
234,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ql=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,l1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ql([0,.65,.55,1]),circOut:Ql([.55,0,1,.45]),backIn:Ql([.31,.01,.66,-.59]),backOut:Ql([.33,1.53,.69,.99])};function RT(e,t){if(e)return typeof e=="function"?AT()?kT(e,t):"ease-out":fT(e)?Ql(e):Array.isArray(e)?e.map(n=>RT(n,t)||l1.easeOut):l1[e]}function $F(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:l="easeOut",times:c}={},u=void 0){const h={[t]:n};c&&(h.offset=c);const f=RT(l,s);Array.isArray(f)&&(h.easing=f);const p={delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return u&&(p.pseudoElement=u),e.animate(h,p)}function _T(e){return typeof e=="function"&&"applyToOptions"in e}function DF({type:e,...t}){return _T(e)&&AT()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class FF extends Vx{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,Hi(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=DF(t);this.animation=$F(n,r,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const h=Ux(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(h):OF(n,r,h),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return br(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+br(t)}get time(){return br(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hs(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&IT()?(this.animation.timeline=t,Qn):n(this)}}const OT={anticipate:cT,backInOut:lT,circInOut:dT};function BF(e){return e in OT}function UF(e){typeof e.ease=="string"&&BF(e.ease)&&(e.ease=OT[e.ease])}const ap=10;class VF extends FF{constructor(t){UF(t),ET(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new zx({...a,autoplay:!1}),c=Math.max(ap,Pn.now()-this.startTime),u=Kr(0,ap,c-ap);n.setWithVelocity(l.sample(Math.max(0,c-u)).value,l.sample(c).value,u),l.stop()}}const c1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(qi.test(e)||e==="0")&&!e.startsWith("url("));function zF(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function WF(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=c1(s,t),l=c1(o,t);return em(a===l,`You are trying to animate ${t} from "${s}" to "${o}". "${a?o:s}" is not an animatable value.`,"value-not-animatable"),!a||!l?!1:zF(e)||(n==="spring"||_T(n))&&r}function vy(e){e.duration=0,e.type="keyframes"}const GF=new Set(["opacity","clipPath","filter","transform"]),HF=Ix(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qF(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:a}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return HF()&&n&&GF.has(n)&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&o!==0&&a!=="inertia"}const KF=40;class YF extends Vx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",keyframes:l,name:c,motionValue:u,element:h,...f}){var w;super(),this.stop=()=>{var v,x;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Pn.now();const p={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:a,name:c,motionValue:u,element:h,...f},d=(h==null?void 0:h.KeyframeResolver)||Wx;this.keyframeResolver=new d(l,(v,x,y)=>this.onKeyframesResolved(v,x,p,!y),c,u,h),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:h}=r;this.resolvedAt=Pn.now(),WF(t,o,a,l)||((Us.instantAnimations||!c)&&(h==null||h(Ux(t,r,n))),t[0]=t[t.length-1],vy(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>KF?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},d=!u&&qF(p)?new VF({...p,element:p.motionValue.owner.current}):new zx(p);d.finished.then(()=>this.notifyFinished()).catch(Qn),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),RF()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const JF=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QF(e){const t=JF.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const XF=4;function MT(e,t,n=1){Hi(n<=XF,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=QF(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return tT(a)?parseFloat(a):a}return Mx(s)?MT(s,t,n+1):s}function Gx(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ZF={type:"spring",stiffness:500,damping:25,restSpeed:10},e3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),t3={type:"keyframes",duration:.8},n3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},r3=(e,{keyframes:t})=>t.length>2?t3:Il.has(e)?e.startsWith("scale")?e3(t[1]):ZF:n3;function s3({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...h}){return!!Object.keys(h).length}const i3=e=>e!==null;function o3(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(i3),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}function LT(e,t,n,r=0,s=1){const o=Array.from(e).sort((u,h)=>u.sortNodePosition(h)).indexOf(t),a=e.size,l=(a-1)*r;return typeof n=="function"?n(o,a):s===1?o*r:l-o*r}const Hx=(e,t,n,r={},s,o)=>a=>{const l=Gx(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-hs(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:s};s3(l)||Object.assign(h,r3(e,h)),h.duration&&(h.duration=hs(h.duration)),h.repeatDelay&&(h.repeatDelay=hs(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let f=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(vy(h),h.delay===0&&(f=!0)),(Us.instantAnimations||Us.skipAnimations)&&(f=!0,vy(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,f&&!o&&t.get()!==void 0){const p=o3(h.keyframes,l);if(p!==void 0){ut.update(()=>{h.onUpdate(p),h.onComplete()});return}}return l.isSync?new zx(h):new YF(h)}
234,$T=new Set(["width","height","top","left","right","bottom",...Pl]),u1=30,a3=e=>!isNaN(parseFloat(e)),pc={current:void 0};class l3{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Pn.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Pn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=a3(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ax);const r=this.events[t].add(n);return t==="change"?()=>{r(),ut.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return pc.current&&pc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Pn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>u1)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,u1);return Rx(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Br(e,t){return new l3(e,t)}function d1(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function qx(e,t,n,r){if(typeof t=="function"){const[s,o]=d1(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=d1(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function Ia(e,t,n){const r=e.getProps();return qx(r,t,n!==void 0?n:r.custom,e)}const xy=e=>Array.isArray(e);function c3(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Br(n))}function u3(e){return xy(e)?e[e.length-1]||0:e}function d3(e,t){const n=Ia(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const a in o){const l=u3(o[a]);c3(e,a,l)}}const wn=e=>!!(e&&e.getVelocity);function h3(e){return!!(wn(e)&&e.add)}function wy(e,t){const n=e.getValue("willChange");if(h3(n))return n.add(t);if(!n&&Us.WillChange){const r=new Us.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Kx(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const f3="framerAppearId",DT="data-"+Kx(f3);function FT(e){return e.props[DT]}function m3({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function BT(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const h in l){const f=e.getValue(h,e.latestValues[h]??null),p=l[h];if(p===void 0||u&&m3(u,h))continue;const d={delay:n,...Gx(o||{},h)},w=f.get();
vendor: 4,866 bytes, line 234
234if(w!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===w&&!d.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const y=FT(e);if(y){const g=window.MotionHandoffAnimation(y,h,ut);g!==null&&(d.startTime=g,v=!0)}}wy(e,h),f.start(Hx(h,f,p,e.shouldReduceMotion&&$T.has(h)?{type:!1}:d,e,v));const x=f.animation;x&&c.push(x)}return a&&Promise.all(c).then(()=>{ut.update(()=>{a&&d3(e,a)})}),c}function by(e,t,n={}){var c;const r=Ia(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(BT(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:f,staggerDirection:p}=s;return p3(e,t,u,h,f,p,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,h]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>h())}else return Promise.all([o(),a(n.delay)])}function p3(e,t,n=0,r=0,s=0,o=1,a){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(by(c,t,{...a,delay:n+(typeof r=="function"?0:r)+LT(e.variantChildren,c,r,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function g3(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>by(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=by(e,t,n);else{const s=typeof t=="function"?Ia(e,t,n.custom):t;r=Promise.all(BT(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const y3={test:e=>e==="auto",parse:e=>e},UT=e=>t=>t.test(e),VT=[Tl,ve,fs,ri,HD,GD,y3],h1=e=>VT.find(UT(e));function v3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rT(e):!0}const x3=new Set(["brightness","contrast","saturate","opacity"]);function w3(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Lx)||[];if(!r)return e;const s=n.replace(r,"");let o=x3.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const b3=/\b([a-z-]*)\(.*?\)/gu,Sy={...qi,getAnimatableNone:e=>{const t=e.match(b3);return t?t.map(w3).join(" "):e}},f1={...Tl,transform:Math.round},S3={rotate:ri,rotateX:ri,rotateY:ri,rotateZ:ri,scale:vd,scaleX:vd,scaleY:vd,scaleZ:vd,skew:ri,skewX:ri,skewY:ri,distance:ve,translateX:ve,translateY:ve,translateZ:ve,x:ve,y:ve,z:ve,perspective:ve,transformPerspective:ve,opacity:Zc,originX:Z0,originY:Z0,originZ:ve},Yx={borderWidth:ve,borderTopWidth:ve,borderRightWidth:ve,borderBottomWidth:ve,borderLeftWidth:ve,borderRadius:ve,radius:ve,borderTopLeftRadius:ve,borderTopRightRadius:ve,borderBottomRightRadius:ve,borderBottomLeftRadius:ve,width:ve,maxWidth:ve,height:ve,maxHeight:ve,top:ve,right:ve,bottom:ve,left:ve,inset:ve,insetBlock:ve,insetBlockStart:ve,insetBlockEnd:ve,insetInline:ve,insetInlineStart:ve,insetInlineEnd:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,paddingBlock:ve,paddingBlockStart:ve,paddingBlockEnd:ve,paddingInline:ve,paddingInlineStart:ve,paddingInlineEnd:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,marginBlock:ve,marginBlockStart:ve,marginBlockEnd:ve,marginInline:ve,marginInlineStart:ve,marginInlineEnd:ve,backgroundPositionX:ve,backgroundPositionY:ve,...S3,zIndex:f1,fillOpacity:Zc,strokeOpacity:Zc,numOctaves:f1},j3={...Yx,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:Sy,WebkitFilter:Sy},zT=e=>j3[e];function WT(e,t){let n=zT(e);return n!==Sy&&(n=qi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const k3=new Set(["auto","none","0"]);function N3(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!k3.has(o)&&eu(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=WT(n,s)}class C3 extends Wx{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let f=t[h];if(typeof f=="string"&&(f=f.trim(),Mx(f))){const p=MT(f,n.current);p!==void 0&&(t[h]=p),h===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!$T.has(r)||t.length!==2)return;const[s,o]=t,a=h1(s),l=h1(o),c=X0(s),u=X0(o);if(c!==u&&ji[r]){this.needsMeasurement=!0;return}if(a!==l)if(a1(a)&&a1(l))for(let h=0;h<t.length;h++){const f=t[h];typeof f=="string"&&(t[h]=parseFloat(f))}else ji[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||v3(t[s]))&&r.push(s);r.length&&N3(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ji[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];
234s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=ji[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function GT(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const HT=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Jx(e){return nT(e)&&"offsetHeight"in e}const{schedule:Qx,cancel:EY}=mT(queueMicrotask,!1),Ir={x:!1,y:!1};function qT(){return Ir.x||Ir.y}function E3(e){return e==="x"||e==="y"?Ir[e]?null:(Ir[e]=!0,()=>{Ir[e]=!1}):Ir.x||Ir.y?null:(Ir.x=Ir.y=!0,()=>{Ir.x=Ir.y=!1})}function KT(e,t){const n=GT(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function m1(e){return!(e.pointerType==="touch"||qT())}function T3(e,t,n={}){const[r,s,o]=KT(e,n),a=l=>{if(!m1(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const h=f=>{m1(f)&&(u(f),c.removeEventListener("pointerleave",h))};c.addEventListener("pointerleave",h,s)};return r.forEach(l=>{l.addEventListener("pointerenter",a,s)}),o}const YT=(e,t)=>
vendor: 5,834 bytes, line 234
234t?e===t?!0:YT(e,t.parentElement):!1,Xx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,P3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function JT(e){return P3.has(e.tagName)||e.isContentEditable===!0}const th=new WeakSet;function p1(e){return t=>{t.key==="Enter"&&e(t)}}function lp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const I3=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=p1(()=>{if(th.has(n))return;lp(n,"down");const s=p1(()=>{lp(n,"up")}),o=()=>lp(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function g1(e){return Xx(e)&&!qT()}function A3(e,t,n={}){const[r,s,o]=KT(e,n),a=l=>{const c=l.currentTarget;if(!g1(l))return;th.add(c);const u=t(c,l),h=(d,w)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),th.has(c)&&th.delete(c),g1(d)&&typeof u=="function"&&u(d,{success:w})},f=d=>{h(d,c===window||c===document||n.useGlobalTarget||YT(c,d.target))},p=d=>{h(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",p,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),Jx(l)&&(l.addEventListener("focus",u=>I3(u,s)),!JT(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function Zx(e){return nT(e)&&"ownerSVGElement"in e}const nh=new WeakMap;let si;const QT=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Zx(r)&&"getBBox"in r?r.getBBox()[t]:r[n],R3=QT("inline","width","offsetWidth"),_3=QT("block","height","offsetHeight");function O3({target:e,borderBoxSize:t}){var n;(n=nh.get(e))==null||n.forEach(r=>{r(e,{get width(){return R3(e,t)},get height(){return _3(e,t)}})})}function M3(e){e.forEach(O3)}function L3(){typeof ResizeObserver>"u"||(si=new ResizeObserver(M3))}function $3(e,t){si||L3();const n=GT(e);return n.forEach(r=>{let s=nh.get(r);s||(s=new Set,nh.set(r,s)),s.add(t),si==null||si.observe(r)}),()=>{n.forEach(r=>{const s=nh.get(r);s==null||s.delete(t),s!=null&&s.size||si==null||si.unobserve(r)})}}const rh=new Set;let ga;function D3(){ga=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};rh.forEach(t=>t(e))},window.addEventListener("resize",ga)}function F3(e){return rh.add(e),ga||D3(),()=>{rh.delete(e),!rh.size&&typeof ga=="function"&&(window.removeEventListener("resize",ga),ga=void 0)}}function B3(e,t){return typeof e=="function"?F3(e):$3(e,t)}function XT(e,t){let n;const r=()=>{const{currentTime:s}=t,a=(s===null?0:s.value)/100;n!==a&&e(a),n=a};return ut.preUpdate(r,!0),()=>Yr(r)}function U3(e){return Zx(e)&&e.tagName==="svg"}function V3(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],o=e[2+n],a=e[3+n],l=Bx(s,o,a);return t?l(r):l}const z3=[...VT,Ut,qi],W3=e=>z3.find(UT(e)),y1=()=>({translate:0,scale:1,origin:0,originPoint:0}),ya=()=>({x:y1(),y:y1()}),v1=()=>({min:0,max:0}),Kt=()=>({x:v1(),y:v1()}),jy={current:null},ZT={current:!1},G3=typeof window<"u";function H3(){if(ZT.current=!0,!!G3)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jy.current=e.matches;e.addEventListener("change",t),t()}else jy.current=!1}const q3=new WeakMap;function tm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function tu(e){return typeof e=="string"||Array.isArray(e)}const ew=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tw=["initial",...ew];function nm(e){return tm(e.animate)||tw.some(t=>tu(e[t]))}function eP(e){return!!(nm(e)||e.variants)}function K3(e,t,n){for(const r in t){const s=t[r],o=n[r];if(wn(s))e.addValue(r,s);else if(wn(o))e.addValue(r,Br(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,Br(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const x1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let rf={};function tP(e){rf=e}function Y3(){return rf}class J3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Pn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ut.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=nm(n),this.isVariantNode=eP(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const d=f[p];c[p]!==void 0&&wn(d)&&d.set(c[p])}}mount(t){var n;this.current=t,q3.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 5,900 bytes, line 234
234h((r,s)=>this.bindToMotionValue(s,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ZT.current||H3(),this.shouldReduceMotion=jy.current),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Yr(this.notifyUpdate),Yr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Il.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ut.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in rf){const n=rf[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<x1.length;r++){const s=x1[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,a=t[o];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=K3(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Br(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(tT(r)||rT(r))?r=parseFloat(r):!W3(r)&&qi.test(n)&&(r=WT(t,n)),this.setBaseTarget(t,wn(r)?r.get():r)),wn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=qx(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!wn(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ax),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Qx.render(this.render)}}class Zi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class nP extends J3{constructor(){super(...arguments),this.KeyframeResolver=C3}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function rP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Q3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function X3(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function cp(e){return e===void 0||e===1}function ky({scale:e,scaleX:t,scaleY:n}){return!cp(e)||!cp(t)||!cp(n)}function ho(e){return ky(e)||sP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function sP(e){return w1(e.x)||w1(e.y)}function w1(e){return e&&e!=="0%"}function sf(e,t,n){const r=e-n,s=t*r;return n+s}
234function b1(e,t,n,r,s){return s!==void 0&&(e=sf(e,s,r)),sf(e,n,r)+t}function Ny(e,t=0,n=1,r,s){e.min=b1(e.min,t,n,r,s),e.max=b1(e.max,t,n,r,s)}function iP(e,{x:t,y:n}){Ny(e.x,t.translate,t.scale,t.originPoint),Ny(e.y,n.translate,n.scale,n.originPoint)}const S1=.999999999999,j1=1.0000000000001;function Z3(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let l=0;l<s;l++){o=n[l],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&xa(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,iP(e,a)),r&&ho(o.latestValues)&&xa(e,o.latestValues))}t.x<j1&&t.x>S1&&(t.x=1),t.y<j1&&t.y>S1&&(t.y=1)}function va(e,t){e.min=e.min+t,e.max=e.max+t}function k1(e,t,n,r,s=.5){const o=At(e.min,e.max,s);Ny(e,t,n,o,r)}function xa(e,t){k1(e.x,t.x,t.scaleX,t.scale,t.originX),k1(e.y,t.y,t.scaleY,t.scale,t.originY)}function oP(e,t){return rP(X3(e.getBoundingClientRect(),t))}function eB(e,t,n){const r=oP(e,n),{scroll:s}=t;return s&&(va(r.x,s.offset.x),va(r.y,s.offset.y)),r}const tB={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nB=Pl.length;function rB(e,t,n){let r="",s=!0;for(let o=0;o<nB;o++){const a=Pl[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=HT(l,Yx[a]);if(!c){s=!1;const h=tB[a]||a;r+=`${h}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function nw(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Il.has(c)){a=!0;continue}else if(gT(c)){s[c]=u;continue}else{const h=HT(u,Yx[c]);c.startsWith("origin")?(l=!0,o[c]=h):r[c]=h}}if(t.transform||(a||n?r.transform=rB(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:h=0}=o;r.transformOrigin=`${c} ${u} ${h}`}}function aP(e,{style:t,vars:n},r,s){const o=e.style;let a;for(a in t)o[a]=t[a];s==null||s.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function N1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ve.test(e))e=parseFloat(e);else return e;const n=N1(e,t.target.x),r=N1(e,t.target.y);return`${n}% ${r}%`}},sB={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=qi.parse(e);if(s.length>5)return r;const o=qi.createTransformer(e),a=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+a]/=l,s[1+a]/=c;const u=At(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),o(s)}},Cy={borderRadius:{...Wl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wl,borderTopRightRadius:Wl,borderBottomLeftRadius:Wl,borderBottomRightRadius:Wl,boxShadow:sB};function lP(e,{layout:t,layoutId:n}){return Il.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cy[e]||e==="opacity")}function rw(e,t,n){var a;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const l in r)(wn(r[l])||s&&wn(s[l])||lP(l,e)||((a=n==null?void 0:n.getValue(l))==null?void 0:a.liveStyle)!==void 0)&&(o[l]=r[l]);return o}function iB(e){return window.getComputedStyle(e)}class oB extends nP{constructor(){super(...arguments),this.type="html",this.renderInstance=aP}readValueFromInstance(t,n){var r;if(Il.has(n))return(r=this.projection)!=null&&r.isProjecting?fy(n):EF(t,n);{const s=iB(t),o=(gT(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return oP(t,n)}build(t,n,r){nw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return rw(t,n,r)}}const aB={offset:"stroke-dashoffset",array:"stroke-dasharray"},lB={offset:"strokeDashoffset",array:"strokeDasharray"};function cB(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?aB:lB;e[o.offset]=ve.transform(-r);const a=ve.transform(t),l=ve.transform(n);e[o.array]=`${a} ${l}`}const uB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function cP(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l}
vendor: 4,124 bytes, line 234
234,c,u,h){if(nw(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete f.transformBox);for(const d of uB)f[d]!==void 0&&(p[d]=f[d],delete f[d]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&cB(f,s,o,a,!1)}const uP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),dP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function dB(e,t,n,r){aP(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(uP.has(s)?s:Kx(s),t.attrs[s])}function hP(e,t,n){const r=rw(e,t,n);for(const s in e)if(wn(e[s])||wn(t[s])){const o=Pl.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class hB extends nP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Il.has(n)){const r=zT(n);return r&&r.default||0}return n=uP.has(n)?n:Kx(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return hP(t,n,r)}build(t,n,r){cP(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){dB(t,n,r,s)}mount(t){this.isSVGTag=dP(t.tagName),super.mount(t)}}const fB=tw.length;function fP(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?fP(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fB;n++){const r=tw[n],s=e.props[r];(tu(s)||s===!1)&&(t[r]=s)}return t}function mP(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const mB=[...ew].reverse(),pB=ew.length;function gB(e){return t=>Promise.all(t.map(({animation:n,options:r})=>g3(e,n,r)))}function yB(e){let t=gB(e),n=C1(),r=!0;const s=c=>(u,h)=>{var p;const f=Ia(e,h,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:d,transitionEnd:w,...v}=f;u={...u,...v,...w}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,h=fP(e.parent)||{},f=[],p=new Set;let d={},w=1/0;for(let x=0;x<pB;x++){const y=mB[x],g=n[y],b=u[y]!==void 0?u[y]:h[y],S=tu(b),j=y===c?g.isActive:null;j===!1&&(w=x);let T=b===h[y]&&b!==u[y]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),g.protectedKeys={...d},!g.isActive&&j===null||!b&&!g.prevProp||tm(b)||typeof b=="boolean")continue;const C=vB(g.prevProp,b);let E=C||y===c&&g.isActive&&!T&&S||x>w&&S,A=!1;const R=Array.isArray(b)?b:[b];let V=R.reduce(s(y),{});j===!1&&(V={});const{prevResolvedValues:D={}}=g,J={...D,...V},F=H=>{E=!0,p.has(H)&&(A=!0,p.delete(H)),g.needsAnimating[H]=!0;const P=e.getValue(H);P&&(P.liveStyle=!1)};for(const H in J){const P=V[H],_=D[H];if(d.hasOwnProperty(H))continue;let k=!1;xy(P)&&xy(_)?k=!mP(P,_):k=P!==_,k?P!=null?F(H):p.add(H):P!==void 0&&p.has(H)?F(H):g.protectedKeys[H]=!0}g.prevProp=b,g.prevResolvedValues=V,g.isActive&&(d={...d,...V}),r&&e.blockInitialAnimation&&(E=!1);const Y=T&&C;E&&(!Y||A)&&f.push(...R.map(H=>{const P={type:y};if(typeof H=="string"&&r&&!Y&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,k=Ia(_,H);if(_.enteringChildren&&k){const{delayChildren:N}=k.transition||{};P.delay=LT(_.enteringChildren,e,N)}}return{animation:H,options:P}}))}if(p.size){const x={};if(typeof u.initial!="boolean"){const y=Ia(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}p.forEach(y=>{const g=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=g??null}),f.push({animation:x})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Prom
vendor: 1,311 bytes, line 234
234ise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var d;return(d=p.animationState)==null?void 0:d.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=C1()}}}function vB(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!mP(t,e):!1}function ao(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function C1(){return{animate:ao(!0),whileInView:ao(),whileHover:ao(),whileTap:ao(),whileDrag:ao(),whileFocus:ao(),exit:ao()}}const pP=1e-4,xB=1-pP,wB=1+pP,gP=.01,bB=0-gP,SB=0+gP;function In(e){return e.max-e.min}function jB(e,t,n){return Math.abs(e-t)<=n}function E1(e,t,n,r=.5){e.origin=r,e.originPoint=At(t.min,t.max,e.origin),e.scale=In(n)/In(t),e.translate=At(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xB&&e.scale<=wB||isNaN(e.scale))&&(e.scale=1),(e.translate>=bB&&e.translate<=SB||isNaN(e.translate))&&(e.translate=0)}function gc(e,t,n,r){E1(e.x,t.x,n.x,r?r.originX:void 0),E1(e.y,t.y,n.y,r?r.originY:void 0)}function T1(e,t,n){e.min=n.min+t.min,e.max=e.min+In(t)}function kB(e,t,n){T1(e.x,t.x,n.x),T1(e.y,t.y,n.y)}function P1(e,t,n){e.min=t.min-n.min,e.max=e.min+In(t)}
vendor: 1,296 bytes, line 234
234function of(e,t,n){P1(e.x,t.x,n.x),P1(e.y,t.y,n.y)}function I1(e,t,n,r,s){return e-=t,e=sf(e,1/n,r),s!==void 0&&(e=sf(e,1/s,r)),e}function NB(e,t=0,n=1,r=.5,s,o=e,a=e){if(fs.test(t)&&(t=parseFloat(t),t=At(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=At(o.min,o.max,r);e===o&&(l-=t),e.min=I1(e.min,t,n,l,s),e.max=I1(e.max,t,n,l,s)}function A1(e,t,[n,r,s],o,a){NB(e,t[n],t[r],t[s],t.scale,o,a)}const CB=["x","scaleX","originX"],EB=["y","scaleY","originY"];function R1(e,t,n,r){A1(e.x,t,CB,n?n.x:void 0,r?r.x:void 0),A1(e.y,t,EB,n?n.y:void 0,r?r.y:void 0)}function _1(e,t){e.min=t.min,e.max=t.max}function Pr(e,t){_1(e.x,t.x),_1(e.y,t.y)}function O1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function M1(e){return e.translate===0&&e.scale===1}function yP(e){return M1(e.x)&&M1(e.y)}function L1(e,t){return e.min===t.min&&e.max===t.max}function TB(e,t){return L1(e.x,t.x)&&L1(e.y,t.y)}function $1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function vP(e,t){return $1(e.x,t.x)&&$1(e.y,t.y)}function D1(e){return In(e.x)/In(e.y)}function F1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function pr(e){return[e("x"),e("y")]}function PB(e,t,n){let r="";
vendor: 4,443 bytes, line 234
234const s=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||o||a)&&(r=`translate3d(${s}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:h,rotateX:f,rotateY:p,skewX:d,skewY:w}=n;u&&(r=`perspective(${u}px) ${r}`),h&&(r+=`rotate(${h}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),d&&(r+=`skewX(${d}deg) `),w&&(r+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const xP=["TopLeft","TopRight","BottomLeft","BottomRight"],IB=xP.length,B1=e=>typeof e=="string"?parseFloat(e):e,U1=e=>typeof e=="number"||ve.test(e);function AB(e,t,n,r,s,o){s?(e.opacity=At(0,n.opacity??1,RB(r)),e.opacityExit=At(t.opacity??1,0,_B(r))):o&&(e.opacity=At(t.opacity??1,n.opacity??1,r));for(let a=0;a<IB;a++){const l=`border${xP[a]}Radius`;let c=V1(t,l),u=V1(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||U1(c)===U1(u)?(e[l]=Math.max(At(B1(c),B1(u),r),0),(fs.test(u)||fs.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=At(t.rotate||0,n.rotate||0,r))}function V1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const RB=wP(0,.5,uT),_B=wP(.5,.95,Qn);function wP(e,t,n){return r=>r<e?0:r>t?1:n(il(e,t,r))}function OB(e,t){const n=Pn.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Yr(r),e(o-t))};return ut.setup(r,!0),()=>Yr(r)}function nu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function sh(e){return wn(e)?e.get():e}function MB(e,t,n){const r=wn(e)?e:Br(e);return r.start(Hx("",r,t,n)),r.animation}const LB=(e,t)=>e.depth-t.depth;class $B{constructor(){this.children=[],this.isDirty=!1}add(t){Tx(this.children,t),this.isDirty=!0}remove(t){Px(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LB),this.isDirty=!1,this.children.forEach(t)}}class DB{constructor(){this.members=[]}add(t){Tx(this.members,t),t.scheduleRender()}remove(t){if(Px(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ih={hasAnimatedSinceResize:!0,hasEverUpdated:!1},up=["","X","Y","Z"],FB=1e3;let BB=0;function dp(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function bP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=FT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ut,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&bP(r)}function SP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},l=t==null?void 0:t()){this.id=BB++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 14,720 bytes, line 234
234{this.projectionUpdateScheduled=!1,this.nodes.forEach(zB),this.nodes.forEach(qB),this.nodes.forEach(KB),this.nodes.forEach(WB)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $B)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ax),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Zx(a)&&!U3(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let h,f=0;const p=()=>this.root.updateBlockedByResize=!1;ut.read(()=>{f=window.innerWidth}),e(a,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,h&&h(),h=OB(p,250),ih.hasAnimatedSinceResize&&(ih.hasAnimatedSinceResize=!1,this.nodes.forEach(G1)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||u.getDefaultTransition()||ZB,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!vP(this.targetLayout,d),g=!f&&p;if(this.options.layoutRoot||this.resumeFrom||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Gx(w,"layout"),onPlay:v,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(h,g)}else f||G1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Yr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(YB),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&bP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const f=this.path[h];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(z1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(W1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(HB),this.nodes.forEach(UB),this.nodes.forEach(VB)):this.nodes.forEach(W1),this.clearAllSnapshots();const l=Pn.now();tn.delta=Kr(0,1e3/60,l-tn.timestamp),tn.timestamp=l,tn.isProcessing=!0,np.update.process(tn),np.preRender.process(tn),np.render.process(tn),tn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(GB),this.sharedNodes.forEach(JB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ut.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ut.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!In(this.snapshot.measuredBox.x)&&!In(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Kt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!yP(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,h=u!==this.prevTransformTemplateValue;a&&this.instance&&(l||ho(this.latestValues)||h)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),e6(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Kt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(t6))){const{scroll:h}=this.root;h&&(va(l.x,h.offset.x),va(l.y,h.offset.y))}return l}removeElementScroll(a){var c;const l=Kt();if(Pr(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const h=this.path[u],{scroll:f,options:p}=h;h!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Pr(l,a),va(l.x,f.offset.x),va(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=Kt();Pr(c,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];!l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&xa(c,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),ho(h.latestValues)&&xa(c,h.latestValues)}return ho(this.latestValues)&&xa(c,this.latestValues),c}removeTransform(a){const l=Kt();Pr(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ho(u.latestValues))continue;ky(u.latestValues)&&u.updateSnapshot();const h=Kt(),f=u.measurePageBox();Pr(h,f),R1(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,h)}return ho(this.latestValues)&&R1(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var d;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!this.layout||!(h||f))return;this.resolvedRelativeTargetAt=tn.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Kt(),this.targetWithTransforms=Kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kB(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pr(this.target,this.layout.layoutBox),iP(this.target,this.targetDelta)):Pr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ky(this.parent.latestValues)||sP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,l,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Kt(),this.relativeTargetOrigin=Kt(),of(this.relativeTargetOrigin,l,c),Pr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===tn.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;Pr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;Z3(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Kt());const{target:d}=a;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(O1(this.prevProjectionDelta.x,this.projectionDelta.x),O1(this.prevProjectionDelta.y,this.projectionDelta.y)),gc(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!F1(this.projectionDelta.x,this.prevProjectionDelta.x)||!F1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ya(),this.projectionDelta=ya(),this.projectionDeltaWithTransform=ya()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},f=ya();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=Kt(),d=c?c.source:void 0,w=this.layout?this.layout.source:void 0,v=d!==w,x=this.getStack(),y=!x||x.members.length<=1,g=!!(v&&!y&&this.options.crossfade===!0&&!this.path.some(XB));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const j=S/1e3;H1(f.x,a.x,j),H1(f.y,a.y,j),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(of(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QB(this.relativeTarget,this.relativeTargetOrigin,p,j),b&&TB(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Kt()),Pr(b,this.relativeTarget)),v&&(this.animationValues=h,AB(h,u,this.latestValues,j,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Yr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ut.update(()=>{ih.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Br(0)),this.currentAnimation=MB(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),a.onUpdate&&a.onUpdate(h)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(FB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:h}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&jP(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Kt();const f=In(this.layout.layoutBox.x);
vendor: 5,324 bytes, line 234
234c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=In(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Pr(l,c),xa(l,h),gc(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new DB),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&dp("z",a,u,this.animationValues);for(let h=0;h<up.length;h++)dp(`rotate${up[h]}`,a,u,this.animationValues),dp(`skew${up[h]}`,a,u,this.animationValues);a.render();for(const h in u)a.setStaticValue(h,u[h]),this.animationValues&&(this.animationValues[h]=u[h]);a.scheduleRender()}applyProjectionStyles(a,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=sh(l==null?void 0:l.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=sh(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ho(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=PB(this.projectionDeltaWithTransform,this.treeScale,h);c&&(f=c(h,f)),a.transform=f;const{x:p,y:d}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=u===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const w in Cy){if(h[w]===void 0)continue;const{correct:v,applyTo:x,isCSSVariable:y}=Cy[w],g=f==="none"?h[w]:v(h[w],u);if(x){const b=x.length;for(let S=0;S<b;S++)a[x[S]]=g}else y?this.options.visualElement.renderState.vars[w]=g:a[w]=g}this.options.layoutId&&(a.pointerEvents=u===this?sh(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(z1),this.root.sharedNodes.clear()}}}function UB(e){e.updateLayout()}function VB(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;o==="size"?pr(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],d=In(p);p.min=r[f].min,p.max=p.min+d}):jP(o,t.layoutBox,r)&&pr(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],d=In(r[f]);p.max=p.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const l=ya();gc(l,r,t.layoutBox);const c=ya();a?gc(c,e.applyTransform(s,!0),t.measuredBox):gc(c,r,t.layoutBox);const u=!yP(l);let h=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:d}=f;if(p&&d){const w=Kt();of(w,t.layoutBox,p.layoutBox);const v=Kt();of(v,r,d.layoutBox),vP(w,v)||(h=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function zB(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function WB(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function GB(e){e.clearSnapshot()}function z1(e){e.clearMeasurements()}function W1(e){e.isLayoutDirty=!1}function HB(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function G1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qB(e){e.resolveTargetDelta()}function KB(e){e.calcProjection()}
vendor: 11,592 bytes, lines 234-242
234function YB(e){e.resetSkewAndRotation()}function JB(e){e.removeLeadSnapshot()}function H1(e,t,n){e.translate=At(t.translate,0,n),e.scale=At(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function q1(e,t,n,r){e.min=At(t.min,n.min,r),e.max=At(t.max,n.max,r)}function QB(e,t,n,r){q1(e.x,t.x,n.x,r),q1(e.y,t.y,n.y,r)}function XB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ZB={duration:.45,ease:[.4,0,.1,1]},K1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Y1=K1("applewebkit/")&&!K1("chrome/")?Math.round:Qn;function J1(e){e.min=Y1(e.min),e.max=Y1(e.max)}function e6(e){J1(e.x),J1(e.y)}function jP(e,t,n){return e==="position"||e==="preserve-aspect"&&!jB(D1(t),D1(n),.2)}function t6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const n6=SP({attachResizeListener:(e,t)=>nu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hp={current:void 0},kP=SP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hp.current){const e=new n6({});e.mount(window),e.setOptions({layoutScroll:!0}),hp.current=e}return hp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rm=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Q1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function r6(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Q1(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Q1(e[s],null)}}}}function s6(...e){return m.useCallback(r6(...e),e)}class i6 extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=Jx(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function o6({children:e,isPresent:t,anchorX:n,root:r}){var h;const s=m.useId(),o=m.useRef(null),a=m.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=m.useContext(rm),c=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),u=s6(o,c);return m.useInsertionEffect(()=>{const{width:f,height:p,top:d,left:w,right:v}=a.current;if(t||!o.current||!f||!p)return;const x=n==="left"?`left: ${w}`:`right: ${v}`;o.current.dataset.motionPopId=s;const y=document.createElement("style");l&&(y.nonce=l);const g=r??document.head;return g.appendChild(y),y.sheet&&y.sheet.insertRule(` 235 [data-motion-pop-id="${s}"] { 236 position: absolute !important; 237 width: ${f}px !important; 238 height: ${p}px !important; 239 ${x}px !important; 240 top: ${d}px !important; 241 } 242 `),()=>{g.contains(y)&&g.removeChild(y)}},[t]),i.jsx(i6,{isPresent:t,childRef:o,sizeRef:a,children:m.cloneElement(e,{ref:u})})}const a6=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:a,anchorX:l,root:c})=>{const u=Gi(l6),h=m.useId();let f=!0,p=m.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:d=>{u.set(d,!0);for(const w of u.values())if(!w)return;r&&r()},register:d=>(u.set(d,!1),()=>u.delete(d))}),[n,u,r]);return o&&f&&(p={...p}),m.useMemo(()=>{u.forEach((d,w)=>u.set(w,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=i.jsx(o6,{isPresent:n,anchorX:l,root:c,children:e})),i.jsx(Zf.Provider,{value:p,children:e})};function l6(){return new Map}function NP(e=!0){const t=m.useContext(Zf);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=m.useId();m.useEffect(()=>{if(e)return s(o)},[e]);const a=m.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const xd=e=>e.key||"";function X1(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const af=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:a=!1,anchorX:l="left",root:c})=>{const[u,h]=NP(a),f=m.useMemo(()=>X1(e),[e]),p=a&&!u?[]:f.map(xd),d=m.useRef(!0),w=m.useRef(f),v=Gi(()=>new Map),x=m.useRef(new Set),[y,g]=m.useState(f),[b,S]=m.useState(f);Xf(()=>{d.current=!1,w.current=f;for(let C=0;C<b.length;C++){const E=xd(b[C]);p.includes(E)?(v.delete(E),x.current.delete(E)):v.get(E)!==!0&&v.set(E,!1)}},[b,p.length,p.join("-")]);const j=[];if(f!==y){let C=[...f];for(let E=0;E<b.length;E++){const A=b[E],R=xd(A);p.includes(R)||(C.splice(E,0,A),j.push(A))}return o==="wait"&&j.length&&(C=j),S(X1(C)),g(f),null}const{forceRender:T}=m.useContext(Ex);return i.jsx(i.Fragment,{children:b.map(C=>{const E=xd(C),A=a&&!u?!1:f===b||p.includes(E),R=()=>{if(x.current.has(E))return;if(x.current.add(E),v.has(E))v.set(E,!0);else return;let V=!0;v.forEach(D=>{D||(V=!1)}),V&&(T==null||T(),S(w.current),a&&(h==null||h()),r&&r())};return i.jsx(a6,{isPresent:A,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:c,onExitComplete:A?void 0:R,anchorX:l,children:C},E)})})},CP=m.createContext({strict:!1}),Z1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let eS=!1;function c6(){if(eS)return;const e={};for(const t in Z1)e[t]={isEnabled:n=>Z1[t].some(r=>!!n[r])};tP(e),eS=!0}function EP(){return c6(),Y3()}function u6(e){const t=EP();for(const n in e)t[n]={...t[n],...e[n]};tP(t)}const d6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function lf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||d6.has(e)}let TP=e=>!lf(e);function h6(e){typeof e=="function"&&(TP=t=>t.startsWith("on")?!lf(t):e(t))}try{h6(require("@emotion/is-prop-valid").default)}catch{}function f6(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(TP(s)||n===!0&&lf(s)||!t&&!lf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const sm=m.createContext({});function m6(e,t){if(nm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||tu(n)?n:void 0,animate:tu(r)?r:void 0}}return e.inherit!==!1?t:{}}function p6(e){const{initial:t,animate:n}=m6(e,m.useContext(sm));return m.useMemo(()=>({initial:t,animate:n}),[tS(t),tS(n)])}function tS(e){return Array.isArray(e)?e.join(" "):e}const sw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function PP(e,t,n){for(const r in t)!wn(t[r])&&!lP(r,n)&&(e[r]=t[r])}function g6({transformTemplate:e},t){return m.useMemo(()=>{const n=sw();return nw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function y6(e,t){const n=e.style||{},r={};return PP(r,n,e),Object.assign(r,g6(e,t)),r}function v6(e,t){const n={},r=y6(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const IP=()=>({...sw(),attrs:{}});function x6(e,t,n,r){const s=m.useMemo(()=>{const o=IP();return cP(o,t,dP(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};PP(o,e.style,e),s.style={...o,...s.style}}return s}const w6=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function iw(e){return typeof e!="string"||e.includes("-")?!1:!!(w6.indexOf(e)>-1||/[A-Z]/u.test(e))}function b6(e,t,n,{latestValues:r},s,o=!1,a){const c=(a??iw(e)?x6:v6)(t,r,s,e),u=f6(t,typeof e=="string",o),h=e!==m.Fragment?{...u,...c,ref:n}:{},{children:f}=t,p=m.useMemo(()=>wn(f)?f.get():f,[f]);return m.createElement(e,{...h,children:p})}function S6({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:j6(n,r,s,e),renderState:t()}}function j6(e,t,n,r){const s={},o=r(e,{});for(const p in o)s[p]=sh(o[p]);let{initial:a,animate:l}=e;const c=nm(e),u=eP(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const f=h?l:a;if(f&&typeof f!="boolean"&&!tm(f)){const p=Array.isArray(f)?f:[f];for(let d=0;d<p.length;d++){const w=qx(e,p[d]);if(w){const{transitionEnd:v,transition:x,...y}=w;for(const g in y){let b=y[g];if(Array.isArray(b)){const S=h?b.length-1:0;b=b[S]}b!==null&&(s[g]=b)}for(const g in v)s[g]=v[g]}}}return s}const AP=e=>(t,n)=>{const r=m.useContext(sm),s=m.useContext(Zf),o=()=>S6(e,t,r,s);return n?o():Gi(o)},k6=AP({scrapeMotionValuesFromProps:rw,createRenderState:sw}),N6=AP({scrapeMotionValuesFromProps:hP,createRenderState:IP}),C6=Symbol.for("motionComponentSymbol");function E6(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(o=>{var l;o&&((l=e.onMount)==null||l.call(e,o)),t&&(o?t.mount(o):t.unmount());const a=r.current;if(typeof a=="function")if(o){const c=a(o);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(o);else a&&(a.current=o)},[t])}const RP=m.createContext({});function Xl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function T6(e,t,n,r,s,o){var x,y;const{visualElement:a}=m.useContext(sm),l=m.useContext(CP),c=m.useContext(Zf),u=m.useContext(rm).reducedMotion,h=m.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:o}));const f=h.current,p=m.useContext(RP);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&P6(h.current,n,s,p);const d=m.useRef(!1);m.useInsertionEffect(()=>{f&&d.current&&f.update(n,c)});const w=n[DT],v=m.useRef(!!w&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,w))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,w)));return Xf(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,w)}),v.current=!1),f.enteringChildren=void 0)}),f}function P6(e,t,n,r){const{layoutId:s,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:_P(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!a||l&&Xl(l),visualElement:e,animationType:typeof o=="str
242ing"?o:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:c,layoutRoot:u})}function _P(e){if(e)return e.options.allowProjection!==!1?e.projection:_P(e.parent)}function fp(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&u6(r);const o=n?n==="svg":iw(e),a=o?N6:k6;function l(u,h){let f;const p={...m.useContext(rm),...u,layoutId:I6(u)},{isStatic:d}=p,w=p6(u),v=a(u,d);if(!d&&eT){A6();const x=R6(p);f=x.MeasureLayout,w.visualElement=T6(e,v,p,s,x.ProjectionNode,o)}return i.jsxs(sm.Provider,{value:w,children:[f&&w.visualElement?i.jsx(f,{visualElement:w.visualElement,...p}):null,b6(e,u,E6(v,w.visualElement,h),v,d,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=m.forwardRef(l);return c[C6]=e,c}function I6({layoutId:e}){const t=m.useContext(Ex).id;return t&&e!==void 0?t+"-"+e:e}function A6(e,t){m.useContext(CP).strict}function R6(e){const t=EP(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function _6(e,t){if(typeof Proxy>"u")return fp;const n=new Map,r=(o,a)=>fp(o,a,e,t),s=(o,a)=>r(o,a);return new Proxy(s,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,fp(a,void 0,e,t)),n.get(a))})}const O6=(e,t)=>t.isSVG??iw(e)?new hB(t):new oB(t,{allowProjection:e!==m.Fragment});class M6 extends Zi{constructor(t){super(t),t.animationState||(t.animationState=yB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();tm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let L6=0;class $6 extends Zi{constructor(){super(...arguments),this.id=L6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const D6={animation:{Feature:M6},exit:{Feature:$6}};function Iu(e){return{point:{x:e.pageX,y:e.pageY}}}const F6=e=>t=>Xx(t)&&e(t,Iu(t));function yc(e,t,n,r){return nu(e,t,F6(n),r)}const OP=({current:e})=>e?e.ownerDocument.defaultView:null,nS=(e,t)=>Math.abs(e-t);function B6(e,t){const n=nS(e.x,t.x),r=nS(e.y,t.y);return Math.sqrt(n**2+r**2)}const rS=new Set(["auto","scroll"]);class MP{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=pp(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,v=B6(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!v)return;const{point:x}=d,{timestamp:y}=tn;this.history.push({...x,timestamp:y});const{onStart:g,onMove:b}=this.handlers;w||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,w)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=mp(w,this.transformPagePoint),ut.update(this.updatePoint,!0)},this.handlePointerUp=(d,w)=>{this.end();const{onEnd:v,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=pp(d.type==="pointercancel"?this.lastMoveEventInfo:mp(w,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,g),x&&x(d,g)},!Xx(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const c=Iu(t),u=mp(c,this.transformPagePoint),{point:h}=u,{timestamp:f}=tn;this.history=[{...h,timestamp:f}];const{onSessionStart:p}=n;p&&p(t,pp(u,this.history)),this.removeListeners=Eu(yc(this.contextWindow,"pointermove",this.handlePointerMove),yc(this.contextWindow,"pointerup",this.handlePointerUp),yc(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(rS.has(r.overflowX)||rS.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),ut.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Yr(this.updatePoint)}}function mp(e,t){return t?{point:t(e.point)}:e}function sS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pp({point:e},t){return{point:e,delta:sS(e,LP(t)),offset:sS(e,U6(t)),velocity:V6(t,.1)}}function U6(e){return e[0]}function LP(e){return e[e.length-1]}function V6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=LP(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>hs(t)));)n--;if(!r)return{x:0,y:0};const o=br(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function z6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?At(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?At(n,e,r.max):Math.min(e,n)),e}function iS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function W6(e,{top:t,left:n,bottom:r,right:s}){return{x:iS(e.x,n,s),y:iS(e.y,t,r)}}function oS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function G6(e,t){return{x:oS(e.x,t.x),y:oS(e.y,t.y)}}function H6(e,t){let n=.5;const r=In(e),s=In(t);return s>r?n=il(t.min,t.max-r,e.min):r>s&&(n=il(e.min,e.max-s,t.min)),Kr(0,1,n)}function q6(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ey=.35;function K6(e=Ey){return e===!1?e=0:e===!0&&(e=Ey),{x:aS(e,"left","right"),y:aS(e,"top","bottom")}}function aS(e,t,n){return{min:lS(e,t),max:lS(e,n)}}function lS(e,t){return typeof e=="number"?e:e[t]||0}const Y6=new WeakMap;class J6{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Kt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=f=>{n?(this.stopAnimation(),this.snapToCursor(Iu(f).point)):this.pauseAnimation()},a=(f,p)=>{this.stopAnimation();const{drag:d,dragPropagation:w,onDragStart:v}=this.getProps();if(d&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=E3(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pr(y=>{let g=this.getAxisMotionValue(y).get()||0;if(fs.test(g)){const{projection:b}=this.visualElement;if(b&&b.layout){const S=b.layout.layoutBox[y];S&&(g=In(S)*(parseFloat(g)/100))}}this.originPoint[y]=g}),v&&ut.postRender(()=>v(f,p)),wy(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:d,dragDirectionLock:w,onDirectionLock:v,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=p;if(w&&this.currentDirection===null){this.currentDirection=Q6(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),x&&x(f,p)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>pr(f=>{var p;return this.getAnimationState(f)==="paused"&&((p=this.getAxisMotionValue(f).animation)==null?void 0:p.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new MP(t,{onSessionStart:o,onStart:a,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:OP(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&ut.postRender(()=>l(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!wd(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=z6(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Xl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=W6(r.layoutBox,t):this.constraints=!1,this.elastic=K6(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pr(a=>
vendor: 6,576 bytes, line 242
242{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=q6(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xl(t))return!1;const r=t.current;Hi(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=eB(r,s.root,this.visualElement.getTransformPagePoint());let a=G6(s.layout.layoutBox,o);if(n){const l=n(Q3(a));this.hasMutatedConstraints=!!l,l&&(a=rP(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=pr(h=>{if(!wd(h,n,this.currentDirection))return;let f=c&&c[h]||{};a&&(f={min:0,max:0});const p=s?200:1e6,d=s?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:p,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wy(this.visualElement,t),r.start(Hx(t,r,0,n,this.visualElement,!1))}stopAnimation(){pr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){pr(n=>{const{drag:r}=this.getProps();if(!wd(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-At(a,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xl(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pr(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();s[a]=H6({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pr(a=>{if(!wd(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(At(c,u,s[a]))})}addListeners(){if(!this.visualElement.current)return;Y6.set(this.visualElement,this);const t=this.visualElement.current,n=yc(t,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&!JT(c.target)&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Xl(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ut.read(r);const a=nu(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(pr(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:a=Ey,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function wd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Q6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class X6 extends Zi{constructor(t){super(t),this.removeGroupControls=Qn,this.removeListeners=Qn,this.controls=new J6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const cS=e=>(t,n)=>{e&&ut.postRender(()=>e(t,n))};class Z6 extends Zi{constructor(){super(...arguments),this.removePointerDownListener=Qn}onPointerDown(t){this.session=new MP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:OP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:cS(t),onStart:cS(n),onMove:r,onEnd:(o,a)=>{delete this.session,s&&ut.postRender(()=>s(o,a))}}}mount(){this.removePointerDownListener=yc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let gp=!1;class eU extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),gp&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ih.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,gp=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ut.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qx.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;gp=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $P(e){const[t,n]=NP(),r=m.useContext(Ex);return i.jsx(eU,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(RP),isPresent:t,safeToRemove:n})}const tU={pan:{Feature:Z6},drag:{Feature:X6,ProjectionNode:kP,MeasureLayout:$P}};
242function uS(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&ut.postRender(()=>o(t,Iu(t)))}class nU extends Zi{mount(){const{current:t}=this.node;t&&(this.unmount=T3(t,(n,r)=>(uS(this.node,r,"Start"),s=>uS(this.node,s,"End"))))}unmount(){}}class rU extends Zi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Eu(nu(this.node.current,"focus",()=>this.onFocus()),nu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dS(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&ut.postRender(()=>o(t,Iu(t)))}class sU extends Zi{mount(){const{current:t}=this.node;t&&(this.unmount=A3(t,(n,r)=>(dS(this.node,r,"Start"),(s,{success:o})=>dS(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ty=new WeakMap,yp=new WeakMap,iU=e=>{const t=Ty.get(e.target);t&&t(e)},oU=e=>{e.forEach(iU)};function aU({root:e,...t}){const n=e||document;yp.has(n)||yp.set(n,{});const r=yp.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(oU,{root:e,...t})),r[s]}function lU(e,t,n){const r=aU(t);return Ty.set(e,n),r.observe(e),()=>{Ty.delete(e),r.unobserve(e)}}const cU={some:0,all:1};class uU extends Zi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:cU[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=u?h:f;p&&p(c)};return lU(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(dU(t,n))&&this.startObserver()}unmount(){}}function dU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const hU={inView:{Feature:uU},tap:{Feature:sU},focus:{Feature:rU},hover:{Feature:nU}},fU={layout:{ProjectionNode:kP,MeasureLayout:$P}},mU={...D6,...hU,...tU,...fU},it=_6(mU,O6),pU=50,hS=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),gU=()=>({time:0,x:hS(),y:hS()}),yU={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function fS(e,t,n,r){const s=n[t],{length:o,position:a}=yU[t],l=s.current,c=n.time;s.current=e[`scroll${a}`],s.scrollLength=e[`scroll${o}`]-e[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=il(0,s.scrollLength,s.current);const u=r-c;s.velocity=u>pU?0:Rx(s.current-l,u)}function vU(e,t,n){fS(e,"x",t,n),fS(e,"y",t,n),t.time=n}function xU(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(Jx(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const s=r.getBoundingClientRect();r=r.parentElement;const o=r.getBoundingClientRect();n.x+=s.left-o.left,n.y+=s.top-o.top}else if(r instanceof SVGGraphicsElement){const{x:s,y:o}=r.getBBox();n.x+=s,n.y+=o;let a=null,l=r.parentNode;for(;!a;)l.tagName==="svg"&&(a=l),l=r.parentNode;r=a}else break;return n}const Py={start:0,center:.5,end:1};function mS(e,t,n=0){let r=0;if(e in Py&&(e=Py[e]),typeof e=="string"){const s=parseFloat(e);e.endsWith("px")?r=s:e.endsWith("%")?e=s/100:e.endsWith("vw")?r=s/100*document.documentElement.clientWidth:e.endsWith("vh")?r=s/100*document.documentElement.clientHeight:e=s}return typeof e=="number"&&(r=t*e),n+r}const wU=[0,0];function bU(e,t,n,r){let s=Array.isArray(e)?e:wU,o=0,a=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,Py[e]?e:"0"]),o=mS(s[0],n,r),a=mS(s[1],t),o-a}const SU={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},jU={x:0,y:0};function kU(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function NU(e,t,n){const{offset:r=SU.All}=n,{target:s=e,axis:o="y"}=n,a=o==="y"?"height":"width",l=s!==e?xU(s,e):jU,c=s===e?{width:e.scrollWidth,height:e.scrollHeight}:kU(s),u={width:e.clientWidth,height:e.clientHeight};t[o].offset.length=0;let h=!t[o].interpolate;const f=r.length;for(let p=0;p<f;p++){const d=bU(r[p],u[a],c[a],l[o]);
242!h&&d!==t[o].interpolatorOffsets[p]&&(h=!0),t[o].offset[p]=d}h&&(t[o].interpolate=Bx(t[o].offset,CT(r),{clamp:!1}),t[o].interpolatorOffsets=[...t[o].offset]),t[o].progress=Kr(0,1,t[o].interpolate(t[o].current))}function CU(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function EU(e,t,n,r={}){return{measure:s=>{CU(e,r.target,n),vU(e,n,s),(r.offset||r.target)&&NU(e,n,r)},notify:()=>t(n)}}const Gl=new WeakMap,pS=new WeakMap,vp=new WeakMap,gS=e=>e===document.scrollingElement?window:e;function DP(e,{container:t=document.scrollingElement,...n}={}){if(!t)return Qn;let r=vp.get(t);r||(r=new Set,vp.set(t,r));const s=gU(),o=EU(t,e,s,n);if(r.add(o),!Gl.has(t)){const l=()=>{for(const f of r)f.measure(tn.timestamp);ut.preUpdate(c)},c=()=>{for(const f of r)f.notify()},u=()=>ut.read(l);Gl.set(t,u);const h=gS(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&pS.set(t,B3(t,u)),h.addEventListener("scroll",u,{passive:!0}),u()}const a=Gl.get(t);return ut.read(a,!1,!0),()=>{var u;Yr(a);const l=vp.get(t);if(!l||(l.delete(o),l.size))return;const c=Gl.get(t);Gl.delete(t),c&&(gS(t).removeEventListener("scroll",c),(u=pS.get(t))==null||u(),window.removeEventListener("resize",c))}}const yS=new Map;function TU(e){const t={value:0},n=DP(r=>
242{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function FP({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const s=yS.get(t)??new Map;yS.set(t,s);const o=n.target??"self",a=s.get(o)??{},l=r+(n.offset??[]).join(",");return a[l]||(a[l]=!n.target&&IT()?new ScrollTimeline({source:t,axis:r}):TU({container:t,...n})),a[l]}function PU(e,t){const n=FP(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),XT(s=>{r.time=r.iterationDuration*s},n))})}function IU(e){return e.length===2}function AU(e,t){return IU(e)?DP(n=>{e(n[t.axis].progress,n)},t):XT(e,FP(t))}function RU(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return Qn;const s={axis:t,container:n,...r};return typeof e=="function"?AU(e,s):PU(e,s)}const _U=()=>({scrollX:Br(0),scrollY:Br(0),scrollXProgress:Br(0),scrollYProgress:Br(0)}),bd=e=>e?!e.current:!1;function OU({container:e,target:t,...n}={}){const r=Gi(_U),s=m.useRef(null),o=m.useRef(!1),a=m.useCallback(()=>(s.current=RU((l,{x:c,y:u})=>{r.scrollX.set(c.current),r.scrollXProgress.set(c.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var l;(l=s.current)==null||l.call(s)}),[e,t,JSON.stringify(n.offset)]);return Xf(()=>{if(o.current=!1,bd(e)||bd(t)){o.current=!0;return}else return a()},[a]),m.useEffect(()=>{if(o.current)return Hi(!bd(e),"Container ref is defined but not hydrated","use-scroll-ref"),Hi(!bd(t),"Target ref is defined but not hydrated","use-scroll-ref"),a()},[a]),r}function MU(e){const t=Gi(()=>Br(e)),{isStatic:n}=m.useContext(rm);if(n){const[,r]=m.useState(e);m.useEffect(()=>t.on("change",r),[])}return t}function BP(e,t){const n=MU(t()),r=()=>n.set(t());return r(),Xf(()=>{const s=()=>ut.preRender(r,!1,!0),o=e.map(a=>a.on("change",s));return()=>{o.forEach(a=>a()),Yr(r)}}),n}function LU(e){pc.current=[],e();const t=BP(pc.current,e);return pc.current=void 0,t}function zt(e,t,n,r){if(typeof e=="function")return LU(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return $U(e,t,n,r);const a=typeof t=="function"?t:V3(t,n,r);return Array.isArray(e)?vS(e,a):vS([e],([l])=>a(l))}function vS(e,t){const n=Gi(()=>[]);return BP(e,()=>{n.length=0;const r=e.length;for(let s=0;s<r;s++)n[s]=e[s].get();return t(n)})}function $U(e,t,n,r){const s=Gi(()=>Object.keys(n)),o=Gi(()=>({}));for(const a of s)o[a]=zt(e,t,n[a],r);return o}const DU=()=>{};var xS={};/** 243 * @license 244 * Copyright 2017 Google LLC 245 * 246 * Licensed under the Apache License, Version 2.0 (the "License"); 247 * you may not use this file except in compliance with the License. 248 * You may obtain a copy of the License at 249 * 250 * http://www.apache.org/licenses/LICENSE-2.0 251 * 252 * Unless required by applicable law or agreed to in writing, software 253 * distributed under the License is distributed on an "AS IS" BASIS, 254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 255 * See the License for the specific language governing permissions and 256 * limitations under the License. 257 */const UP=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=s&63|128):(s&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(s=65536+((s&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128)}return t},FU=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const s=e[n++];if(s<128)t[r++]=String.fromCharCode(s);else if(s>191&&s<224){const o=e[n++];t[r++]=String.fromCharCode((s&31)<<6|o&63)}else if(s>239&&s<365){const o=e[n++],a=e[n++],l=e[n++],c=((s&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((s&15)<<12|(o&63)<<6|a&63)}}return t.join("")},VP={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:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let s=0;s<e.length;s+=3){const o=e[s],a=s+1<e.length,l=a?e[s+1]:0,c=s+2<e.length,u=c?e[s+2]:0,h=o>>2,f=(o&3)<<4|l>>4;let p=(l&15)<<2|u>>6,d=u&63;c||(d=64,a||(p=64)),r.push(n[h],n[f],n[p],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(UP(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):FU(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let s=0;s<e.length;){const o=n[e.charAt(s++)],l=s<e.length?n[e.charAt(s)]:0;++s;const u=s<e.length?n[e.charAt(s)]:64;++s;const f=s<e.length?n[e.charAt(s)]:64;if(++s,o==null||l==null||u==null||f==null)throw new BU;const p=o<<2|l>>4;if(r.push(p),u!==64){const d=l<<4&240|u>>2;if(r.push(d),f!==64){const w=u<<6&192|f;r.push(w)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
257class BU extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const UU=function(e){const t=UP(e);return VP.encodeByteArray(t,!0)},zP=function(e){return UU(e).replace(/\./g,"")},WP=function(e){try{return VP.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/** 258 * @license 259 * Copyright 2022 Google LLC 260 * 261 * Licensed under the Apache License, Version 2.0 (the "License"); 262 * you may not use this file except in compliance with the License. 263 * You may obtain a copy of the License at 264 * 265 * http://www.apache.org/licenses/LICENSE-2.0 266 * 267 * Unless required by applicable law or agreed to in writing, software 268 * distributed under the License is distributed on an "AS IS" BASIS, 269 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 270 * See the License for the specific language governing permissions and 271 * limitations under the License. 272 */function VU(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** 273 * @license 274 * Copyright 2022 Google LLC 275 * 276 * Licensed under the Apache License, Version 2.0 (the "License"); 277 * you may not use this file except in compliance with the License. 278 * You may obtain a copy of the License at 279 * 280 * http://www.apache.org/licenses/LICENSE-2.0 281 * 282 * Unless required by applicable law or agreed to in writing, software 283 * distributed under the License is distributed on an "AS IS" BASIS, 284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 285 * See the License for the specific language governing permissions and 286 * limitations under the License. 287 */const zU=()=>VU().__FIREBASE_DEFAULTS__,WU=()=>{if(typeof process>"u"||typeof xS>"u")return;const e=xS.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},GU=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&WP(e[1]);return t&&JSON.parse(t)},ow=()=>{try{return DU()||zU()||WU()||GU()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},HU=e=>{var t,n;return(n=(t=ow())==null?void 0:t.emulatorHosts)==null?void 0:n[e]},GP=()=>{var e;return(e=ow())==null?void 0:e.config},HP=e=>{var t;return(t=ow())==null?void 0:t[`_${e}`]};/** 288 * @license 289 * Copyright 2017 Google LLC 290 * 291 * Licensed under the Apache License, Version 2.0 (the "License"); 292 * you may not use this file except in compliance with the License. 293 * You may obtain a copy of the License at 294 * 295 * http://www.apache.org/licenses/LICENSE-2.0 296 * 297 * Unless required by applicable law or agreed to in writing, software 298 * distributed under the License is distributed on an "AS IS" BASIS, 299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 300 * See the License for the specific language governing permissions and 301 * limitations under the License. 302 */class qU{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}/** 303 * @license 304 * Copyright 2025 Google LLC 305 * 306 * Licensed under the Apache License, Version 2.0 (the "License"); 307 * you may not use this file except in compliance with the License. 308 * You may obtain a copy of the License at 309 * 310 * http://www.apache.org/licenses/LICENSE-2.0 311 * 312 * Unless required by applicable law or agreed to in writing, software 313 * distributed under the License is distributed on an "AS IS" BASIS, 314 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 315 * See the License for the specific language governing permissions and 316 * limitations under the License. 317 */function im(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function KU(e){return(await fetch(e,{credentials:"include"})).ok}const vc={};function YU(){const e={prod:[],emulator:[]};for(const t of Object.keys(vc))vc[t]?e.emulator.push(t):e.prod.push(t);return e}function JU(e){let t=document.getElementById(e),n=!1;return t||(t=document.createElement("div"),t.setAttribute("id",e),n=!0),{created:n,element:t}}let wS=!1;function QU(e,t){if(typeof window>"u"||typeof document>"u"||!im(window.location.host)||vc[e]===t||vc[e]||wS)return;
317vc[e]=t;function n(p){return`__firebase__banner__${p}`}const r="__firebase__banner",o=YU().prod.length>0;function a(){const p=document.getElementById(r);p&&p.remove()}function l(p){p.style.display="flex",p.style.background="#7faaf0",p.style.position="fixed",p.style.bottom="5px",p.style.left="5px",p.style.padding=".5em",p.style.borderRadius="5px",p.style.alignItems="center"}function c(p,d){p.setAttribute("width","24"),p.setAttribute("id",d),p.setAttribute("height","24"),p.setAttribute("viewBox","0 0 24 24"),p.setAttribute("fill","none"),p.style.marginLeft="-6px"}function u(){const p=document.createElement("span");return p.style.cursor="pointer",p.style.marginLeft="16px",p.style.fontSize="24px",p.innerHTML=" ×",p.onclick=()=>{wS=!0,a()},p}function h(p,d){p.setAttribute("id",d),p.innerText="Learn more",p.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",p.setAttribute("target","__blank"),p.style.paddingLeft="5px",p.style.textDecoration="underline"}function f(){const p=JU(r),d=n("text"),w=document.getElementById(d)||document.createElement("span"),v=n("learnmore"),x=document.getElementById(v)||document.createElement("a"),y=n("preprendIcon"),g=document.getElementById(y)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(p.created){const b=p.element;l(b),h(x,v);const S=u();c(g,y),b.append(g,w,x,S),document.body.appendChild(b)}o?(w.innerText="Preview backend disconnected.",g.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 318<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 319</g> 320<defs> 321<clipPath id="clip0_6013_33858"> 322<rect width="24" height="24" fill="white"/> 323</clipPath> 324</defs>`):(g.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 325<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 326</g> 327<defs> 328<clipPath id="clip0_6083_34804"> 329<rect width="24" height="24" fill="white"/> 330</clipPath> 331</defs>`,w.innerText="Preview backend running in this workspace."),w.setAttribute("id",d)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",f):f()}/** 332 * @license 333 * Copyright 2017 Google LLC 334 * 335 * Licensed under the Apache License, Version 2.0 (the "License"); 336 * you may not use this file except in compliance with the License. 337 * You may obtain a copy of the License at 338 * 339 * http://www.apache.org/licenses/LICENSE-2.0 340 * 341 * Unless required by applicable law or agreed to in writing, softw
341are 342 * distributed under the License is distributed on an "AS IS" BASIS, 343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 344 * See the License for the specific language governing permissions and 345 * limitations under the License. 346 */function _n(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function XU(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(_n())}function ZU(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function e8(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function t8(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function n8(){const e=_n();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function r8(){try{return typeof indexedDB=="object"}catch{return!1}}function s8(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(r);s.onsuccess=()=>{s.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},s.onupgradeneeded=()=>{n=!1},s.onerror=()=>{var o;t(((o=s.error)==null?void 0:o.message)||"")}}catch(n){t(n)}})}/** 347 * @license 348 * Copyright 2017 Google LLC 349 * 350 * Licensed under the Apache License, Version 2.0 (the "License"); 351 * you may not use this file except in compliance with the License. 352 * You may obtain a copy of the License at 353 * 354 * http://www.apache.org/licenses/LICENSE-2.0 355 * 356 * Unless required by applicable law or agreed to in writing, software 357 * distributed under the License is distributed on an "AS IS" BASIS, 358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 359 * See the License for the specific language governing permissions and 360 * limitations under the License. 361 */const i8="FirebaseError";
361class eo extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=i8,Object.setPrototypeOf(this,eo.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Au.prototype.create)}}class Au{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},s=`${this.service}/${t}`,o=this.errors[t],a=o?o8(o,r):"Error",l=`${this.serviceName}: ${a} (${s}).`;return new eo(s,l,r)}}function o8(e,t){return e.replace(a8,(n,r)=>{const s=t[r];return s!=null?String(s):`<${r}?>`})}const a8=/\{\$([^}]+)}/g;function l8(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function ol(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const s of n){if(!r.includes(s))return!1;const o=e[s],a=t[s];if(bS(o)&&bS(a)){if(!ol(o,a))return!1}else if(o!==a)return!1}for(const s of r)if(!n.includes(s))return!1;return!0}function bS(e){return e!==null&&typeof e=="object"}/** 362 * @license 363 * Copyright 2017 Google LLC 364 * 365 * Licensed under the Apache License, Version 2.0 (the "License"); 366 * you may not use this file except in compliance with the License. 367 * You may obtain a copy of the License at 368 * 369 * http://www.apache.org/licenses/LICENSE-2.0 370 * 371 * Unless required by applicable law or agreed to in writing, software 372 * distributed under the License is distributed on an "AS IS" BASIS, 373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 374 * See the License for the specific language governing permissions and 375 * limitations under the License. 376 */function Al(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(s=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(s))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function c8(e,t){const n=new u8(e,t);return n.subscribe.bind(n)}class u8{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(r=>{this.error(r)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,r){let s;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");d8(t,["next","error","complete"])?s=t:s={next:t,error:n,complete:r},s.next===void 0&&(s.next=xp),s.error===void 0&&(s.error=xp),s.complete===void 0&&(s.complete=xp);const o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),o}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,t)}sendOne(t,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function d8(e,t){if(typeof e!="object"||e===null)return!1;for(const n of t)if(n in e&&typeof e[n]=="function")return!0;return!1}function xp(){}/** 377 * @license 378 * Copyright 2021 Google LLC 379 * 380 * Licensed under the Apache License, Version 2.0 (the "License"); 381 * you may not use this file except in compliance with the License. 382 * You may obtain a copy of the License at 383 * 384 * http://www.apache.org/licenses/LICENSE-2.0 385 * 386 * Unless required by applicable law or agreed to in writing, software 387 * distributed under the License is distributed on an "AS IS" BASIS, 388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 389 * See the License for the specific language governing permissions and 390 * limitations under the License. 391 */function Wo(e){return e&&e._delegate?e._delegate:e}class al{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/** 392 * @license 393 * Copyright 2019 Google LLC 394 * 395 * Licensed under the Apache License, Version 2.0 (the "License");
396 * you may not use this file except in compliance with the License. 397 * You may obtain a copy of the License at 398 * 399 * http://www.apache.org/licenses/LICENSE-2.0 400 * 401 * Unless required by applicable law or agreed to in writing, software 402 * distributed under the License is distributed on an "AS IS" BASIS, 403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 404 * See the License for the specific language governing permissions and 405 * limitations under the License. 406 */const fo="[DEFAULT]";/** 407 * @license 408 * Copyright 2019 Google LLC 409 * 410 * Licensed under the Apache License, Version 2.0 (the "License"); 411 * you may not use this file except in compliance with the License. 412 * You may obtain a copy of the License at 413 * 414 * http://www.apache.org/licenses/LICENSE-2.0 415 * 416 * Unless required by applicable law or agreed to in writing, software 417 * distributed under the License is distributed on an "AS IS" BASIS, 418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 419 * See the License for the specific language governing permissions and 420 * limitations under the License. 421 */class h8{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new qU;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:n});s&&r.resolve(s)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){const n=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),r=(t==null?void 0:t.optional)??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(m8(t))try{this.getOrInitializeService({instanceIdentifier:fo})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:s});r.resolve(o)}catch{}}}}clearInstance(t=fo){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=fo){return this.instances.has(t)}getOptions(t=fo){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.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 s=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[o,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(o);r===l&&a.resolve(s)}return s}onInit(t,n){const r=this.normalizeInstanceIdentifier(n),s=this.onInitCallbacks.get(r)??new Set;s.add(t),this.onInitCallbacks.set(r,s);const o=this.instances.get(r);return o&&t(o,r),()=>{s.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const s of r)try{s(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:f8(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=fo){return this.component?this.component.multipleInstances?t:fo:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function f8(e){return e===fo?void 0:e}function m8(e){return e.instantiationMode==="EAGER"}/** 422 * @license 423 * Copyright 2019 Google LLC 424 * 425 * Licensed under the Apache License, Version 2.0 (the "License");
426 * you may not use this file except in compliance with the License. 427 * You may obtain a copy of the License at 428 * 429 * http://www.apache.org/licenses/LICENSE-2.0 430 * 431 * Unless required by applicable law or agreed to in writing, software 432 * distributed under the License is distributed on an "AS IS" BASIS, 433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 434 * See the License for the specific language governing permissions and 435 * limitations under the License. 436 */class p8{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new h8(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/** 437 * @license 438 * Copyright 2017 Google LLC 439 * 440 * Licensed under the Apache License, Version 2.0 (the "License"); 441 * you may not use this file except in compliance with the License. 442 * You may obtain a copy of the License at 443 * 444 * http://www.apache.org/licenses/LICENSE-2.0 445 * 446 * Unless required by applicable law or agreed to in writing, software 447 * distributed under the License is distributed on an "AS IS" BASIS, 448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 449 * See the License for the specific language governing permissions and 450 * limitations under the License. 451 */var gt;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(gt||(gt={}));const g8={debug:gt.DEBUG,verbose:gt.VERBOSE,info:gt.INFO,warn:gt.WARN,error:gt.ERROR,silent:gt.SILENT},y8=gt.INFO,v8={[gt.DEBUG]:"log",[gt.VERBOSE]:"log",[gt.INFO]:"info",[gt.WARN]:"warn",[gt.ERROR]:"error"},x8=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),s=v8[t];if(s)console[s](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class qP{constructor(t){this.name=t,this._logLevel=y8,this._logHandler=x8,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in gt))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?g8[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,gt.DEBUG,...t),this._logHandler(this,gt.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,gt.VERBOSE,...t),this._logHandler(this,gt.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,gt.INFO,...t),this._logHandler(this,gt.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,gt.WARN,...t),this._logHandler(this,gt.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,gt.ERROR,...t),this._logHandler(this,gt.ERROR,...t)}}const w8=(e,t)=>t.some(n=>e instanceof n);let SS,jS;function b8(){return SS||(SS=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function S8(){return jS||(jS=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const KP=new WeakMap,Iy=new WeakMap,YP=new WeakMap,wp=new WeakMap,aw=new WeakMap;function j8(e){const t=new Promise((n,r)=>{const s=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Mi(e.result)),s()},a=()=>{r(e.error),s()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&KP.set(n,e)}).catch(()=>{}),aw.set(t,e),t}function k8(e){if(Iy.has(e))return;const t=new Promise((n,r)=>{const s=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{n(),s()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Iy.set(e,t)}let Ay={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Iy.get(e);if(t==="objectStoreNames")return e.objectStoreNames||YP.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Mi(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function N8(e){Ay=e(Ay)}function C8(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(bp(this),t,...n);return YP.set(r,t.sort?t.sort():[t]),Mi(r)}:S8().includes(e)?function(...t){return e.apply(bp(this),t),Mi(KP.get(this))}:function(...t){return Mi(e.apply(bp(this),t))}}function E8(e){return typeof e=="function"?C8(e):(e instanceof IDBTransaction&&k8(e),w8(e,b8())?new Proxy(e,Ay):e)}function Mi(e){if(e instanceof IDBRequest)return j8(e);if(wp.has(e))return wp.get(e);const t=E8(e);return t!==e&&(wp.set(e,t),aw.set(t,e)),t}const bp=e=>aw.get(e);function T8(e,t,{blocked:n,upgrade:r,blocking:s,terminated:o}={}){const a=indexedDB.open(e,t),l=Mi(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Mi(a.result),c.oldVersion,c.newVersion,Mi(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{o&&c.addEventListener("close",()=>o()),s&&c.addEventListener("versionchange",u=>s(u.oldVersion,u.newVersion,u))}).catch(()=>{}),l}const P8=["get","getKey","getAll","getAllKeys","count"],I8=["put","add","delete","clear"],Sp=new Map;function kS(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Sp.get(t))return Sp.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=I8.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||P8.includes(n)))return;const o=async function(a,...l){const c=this.transaction(a,s?"readwrite":"readonly");let u=c.store;
451return r&&(u=u.index(l.shift())),(await Promise.all([u[n](...l),s&&c.done]))[0]};return Sp.set(t,o),o}N8(e=>({...e,get:(t,n,r)=>kS(t,n)||e.get(t,n,r),has:(t,n)=>!!kS(t,n)||e.has(t,n)}));/** 452 * @license 453 * Copyright 2019 Google LLC 454 * 455 * Licensed under the Apache License, Version 2.0 (the "License"); 456 * you may not use this file except in compliance with the License. 457 * You may obtain a copy of the License at 458 * 459 * http://www.apache.org/licenses/LICENSE-2.0 460 * 461 * Unless required by applicable law or agreed to in writing, software 462 * distributed under the License is distributed on an "AS IS" BASIS, 463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 464 * See the License for the specific language governing permissions and 465 * limitations under the License. 466 */class A8{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(R8(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function R8(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const Ry="@firebase/app",NS="0.14.8";/** 467 * @license 468 * Copyright 2019 Google LLC 469 * 470 * Licensed under the Apache License, Version 2.0 (the "License"); 471 * you may not use this file except in compliance with the License. 472 * You may obtain a copy of the License at 473 * 474 * http://www.apache.org/licenses/LICENSE-2.0 475 * 476 * Unless required by applicable law or agreed to in writing, software 477 * distributed under the License is distributed on an "AS IS" BASIS, 478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 479 * See the License for the specific language governing permissions and 480 * limitations under the License. 481 */const Vs=new qP("@firebase/app"),_8="@firebase/app-compat",O8="@firebase/analytics-compat",M8="@firebase/analytics",L8="@firebase/app-check-compat",$8="@firebase/app-check",D8="@firebase/auth",F8="@firebase/auth-compat",B8="@firebase/database",U8="@firebase/data-connect",V8="@firebase/database-compat",z8="@firebase/functions",W8="@firebase/functions-compat",G8="@firebase/installations",H8="@firebase/installations-compat",q8="@firebase/messaging",K8="@firebase/messaging-compat",Y8="@firebase/performance",J8="@firebase/performance-compat",Q8="@firebase/remote-config",X8="@firebase/remote-config-compat",Z8="@firebase/storage",eV="@firebase/storage-compat",tV="@firebase/firestore",nV="@firebase/ai",rV="@firebase/firestore-compat",sV="firebase",iV="12.9.0";/** 482 * @license 483 * Copyright 2019 Google LLC 484 * 485 * Licensed under the Apache License, Version 2.0 (the "License"); 486 * you may not use this file except in compliance with the License. 487 * You may obtain a copy of the License at 488 * 489 * http://www.apache.org/licenses/LICENSE-2.0 490 * 491 * Unless required by applicable law or agreed to in writing, software 492 * distributed under the License is distributed on an "AS IS" BASIS, 493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 494 * See the License for the specific language governing permissions and 495 * limitations under the License. 496 */const _y="[DEFAULT]",oV={[Ry]:"fire-core",[_8]:"fire-core-compat",[M8]:"fire-analytics",[O8]:"fire-analytics-compat",[$8]:"fire-app-check",[L8]:"fire-app-check-compat",[D8]:"fire-auth",[F8]:"fire-auth-compat",[B8]:"fire-rtdb",[U8]:"fire-data-connect",[V8]:"fire-rtdb-compat",[z8]:"fire-fn",[W8]:"fire-fn-compat",[G8]:"fire-iid",[H8]:"fire-iid-compat",[q8]:"fire-fcm",[K8]:"fire-fcm-compat",[Y8]:"fire-perf",[J8]:"fire-perf-compat",[Q8]:"fire-rc",[X8]:"fire-rc-compat",[Z8]:"fire-gcs",[eV]:"fire-gcs-compat",[tV]:"fire-fst",[rV]:"fire-fst-compat",[nV]:"fire-vertex","fire-js":"fire-js",[sV]:"fire-js-all"};/** 497 * @license 498 * Copyright 2019 Google LLC 499 * 500 * Licensed under the Apache License, Version 2.0 (the "License"); 501 * you may not use this file except in compliance with the License. 502 * You may obtain a copy of the License at 503 * 504 * http://www.apache.org/licenses/LICENSE-2.0 505 * 506 * Unless required by applicable law or agreed to in writing, software 507 * distributed under the License is distributed on an "AS IS" BASIS, 508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 509 * See the License for the specific language governing permissions and 510 * limitations under the License. 511 */const ru=new Map,aV=new Map,Oy=new Map;function CS(e,t){try{e.container.addComponent(t)}catch(n){Vs.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function su(e){const t=e.name;if(Oy.has(t))return Vs.debug(`There were multiple attempts to register component ${t}.`),!1;Oy.set(t,e);for(const n of ru.values())CS(n,e);for(const n of aV.values())CS(n,e);return!0}function JP(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function os(e){return e==null?!1:e.settings!==void 0}/** 512 * @license 513 * Copyright 2019 Google LLC 514 * 515 * Licensed under the Apache License, Version 2.0 (the "License");
516 * you may not use this file except in compliance with the License. 517 * You may obtain a copy of the License at 518 * 519 * http://www.apache.org/licenses/LICENSE-2.0 520 * 521 * Unless required by applicable law or agreed to in writing, software 522 * distributed under the License is distributed on an "AS IS" BASIS, 523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 524 * See the License for the specific language governing permissions and 525 * limitations under the License. 526 */const lV={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
526d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Li=new Au("app","Firebase",lV);/** 527 * @license 528 * Copyright 2019 Google LLC 529 * 530 * Licensed under the Apache License, Version 2.0 (the "License"); 531 * you may not use this file except in compliance with the License. 532 * You may obtain a copy of the License at 533 * 534 * http://www.apache.org/licenses/LICENSE-2.0 535 * 536 * Unless required by applicable law or agreed to in writing, software 537 * distributed under the License is distributed on an "AS IS" BASIS, 538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 539 * See the License for the specific language governing permissions and 540 * limitations under the License. 541 */class cV{constructor(t,n,r){this._isDeleted=!1,this._options={...t},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new al("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Li.create("app-deleted",{appName:this._name})}}/** 542 * @license 543 * Copyright 2019 Google LLC 544 * 545 * Licensed under the Apache License, Version 2.0 (the "License"); 546 * you may not use this file except in compliance with the License. 547 * You may obtain a copy of the License at 548 * 549 * http://www.apache.org/licenses/LICENSE-2.0 550 * 551 * Unless required by applicable law or agreed to in writing, software 552 * distributed under the License is distributed on an "AS IS" BASIS, 553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 554 * See the License for the specific language governing permissions and 555 * limitations under the License. 556 */const Ru=iV;function QP(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r={name:_y,automaticDataCollectionEnabled:!0,...t},s=r.name;if(typeof s!="string"||!s)throw Li.create("bad-app-name",{appName:String(s)});if(n||(n=GP()),!n)throw Li.create("no-options");const o=ru.get(s);if(o){if(ol(n,o.options)&&ol(r,o.config))return o;throw Li.create("duplicate-app",{appName:s})}const a=new p8(s);for(const c of Oy.values())a.addComponent(c);const l=new cV(n,r,a);return ru.set(s,l),l}function uV(e=_y){const t=ru.get(e);if(!t&&e===_y&&GP())return QP();if(!t)throw Li.create("no-app",{appName:e});return t}function dV(){return Array.from(ru.values())}function Aa(e,t,n){let r=oV[e]??e;n&&(r+=`-${n}`);const s=r.match(/\s|\//),o=t.match(/\s|\//);if(s||o){const a=[`Unable to register library "${r}" with version "${t}":`];s&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),Vs.warn(a.join(" "));return}su(new al(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}/** 557 * @license 558 * Copyright 2021 Google LLC 559 * 560 * Licensed under the Apache License, Version 2.0 (the "License"); 561 * you may not use this file except in compliance with the License. 562 * You may obtain a copy of the License at 563 * 564 * http://www.apache.org/licenses/LICENSE-2.0 565 * 566 * Unless required by applicable law or agreed to in writing, softw
566are 567 * distributed under the License is distributed on an "AS IS" BASIS, 568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 569 * See the License for the specific language governing permissions and 570 * limitations under the License. 571 */const hV="firebase-heartbeat-database",fV=1,iu="firebase-heartbeat-store";let jp=null;function XP(){return jp||(jp=T8(hV,fV,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(iu)}catch(n){console.warn(n)}}}}).catch(e=>{throw Li.create("idb-open",{originalErrorMessage:e.message})})),jp}async function mV(e){try{const n=(await XP()).transaction(iu),r=await n.objectStore(iu).get(ZP(e));return await n.done,r}catch(t){if(t instanceof eo)Vs.warn(t.message);else{const n=Li.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});Vs.warn(n.message)}}}async function ES(e,t){try{const r=(await XP()).transaction(iu,"readwrite");await r.objectStore(iu).put(t,ZP(e)),await r.done}catch(n){if(n instanceof eo)Vs.warn(n.message);else{const r=Li.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Vs.warn(r.message)}}}function ZP(e){return`${e.name}!${e.options.appId}`}/** 572 * @license 573 * Copyright 2021 Google LLC 574 * 575 * Licensed under the Apache License, Version 2.0 (the "License"); 576 * you may not use this file except in compliance with the License. 577 * You may obtain a copy of the License at 578 * 579 * http://www.apache.org/licenses/LICENSE-2.0 580 * 581 * Unless required by applicable law or agreed to in writing, software 582 * distributed under the License is distributed on an "AS IS" BASIS, 583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 584 * See the License for the specific language governing permissions and 585 * limitations under the License. 586 */const pV=1024,gV=30;class yV{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new xV(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var t,n;try{const s=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=TS();if(((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)==null?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===o||this._heartbeatsCache.heartbeats.some(a=>a.date===o))return;if(this._heartbeatsCache.heartbeats.push({date:o,agent:s}),this._heartbeatsCache.heartbeats.length>gV){const a=wV(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(a,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){Vs.warn(r)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=TS(),{heartbeatsToSend:r,unsentEntries:s}=vV(this._heartbeatsCache.heartbeats),o=zP(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(n){return Vs.warn(n),""}}}function TS(){return new Date().toISOString().substring(0,10)}function vV(e,t=pV){const n=[];let r=e.slice();for(const s of e){const o=n.find(a=>a.agent===s.agent);if(o){if(o.dates.push(s.date),PS(n)>t){o.dates.pop();break}}else if(n.push({agent:s.agent,dates:[s.date]}),PS(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class xV{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return r8()?s8().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await mV(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return ES(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return ES(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return}}function PS(e){return zP(JSON.stringify({version:2,heartbeats:e})).length}function wV(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}/** 587 * @license 588 * Copyright 2019 Google LLC 589 * 590 * Licensed under the Apache License, Version 2.0 (the "License");
591 * you may not use this file except in compliance with the License. 592 * You may obtain a copy of the License at 593 * 594 * http://www.apache.org/licenses/LICENSE-2.0 595 * 596 * Unless required by applicable law or agreed to in writing, software 597 * distributed under the License is distributed on an "AS IS" BASIS, 598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 599 * See the License for the specific language governing permissions and 600 * limitations under the License. 601 */function bV(e){su(new al("platform-logger",t=>new A8(t),"PRIVATE")),su(new al("heartbeat",t=>new yV(t),"PRIVATE")),Aa(Ry,NS,e),Aa(Ry,NS,"esm2020"),Aa("fire-js","")}bV("");var SV="firebase",jV="12.9.0";/** 602 * @license 603 * Copyright 2020 Google LLC 604 * 605 * Licensed under the Apache License, Version 2.0 (the "License"); 606 * you may not use this file except in compliance with the License. 607 * You may obtain a copy of the License at 608 * 609 * http://www.apache.org/licenses/LICENSE-2.0 610 * 611 * Unless required by applicable law or agreed to in writing, software 612 * distributed under the License is distributed on an "AS IS" BASIS, 613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 614 * See the License for the specific language governing permissions and 615 * limitations under the License. 616 */Aa(SV,jV,"app");function eI(){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."}}const kV=eI,tI=new Au("auth","Firebase",eI());/** 617 * @license 618 * Copyright 2020 Google LLC 619 * 620 * Licensed under the Apache License, Version 2.0 (the "License"); 621 * you may not use this file except in compliance with the License. 622 * You may obtain a copy of the License at 623 * 624 * http://www.apache.org/licenses/LICENSE-2.0 625 * 626 * Unless required by applicable law or agreed to in writing, software 627 * distributed under the License is distributed on an "AS IS" BASIS, 628 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 629 * See the License for the specific language governing permissions and 630 * limitations under the License. 631 */const cf=new qP("@firebase/auth");function NV(e,...t){cf.logLevel<=gt.WARN&&cf.warn(`Auth (${Ru}): ${e}`,...t)}function oh(e,...t){cf.logLevel<=gt.ERROR&&cf.error(`Auth (${Ru}): ${e}`,...t)}/** 632 * @license 633 * Copyright 2020 Google LLC 634 * 635 * Licensed under the Apache License, Version 2.0 (the "License"); 636 * you may not use this file except in compliance with the License. 637 * You may obtain a copy of the License at 638 * 639 * http://www.apache.org/licenses/LICENSE-2.0 640 * 641 * Unless required by applicable law or agreed to in writing, software 642 * distributed under the License is distributed on an "AS IS" BASIS, 643 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 644 * See the License for the specific language governing permissions and 645 * limitations under the License. 646 */function zs(e,...t){throw lw(e,...t)}function or(e,...t){return lw(e,...t)}function nI(e,t,n){const r={...kV(),[t]:n};return new Au("auth","Firebase",r).create(t,{appName:e.name})}function $i(e){return nI(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function lw(e,...t){if(typeof e!="string"){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return tI.create(e,...t)}function be(e,t,...n){if(!e)throw lw(t,...n)}function As(e){const t="INTERNAL ASSERTION FAILED: "+e;throw oh(t),new Error(t)}function Ws(e,t){e||As(t)}/** 647 * @license 648 * Copyright 2020 Google LLC 649 * 650 * Licensed under the Apache License, Version 2.0 (the "License"); 651 * you may not use this file except in compliance with the License. 652 * You may obtain a copy of the License at 653 * 654 * http://www.apache.org/licenses/LICENSE-2.0 655 * 656 * Unless required by applicable law or agreed to in writing, software 657 * distributed under the License is distributed on an "AS IS" BASIS, 658 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 659 * See the License for the specific language governing permissions and 660 * limitations under the License. 661 */function My(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.href)||""}function rI(){return IS()==="http:"||IS()==="https:"}function IS(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.protocol)||null}/** 662 * @license 663 * Copyright 2020 Google LLC 664 * 665 * Licensed under the Apache License, Version 2.0 (the "License");
666 * you may not use this file except in compliance with the License. 667 * You may obtain a copy of the License at 668 * 669 * http://www.apache.org/licenses/LICENSE-2.0 670 * 671 * Unless required by applicable law or agreed to in writing, software 672 * distributed under the License is distributed on an "AS IS" BASIS, 673 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 674 * See the License for the specific language governing permissions and 675 * limitations under the License. 676 */function CV(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(rI()||e8()||"connection"in navigator)?navigator.onLine:!0}function EV(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/** 677 * @license 678 * Copyright 2020 Google LLC 679 * 680 * Licensed under the Apache License, Version 2.0 (the "License"); 681 * you may not use this file except in compliance with the License. 682 * You may obtain a copy of the License at 683 * 684 * http://www.apache.org/licenses/LICENSE-2.0 685 * 686 * Unless required by applicable law or agreed to in writing, software 687 * distributed under the License is distributed on an "AS IS" BASIS, 688 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 689 * See the License for the specific language governing permissions and 690 * limitations under the License. 691 */class _u{constructor(t,n){this.shortDelay=t,this.longDelay=n,Ws(n>t,"Short delay should be less than long delay!"),this.isMobile=XU()||t8()}get(){return CV()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 692 * @license 693 * Copyright 2020 Google LLC 694 * 695 * Licensed under the Apache License, Version 2.0 (the "License"); 696 * you may not use this file except in compliance with the License. 697 * You may obtain a copy of the License at 698 * 699 * http://www.apache.org/licenses/LICENSE-2.0 700 * 701 * Unless required by applicable law or agreed to in writing, software 702 * distributed under the License is distributed on an "AS IS" BASIS, 703 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 704 * See the License for the specific language governing permissions and 705 * limitations under the License. 706 */function cw(e,t){Ws(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/** 707 * @license 708 * Copyright 2020 Google LLC 709 * 710 * Licensed under the Apache License, Version 2.0 (the "License"); 711 * you may not use this file except in compliance with the License. 712 * You may obtain a copy of the License at 713 * 714 * http://www.apache.org/licenses/LICENSE-2.0 715 * 716 * Unless required by applicable law or agreed to in writing, software 717 * distributed under the License is distributed on an "AS IS" BASIS, 718 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 719 * See the License for the specific language governing permissions and 720 * limitations under the License. 721 */class sI{static initialize(t,n,r){this.fetchImpl=t,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;As("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;As("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;As("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 722 * @license 723 * Copyright 2020 Google LLC 724 * 725 * Licensed under the Apache License, Version 2.0 (the "License");
726 * you may not use this file except in compliance with the License. 727 * You may obtain a copy of the License at 728 * 729 * http://www.apache.org/licenses/LICENSE-2.0 730 * 731 * Unless required by applicable law or agreed to in writing, software 732 * distributed under the License is distributed on an "AS IS" BASIS, 733 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 734 * See the License for the specific language governing permissions and 735 * limitations under the License. 736 */const TV={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** 737 * @license 738 * Copyright 2020 Google LLC 739 * 740 * Licensed under the Apache License, Version 2.0 (the "License"); 741 * you may not use this file except in compliance with the License. 742 * You may obtain a copy of the License at 743 * 744 * http://www.apache.org/licenses/LICENSE-2.0 745 * 746 * Unless required by applicable law or agreed to in writing, software 747 * distributed under the License is distributed on an "AS IS" BASIS, 748 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 749 * See the License for the specific language governing permissions and 750 * limitations under the License. 751 */const PV=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],IV=new _u(3e4,6e4);function vs(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function Qr(e,t,n,r,s={}){return iI(e,s,async()=>{let o={},a={};r&&(t==="GET"?a=r:o={body:JSON.stringify(r)});const l=Al({key:e.config.apiKey,...a}).slice(1),c=await e._getAdditionalHeaders();c["Content-Type"]="application/json",e.languageCode&&(c["X-Firebase-Locale"]=e.languageCode);const u={method:t,headers:c,...o};return ZU()||(u.referrerPolicy="no-referrer"),e.emulatorConfig&&im(e.emulatorConfig.host)&&(u.credentials="include"),sI.fetch()(await oI(e,e.config.apiHost,n,l),u)})}async function iI(e,t,n){e._canInitEmulator=!1;const r={...TV,...t};try{const s=new RV(e),o=await Promise.race([n(),s.promise]);s.clearNetworkTimeout();const a=await o.json();if("needConfirmation"in a)throw Zl(e,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{const l=o.ok?a.errorMessage:a.error.message,[c,u]=l.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw Zl(e,"credential-already-in-use",a);if(c==="EMAIL_EXISTS")throw Zl(e,"email-already-in-use",a);if(c==="USER_DISABLED")throw Zl(e,"user-disabled",a);const h=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw nI(e,h,u);zs(e,h)}}catch(s){if(s instanceof eo)throw s;zs(e,"network-request-failed",{message:String(s)})}}async function om(e,t,n,r,s={}
751){const o=await Qr(e,t,n,r,s);return"mfaPendingCredential"in o&&zs(e,"multi-factor-auth-required",{_serverResponse:o}),o}async function oI(e,t,n,r){const s=`${t}${n}?${r}`,o=e,a=o.config.emulator?cw(e.config,s):`${e.config.apiScheme}://${s}`;return PV.includes(n)&&(await o._persistenceManagerAvailable,o._getPersistenceType()==="COOKIE")?o._getPersistence()._getFinalTarget(a).toString():a}function AV(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class RV{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(or(this.auth,"network-request-failed")),IV.get())})}}function Zl(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const s=or(e,t,r);return s.customData._tokenResponse=n,s}/** 752 * @license 753 * Copyright 2020 Google LLC 754 * 755 * Licensed under the Apache License, Version 2.0 (the "License"); 756 * you may not use this file except in compliance with the License. 757 * You may obtain a copy of the License at 758 * 759 * http://www.apache.org/licenses/LICENSE-2.0 760 * 761 * Unless required by applicable law or agreed to in writing, software 762 * distributed under the License is distributed on an "AS IS" BASIS, 763 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 764 * See the License for the specific language governing permissions and 765 * limitations under the License. 766 */function AS(e){return e!==void 0&&e.getResponse!==void 0}function RS(e){return e!==void 0&&e.enterprise!==void 0}class aI{constructor(t){if(this.siteKey="",this.recaptchaEnforcementState=[],t.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=t.recaptchaEnforcementState}getProviderEnforcementState(t){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===t)return AV(n.enforcementState);return null}isProviderEnabled(t){return this.getProviderEnforcementState(t)==="ENFORCE"||this.getProviderEnforcementState(t)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}/** 767 * @license 768 * Copyright 2020 Google LLC 769 * 770 * Licensed under the Apache License, Version 2.0 (the "License"); 771 * you may not use this file except in compliance with the License. 772 * You may obtain a copy of the License at 773 * 774 * http://www.apache.org/licenses/LICENSE-2.0 775 * 776 * Unless required by applicable law or agreed to in writing, software 777 * distributed under the License is distributed on an "AS IS" BASIS, 778 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 779 * See the License for the specific language governing permissions and 780 * limitations under the License. 781 */async function _V(e){return(await Qr(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function lI(e,t){return Qr(e,"GET","/v2/recaptchaConfig",vs(e,t))}/** 782 * @license 783 * Copyright 2020 Google LLC 784 * 785 * Licensed under the Apache License, Version 2.0 (the "License"); 786 * you may not use this file except in compliance with the License. 787 * You may obtain a copy of the License at 788 * 789 * http://www.apache.org/licenses/LICENSE-2.0 790 * 791 * Unless required by applicable law or agreed to in writing, software 792 * distributed under the License is distributed on an "AS IS" BASIS, 793 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 794 * See the License for the specific language governing permissions and 795 * limitations under the License. 796 */async function OV(e,t){return Qr(e,"POST","/v1/accounts:delete",t)}async function uf(e,t){return Qr(e,"POST","/v1/accounts:lookup",t)}/** 797 * @license 798 * Copyright 2020 Google LLC 799 * 800 * Licensed under the Apache License, Version 2.0 (the "License"); 801 * you may not use this file except in compliance with the License. 802 * You may obtain a copy of the License at 803 * 804 * http://www.apache.org/licenses/LICENSE-2.0 805 * 806 * Unless required by applicable law or agreed to in writing, softw
806are 807 * distributed under the License is distributed on an "AS IS" BASIS, 808 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 809 * See the License for the specific language governing permissions and 810 * limitations under the License. 811 */function xc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function MV(e,t=!1){const n=Wo(e),r=await n.getIdToken(t),s=uw(r);be(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");const o=typeof s.firebase=="object"?s.firebase:void 0,a=o==null?void 0:o.sign_in_provider;return{claims:s,token:r,authTime:xc(kp(s.auth_time)),issuedAtTime:xc(kp(s.iat)),expirationTime:xc(kp(s.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}}function kp(e){return Number(e)*1e3}function uw(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return oh("JWT malformed, contained fewer than 3 sections"),null;try{const s=WP(n);return s?JSON.parse(s):(oh("Failed to decode base64 JWT payload"),null)}catch(s){return oh("Caught error parsing JWT payload as JSON",s==null?void 0:s.toString()),null}}function _S(e){const t=uw(e);return be(t,"internal-error"),be(typeof t.exp<"u","internal-error"),be(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/** 812 * @license 813 * Copyright 2020 Google LLC 814 * 815 * Licensed under the Apache License, Version 2.0 (the "License"); 816 * you may not use this file except in compliance with the License. 817 * You may obtain a copy of the License at 818 * 819 * http://www.apache.org/licenses/LICENSE-2.0 820 * 821 * Unless required by applicable law or agreed to in writing, software 822 * distributed under the License is distributed on an "AS IS" BASIS, 823 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 824 * See the License for the specific language governing permissions and 825 * limitations under the License. 826 */async function ou(e,t,n=!1){if(n)return t;try{return await t}catch(r){throw r instanceof eo&&LV(r)&&e.auth.currentUser===e&&await e.auth.signOut(),r}}function LV({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/** 827 * @license 828 * Copyright 2020 Google LLC 829 * 830 * Licensed under the Apache License, Version 2.0 (the "License"); 831 * you may not use this file except in compliance with the License. 832 * You may obtain a copy of the License at 833 * 834 * http://www.apache.org/licenses/LICENSE-2.0 835 * 836 * Unless required by applicable law or agreed to in writing, software 837 * distributed under the License is distributed on an "AS IS" BASIS, 838 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 839 * See the License for the specific language governing permissions and 840 * limitations under the License. 841 */class $V{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){if(t){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 842 * @license 843 * Copyright 2020 Google LLC 844 * 845 * Licensed under the Apache License, Version 2.0 (the "License"); 846 * you may not use this file except in compliance with the License. 847 * You may obtain a copy of the License at 848 * 849 * http://www.apache.org/licenses/LICENSE-2.0 850 * 851 * Unless required by applicable law or agreed to in writing, software 852 * distributed under the License is distributed on an "AS IS" BASIS, 853 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 854 * See the License for the specific language governing permissions and 855 * limitations under the License. 856 */class Ly{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=xc(this.lastLoginAt),this.creationTime=xc(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 857 * @license 858 * Copyright 2019 Google LLC 859 * 860 * Licensed under the Apache License, Version 2.0 (the "License");
861 * you may not use this file except in compliance with the License. 862 * You may obtain a copy of the License at 863 * 864 * http://www.apache.org/licenses/LICENSE-2.0 865 * 866 * Unless required by applicable law or agreed to in writing, software 867 * distributed under the License is distributed on an "AS IS" BASIS, 868 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 869 * See the License for the specific language governing permissions and 870 * limitations under the License. 871 */async function df(e){var f;const t=e.auth,n=await e.getIdToken(),r=await ou(e,uf(t,{idToken:n}));be(r==null?void 0:r.users.length,t,"internal-error");const s=r.users[0];e._notifyReloadListener(s);const o=(f=s.providerUserInfo)!=null&&f.length?cI(s.providerUserInfo):[],a=FV(e.providerData,o),l=e.isAnonymous,c=!(e.email&&s.passwordHash)&&!(a!=null&&a.length),u=l?c:!1,h={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:a,metadata:new Ly(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(e,h)}async function DV(e){const t=Wo(e);await df(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function FV(e,t){return[...e.filter(r=>!t.some(s=>s.providerId===r.providerId)),...t]}function cI(e){return e.map(({providerId:t,...n})=>({providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}/** 872 * @license 873 * Copyright 2020 Google LLC 874 * 875 * Licensed under the Apache License, Version 2.0 (the "License"); 876 * you may not use this file except in compliance with the License. 877 * You may obtain a copy of the License at 878 * 879 * http://www.apache.org/licenses/LICENSE-2.0 880 * 881 * Unless required by applicable law or agreed to in writing, software 882 * distributed under the License is distributed on an "AS IS" BASIS, 883 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 884 * See the License for the specific language governing permissions and 885 * limitations under the License. 886 */async function BV(e,t){const n=await iI(e,{},async()=>{const r=Al({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:s,apiKey:o}=e.config,a=await oI(e,s,"/v1/token",`key=${o}`),l=await e._getAdditionalHeaders();l["Content-Type"]="application/x-www-form-urlencoded";const c={method:"POST",headers:l,body:r};return e.emulatorConfig&&im(e.emulatorConfig.host)&&(c.credentials="include"),sI.fetch()(a,c)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function UV(e,t){return Qr(e,"POST","/v2/accounts:revokeToken",vs(e,t))}/** 887 * @license 888 * Copyright 2020 Google LLC 889 * 890 * Licensed under the Apache License, Version 2.0 (the "License"); 891 * you may not use this file except in compliance with the License. 892 * You may obtain a copy of the License at 893 * 894 * http://www.apache.org/licenses/LICENSE-2.0 895 * 896 * Unless required by applicable law or agreed to in writing, software 897 * distributed under the License is distributed on an "AS IS" BASIS, 898 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 899 * See the License for the specific language governing permissions and 900 * limitations under the License. 901 */class Ra{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){be(t.idToken,"internal-error"),be(typeof t.idToken<"u","internal-error"),be(typeof t.refreshToken<"u","internal-error");const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):_S(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){be(t.length!==0,"internal-error");const n=_S(t);this.updateTokensAndExpiration(t,null,n)}async getToken(t,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(be(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}
901async refresh(t,n){const{accessToken:r,refreshToken:s,expiresIn:o}=await BV(t,n);this.updateTokensAndExpiration(r,s,Number(o))}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:s,expirationTime:o}=n,a=new Ra;return r&&(be(typeof r=="string","internal-error",{appName:t}),a.refreshToken=r),s&&(be(typeof s=="string","internal-error",{appName:t}),a.accessToken=s),o&&(be(typeof o=="number","internal-error",{appName:t}),a.expirationTime=o),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Ra,this.toJSON())}_performRefresh(){return As("not implemented")}}/** 902 * @license 903 * Copyright 2020 Google LLC 904 * 905 * Licensed under the Apache License, Version 2.0 (the "License"); 906 * you may not use this file except in compliance with the License. 907 * You may obtain a copy of the License at 908 * 909 * http://www.apache.org/licenses/LICENSE-2.0 910 * 911 * Unless required by applicable law or agreed to in writing, software 912 * distributed under the License is distributed on an "AS IS" BASIS, 913 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 914 * See the License for the specific language governing permissions and 915 * limitations under the License. 916 */function ei(e,t){be(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class Ur{constructor({uid:t,auth:n,stsTokenManager:r,...s}){this.providerId="firebase",this.proactiveRefresh=new $V(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new Ly(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(t){const n=await ou(this,this.stsTokenManager.getToken(this.auth,t));return be(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return MV(this,t)}reload(){return DV(this)}_assign(t){this!==t&&(be(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>({...n})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new Ur({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(t){be(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&await df(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(os(this.auth.app))return Promise.reject($i(this.auth));const t=await this.getIdToken();return await ou(this,OV(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{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(t=>({...t})),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(t,n){const r=n.displayName??void 0,s=n.email??void 0,o=n.phoneNumber??void 0,a=n.photoURL??void 0,l=n.tenantId??void 0,c=n._redirectEventId??void 0,u=n.createdAt??void 0,h=n.lastLoginAt??void 0,{uid:f,emailVerified:p,isAnonymous:d,providerData:w,stsTokenManager:v}=n;
916be(f&&v,t,"internal-error");const x=Ra.fromJSON(this.name,v);be(typeof f=="string",t,"internal-error"),ei(r,t.name),ei(s,t.name),be(typeof p=="boolean",t,"internal-error"),be(typeof d=="boolean",t,"internal-error"),ei(o,t.name),ei(a,t.name),ei(l,t.name),ei(c,t.name),ei(u,t.name),ei(h,t.name);const y=new Ur({uid:f,auth:t,email:s,emailVerified:p,displayName:r,isAnonymous:d,photoURL:a,phoneNumber:o,tenantId:l,stsTokenManager:x,createdAt:u,lastLoginAt:h});return w&&Array.isArray(w)&&(y.providerData=w.map(g=>({...g}))),c&&(y._redirectEventId=c),y}static async _fromIdTokenResponse(t,n,r=!1){const s=new Ra;s.updateFromServerResponse(n);const o=new Ur({uid:n.localId,auth:t,stsTokenManager:s,isAnonymous:r});return await df(o),o}static async _fromGetAccountInfoResponse(t,n,r){const s=n.users[0];be(s.localId!==void 0,"internal-error");const o=s.providerUserInfo!==void 0?cI(s.providerUserInfo):[],a=!(s.email&&s.passwordHash)&&!(o!=null&&o.length),l=new Ra;l.updateFromIdToken(r);const c=new Ur({uid:s.localId,auth:t,stsTokenManager:l,isAnonymous:a}),u={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:o,metadata:new Ly(s.createdAt,s.lastLoginAt),isAnonymous:!(s.email&&s.passwordHash)&&!(o!=null&&o.length)};return Object.assign(c,u),c}}/** 917 * @license 918 * Copyright 2020 Google LLC 919 * 920 * Licensed under the Apache License, Version 2.0 (the "License"); 921 * you may not use this file except in compliance with the License. 922 * You may obtain a copy of the License at 923 * 924 * http://www.apache.org/licenses/LICENSE-2.0 925 * 926 * Unless required by applicable law or agreed to in writing, software 927 * distributed under the License is distributed on an "AS IS" BASIS, 928 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 929 * See the License for the specific language governing permissions and 930 * limitations under the License. 931 */const OS=new Map;function Rs(e){Ws(e instanceof Function,"Expected a class definition");let t=OS.get(e);return t?(Ws(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,OS.set(e,t),t)}/** 932 * @license 933 * Copyright 2019 Google LLC 934 * 935 * Licensed under the Apache License, Version 2.0 (the "License"); 936 * you may not use this file except in compliance with the License. 937 * You may obtain a copy of the License at 938 * 939 * http://www.apache.org/licenses/LICENSE-2.0 940 * 941 * Unless required by applicable law or agreed to in writing, software 942 * distributed under the License is distributed on an "AS IS" BASIS, 943 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 944 * See the License for the specific language governing permissions and 945 * limitations under the License. 946 */class uI{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}uI.type="NONE";const MS=uI;/** 947 * @license 948 * Copyright 2019 Google LLC 949 * 950 * Licensed under the Apache License, Version 2.0 (the "License"); 951 * you may not use this file except in compliance with the License. 952 * You may obtain a copy of the License at 953 * 954 * http://www.apache.org/licenses/LICENSE-2.0 955 * 956 * Unless required by applicable law or agreed to in writing, software 957 * distributed under the License is distributed on an "AS IS" BASIS, 958 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 959 * See the License for the specific language governing permissions and 960 * limitations under the License. 961 */function ah(e,t,n){return`firebase:${e}:${t}:${n}`}class _a{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:s,name:o}=this.auth;this.fullUserKey=ah(this.userKey,s.apiKey,o),this.fullPersistenceKey=ah("persistence",s.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const n=await uf(this.auth,{idToken:t}).catch(()=>{});return n?Ur._fromGetAccountInfoResponse(this.auth,n,t):null}return Ur._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r="authUser"){if(!n.length)return new _a(Rs(MS),t,r);const s=(await Promise.all(n.map(async u=>
961{if(await u._isAvailable())return u}))).filter(u=>u);let o=s[0]||Rs(MS);const a=ah(r,t.config.apiKey,t.name);let l=null;for(const u of n)try{const h=await u._get(a);if(h){let f;if(typeof h=="string"){const p=await uf(t,{idToken:h}).catch(()=>{});if(!p)break;f=await Ur._fromGetAccountInfoResponse(t,p,h)}else f=Ur._fromJSON(t,h);u!==o&&(l=f),o=u;break}}catch{}const c=s.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!c.length?new _a(o,t,r):(o=c[0],l&&await o._set(a,l.toJSON()),await Promise.all(n.map(async u=>{if(u!==o)try{await u._remove(a)}catch{}})),new _a(o,t,r))}}/** 962 * @license 963 * Copyright 2020 Google LLC 964 * 965 * Licensed under the Apache License, Version 2.0 (the "License"); 966 * you may not use this file except in compliance with the License. 967 * You may obtain a copy of the License at 968 * 969 * http://www.apache.org/licenses/LICENSE-2.0 970 * 971 * Unless required by applicable law or agreed to in writing, software 972 * distributed under the License is distributed on an "AS IS" BASIS, 973 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 974 * See the License for the specific language governing permissions and 975 * limitations under the License. 976 */function LS(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(mI(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(dI(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(gI(t))return"Blackberry";if(yI(t))return"Webos";if(hI(t))return"Safari";if((t.includes("chrome/")||fI(t))&&!t.includes("edge/"))return"Chrome";if(pI(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function dI(e=_n()){return/firefox\//i.test(e)}function hI(e=_n()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function fI(e=_n()){return/crios\//i.test(e)}function mI(e=_n()){return/iemobile/i.test(e)}function pI(e=_n()){return/android/i.test(e)}function gI(e=_n()){return/blackberry/i.test(e)}function yI(e=_n()){return/webos/i.test(e)}function dw(e=_n()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function VV(e=_n()){var t;return dw(e)&&!!((t=window.navigator)!=null&&t.standalone)}function zV(){return n8()&&document.documentMode===10}function vI(e=_n()){return dw(e)||pI(e)||yI(e)||gI(e)||/windows phone/i.test(e)||mI(e)}/** 977 * @license 978 * Copyright 2020 Google LLC 979 * 980 * Licensed under the Apache License, Version 2.0 (the "License"); 981 * you may not use this file except in compliance with the License. 982 * You may obtain a copy of the License at 983 * 984 * http://www.apache.org/licenses/LICENSE-2.0 985 * 986 * Unless required by applicable law or agreed to in writing, software 987 * distributed under the License is distributed on an "AS IS" BASIS, 988 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 989 * See the License for the specific language governing permissions and 990 * limitations under the License. 991 */function xI(e,t=[]){let n;switch(e){case"Browser":n=LS(_n());break;case"Worker":n=`${LS(_n())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Ru}/${r}`}/** 992 * @license 993 * Copyright 2022 Google LLC 994 * 995 * Licensed under the Apache License, Version 2.0 (the "License"); 996 * you may not use this file except in compliance with the License. 997 * You may obtain a copy of the License at 998 * 999 * http://www.apache.org/licenses/LICENSE-2.0 1000 * 1001 * Unless required by applicable law or agreed to in writing, software 1002 * distributed under the License is distributed on an "AS IS" BASIS, 1003 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1004 * See the License for the specific language governing permissions and 1005 * limitations under the License. 1006 */class WV{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((a,l)=>{try{const c=t(o);a(c)}catch(c){l(c)}});r.onAbort=n,this.queue.push(r);const s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)await r(t),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const s of n)try{s()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/** 1007 * @license 1008 * Copyright 2023 Google LLC 1009 * 1010 * Licensed under the Apache License, Version 2.0 (the "License");
1011 * you may not use this file except in compliance with the License. 1012 * You may obtain a copy of the License at 1013 * 1014 * http://www.apache.org/licenses/LICENSE-2.0 1015 * 1016 * Unless required by applicable law or agreed to in writing, software 1017 * distributed under the License is distributed on an "AS IS" BASIS, 1018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1019 * See the License for the specific language governing permissions and 1020 * limitations under the License. 1021 */async function GV(e,t={}){return Qr(e,"GET","/v2/passwordPolicy",vs(e,t))}/** 1022 * @license 1023 * Copyright 2023 Google LLC 1024 * 1025 * Licensed under the Apache License, Version 2.0 (the "License"); 1026 * you may not use this file except in compliance with the License. 1027 * You may obtain a copy of the License at 1028 * 1029 * http://www.apache.org/licenses/LICENSE-2.0 1030 * 1031 * Unless required by applicable law or agreed to in writing, software 1032 * distributed under the License is distributed on an "AS IS" BASIS, 1033 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1034 * See the License for the specific language governing permissions and 1035 * limitations under the License. 1036 */const HV=6;class qV{constructor(t){var r;const n=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??HV,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((r=t.allowedNonAlphanumericCharacters)==null?void 0:r.join(""))??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,n),this.validatePasswordCharacterOptions(t,n),n.isValid&&(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(t,n){const r=this.customStrengthOptions.minPasswordLength,s=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=t.length>=r),s&&(n.meetsMaxPasswordLength=t.length<=s)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,
1036!1,!1,!1);let r;for(let s=0;s<t.length;s++)r=t.charAt(s),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,n,r,s,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=s)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}}/** 1037 * @license 1038 * Copyright 2020 Google LLC 1039 * 1040 * Licensed under the Apache License, Version 2.0 (the "License"); 1041 * you may not use this file except in compliance with the License. 1042 * You may obtain a copy of the License at 1043 * 1044 * http://www.apache.org/licenses/LICENSE-2.0 1045 * 1046 * Unless required by applicable law or agreed to in writing, software 1047 * distributed under the License is distributed on an "AS IS" BASIS, 1048 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1049 * See the License for the specific language governing permissions and 1050 * limitations under the License. 1051 */class KV{constructor(t,n,r,s){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=s,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new $S(this),this.idTokenSubscription=new $S(this),this.beforeStateQueue=new WV(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=tI,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=s.sdkClientVersion,this._persistenceManagerAvailable=new Promise(o=>this._resolvePersistenceManagerAvailable=o)}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Rs(n)),this._initializationPromise=this.queue(async()=>{var r,s,o;if(!this._deleted&&(this.persistenceManager=await _a.create(this,t),(r=this._resolvePersistenceManagerAvailable)==null||r.call(this),!this._deleted)){if((s=this._popupRedirectResolver)!=null&&s._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((o=this.currentUser)==null?void 0:o.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const n=await uf(this,{idToken:t}),r=await Ur._fromGetAccountInfoResponse(this,n,t);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){var o;if(os(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(l,l))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let r=n,s=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const a=(o=this.redirectUser)==null?void 0:o._redirectEventId,l=r==null?void 0:r._redirectEventId,c=await this.tryRedirectSignIn(t);(!a||a===l)&&(c!=null&&c.user)&&(r=c.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);
1051if(!r._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(r)}catch(a){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return be(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await df(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=EV()}async _delete(){this._deleted=!0}async updateCurrentUser(t){if(os(this.app))return Promise.reject($i(this));const n=t?Wo(t):null;return n&&be(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&be(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return os(this.app)?Promise.reject($i(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return os(this.app)?Promise.reject($i(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Rs(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await GV(this),n=new qV(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new Au("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}async revokeAccessToken(t){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await UV(this,r)}}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)==null?void 0:t.toJSON()}}async _setRedirectUser(t,n){const r=await this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&Rs(t)||this._popupRedirectResolver;be(n,this,"argument-error"),this.redirectPersistenceManager=await _a.create(this,[Rs(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)==null?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)==null?void 0:r._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===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 n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const t=((n=this.currentUser)==null?void 0:n.uid)??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,s){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(be(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const c=t.addObserver(n,r,s);return()=>{a=!0,c()}}else{const c=t.addObserver(n);return()=>{a=!0,c()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return be(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=xI(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var s;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await((s=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:s.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var n;if(os(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await((n=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:n.getToken());
1051return t!=null&&t.error&&NV(`Error while retrieving App Check token: ${t.error}`),t==null?void 0:t.token}}function to(e){return Wo(e)}class $S{constructor(t){this.auth=t,this.observer=null,this.addObserver=c8(n=>this.observer=n)}get next(){return be(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 1052 * @license 1053 * Copyright 2020 Google LLC 1054 * 1055 * Licensed under the Apache License, Version 2.0 (the "License"); 1056 * you may not use this file except in compliance with the License. 1057 * You may obtain a copy of the License at 1058 * 1059 * http://www.apache.org/licenses/LICENSE-2.0 1060 * 1061 * Unless required by applicable law or agreed to in writing, software 1062 * distributed under the License is distributed on an "AS IS" BASIS, 1063 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1064 * See the License for the specific language governing permissions and 1065 * limitations under the License. 1066 */let Ou={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function YV(e){Ou=e}function hw(e){return Ou.loadJS(e)}function JV(){return Ou.recaptchaV2Script}function QV(){return Ou.recaptchaEnterpriseScript}function XV(){return Ou.gapiScript}function wI(e){return`__${e}${Math.floor(Math.random()*1e6)}`}/** 1067 * @license 1068 * Copyright 2020 Google LLC 1069 * 1070 * Licensed under the Apache License, Version 2.0 (the "License"); 1071 * you may not use this file except in compliance with the License. 1072 * You may obtain a copy of the License at 1073 * 1074 * http://www.apache.org/licenses/LICENSE-2.0 1075 * 1076 * Unless required by applicable law or agreed to in writing, software 1077 * distributed under the License is distributed on an "AS IS" BASIS, 1078 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1079 * See the License for the specific language governing permissions and 1080 * limitations under the License. 1081 */const ZV=500,ez=6e4,Sd=1e12;class tz{constructor(t){this.auth=t,this.counter=Sd,this._widgets=new Map}render(t,n){const r=this.counter;return this._widgets.set(r,new sz(t,this.auth.name,n||{})),this.counter++,r}reset(t){var r;const n=t||Sd;(r=this._widgets.get(n))==null||r.delete(),this._widgets.delete(n)}getResponse(t){var r;const n=t||Sd;return((r=this._widgets.get(n))==null?void 0:r.getResponse())||""}async execute(t){var r;const n=t||Sd;return(r=this._widgets.get(n))==null||r.execute(),""}}class nz{constructor(){this.enterprise=new rz}ready(t){t()}execute(t,n){return Promise.resolve("token")}render(t,n){return""}}class rz{ready(t){t()}execute(t,n){return Promise.resolve("token")}render(t,n){return""}}class sz{constructor(t,n,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const s=typeof t=="string"?document.getElementById(t):t;be(s,"argument-error",{appName:n}),this.container=s,this.isVisible=this.params.size!=="invisible",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=iz(50);const{callback:t,"expired-callback":n}=this.params;if(t)try{t(this.responseToken)}catch{}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,n)try{n()}catch{}this.isVisible&&this.execute()},ez)},ZV))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}function iz(e){const t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}const oz="recaptcha-enterprise",wc="NO_RECAPTCHA";class bI{constructor(t){this.type=oz,this.auth=to(t)}async verify(t="verify",n=!1){async function r(o){if(!n){if(o.tenantId==null&&o._agentRecaptchaConfig!=null)return o._agentRecaptchaConfig.siteKey;if(o.tenantId!=null&&o._tenantRecaptchaConfigs[o.tenantId]!==void 0)return o._tenantRecaptchaConfigs[o.tenantId].siteKey}return new Promise(async(a,l)=>
1081{lI(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)l(new Error("recaptcha Enterprise site key undefined"));else{const u=new aI(c);return o.tenantId==null?o._agentRecaptchaConfig=u:o._tenantRecaptchaConfigs[o.tenantId]=u,a(u.siteKey)}}).catch(c=>{l(c)})})}function s(o,a,l){const c=window.grecaptcha;RS(c)?c.enterprise.ready(()=>{c.enterprise.execute(o,{action:t}).then(u=>{a(u)}).catch(()=>{a(wc)})}):l(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new nz().execute("siteKey",{action:"verify"}):new Promise((o,a)=>{r(this.auth).then(l=>{if(!n&&RS(window.grecaptcha))s(l,o,a);else{if(typeof window>"u"){a(new Error("RecaptchaVerifier is only supported in browser"));return}let c=QV();c.length!==0&&(c+=l),hw(c).then(()=>{s(l,o,a)}).catch(u=>{a(u)})}}).catch(l=>{a(l)})})}}async function Np(e,t,n,r=!1,s=!1){const o=new bI(e);let a;if(s)a=wc;else try{a=await o.verify(n)}catch{a=await o.verify(n,!0)}const l={...t};if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in l){const c=l.phoneEnrollmentInfo.phoneNumber,u=l.phoneEnrollmentInfo.recaptchaToken;Object.assign(l,{phoneEnrollmentInfo:{phoneNumber:c,recaptchaToken:u,captchaResponse:a,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in l){const c=l.phoneSignInInfo.recaptchaToken;Object.assign(l,{phoneSignInInfo:{recaptchaToken:c,captchaResponse:a,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return l}return r?Object.assign(l,{captchaResp:a}):Object.assign(l,{captchaResponse:a}),Object.assign(l,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(l,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),l}async function Cp(e,t,n,r,s){var o;if((o=e._getRecaptchaConfig())!=null&&o.isProviderEnabled("PHONE_PROVIDER")){const a=await Np(e,t,n);return r(e,a).catch(async l=>{var c;if(((c=e._getRecaptchaConfig())==null?void 0:c.getProviderEnforcementState("PHONE_PROVIDER"))==="AUDIT"&&(l.code==="auth/missing-recaptcha-token"||l.code==="auth/invalid-app-credential")){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`);const u=await Np(e,t,n,!1,!0);return r(e,u)}return Promise.reject(l)})}else{const a=await Np(e,t,n,!1,!0);return r(e,a)}}async function az(e){const t=to(e),n=await lI(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),r=new aI(n);t.tenantId==null?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()&&new bI(t).verify()}/** 1082 * @license 1083 * Copyright 2020 Google LLC 1084 * 1085 * Licensed under the Apache License, Version 2.0 (the "License"); 1086 * you may not use this file except in compliance with the License. 1087 * You may obtain a copy of the License at 1088 * 1089 * http://www.apache.org/licenses/LICENSE-2.0 1090 * 1091 * Unless required by applicable law or agreed to in writing, software 1092 * distributed under the License is distributed on an "AS IS" BASIS, 1093 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1094 * See the License for the specific language governing permissions and 1095 * limitations under the License. 1096 */function lz(e,t){const n=JP(e,"auth");if(n.isInitialized()){const s=n.getImmediate(),o=n.getOptions();if(ol(o,t??{}))return s;zs(s,"already-initialized")}return n.initialize({options:t})}function cz(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Rs);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function uz(e,t,n){const r=to(e);be(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const s=!!(n!=null&&n.disableWarnings),o=SI(t),{host:a,port:l}=dz(t),c=l===null?"":`:${l}`,u={url:`${o}//${a}${c}/`},h=Object.freeze({host:a,port:l,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:s})});if(!r._canInitEmulator){be(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),be(ol(u,r.config.emulator)&&ol(h,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=u,r.emulatorConfig=h,r.settings.appVerificationDisabledForTesting=!0,im(a)?(KU(`${o}//${a}${c}`),QU("Auth",!0)):hz()}function SI(e){const t=e.indexOf(":");
1096return t<0?"":e.substr(0,t+1)}function dz(e){const t=SI(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",s=/^(\[[^\]]+\])(:|$)/.exec(r);if(s){const o=s[1];return{host:o,port:DS(r.substr(o.length+1))}}else{const[o,a]=r.split(":");return{host:o,port:DS(a)}}}function DS(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function hz(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/** 1097 * @license 1098 * Copyright 2020 Google LLC 1099 * 1100 * Licensed under the Apache License, Version 2.0 (the "License"); 1101 * you may not use this file except in compliance with the License. 1102 * You may obtain a copy of the License at 1103 * 1104 * http://www.apache.org/licenses/LICENSE-2.0 1105 * 1106 * Unless required by applicable law or agreed to in writing, software 1107 * distributed under the License is distributed on an "AS IS" BASIS, 1108 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1109 * See the License for the specific language governing permissions and 1110 * limitations under the License. 1111 */class fw{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return As("not implemented")}_getIdTokenResponse(t){return As("not implemented")}_linkToIdToken(t,n){return As("not implemented")}_getReauthenticationResolver(t){return As("not implemented")}}/** 1112 * @license 1113 * Copyright 2020 Google LLC 1114 * 1115 * Licensed under the Apache License, Version 2.0 (the "License"); 1116 * you may not use this file except in compliance with the License. 1117 * You may obtain a copy of the License at 1118 * 1119 * http://www.apache.org/licenses/LICENSE-2.0 1120 * 1121 * Unless required by applicable law or agreed to in writing, software 1122 * distributed under the License is distributed on an "AS IS" BASIS, 1123 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1124 * See the License for the specific language governing permissions and 1125 * limitations under the License. 1126 */async function Oa(e,t){return om(e,"POST","/v1/accounts:signInWithIdp",vs(e,t))}/** 1127 * @license 1128 * Copyright 2020 Google LLC 1129 * 1130 * Licensed under the Apache License, Version 2.0 (the "License"); 1131 * you may not use this file except in compliance with the License. 1132 * You may obtain a copy of the License at 1133 * 1134 * http://www.apache.org/licenses/LICENSE-2.0 1135 * 1136 * Unless required by applicable law or agreed to in writing, software 1137 * distributed under the License is distributed on an "AS IS" BASIS, 1138 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1139 * See the License for the specific language governing permissions and 1140 * limitations under the License. 1141 */const fz="http://localhost";class Do extends fw{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new Do(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):zs("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
1141once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:s,...o}=n;if(!r||!s)return null;const a=new Do(r,s);return a.idToken=o.idToken||void 0,a.accessToken=o.accessToken||void 0,a.secret=o.secret,a.nonce=o.nonce,a.pendingToken=o.pendingToken||null,a}_getIdTokenResponse(t){const n=this.buildRequest();return Oa(t,n)}_linkToIdToken(t,n){const r=this.buildRequest();return r.idToken=n,Oa(t,r)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,Oa(t,n)}buildRequest(){const t={requestUri:fz,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),t.postBody=Al(n)}return t}}/** 1142 * @license 1143 * Copyright 2020 Google LLC 1144 * 1145 * Licensed under the Apache License, Version 2.0 (the "License"); 1146 * you may not use this file except in compliance with the License. 1147 * You may obtain a copy of the License at 1148 * 1149 * http://www.apache.org/licenses/LICENSE-2.0 1150 * 1151 * Unless required by applicable law or agreed to in writing, software 1152 * distributed under the License is distributed on an "AS IS" BASIS, 1153 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1154 * See the License for the specific language governing permissions and 1155 * limitations under the License. 1156 */async function FS(e,t){return Qr(e,"POST","/v1/accounts:sendVerificationCode",vs(e,t))}async function mz(e,t){return om(e,"POST","/v1/accounts:signInWithPhoneNumber",vs(e,t))}async function pz(e,t){const n=await om(e,"POST","/v1/accounts:signInWithPhoneNumber",vs(e,t));if(n.temporaryProof)throw Zl(e,"account-exists-with-different-credential",n);return n}const gz={USER_NOT_FOUND:"user-not-found"};async function yz(e,t){const n={...t,operation:"REAUTH"};return om(e,"POST","/v1/accounts:signInWithPhoneNumber",vs(e,n),gz)}/** 1157 * @license 1158 * Copyright 2020 Google LLC 1159 * 1160 * Licensed under the Apache License, Version 2.0 (the "License"); 1161 * you may not use this file except in compliance with the License. 1162 * You may obtain a copy of the License at 1163 * 1164 * http://www.apache.org/licenses/LICENSE-2.0 1165 * 1166 * Unless required by applicable law or agreed to in writing, software 1167 * distributed under the License is distributed on an "AS IS" BASIS, 1168 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1169 * See the License for the specific language governing permissions and 1170 * limitations under the License. 1171 */class bc extends fw{constructor(t){super("phone","phone"),this.params=t}static _fromVerification(t,n){return new bc({verificationId:t,verificationCode:n})}static _fromTokenResponse(t,n){return new bc({phoneNumber:t,temporaryProof:n})}_getIdTokenResponse(t){return mz(t,this._makeVerificationRequest())}_linkToIdToken(t,n){return pz(t,{idToken:n,...this._makeVerificationRequest()})}_getReauthenticationResolver(t){return yz(t,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:t,phoneNumber:n,verificationId:r,verificationCode:s}=this.params;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:s}}toJSON(){const t={providerId:this.providerId};return this.params.phoneNumber&&(t.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(t.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(t.verificationCode=this.params.verificationCode),this.params.verificationId&&(t.verificationId=this.params.verificationId),t}static fromJSON(t){typeof t=="string"&&(t=JSON.parse(t));const{verificationId:n,verificationCode:r,phoneNumber:s,temporaryProof:o}=t;return!r&&!n&&!s&&!o?null:new bc({verificationId:n,verificationCode:r,phoneNumber:s,temporaryProof:o})}}/** 1172 * @license 1173 * Copyright 2020 Google LLC 1174 * 1175 * Licensed under the Apache License, Version 2.0 (the "License"); 1176 * you may not use this file except in compliance with the License. 1177 * You may obtain a copy of the License at 1178 * 1179 * http://www.apache.org/licenses/LICENSE-2.0 1180 * 1181 * Unless required by applicable law or agreed to in writing, softw
1181are 1182 * distributed under the License is distributed on an "AS IS" BASIS, 1183 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1184 * See the License for the specific language governing permissions and 1185 * limitations under the License. 1186 */class jI{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/** 1187 * @license 1188 * Copyright 2019 Google LLC 1189 * 1190 * Licensed under the Apache License, Version 2.0 (the "License"); 1191 * you may not use this file except in compliance with the License. 1192 * You may obtain a copy of the License at 1193 * 1194 * http://www.apache.org/licenses/LICENSE-2.0 1195 * 1196 * Unless required by applicable law or agreed to in writing, software 1197 * distributed under the License is distributed on an "AS IS" BASIS, 1198 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1199 * See the License for the specific language governing permissions and 1200 * limitations under the License. 1201 */class Mu extends jI{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/** 1202 * @license 1203 * Copyright 2020 Google LLC 1204 * 1205 * Licensed under the Apache License, Version 2.0 (the "License"); 1206 * you may not use this file except in compliance with the License. 1207 * You may obtain a copy of the License at 1208 * 1209 * http://www.apache.org/licenses/LICENSE-2.0 1210 * 1211 * Unless required by applicable law or agreed to in writing, software 1212 * distributed under the License is distributed on an "AS IS" BASIS, 1213 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1214 * See the License for the specific language governing permissions and 1215 * limitations under the License. 1216 */class ci extends Mu{constructor(){super("facebook.com")}static credential(t){return Do._fromParams({providerId:ci.PROVIDER_ID,signInMethod:ci.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return ci.credentialFromTaggedObject(t)}static credentialFromError(t){return ci.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return ci.credential(t.oauthAccessToken)}catch{return null}}}ci.FACEBOOK_SIGN_IN_METHOD="facebook.com";ci.PROVIDER_ID="facebook.com";/** 1217 * @license 1218 * Copyright 2020 Google LLC 1219 * 1220 * Licensed under the Apache License, Version 2.0 (the "License"); 1221 * you may not use this file except in compliance with the License. 1222 * You may obtain a copy of the License at 1223 * 1224 * http://www.apache.org/licenses/LICENSE-2.0 1225 * 1226 * Unless required by applicable law or agreed to in writing, software 1227 * distributed under the License is distributed on an "AS IS" BASIS, 1228 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1229 * See the License for the specific language governing permissions and 1230 * limitations under the License. 1231 */class ui extends Mu{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return Do._fromParams({providerId:ui.PROVIDER_ID,signInMethod:ui.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return ui.credentialFromTaggedObject(t)}static credentialFromError(t){return ui.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return ui.credential(n,r)}catch{return null}}}ui.GOOGLE_SIGN_IN_METHOD="google.com";ui.PROVIDER_ID="google.com";/** 1232 * @license 1233 * Copyright 2020 Google LLC 1234 * 1235 * Licensed under the Apache License, Version 2.0 (the "License"); 1236 * you may not use this file except in compliance with the License. 1237 * You may obtain a copy of the License at 1238 * 1239 * http://www.apache.org/licenses/LICENSE-2.0 1240 * 1241 * Unless required by applicable law or agreed to in writing, software 1242 * distributed under the License is distributed on an "AS IS" BASIS, 1243 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1244 * See the License for the specific language governing permissions and 1245 * limitations under the License. 1246 */class di extends Mu{constructor(){super("github.com")}static credential(t){return Do._fromParams({providerId:di.PROVIDER_ID,signInMethod:di.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return di.credentialFromTaggedObject(t)}static credentialFromError(t){return di.credentialFromTaggedObject(t.customData||{})}
1246static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return di.credential(t.oauthAccessToken)}catch{return null}}}di.GITHUB_SIGN_IN_METHOD="github.com";di.PROVIDER_ID="github.com";/** 1247 * @license 1248 * Copyright 2020 Google LLC 1249 * 1250 * Licensed under the Apache License, Version 2.0 (the "License"); 1251 * you may not use this file except in compliance with the License. 1252 * You may obtain a copy of the License at 1253 * 1254 * http://www.apache.org/licenses/LICENSE-2.0 1255 * 1256 * Unless required by applicable law or agreed to in writing, software 1257 * distributed under the License is distributed on an "AS IS" BASIS, 1258 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1259 * See the License for the specific language governing permissions and 1260 * limitations under the License. 1261 */class hi extends Mu{constructor(){super("twitter.com")}static credential(t,n){return Do._fromParams({providerId:hi.PROVIDER_ID,signInMethod:hi.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return hi.credentialFromTaggedObject(t)}static credentialFromError(t){return hi.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return hi.credential(n,r)}catch{return null}}}hi.TWITTER_SIGN_IN_METHOD="twitter.com";hi.PROVIDER_ID="twitter.com";/** 1262 * @license 1263 * Copyright 2020 Google LLC 1264 * 1265 * Licensed under the Apache License, Version 2.0 (the "License"); 1266 * you may not use this file except in compliance with the License. 1267 * You may obtain a copy of the License at 1268 * 1269 * http://www.apache.org/licenses/LICENSE-2.0 1270 * 1271 * Unless required by applicable law or agreed to in writing, software 1272 * distributed under the License is distributed on an "AS IS" BASIS, 1273 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1274 * See the License for the specific language governing permissions and 1275 * limitations under the License. 1276 */class ll{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,n,r,s=!1){const o=await Ur._fromIdTokenResponse(t,r,s),a=BS(r);return new ll({user:o,providerId:a,_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){await t._updateTokensIfNecessary(r,!0);const s=BS(r);return new ll({user:t,providerId:s,_tokenResponse:r,operationType:n})}}function BS(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/** 1277 * @license 1278 * Copyright 2020 Google LLC 1279 * 1280 * Licensed under the Apache License, Version 2.0 (the "License"); 1281 * you may not use this file except in compliance with the License. 1282 * You may obtain a copy of the License at 1283 * 1284 * http://www.apache.org/licenses/LICENSE-2.0 1285 * 1286 * Unless required by applicable law or agreed to in writing, software 1287 * distributed under the License is distributed on an "AS IS" BASIS, 1288 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1289 * See the License for the specific language governing permissions and 1290 * limitations under the License. 1291 */class hf extends eo{constructor(t,n,r,s){super(n.code,n.message),this.operationType=r,this.user=s,Object.setPrototypeOf(this,hf.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,s){return new hf(t,n,r,s)}}function kI(e,t,n,r){return(t==="reauthenticate"?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?hf._fromErrorAndOperation(e,o,t,r):o})}async function vz(e,t,n=!1){const r=await ou(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return ll._forOperation(e,"link",r)}/** 1292 * @license 1293 * Copyright 2019 Google LLC 1294 * 1295 * Licensed under the Apache License, Version 2.0 (the "License"); 1296 * you may not use this file except in compliance with the License. 1297 * You may obtain a copy of the License at 1298 * 1299 * http://www.apache.org/licenses/LICENSE-2.0 1300 * 1301 * Unless required by applicable law or agreed to in writing, softw
1301are 1302 * distributed under the License is distributed on an "AS IS" BASIS, 1303 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1304 * See the License for the specific language governing permissions and 1305 * limitations under the License. 1306 */async function xz(e,t,n=!1){const{auth:r}=e;if(os(r.app))return Promise.reject($i(r));const s="reauthenticate";try{const o=await ou(e,kI(r,s,t,e),n);be(o.idToken,r,"internal-error");const a=uw(o.idToken);be(a,r,"internal-error");const{sub:l}=a;return be(e.uid===l,r,"user-mismatch"),ll._forOperation(e,s,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&zs(r,"user-mismatch"),o}}/** 1307 * @license 1308 * Copyright 2020 Google LLC 1309 * 1310 * Licensed under the Apache License, Version 2.0 (the "License"); 1311 * you may not use this file except in compliance with the License. 1312 * You may obtain a copy of the License at 1313 * 1314 * http://www.apache.org/licenses/LICENSE-2.0 1315 * 1316 * Unless required by applicable law or agreed to in writing, software 1317 * distributed under the License is distributed on an "AS IS" BASIS, 1318 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1319 * See the License for the specific language governing permissions and 1320 * limitations under the License. 1321 */async function NI(e,t,n=!1){if(os(e.app))return Promise.reject($i(e));const r="signIn",s=await kI(e,r,t),o=await ll._fromIdTokenResponse(e,r,s);return n||await e._updateCurrentUser(o.user),o}async function wz(e,t){return NI(to(e),t)}function bz(e,t,n,r){return Wo(e).onIdTokenChanged(t,n,r)}function Sz(e,t,n){return Wo(e).beforeAuthStateChanged(t,n)}/** 1322 * @license 1323 * Copyright 2020 Google LLC 1324 * 1325 * Licensed under the Apache License, Version 2.0 (the "License"); 1326 * you may not use this file except in compliance with the License. 1327 * You may obtain a copy of the License at 1328 * 1329 * http://www.apache.org/licenses/LICENSE-2.0 1330 * 1331 * Unless required by applicable law or agreed to in writing, software 1332 * distributed under the License is distributed on an "AS IS" BASIS, 1333 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1334 * See the License for the specific language governing permissions and 1335 * limitations under the License. 1336 */function US(e,t){return Qr(e,"POST","/v2/accounts/mfaEnrollment:start",vs(e,t))}const ff="__sak";/** 1337 * @license 1338 * Copyright 2019 Google LLC 1339 * 1340 * Licensed under the Apache License, Version 2.0 (the "License"); 1341 * you may not use this file except in compliance with the License. 1342 * You may obtain a copy of the License at 1343 * 1344 * http://www.apache.org/licenses/LICENSE-2.0 1345 * 1346 * Unless required by applicable law or agreed to in writing, software 1347 * distributed under the License is distributed on an "AS IS" BASIS, 1348 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1349 * See the License for the specific language governing permissions and 1350 * limitations under the License. 1351 */class CI{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(ff,"1"),this.storage.removeItem(ff),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 1352 * @license 1353 * Copyright 2020 Google LLC 1354 * 1355 * Licensed under the Apache License, Version 2.0 (the "License"); 1356 * you may not use this file except in compliance with the License. 1357 * You may obtain a copy of the License at 1358 * 1359 * http://www.apache.org/licenses/LICENSE-2.0 1360 * 1361 * Unless required by applicable law or agreed to in writing, software 1362 * distributed under the License is distributed on an "AS IS" BASIS, 1363 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1364 * See the License for the specific language governing permissions and 1365 * limitations under the License. 1366 */const jz=1e3,kz=10;class EI extends CI{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=vI(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),s=this.localCache[n];r!==s&&t(n,s,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((a,l,c)=>{this.notifyListeners(a,c)});return}const r=t.key;n?this.detachListener():this.stopPolling();const s=()=>{const a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);zV()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(s,kz):s()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const s of Array.from(r))s(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},jz)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,n){await super._set(t,n),this.localCache[t]=JSON.stringify(n)}async _get(t){const n=await super._get(t);return this.localCache[t]=JSON.stringify(n),n}async _remove(t){await super._remove(t),delete this.localCache[t]}}EI.type="LOCAL";const Nz=EI;/** 1367 * @license 1368 * Copyright 2020 Google LLC 1369 * 1370 * Licensed under the Apache License, Version 2.0 (the "License");
1371 * you may not use this file except in compliance with the License. 1372 * You may obtain a copy of the License at 1373 * 1374 * http://www.apache.org/licenses/LICENSE-2.0 1375 * 1376 * Unless required by applicable law or agreed to in writing, software 1377 * distributed under the License is distributed on an "AS IS" BASIS, 1378 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1379 * See the License for the specific language governing permissions and 1380 * limitations under the License. 1381 */class TI extends CI{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,n){}_removeListener(t,n){}}TI.type="SESSION";const PI=TI;/** 1382 * @license 1383 * Copyright 2019 Google LLC 1384 * 1385 * Licensed under the Apache License, Version 2.0 (the "License"); 1386 * you may not use this file except in compliance with the License. 1387 * You may obtain a copy of the License at 1388 * 1389 * http://www.apache.org/licenses/LICENSE-2.0 1390 * 1391 * Unless required by applicable law or agreed to in writing, software 1392 * distributed under the License is distributed on an "AS IS" BASIS, 1393 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1394 * See the License for the specific language governing permissions and 1395 * limitations under the License. 1396 */function Cz(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(n){return{fulfilled:!1,reason:n}}}))}/** 1397 * @license 1398 * Copyright 2019 Google LLC 1399 * 1400 * Licensed under the Apache License, Version 2.0 (the "License"); 1401 * you may not use this file except in compliance with the License. 1402 * You may obtain a copy of the License at 1403 * 1404 * http://www.apache.org/licenses/LICENSE-2.0 1405 * 1406 * Unless required by applicable law or agreed to in writing, software 1407 * distributed under the License is distributed on an "AS IS" BASIS, 1408 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1409 * See the License for the specific language governing permissions and 1410 * limitations under the License. 1411 */class am{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(s=>s.isListeningto(t));if(n)return n;const r=new am(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const n=t,{eventId:r,eventType:s,data:o}=n.data,a=this.handlersMap[s];if(!(a!=null&&a.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:s});const l=Array.from(a).map(async u=>u(n.origin,o)),c=await Cz(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:c})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}am.receivers=[];/** 1412 * @license 1413 * Copyright 2020 Google LLC 1414 * 1415 * Licensed under the Apache License, Version 2.0 (the "License"); 1416 * you may not use this file except in compliance with the License. 1417 * You may obtain a copy of the License at 1418 * 1419 * http://www.apache.org/licenses/LICENSE-2.0 1420 * 1421 * Unless required by applicable law or agreed to in writing, software 1422 * distributed under the License is distributed on an "AS IS" BASIS, 1423 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1424 * See the License for the specific language governing permissions and 1425 * limitations under the License. 1426 */function mw(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(Math.random()*10);return e+n}/** 1427 * @license 1428 * Copyright 2019 Google LLC 1429 * 1430 * Licensed under the Apache License, Version 2.0 (the "License"); 1431 * you may not use this file except in compliance with the License. 1432 * You may obtain a copy of the License at 1433 * 1434 * http://www.apache.org/licenses/LICENSE-2.0 1435 * 1436 * Unless required by applicable law or agreed to in writing, softw
1436are 1437 * distributed under the License is distributed on an "AS IS" BASIS, 1438 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1439 * See the License for the specific language governing permissions and 1440 * limitations under the License. 1441 */class Ez{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,n,r=50){const s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let o,a;return new Promise((l,c)=>{const u=mw("",20);s.port1.start();const h=setTimeout(()=>{c(new Error("unsupported_event"))},r);a={messageChannel:s,onMessage(f){const p=f;if(p.data.eventId===u)switch(p.data.status){case"ack":clearTimeout(h),o=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),l(p.data.response);break;default:clearTimeout(h),clearTimeout(o),c(new Error("invalid_response"));break}}},this.handlers.add(a),s.port1.addEventListener("message",a.onMessage),this.target.postMessage({eventType:t,eventId:u,data:n},[s.port2])}).finally(()=>{a&&this.removeMessageHandler(a)})}}/** 1442 * @license 1443 * Copyright 2020 Google LLC 1444 * 1445 * Licensed under the Apache License, Version 2.0 (the "License"); 1446 * you may not use this file except in compliance with the License. 1447 * You may obtain a copy of the License at 1448 * 1449 * http://www.apache.org/licenses/LICENSE-2.0 1450 * 1451 * Unless required by applicable law or agreed to in writing, software 1452 * distributed under the License is distributed on an "AS IS" BASIS, 1453 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1454 * See the License for the specific language governing permissions and 1455 * limitations under the License. 1456 */function Vt(){return window}function Tz(e){Vt().location.href=e}/** 1457 * @license 1458 * Copyright 2020 Google LLC. 1459 * 1460 * Licensed under the Apache License, Version 2.0 (the "License"); 1461 * you may not use this file except in compliance with the License. 1462 * You may obtain a copy of the License at 1463 * 1464 * http://www.apache.org/licenses/LICENSE-2.0 1465 * 1466 * Unless required by applicable law or agreed to in writing, software 1467 * distributed under the License is distributed on an "AS IS" BASIS, 1468 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1469 * See the License for the specific language governing permissions and 1470 * limitations under the License. 1471 */function pw(){return typeof Vt().WorkerGlobalScope<"u"&&typeof Vt().importScripts=="function"}async function Pz(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function Iz(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)==null?void 0:e.controller)||null}function Az(){return pw()?self:null}/** 1472 * @license 1473 * Copyright 2019 Google LLC 1474 * 1475 * Licensed under the Apache License, Version 2.0 (the "License"); 1476 * you may not use this file except in compliance with the License. 1477 * You may obtain a copy of the License at 1478 * 1479 * http://www.apache.org/licenses/LICENSE-2.0 1480 * 1481 * Unless required by applicable law or agreed to in writing, software 1482 * distributed under the License is distributed on an "AS IS" BASIS, 1483 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1484 * See the License for the specific language governing permissions and 1485 * limitations under the License. 1486 */const II="firebaseLocalStorageDb",Rz=1,mf="firebaseLocalStorage",AI="fbase_key";class Lu{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function lm(e,t){return e.transaction([mf],t?"readwrite":"readonly").objectStore(mf)}function _z(){const e=indexedDB.deleteDatabase(II);return new Lu(e).toPromise()}function $y(){const e=indexedDB.open(II,Rz);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(mf,{keyPath:AI})}catch(s){n(s)}}),e.addEventListener("success",async()=>{const r=e.result;r.objectStoreNames.contains(mf)?t(r):(r.close(),await _z(),t(await $y()))})})}async function VS(e,t,n){const r=lm(e,!0).put({[AI]:t,value:n});
1486return new Lu(r).toPromise()}async function Oz(e,t){const n=lm(e,!1).get(t),r=await new Lu(n).toPromise();return r===void 0?null:r.value}function zS(e,t){const n=lm(e,!0).delete(t);return new Lu(n).toPromise()}const Mz=800,Lz=3;class RI{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:(this.db=await $y(),this.db)}async _withRetries(t){let n=0;for(;;)try{const r=await this._openDb();return await t(r)}catch(r){if(n++>Lz)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return pw()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=am._getInstance(Az()),this.receiver._subscribe("keyChanged",async(t,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1486)),this.receiver._subscribe("ping",async(t,n)=>["keyChanged"])}async initializeSender(){var n,r;if(this.activeServiceWorker=await Pz(),!this.activeServiceWorker)return;this.sender=new Ez(this.activeServiceWorker);const t=await this.sender._send("ping",{},800);t&&(n=t[0])!=null&&n.fulfilled&&(r=t[0])!=null&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||Iz()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const t=await $y();return await VS(t,ff,"1"),await zS(t,ff),!0}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>VS(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)))}async _get(t){const n=await this._withRetries(r=>Oz(r,t));return this.localCache[t]=n,n}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(n=>zS(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){const t=await this._withRetries(s=>{const o=lm(s,!1).getAll();return new Lu(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:s,value:o}of t)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),n.push(s));for(const s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),n.push(s));return n}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const s of Array.from(r))s(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),Mz)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}RI.type="LOCAL";const $z=RI;/** 1487 * @license 1488 * Copyright 2020 Google LLC 1489 * 1490 * Licensed under the Apache License, Version 2.0 (the "License"); 1491 * you may not use this file except in compliance with the License. 1492 * You may obtain a copy of the License at 1493 * 1494 * http://www.apache.org/licenses/LICENSE-2.0 1495 * 1496 * Unless required by applicable law or agreed to in writing, software 1497 * distributed under the License is distributed on an "AS IS" BASIS, 1498 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1499 * See the License for the specific language governing permissions and 1500 * limitations under the License. 1501 */function WS(e,t){return Qr(e,"POST","/v2/accounts/mfaSignIn:start",vs(e,t))}/** 1502 * @license 1503 * Copyright 2020 Google LLC 1504 * 1505 * Licensed under the Apache License, Version 2.0 (the "License"); 1506 * you may not use this file except in compliance with the License. 1507 * You may obtain a copy of the License at 1508 * 1509 * http://www.apache.org/licenses/LICENSE-2.0 1510 * 1511 * Unless required by applicable law or agreed to in writing, software 1512 * distributed under the License is distributed on an "AS IS" BASIS, 1513 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1514 * See the License for the specific language governing permissions and 1515 * limitations under the License. 1516 */const Ep=wI("rcb"),Dz=new _u(3e4,6e4);class Fz{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!((t=Vt().grecaptcha)!=null&&t.render)}load(t,n=""){return be(Bz(n),t,"argument-error"),this.shouldResolveImmediately(n)&&AS(Vt().grecaptcha)?Promise.resolve(Vt().grecaptcha):new Promise((r,s)=>{const o=Vt().setTimeout(()=>{s(or(t,"network-request-failed"))},Dz.get());Vt()[Ep]=()=>{Vt().clearTimeout(o),delete Vt()[Ep];const l=Vt().grecaptcha;if(!l||!AS(l)){s(or(t,"internal-error"));return}const c=l.render;l.render=(u,h)=>{const f=c(u,h);return this.counter++,f},this.hostLanguage=n,r(l)};const a=`${JV()}?${Al({onload:Ep,render:"explicit",hl:n}
1516)}`;hw(a).catch(()=>{clearTimeout(o),s(or(t,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(t){var n;return!!((n=Vt().grecaptcha)!=null&&n.render)&&(t===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function Bz(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class Uz{async load(t){return new tz(t)}clearedOneInstance(){}}/** 1517 * @license 1518 * Copyright 2020 Google LLC 1519 * 1520 * Licensed under the Apache License, Version 2.0 (the "License"); 1521 * you may not use this file except in compliance with the License. 1522 * You may obtain a copy of the License at 1523 * 1524 * http://www.apache.org/licenses/LICENSE-2.0 1525 * 1526 * Unless required by applicable law or agreed to in writing, software 1527 * distributed under the License is distributed on an "AS IS" BASIS, 1528 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1529 * See the License for the specific language governing permissions and 1530 * limitations under the License. 1531 */const Sc="recaptcha",Vz={theme:"light",type:"image"};class zz{constructor(t,n,r={...Vz}){this.parameters=r,this.type=Sc,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=to(t),this.isInvisible=this.parameters.size==="invisible",be(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");const s=typeof n=="string"?document.getElementById(n):n;be(s,this.auth,"argument-error"),this.container=s,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Uz:new Fz,this.validateStartingState()}async verify(){this.assertNotDestroyed();const t=await this.render(),n=this.getAssertedRecaptcha(),r=n.getResponse(t);return r||new Promise(s=>{const o=a=>{a&&(this.tokenChangeListeners.delete(o),s(a))};this.tokenChangeListeners.add(o),this.isInvisible&&n.execute(t)})}render(){try{this.assertNotDestroyed()}catch(t){return Promise.reject(t)}return this.renderPromise?this.renderPromise:(this.renderPromise=this.makeRenderPromise().catch(t=>{throw this.renderPromise=null,t}),this.renderPromise)}_reset(){this.assertNotDestroyed(),this.widgetId!==null&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(t=>{this.container.removeChild(t)})}validateStartingState(){be(!this.parameters.sitekey,this.auth,"argument-error"),be(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),be(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(t){return n=>{if(this.tokenChangeListeners.forEach(r=>r(n)),typeof t=="function")t(n);else if(typeof t=="string"){const r=Vt()[t];typeof r=="function"&&r(n)}}}assertNotDestroyed(){be(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let t=this.container;if(!this.isInvisible){const n=document.createElement("div");t.appendChild(n),t=n}this.widgetId=this.getAssertedRecaptcha().render(t,this.parameters)}return this.widgetId}
1531async init(){be(rI()&&!pw(),this.auth,"internal-error"),await Wz(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const t=await _V(this.auth);be(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return be(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}function Wz(){let e=null;return new Promise(t=>{if(document.readyState==="complete"){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})}/** 1532 * @license 1533 * Copyright 2020 Google LLC 1534 * 1535 * Licensed under the Apache License, Version 2.0 (the "License"); 1536 * you may not use this file except in compliance with the License. 1537 * You may obtain a copy of the License at 1538 * 1539 * http://www.apache.org/licenses/LICENSE-2.0 1540 * 1541 * Unless required by applicable law or agreed to in writing, software 1542 * distributed under the License is distributed on an "AS IS" BASIS, 1543 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1544 * See the License for the specific language governing permissions and 1545 * limitations under the License. 1546 */class Gz{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=bc._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}async function Hz(e,t,n){if(os(e.app))return Promise.reject($i(e));const r=to(e),s=await qz(r,t,Wo(n));return new Gz(s,o=>wz(r,o))}async function qz(e,t,n){var r;if(!e._getRecaptchaConfig())try{await az(e)}catch{console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let s;if(typeof t=="string"?s={phoneNumber:t}:s=t,"session"in s){const o=s.session;if("phoneNumber"in s){be(o.type==="enroll",e,"internal-error");const a={idToken:o.credential,phoneEnrollmentInfo:{phoneNumber:s.phoneNumber,clientType:"CLIENT_TYPE_WEB"}};return(await Cp(e,a,"mfaSmsEnrollment",async(h,f)=>{if(f.phoneEnrollmentInfo.captchaResponse===wc){be((n==null?void 0:n.type)===Sc,h,"argument-error");const p=await Tp(h,f,n);return US(h,p)}return US(h,f)},"PHONE_PROVIDER").catch(h=>Promise.reject(h))).phoneSessionInfo.sessionInfo}else{be(o.type==="signin",e,"internal-error");const a=((r=s.multiFactorHint)==null?void 0:r.uid)||s.multiFactorUid;be(a,e,"missing-multi-factor-info");const l={mfaPendingCredential:o.credential,mfaEnrollmentId:a,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}};return(await Cp(e,l,"mfaSmsSignIn",async(f,p)=>{if(p.phoneSignInInfo.captchaResponse===wc){be((n==null?void 0:n.type)===Sc,f,"argument-error");const d=await Tp(f,p,n);return WS(f,d)}return WS(f,p)},"PHONE_PROVIDER").catch(f=>Promise.reject(f))).phoneResponseInfo.sessionInfo}}else{const o={phoneNumber:s.phoneNumber,clientType:"CLIENT_TYPE_WEB"};return(await Cp(e,o,"sendVerificationCode",async(u,h)=>{if(h.captchaResponse===wc){be((n==null?void 0:n.type)===Sc,u,"argument-error");const f=await Tp(u,h,n);return FS(u,f)}return FS(u,h)},"PHONE_PROVIDER").catch(u=>Promise.reject(u))).sessionInfo}}finally{n==null||n._reset()}}async function Tp(e,t,n){be(n.type===Sc,e,"argument-error");const r=await n.verify();be(typeof r=="string",e,"argument-error");const s={...t};if("phoneEnrollmentInfo"in s){const o=s.phoneEnrollmentInfo.phoneNumber,a=s.phoneEnrollmentInfo.captchaResponse,l=s.phoneEnrollmentInfo.clientType,c=s.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(s,{phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r,captchaResponse:a,clientType:l,recaptchaVersion:c}}),s}else if("phoneSignInInfo"in s){const o=s.phoneSignInInfo.captchaResponse,a=s.phoneSignInInfo.clientType,l=s.phoneSignInInfo.recaptchaVersion;return Object.assign(s,{phoneSignInInfo:{recaptchaToken:r,captchaResponse:o,clientType:a,recaptchaVersion:l}}),s}else return Object.assign(s,{recaptchaToken:r}),s}/** 1547 * @license 1548 * Copyright 2021 Google LLC 1549 * 1550 * Licensed under the Apache License, Version 2.0 (the "License"); 1551 * you may not use this file except in compliance with the License. 1552 * You may obtain a copy of the License at 1553 * 1554 * http://www.apache.org/licenses/LICENSE-2.0 1555 * 1556 * Unless required by applicable law or agreed to in writing, softw
1556are 1557 * distributed under the License is distributed on an "AS IS" BASIS, 1558 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1559 * See the License for the specific language governing permissions and 1560 * limitations under the License. 1561 */function Kz(e,t){return t?Rs(t):(be(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/** 1562 * @license 1563 * Copyright 2019 Google LLC 1564 * 1565 * Licensed under the Apache License, Version 2.0 (the "License"); 1566 * you may not use this file except in compliance with the License. 1567 * You may obtain a copy of the License at 1568 * 1569 * http://www.apache.org/licenses/LICENSE-2.0 1570 * 1571 * Unless required by applicable law or agreed to in writing, software 1572 * distributed under the License is distributed on an "AS IS" BASIS, 1573 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1574 * See the License for the specific language governing permissions and 1575 * limitations under the License. 1576 */class gw extends fw{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Oa(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Oa(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Oa(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={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 t&&(n.idToken=t),n}}function Yz(e){return NI(e.auth,new gw(e),e.bypassAuthState)}function Jz(e){const{auth:t,user:n}=e;return be(n,t,"internal-error"),xz(n,new gw(e),e.bypassAuthState)}async function Qz(e){const{auth:t,user:n}=e;return be(n,t,"internal-error"),vz(n,new gw(e),e.bypassAuthState)}/** 1577 * @license 1578 * Copyright 2020 Google LLC 1579 * 1580 * Licensed under the Apache License, Version 2.0 (the "License"); 1581 * you may not use this file except in compliance with the License. 1582 * You may obtain a copy of the License at 1583 * 1584 * http://www.apache.org/licenses/LICENSE-2.0 1585 * 1586 * Unless required by applicable law or agreed to in writing, software 1587 * distributed under the License is distributed on an "AS IS" BASIS, 1588 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1589 * See the License for the specific language governing permissions and 1590 * limitations under the License. 1591 */class _I{constructor(t,n,r,s,o=!1){this.auth=t,this.resolver=r,this.user=s,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(t,n)=>{this.pendingPromise={resolve:t,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(t){const{urlResponse:n,sessionId:r,postBody:s,tenantId:o,error:a,type:l}=t;if(a){this.reject(a);return}const c={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(c))}catch(u){this.reject(u)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return Yz;case"linkViaPopup":case"linkViaRedirect":return Qz;case"reauthViaPopup":case"reauthViaRedirect":return Jz;default:zs(this.auth,"internal-error")}}resolve(t){Ws(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Ws(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** 1592 * @license 1593 * Copyright 2020 Google LLC 1594 * 1595 * Licensed under the Apache License, Version 2.0 (the "License"); 1596 * you may not use this file except in compliance with the License. 1597 * You may obtain a copy of the License at 1598 * 1599 * http://www.apache.org/licenses/LICENSE-2.0 1600 * 1601 * Unless required by applicable law or agreed to in writing, softw
1601are 1602 * distributed under the License is distributed on an "AS IS" BASIS, 1603 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1604 * See the License for the specific language governing permissions and 1605 * limitations under the License. 1606 */const Xz=new _u(2e3,1e4);class wa extends _I{constructor(t,n,r,s,o){super(t,n,s,o),this.provider=r,this.authWindow=null,this.pollId=null,wa.currentPopupAction&&wa.currentPopupAction.cancel(),wa.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return be(t,this.auth,"internal-error"),t}async onExecution(){Ws(this.filter.length===1,"Popup operations only handle one event");const t=mw();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(or(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)==null?void 0:t.associatedEvent)||null}cancel(){this.reject(or(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,wa.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if((r=(n=this.authWindow)==null?void 0:n.window)!=null&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(or(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,Xz.get())};t()}}wa.currentPopupAction=null;/** 1607 * @license 1608 * Copyright 2020 Google LLC 1609 * 1610 * Licensed under the Apache License, Version 2.0 (the "License"); 1611 * you may not use this file except in compliance with the License. 1612 * You may obtain a copy of the License at 1613 * 1614 * http://www.apache.org/licenses/LICENSE-2.0 1615 * 1616 * Unless required by applicable law or agreed to in writing, software 1617 * distributed under the License is distributed on an "AS IS" BASIS, 1618 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1619 * See the License for the specific language governing permissions and 1620 * limitations under the License. 1621 */const Zz="pendingRedirect",lh=new Map;class eW extends _I{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let t=lh.get(this.auth._key());if(!t){try{const r=await tW(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}lh.set(this.auth._key(),t)}return this.bypassAuthState||lh.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=await this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tW(e,t){const n=sW(t),r=rW(e);if(!await r._isAvailable())return!1;const s=await r._get(n)==="true";return await r._remove(n),s}function nW(e,t){lh.set(e._key(),t)}function rW(e){return Rs(e._redirectPersistence)}function sW(e){return ah(Zz,e.config.apiKey,e.name)}async function iW(e,t,n=!1){if(os(e.app))return Promise.reject($i(e));const r=to(e),s=Kz(r,t),a=await new eW(r,s,n).execute();return a&&!n&&(delete a.user._redirectEventId,await r._persistUserIfCurrent(a.user),await r._setRedirectUser(null,t)),a}/** 1622 * @license 1623 * Copyright 2020 Google LLC 1624 * 1625 * Licensed under the Apache License, Version 2.0 (the "License"); 1626 * you may not use this file except in compliance with the License. 1627 * You may obtain a copy of the License at 1628 * 1629 * http://www.apache.org/licenses/LICENSE-2.0 1630 * 1631 * Unless required by applicable law or agreed to in writing, software 1632 * distributed under the License is distributed on an "AS IS" BASIS, 1633 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1634 * See the License for the specific language governing permissions and 1635 * limitations under the License. 1636 */const oW=10*60*1e3;class aW{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=
1636Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(t,r)&&(n=!0,this.sendToConsumer(t,r),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!lW(t)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=t,n=!0)),n}sendToConsumer(t,n){var r;if(t.error&&!OI(t)){const s=((r=t.error.code)==null?void 0:r.split("auth/")[1])||"internal-error";n.onError(or(this.auth,s))}else n.onAuthEvent(t)}isEventForConsumer(t,n){const r=n.eventId===null||!!t.eventId&&t.eventId===n.eventId;return n.filter.includes(t.type)&&r}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=oW&&this.cachedEventUids.clear(),this.cachedEventUids.has(GS(t))}saveEventToCache(t){this.cachedEventUids.add(GS(t)),this.lastProcessedEventTime=Date.now()}}function GS(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function OI({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function lW(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return OI(e);default:return!1}}/** 1637 * @license 1638 * Copyright 2020 Google LLC 1639 * 1640 * Licensed under the Apache License, Version 2.0 (the "License"); 1641 * you may not use this file except in compliance with the License. 1642 * You may obtain a copy of the License at 1643 * 1644 * http://www.apache.org/licenses/LICENSE-2.0 1645 * 1646 * Unless required by applicable law or agreed to in writing, software 1647 * distributed under the License is distributed on an "AS IS" BASIS, 1648 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1649 * See the License for the specific language governing permissions and 1650 * limitations under the License. 1651 */async function cW(e,t={}){return Qr(e,"GET","/v1/projects",t)}/** 1652 * @license 1653 * Copyright 2020 Google LLC 1654 * 1655 * Licensed under the Apache License, Version 2.0 (the "License"); 1656 * you may not use this file except in compliance with the License. 1657 * You may obtain a copy of the License at 1658 * 1659 * http://www.apache.org/licenses/LICENSE-2.0 1660 * 1661 * Unless required by applicable law or agreed to in writing, software 1662 * distributed under the License is distributed on an "AS IS" BASIS, 1663 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1664 * See the License for the specific language governing permissions and 1665 * limitations under the License. 1666 */const uW=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,dW=/^https?/;async function hW(e){if(e.config.emulator)return;const{authorizedDomains:t}=await cW(e);for(const n of t)try{if(fW(n))return}catch{}zs(e,"unauthorized-domain")}function fW(e){const t=My(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const a=new URL(e);return a.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&a.hostname===r}if(!dW.test(n))return!1;if(uW.test(e))return r===e;const s=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(r)}/** 1667 * @license 1668 * Copyright 2020 Google LLC. 1669 * 1670 * Licensed under the Apache License, Version 2.0 (the "License"); 1671 * you may not use this file except in compliance with the License. 1672 * You may obtain a copy of the License at 1673 * 1674 * http://www.apache.org/licenses/LICENSE-2.0 1675 * 1676 * Unless required by applicable law or agreed to in writing, software 1677 * distributed under the License is distributed on an "AS IS" BASIS, 1678 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1679 * See the License for the specific language governing permissions and 1680 * limitations under the License. 1681 */const mW=new _u(3e4,6e4);function HS(){const e=Vt().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function pW(e){return new Promise((t,n)=>{var s,o,a;function r(){HS(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{HS(),n(or(e,"network-request-failed"))},timeout:mW.get()})}if((o=(s=Vt().gapi)==null?void 0:s.iframes)!=null&&o.Iframe)t(gapi.iframes.getContext());else if((a=Vt().gapi)!=null&&a.load)r();else{const l=wI("iframefcb");return Vt()[l]=()=>{gapi.load?r():n(or(e,"network-request-failed"))},hw(`${XV()}?onload=${l}`).catch(c=>n(c))}}).catch(t=>{throw ch=null,t})}let ch=null;function gW(e){return ch=ch||pW(e),ch}/** 1682 * @license 1683 * Copyright 2020 Google LLC. 1684 * 1685 * Licensed under the Apache License, Version 2.0 (the "License");
1686 * you may not use this file except in compliance with the License. 1687 * You may obtain a copy of the License at 1688 * 1689 * http://www.apache.org/licenses/LICENSE-2.0 1690 * 1691 * Unless required by applicable law or agreed to in writing, software 1692 * distributed under the License is distributed on an "AS IS" BASIS, 1693 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1694 * See the License for the specific language governing permissions and 1695 * limitations under the License. 1696 */const yW=new _u(5e3,15e3),vW="__/auth/iframe",xW="emulator/auth/iframe",wW={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},bW=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function SW(e){const t=e.config;be(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?cw(t,xW):`https://${e.config.authDomain}/${vW}`,r={apiKey:t.apiKey,appName:e.name,v:Ru},s=bW.get(e.config.apiHost);s&&(r.eid=s);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Al(r).slice(1)}`}async function jW(e){const t=await gW(e),n=Vt().gapi;return be(n,e,"internal-error"),t.open({where:document.body,url:SW(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:wW,dontclear:!0},r=>new Promise(async(s,o)=>{await r.restyle({setHideOnLeave:!1});const a=or(e,"network-request-failed"),l=Vt().setTimeout(()=>{o(a)},yW.get());function c(){Vt().clearTimeout(l),s(r)}r.ping(c).then(c,()=>{o(a)})}))}/** 1697 * @license 1698 * Copyright 2020 Google LLC. 1699 * 1700 * Licensed under the Apache License, Version 2.0 (the "License"); 1701 * you may not use this file except in compliance with the License. 1702 * You may obtain a copy of the License at 1703 * 1704 * http://www.apache.org/licenses/LICENSE-2.0 1705 * 1706 * Unless required by applicable law or agreed to in writing, software 1707 * distributed under the License is distributed on an "AS IS" BASIS, 1708 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1709 * See the License for the specific language governing permissions and 1710 * limitations under the License. 1711 */const kW={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},NW=500,CW=600,EW="_blank",TW="http://localhost";class qS{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function PW(e,t,n,r=NW,s=CW){const o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const c={...kW,width:r.toString(),height:s.toString(),top:o,left:a},u=_n().toLowerCase();n&&(l=fI(u)?EW:n),dI(u)&&(t=t||TW,c.scrollbars="yes");const h=Object.entries(c).reduce((p,[d,w])=>`${p}${d}=${w},`,"");if(VV(u)&&l!=="_self")return IW(t||"",l),new qS(null);const f=window.open(t||"",l,h);be(f,e,"popup-blocked");try{f.focus()}catch{}return new qS(f)}function IW(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** 1712 * @license 1713 * Copyright 2021 Google LLC 1714 * 1715 * Licensed under the Apache License, Version 2.0 (the "License"); 1716 * you may not use this file except in compliance with the License. 1717 * You may obtain a copy of the License at 1718 * 1719 * http://www.apache.org/licenses/LICENSE-2.0 1720 * 1721 * Unless required by applicable law or agreed to in writing, software 1722 * distributed under the License is distributed on an "AS IS" BASIS, 1723 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1724 * See the License for the specific language governing permissions and 1725 * limitations under the License. 1726 */const AW="__/auth/handler",RW="emulator/auth/handler",_W=encodeURIComponent("fac");async function KS(e,t,n,r,s,o){be(e.config.authDomain,e,"auth-domain-config-required"),be(e.config.apiKey,e,"invalid-api-key");const a={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Ru,eventId:s};if(t instanceof jI){t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",l8(t.getCustomParameters())||(a.customParameters=JSON.stringify(t.getCustomParameters()));for(const[h,f]of Object.entries({}))a[h]=f}if(t instanceof Mu){const h=t.getScopes().filter(f=>f!=="");h.length>0&&(a.scopes=h.join(","))}e.tenantId&&(a.tid=e.tenantId);const l=a;for(const h of Object.keys(l))l[h]===void 0&&delete l[h];const c=await e._getAppCheckToken(),u=c?`#${_W}=${encodeURIComponent(c)}`:"";return`${OW(e)}?${Al(l).slice(1)}${u}`}function OW({config:e}){return e.emulator?cw(e,RW):`https://${e.authDomain}/${AW}`}/** 1727 * @license 1728 * Copyright 2020 Google LLC 1729 * 1730 * Licensed under the Apache License, Version 2.0 (the "License");
1731 * you may not use this file except in compliance with the License. 1732 * You may obtain a copy of the License at 1733 * 1734 * http://www.apache.org/licenses/LICENSE-2.0 1735 * 1736 * Unless required by applicable law or agreed to in writing, software 1737 * distributed under the License is distributed on an "AS IS" BASIS, 1738 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1739 * See the License for the specific language governing permissions and 1740 * limitations under the License. 1741 */const Pp="webStorageSupport";class MW{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=PI,this._completeRedirectFn=iW,this._overrideRedirectResult=nW}async _openPopup(t,n,r,s){var a;Ws((a=this.eventManagers[t._key()])==null?void 0:a.manager,"_initialize() not called before _openPopup()");const o=await KS(t,n,r,My(),s);return PW(t,o,mw())}async _openRedirect(t,n,r,s){await this._originValidation(t);const o=await KS(t,n,r,My(),s);return Tz(o),new Promise(()=>{})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:s,promise:o}=this.eventManagers[n];return s?Promise.resolve(s):(Ws(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(t){const n=await jW(t),r=new aW(t);return n.register("authEvent",s=>
1741(be(s==null?void 0:s.authEvent,t,"invalid-auth-event"),{status:r.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(Pp,{type:Pp},s=>{var a;const o=(a=s==null?void 0:s[0])==null?void 0:a[Pp];o!==void 0&&n(!!o),zs(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=hW(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return vI()||hI()||dw()}}const LW=MW;var YS="@firebase/auth",JS="1.12.0";/** 1742 * @license 1743 * Copyright 2020 Google LLC 1744 * 1745 * Licensed under the Apache License, Version 2.0 (the "License"); 1746 * you may not use this file except in compliance with the License. 1747 * You may obtain a copy of the License at 1748 * 1749 * http://www.apache.org/licenses/LICENSE-2.0 1750 * 1751 * Unless required by applicable law or agreed to in writing, software 1752 * distributed under the License is distributed on an "AS IS" BASIS, 1753 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1754 * See the License for the specific language governing permissions and 1755 * limitations under the License. 1756 */class $W{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)==null?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){be(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1757 * @license 1758 * Copyright 2020 Google LLC 1759 * 1760 * Licensed under the Apache License, Version 2.0 (the "License"); 1761 * you may not use this file except in compliance with the License. 1762 * You may obtain a copy of the License at 1763 * 1764 * http://www.apache.org/licenses/LICENSE-2.0 1765 * 1766 * Unless required by applicable law or agreed to in writing, software 1767 * distributed under the License is distributed on an "AS IS" BASIS, 1768 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1769 * See the License for the specific language governing permissions and 1770 * limitations under the License. 1771 */function DW(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function FW(e){su(new al("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),s=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:l}=r.options;be(a&&!a.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:a,authDomain:l,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:xI(e)},u=new KV(r,s,o,c);return cz(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),su(new al("auth-internal",t=>{const n=to(t.getProvider("auth").getImmediate());return(r=>new $W(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Aa(YS,JS,DW(e)),Aa(YS,JS,"esm2020")}/** 1772 * @license 1773 * Copyright 2021 Google LLC 1774 * 1775 * Licensed under the Apache License, Version 2.0 (the "License"); 1776 * you may not use this file except in compliance with the License. 1777 * You may obtain a copy of the License at 1778 * 1779 * http://www.apache.org/licenses/LICENSE-2.0 1780 * 1781 * Unless required by applicable law or agreed to in writing, softw
1781are 1782 * distributed under the License is distributed on an "AS IS" BASIS, 1783 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1784 * See the License for the specific language governing permissions and 1785 * limitations under the License. 1786 */const BW=5*60,UW=HP("authIdTokenMaxAge")||BW;let QS=null;const VW=e=>async t=>{const n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>UW)return;const s=n==null?void 0:n.token;QS!==s&&(QS=s,await fetch(e,{method:s?"POST":"DELETE",headers:s?{Authorization:`Bearer ${s}`}:{}}))};function zW(e=uV()){const t=JP(e,"auth");if(t.isInitialized())return t.getImmediate();const n=lz(e,{popupRedirectResolver:LW,persistence:[$z,Nz,PI]}),r=HP("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=VW(o.toString());Sz(n,a,()=>a(n.currentUser)),bz(n,l=>a(l))}}const s=HU("auth");return s&&uz(n,`http://${s}`),n}function WW(){var e;return((e=document.getElementsByTagName("head"))==null?void 0:e[0])??document}YV({loadJS(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=s=>{const o=or("internal-error");o.customData=s,n(o)},r.type="text/javascript",r.charset="UTF-8",WW().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});FW("Browser");const uh={apiKey:"AIzaSyCnetgr_-ncwYAYRO273I-veIV472WY-vk",authDomain:"gems-b2110.firebaseapp.com",projectId:"gems-b2110",storageBucket:"gems-b2110.firebasestorage.app",messagingSenderId:"1074138261334",appId:"1:1074138261334:web:4bacd8b182f97107b398f7"};let Ip=null,Ap=null;function cm(){if(typeof window>"u"||!uh.apiKey||!uh.projectId)return null;if(!Ip){const e=dV();Ip=e.length?e[0]:QP(uh)}return Ap||(Ap=zW(Ip)),Ap}function $u(){return!!cm()&&!!uh.apiKey}function gs(e,t){const n=e.replace(/\D/g,""),r=t.replace(/\D/g,"");return n.startsWith(r)?`+${n}`:`+${r}${n}`}let ki=null;function GW(e){const t=cm();if(!t)throw new Error("Firebase not initialized");return ki||(ki=new zz(t,e,{size:"invisible",callback:()=>{}}),ki)}async function Du(e,t="recaptcha-container"){const n=cm();if(!n)throw new Error("Firebase not initialized. Add VITE_FIREBASE_* env vars.");const r=GW(t);return await Hz(n,e,r)}async function Fu(e,t){return await e.confirm(t),{success:!0}}async function yw(){const e=cm(),t=e==null?void 0:e.currentUser;if(!t)return null;try{return await t.getIdToken()}catch{return null}}function rr(){ki&&"clear"in ki&&ki.clear(),ki=null}function Bu(e){const t=e,n=e instanceof Error?e.message:(t==null?void 0:t.message)??String(e??""),r=typeof(t==null?void 0:t.code)=="string"?t.code:"",s=`${n} ${r}`.toLowerCase();return s.includes("captcha-check-failed")||s.includes("hostname match not found")||s.includes("invalid_app_credential")||s.includes("invalid app credential")?"This site's domain isn't authorized for phone login. Add it in Firebase Console â Authentication â Settings â Authorized domains (e.g. localhost for dev, or your production hostname). See FIREBASE_SETUP.md.":(n||"Something went wrong").trim()}function vw(){const e="".trim().toLowerCase();return e==="1"||e==="true"||e==="yes"}const pf="gemphere_pending_auth_redirect";function cl(e){if(!e)return null;let t=e;try{t=decodeURIComponent(e)}catch{}return typeof t!="string"||!t.startsWith("/")||t.startsWith("//")?null:t}function xw(e){const t=cl(e);try{t?sessionStorage.setItem(pf,t):sessionStorage.removeItem(pf)}catch{}}function jc(){try{const e=cl(sessionStorage.getItem(pf));return sessionStorage.removeItem(pf),e}catch{return null}}const ul="gemphere_pending_team_invite";function HW(){try{const e=localStorage.getItem(ul)||sessionStorage.getItem(ul);return e&&e.trim()?e.trim():null}catch{return null}}function Io(e){const t=(e||"").trim();if(t)try{localStorage.setItem(ul,t),sessionStorage.setItem(ul,t)}catch{}}function ls(){return HW()}function MI(){try{localStorage.removeItem(ul),sessionStorage.removeItem(ul)}catch{}}function $r(e){return`/onboarding/team/${encodeURIComponent(e)}`}function qW(e){return(Array.isArray(e.goals)?e.goals:[]).some(n=>(n==null?void 0:n.goalType)==="_account_subtype")}function LI(e){return e.isComplete===!0?!0:e.onboardingState===2}function $I(e){var n;return e.accountType==="INDIVIDUAL"?!0:(((n=e.team)==null?void 0:n.plan)||"").toLowerCase().trim()!=="free"?!1:LI(e)}function ww(e){if(LI(e))return!0;
1786if(!qW(e))return!1;const t=e.accountType;return!!t&&t!=="UNSET"}function au(e,t={}){if(e.accountType==="TEAM_MEMBER"||!t.ignorePendingTeamInvite&&(e.hasPendingTeamInvite||e.pendingTeamInviteToken||ls()))return!0;const n=e.teamMember;return!!(n&&(n.role||"").toLowerCase()==="member")}function bw(e,t={}){var s;if(vw()||au(e,t))return!1;const n=e.accountType;if(n==="CONNECTOR"||n==="TEAM_MEMBER"||n==="INDIVIDUAL")return!1;const r=(((s=e.team)==null?void 0:s.plan)||"").toLowerCase().trim();return!r||r==="free"}function KW(e){const t=e.accountType;return t==="CONNECTOR"||t==="TEAM_MEMBER"||t==="INDIVIDUAL"}async function lu(e,t,n,r={}){if(vw()||au(n,r)||KW(n)||$I(n))return!1;if(bw(n,r))return!0;const s=await Nu(e,t,{ignorePendingTeamInvite:r.ignorePendingTeamInvite});return!!s&&!s.allowed}const Uu="/onboarding/enterprise?paymentOnly=1";function YW(e,t={}){const n=t.ignorePendingTeamInvite?null:ls()||(e.pendingTeamInviteToken||"").trim()||null;return n?$r(n):bw(e,t)?Uu:null}function Sw(e,t={}){const n=t.ignorePendingTeamInvite?null:ls()||(e.pendingTeamInviteToken||"").trim()||null;if(n)return $r(n);if(!ww(e))return"/";const r=YW(e,t);return r||jc()||"/home"}async function JW(e,t,n,r={}){const s=Sw(n,r);return s!=="/home"?s:await lu(e,t,n,r)?Uu:"/home"}function DI(e,t={}){const n=t.ignorePendingTeamInvite?null:ls()||(e.pendingTeamInviteToken||"").trim()||null;if(n)return $r(n);if(ww(e))return bw(e,t)?Uu:jc()||"/home";const r=new URLSearchParams;return r.set("step","1"),t.mailboxProvider&&r.set("mailboxProvider",t.mailboxProvider),`/onboarding/enterprise?${r}`}async function QW(e,t,n,r={}){const s=DI(n,r);return s!=="/home"?s:await lu(e,t,n,r)?Uu:"/home"}const FI="https://gem-agent-38ae41bd5367.herokuapp.com".replace(/\/$/,"");function dt(){return FI}const XW="Could not reach the server. Check your connection or try again in a few seconds.";function ZW(e){const t=e instanceof Error?e.message:String(e??"");return t==="Failed to fetch"||t.includes("NetworkError")||t.includes("Load failed")||t.includes("aborted")}class Rp extends Error{constructor(n,r,s,o=!1){super(n);st(this,"status");st(this,"data");st(this,"isNetwork");this.name="ApiError",this.status=r,this.data=s,this.isNetwork=o}}function e7(e){return/^https?:\/\//i.test(e)?e:`${FI}${e.startsWith("/")?"":"/"}${e}`}async function t7(e,t={}){const{method:n="GET",token:r,body:s,headers:o={},signal:a,raw:l=!1}=t,c={...o};let u;s!=null&&(typeof FormData<"u"&&s instanceof FormData?u=s:(!c["Content-Type"]&&!c["content-type"]&&(c["Content-Type"]="application/json"),u=JSON.stringify(s))),r&&(c.Authorization=`Bearer ${r}`);let h;try{h=await fetch(e7(e),{method:n,headers:c,body:u,signal:a})}catch(p){throw ZW(p)?new Rp(XW,0,null,!0):p}if(l){if(!h.ok)throw new Rp(`Request failed (${h.status})`,h.status,null);return h}const f=await h.json().catch(()=>null);if(!h.ok){const p=(f==null?void 0:f.message)??(f==null?void 0:f.error)??`Request failed (${h.status})`;throw new Rp(p,h.status,f)}return f}function Vu(e,t,n){return t7(e,{...n,method:"GET",token:t})}function zu(e){return fetch(`${dt()}${e}`)}function BI(e,t,n){return fetch(`${dt()}${e}`,{method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:`Bearer ${n}`}:{}},body:JSON.stringify(t)})}function PY(e,t,n,r){return fetch(`${dt()}${e}`,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:r!==void 0?JSON.stringify(r):void 0})}
1786function n7(e,t,n){return fetch(`${e}/api/gemphere/getUser/${t}`,{headers:{Authorization:`Bearer ${n}`}})}const Dy="gemphere_onboarding_wa_token",Fy="gemphere_onboarding_wa_token_ls",By="gemphere_onboarding_wa_claimed_token";function Ni(e){return String(e||"").trim().replace(/[^a-zA-Z0-9_-]/g,"").slice(0,128)}function dh(){try{return Ni(sessionStorage.getItem(Dy)||localStorage.getItem(Fy))}catch{return""}}function Uy(e){const t=Ni(e);try{t?(sessionStorage.setItem(Dy,t),localStorage.setItem(Fy,t)):(sessionStorage.removeItem(Dy),localStorage.removeItem(Fy))}catch{}}function UI(){Uy(null)}function VI(e){const t=Ni(e);try{t?localStorage.setItem(By,t):localStorage.removeItem(By)}catch{}}function gf(){try{return Ni(localStorage.getItem(By))}catch{return""}}function r7(){UI(),VI(null)}const dl="gemphere_verified_onboarding_phone";function Ma(){try{const e=sessionStorage.getItem(dl)||localStorage.getItem(dl);return(e==null?void 0:e.trim())||null}catch{return null}}function yf(e){const t=(e||"").trim();if(t)try{sessionStorage.setItem(dl,t),localStorage.setItem(dl,t)}catch{}}function s7(){try{sessionStorage.removeItem(dl),localStorage.removeItem(dl)}catch{}}function jd(){return!!Ma()}function i7(e,t){return"calendar"}const Vy="gemphere_auth_flow";function zI(e){try{sessionStorage.setItem(Vy,e)}catch{}}function o7(){try{const e=sessionStorage.getItem(Vy);return sessionStorage.removeItem(Vy),e==="login"||e==="signup"?e:null}catch{return null}}function a7(){const e=dh()||gf(),t=Ma()||"";return e&&t?{waPhone:t,waOnboardingToken:e}:{}}async function jw(e,t,n,r){const s=await BI("/api/nylas/auth-url",{mode:e,provider:t,...t==="google"&&(r!=null&&r.googleScopeTier)?{googleScopeTier:r.googleScopeTier}:{},...(r==null?void 0:r.role)===1||(r==null?void 0:r.role)===2?{role:r.role}:{},...e==="signup"?a7():{}},n),o=await s.json().catch(()=>({}));if(!s.ok||!(o!=null&&o.url)){const a=t==="microsoft"?"Outlook":"Gmail";throw new Error((o==null?void 0:o.error)||`Failed to start ${a} auth`)}return o}async function WI(e="google",t){zI("signup");const{url:n}=await jw("signup",e,void 0,t);window.location.href=n}async function l7(e="google",t){zI("login");const{url:n}=await jw("login",e,void 0,t);window.location.href=n}async function Rl(e,t="google",n){const{url:r}=await jw("connect",t,e,n);window.location.href=r}async function c7(e){const t=await zu(`/api/nylas/status/${e}`);if(!t.ok)throw new Error("Failed to load import status");return t.json()}async function u7(e){const t=await zu(`/api/nylas/consume/${e}`);if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error((n==null?void 0:n.error)||"Auth not ready yet")}return t.json()}function d7(){return i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24","aria-hidden":"true",children:[i.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),i.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.99.66-2.25 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),i.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),i.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function h7(){return i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24","aria-hidden":"true",children:[i.jsx("rect",{x:"1",y:"1",width:"10",height:"10",fill:"#F25022"}),i.jsx("rect",{x:"13",y:"1",width:"10",height:"10",fill:"#7FBA00"}),i.jsx("rect",{x:"1",y:"13",width:"10",height:"10",fill:"#00A4EF"}),i.jsx("rect",{x:"13",y:"13",width:"10",height:"10",fill:"#FFB900"})]})}function XS({mode:e,provider:t="google",accessToken:n,className:r,onError:s}){const[o,a]=m.useState(!1),l=t==="microsoft",c=l?"Outlook":"Google",u=async()=>{if(!o){a(!0);try{if(e==="signup")await WI(t);else if(e==="login")await l7(t);else{if(!n)throw new Error(`You must be logged in to connect ${c}.`);await Rl(n,t)}}catch(f){a(!1),s==null||s(f instanceof Error?f.message:`Failed to start ${c} auth`)}}},h=e==="connect"?`Connect ${c}`:e==="login"?`Log in with ${c}`:`Continue with ${c}`;return i.jsxs("button",{type:"button",onClick:u,disabled:o,className:`w-full py-3 px-4 roun
1786ded-xl border border-input bg-background hover:bg-muted transition-colors flex items-center justify-center gap-3 font-medium disabled:opacity-60 ${r||""}`,children:[o?i.jsx(bn,{className:"w-5 h-5 animate-spin"}):l?i.jsx(h7,{}):i.jsx(d7,{}),i.jsx("span",{children:h})]})}const Wu=[{code:"+1",label:"US",flag:"ðºð¸"},{code:"+91",label:"IN",flag:"ð®ð³"},{code:"+44",label:"UK",flag:"ð¬ð§"},{code:"+49",label:"DE",flag:"ð©ðª"},{code:"+33",label:"FR",flag:"ð«ð·"},{code:"+61",label:"AU",flag:"ð¦ðº"},{code:"+65",label:"SG",flag:"ð¸ð¬"},{code:"+81",label:"JP",flag:"ð¯ðµ"},{code:"+86",label:"CN",flag:"ð¨ð³"},{code:"+971",label:"UAE",flag:"ð¦ðª"},{code:"+90",label:"Turkey",flag:"ð¹ð·"},{code:"+55",label:"BR",flag:"ð§ð·"}];function f7(e){if(!e||typeof e!="object")return null;const t=e,n=t.data??t,r=(n==null?void 0:n.data)??n,s=(r==null?void 0:r.accessToken)??(n==null?void 0:n.accessToken)??(t==null?void 0:t.accessToken),o=(r==null?void 0:r.refreshToken)??(n==null?void 0:n.refreshToken)??(t==null?void 0:t.refreshToken),a=(r==null?void 0:r.userId)??(n==null?void 0:n.userId)??(r==null?void 0:r.id)??(n==null?void 0:n.id),l=(r==null?void 0:r.fullName)??(n==null?void 0:n.fullName)??(r==null?void 0:r.fullname)??(n==null?void 0:n.fullname);return s?{accessToken:s,refreshToken:o,userId:a,fullName:l}:null}function m7(e={}){const t=e.role??1,{login:n,user:r}=Ht(),[s,o]=m.useState("info"),[a,l]=m.useState("+1"),[c,u]=m.useState(""),[h,f]=m.useState(""),[p,d]=m.useState(!1),[w,v]=m.useState(""),x=m.useRef(null),y=$u(),g=!!(r!=null&&r.accessToken);m.useEffect(()=>()=>rr(),[]);function b(){o("info"),f(""),v(""),x.current=null,rr()}function S(){o("info"),f(""),v(""),rr(),x.current=null}async function j(C){if(v(""),!C.fullName.trim())return v("Your name is required"),!1;if(!C.email.trim()||!Wc(C.email))return v("Enter a valid email (e.g. [email protected])"),!1;if(!qg(C.email))return v(sM),!1;if(!nl(c))return v("Enter a valid phone number (7â15 digits)"),!1;if(!y)return v("Phone login isn't configured. Add Firebase env vars and try again."),!1;d(!0);try{const E=gs(c,a),A=await Du(E);return x.current=A,o("otp"),f(""),!0}catch(E){return v(Bu(E)),!1}finally{d(!1)}}async function T(C){var R;const E=h.replace(/\D/g,"");if(E.length!==6)return v("Enter the 6-digit code"),null;const A=x.current;if(!A)return v("Session expired. Request a new code."),null;d(!0),v("");try{await Fu(A,E);const V=gs(c,a),D=await j5({fullname:C.fullName.trim(),email:C.email.trim(),phoneNumber:V,password:"OTP",role:t,rememberMe:!0});let J,F,Y;const W=f7(D);if(W!=null&&W.accessToken&&(J=W.accessToken,F=W.userId,Y=W.fullName),!J){const k=await FE(V,!0);k.success&&((R=k.data)!=null&&R.accessToken)&&(J=k.data.accessToken,F=k.data.userId,Y=k.data.fullName)}if(!J)return v((D==null?void 0:D.message)||"Account created but could not log in. Try again or use phone login."),null;let H=Y??C.fullName.trim();const P=C.fullName.trim();if(P&&P.toLowerCase()!==(Y??"").trim().toLowerCase())try{await BE(J,{fullname:P,email:C.email.trim()}),H=P}catch{}const _={userId:F??0,fullName:H,email:C.email.trim(),accessToken:J};return n(_),rr(),x.current=null,_}catch(V){return v(V instanceof Error?V.message:"Verification or signup failed"),null}finally{d(!1)}}return{isAuthed:g,firebaseReady:y,phase:s,countryCode:a,setCountryCode:l,phone:c,setPhone:u,otp:h,setOtp:f,loading:p,err:w,setErr:v,sendCode:j,verifyAndSignup:T,backToInfo:S,reset:b}}function p7({open:e,onClose:t,onSuccess:n,redirectTo:r}){const{login:s}=Ht(),o=un(),[a,l]=m.useState("choice"),[c,u]=m.useState("+1"),[h,f]=m.useState(""),[p,d]=m.useState(""),[w,v]=m.useState(!1),[x,y]=m.useState(""),g=m.useRef(null),b=$u();m.useEffect(()=>{e||(l("choice"),f(""),d(""),y(""),v(!1),g.current=null,rr())},[e]);const S=()=>{rr(),t()},j=async()=>{if(y(""),!nl(h)){y("Enter a valid phone number (7â15 digits)");return}if(!b){y("Login isnât configured yet. Add VITE_FIREBASE_API_KEY and VITE_FIREBASE_APP_ID to the .env file â see FIREBASE_SETUP.md in the project for how to get them from Firebase Console.");return}v(!0);try{const C=gs(h,c),E=await Du(C);g.current=E,l("otp"),d("")}catch(C){y(Bu(C))}finally{v(!1)}},T=async()=>{const C=p.replace(/\D/g,"");if(C.length!==6){y("Enter the 6-digit code");return}const E=g.current;if(!E){y("Session expired. Request a new code.");return}v(!0),y("");try{await Fu(E,C);const A=gs(h,c),R=await FE(A,!0);if(!R.success||!R.data){y(R.message||"Phone number not found. Sign up in the app first."),v(!1);return}const V=R.data;s({userId:V.userId,fullName:V.fullName||"User",accessToken:V.accessToken,refreshToken:V.refreshToken});let D=r||"/home";try{const J=await qn(V.accessToken);D=r||Sw(J)}catch{}S(),n==null||n(),o(D,{replace:!0})}catch(A){y(A instanceof Error?A.message:"Verification failed")}finally{v(!1)}};return e?i.jsx(af,{children:i.jsx(it.div,{initial:{opacity:0}
1786,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-background/80 backdrop-blur-xl",onClick:C=>C.target===C.currentTarget&&S(),children:i.jsxs(it.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"relative w-full max-w-[400px] rounded-2xl border border-border bg-card shadow-xl p-6",onClick:C=>C.stopPropagation(),children:[i.jsx("div",{id:"recaptcha-container",className:"absolute opacity-0 w-0 h-0","aria-hidden":!0}),i.jsx("button",{type:"button",onClick:S,className:"absolute top-4 right-4 p-1 rounded-full text-muted-foreground hover:text-foreground","aria-label":"Close",children:i.jsx(bu,{className:"w-5 h-5"})}),i.jsxs("h2",{className:"text-xl font-semibold text-foreground mb-1",children:[a==="choice"&&"Log in or sign up",a==="phone"&&"Enter your number",a==="otp"&&"Enter code",a==="logging-in"&&"Logging inâ¦"]}),i.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:[a==="choice"&&"Use Google, Outlook or your phone to log in. Sign up is available in the app.",a==="phone"&&"Weâll send a verification code by SMS.",a==="otp"&&`Code sent to ${c} ${h.replace(/\D/g,"")}`]}),x&&i.jsx("div",{className:"mb-4 py-2 px-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:x}),i.jsxs(af,{mode:"wait",children:[a==="choice"&&i.jsxs(it.div,{initial:{opacity:0}
1786,animate:{opacity:1},exit:{opacity:0},className:"space-y-3",children:[i.jsx(XS,{mode:"login",provider:"google",onError:C=>y(C)}),i.jsx(XS,{mode:"login",provider:"microsoft",onError:C=>y(C)}),i.jsxs("div",{className:"flex items-center gap-3 py-1",children:[i.jsx("div",{className:"flex-1 h-px bg-border"}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),i.jsx("button",{type:"button",onClick:()=>l("phone"),className:"w-full py-3 px-4 rounded-xl bg-primary text-primary-foreground font-medium",children:"Log in with phone"}),i.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"New users: Google or Outlook connects your calendar automatically."})]},"choice"),a==="phone"&&i.jsxs(it.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"space-y-4",children:[i.jsxs("div",{className:"flex gap-2",children:[i.jsx("select",{value:c,onChange:C=>u(C.target.value),className:"min-w-[8.5rem] py-2.5 px-3 rounded-lg border border-input bg-background text-foreground",children:Wu.map(C=>i.jsxs("option",{value:C.code,children:[C.flag," ",C.label," ",C.code]},C.code))}),i.jsx("input",{type:"tel",placeholder:"Phone number",value:h,onChange:C=>f(C.target.value),className:"flex-1 py-2.5 px-3 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground",disabled:w})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:()=>l("choice"),className:"py-2.5 px-4 rounded-lg border border-border text-foreground",children:"Back"}),i.jsxs("button",{type:"button",onClick:j,disabled:w,className:"flex-1 py-2.5 px-4 rounded-lg bg-primary text-primary-foreground font-medium disabled:opacity-50 flex items-center justify-center gap-2",children:[w?i.jsx(bn,{className:"w-4 h-4 animate-spin"}):null,"Send code"]})]})]},"phone"),a==="otp"&&i.jsxs(it.div,{initial:{opacity:0}
1786,animate:{opacity:1},exit:{opacity:0},className:"space-y-4",children:[i.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,placeholder:"000000",value:p,onChange:C=>d(C.target.value.replace(/\D/g,"").slice(0,6)),className:"w-full py-3 px-4 rounded-lg border border-input bg-background text-foreground text-center text-lg tracking-widest placeholder:text-muted-foreground",disabled:w}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:()=>l("phone"),className:"py-2.5 px-4 rounded-lg border border-border text-foreground",children:"Back"}),i.jsxs("button",{type:"button",onClick:T,disabled:w||p.replace(/\D/g,"").length!==6,className:"flex-1 py-2.5 px-4 rounded-lg bg-primary text-primary-foreground font-medium disabled:opacity-50 flex items-center justify-center gap-2",children:[w?i.jsx(bn,{className:"w-4 h-4 animate-spin"}):null,"Verify & log in"]})]})]},"otp"),a==="logging-in"&&i.jsx(it.div,{initial:{opacity:0},animate:{opacity:1},className:"flex justify-center py-8",children:i.jsx(bn,{className:"w-10 h-10 animate-spin text-primary"})},"logging-in")]})]})})}):null}const GI=m.createContext(null);function g7({children:e}){const[t,n]=m.useState(!1),[r,s]=m.useState(),o=m.useCallback(l=>{l!=null&&l.redirectTo&&xw(l.redirectTo),s(l==null?void 0:l.redirectTo),n(!0)},[]),a=m.useCallback(()=>{n(!1),s(void 0)},[]);return i.jsxs(GI.Provider,{value:{openLogin:o,closeLogin:a},children:[e,i.jsx(p7,{open:t,onClose:a,redirectTo:r})]})}function kw(){const e=m.useContext(GI);if(!e)throw new Error("useLoginModal must be used within LoginModalProvider");return e}const kn="/assets/gemphere-mark-BJw-7Lj5.png",vf="gemphere_onboarding_lead";function y7(){try{const e=sessionStorage.getItem(vf)||localStorage.getItem(vf);if(!e)return null;const t=JSON.parse(e),n=String(t.fullName||"").trim(),r=String(t.email||"").trim();return!n&&!r?null:{fullName:n,email:r}}catch{return null}}function Nw(e){const t=String(e.fullName||"").trim(),n=String(e.email||"").trim();if(!(!t&&!n))try{const r=JSON.stringify({fullName:t,email:n});sessionStorage.setItem(vf,r),localStorage.setItem(vf,r)}catch{}}const cu="https://wa.me/16507601639";let _p=null;async function v7(){if(_p)return _p;try{const e=await zu("/api/gemphere/whatsapp/link"),t=await e.json().catch(()=>null);if(e.ok&&(t!=null&&t.ok)&&t.url)return _p=t.url,t.url}catch{}return cu}const ZS=cu;function x7(e){switch(e){case"firebase_not_configured":return"Phone verification isn't configured on the server yet. Please try again later.";case"whatsapp_not_configured":return"WhatsApp isn't configured on the server yet. Please try again later.";case"whatsapp_send_failed":case"template_send_failed":return"Your number is verified, but we couldn't send the WhatsApp message. Please try again.";case"invalid_firebase_token":case"phone_mismatch":return"Phone session expired. Request a new code and try again.";default:return e||"Something went wrong. Please try again."}}function w7({open:e,onClose:t,initialFirstName:n="",initialLastName:r="",initialEmail:s="",lockEmail:o=!1,note:a=""}){const[l,c]=m.useState("details"),[u,h]=m.useState("+1"),[f,p]=m.useState(""),[d,w]=m.useState(""),[v,x]=m.useState(n),[y,g]=m.useState(r),[b,S]=m.useState(s),[j,T]=m.useState(!1),[C,E]=m.useState(""),[A,R]=m.useState(""),[V,D]=m.useState(!1),[J,F]=m.useState(!1),[Y,W]=m.useState(""),[H,P]=m.useState(!1),_=m.useRef(null),k=$u(),N=`${v.trim()} ${y.trim()}`.trim();m.useEffect(()=>{e||(c("details"),h("+1"),p(""),w(""),x(n),g(r),S(s),E(""),R(""),D(!1),F(!1),W(""),P(!1),T(!1),_.current=null,rr())},[e,n,r,s]),m.useEffect(()=>{e&&(n&&x(te=>te||n),r&&g(te=>te||r),s&&S(te=>o?s:te||s))},[e,n,r,s,o]);const B=()=>{rr(),t()},L=()=>
1786{if(E(""),v.trim().length<1){E("Enter your first name");return}if(y.trim().length<1){E("Enter your last name");return}if(!Wc(b.trim())){E("Enter a valid email address");return}c("phone")},z=async()=>{if(E(""),!nl(f)){E("Enter a valid phone number (7â15 digits)");return}if(!k){E("Phone verification isn't configured. Add Firebase env vars and try again.");return}T(!0);try{const te=gs(f,u);_.current=await Du(te,"message-me-recaptcha"),P(!0),w("")}catch(te){E(Bu(te))}finally{T(!1)}},ee=async()=>{E("");const te=d.replace(/\D/g,"");if(te.length!==6){E("Enter the 6-digit verification code");return}const je=_.current;if(!je){E("Request a verification code first");return}T(!0);try{await Fu(je,te);const q=gs(f,u);rr(),_.current=null;const ie=await yw();if(!ie){E("Phone session expired. Request a new verification code."),P(!1);return}const me=await kx(q,ie,{fullName:N,email:b.trim()});yf(q),Nw({fullName:N,email:b.trim()});const he=!!(me.ok&&(me.whatsappSent??!me.alreadySent)),fe=!!(me.ok&&me.alreadySent);D(he),F(fe),W(me.whatsappUrl||ZS),R(he||fe?"":x7(me.error)),c("done")}catch(q){E(q instanceof Error?q.message:"Verification failed")}finally{T(!1)}},X=()=>{window.open(Y||ZS,"_blank","noopener,noreferrer")},G=j||v.trim().length<1||y.trim().length<1||!Wc(b.trim()),ne=j||!nl(f)||H&&d.replace(/\D/g,"").length!==6;return e?i.jsx(af,{children:i.jsx(it.div,{initial:{opacity:0}
1786,animate:{opacity:1},exit:{opacity:0},className:"mm-overlay",onClick:te=>te.target===te.currentTarget&&B(),children:i.jsxs(it.div,{initial:{scale:.98,opacity:0,y:12},animate:{scale:1,opacity:1,y:0},exit:{scale:.98,opacity:0,y:12},transition:{type:"spring",stiffness:380,damping:30},className:"mm-shell",onClick:te=>te.stopPropagation(),children:[i.jsx("div",{id:"message-me-recaptcha",className:"absolute opacity-0 w-0 h-0","aria-hidden":!0}),i.jsx("button",{type:"button",onClick:B,className:"mm-close","aria-label":"Close",children:i.jsx(bu,{className:"w-4 h-4"})}),l==="details"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mm-header",children:[i.jsx("img",{src:kn,alt:"",className:"mm-logo",draggable:!1}),i.jsxs("div",{children:[i.jsx("div",{className:"mm-eyebrow",children:"Message me · Step 1 of 2"}),i.jsxs("h2",{className:"mm-title",children:["Let's get ",i.jsx("em",{children:"introduced."})]})]})]}),i.jsx("p",{className:"mm-lead",children:"Tell us who you are â next we'll verify your number and Gem will message you on WhatsApp."}),a?i.jsx("p",{className:"mm-lead",children:a}):null,C&&i.jsx("div",{className:"mm-alert mm-alert--error",children:C}),i.jsxs("form",{className:"mm-form",onSubmit:te=>{te.preventDefault(),L()},children:[i.jsxs("div",{className:"mm-form-grid",children:[i.jsxs("div",{className:"mm-field",children:[i.jsxs("label",{htmlFor:"mm-firstname",children:["First name",i.jsx("span",{className:"mm-req",children:"*"})]}),i.jsx("input",{id:"mm-firstname",type:"text",autoComplete:"given-name",placeholder:"Jane",value:v,onChange:te=>x(te.target.value),className:"mm-input",disabled:j})]}),i.jsxs("div",{className:"mm-field",children:[i.jsxs("label",{htmlFor:"mm-lastname",children:["Last name",i.jsx("span",{className:"mm-req",children:"*"})]}),i.jsx("input",{id:"mm-lastname",type:"text",autoComplete:"family-name",placeholder:"Smith",value:y,onChange:te=>g(te.target.value),className:"mm-input",disabled:j})]}),i.jsxs("div",{className:"mm-field mm-field--full",children:[i.jsxs("label",{htmlFor:"mm-email",children:["Email",i.jsx("span",{className:"mm-req",children:"*"})]}),i.jsx("input",{id:"mm-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:"[email protected]",value:b,onChange:te=>S(te.target.value),className:"mm-input",disabled:j,readOnly:o,title:o?"This is the address your invite was sent to.":void 0})]})]}),i.jsx("button",{type:"submit",className:"mm-submit",disabled:G,children:"Next"})]})]}),l==="phone"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mm-header",children:[i.jsx("img",{src:kn,alt:"",className:"mm-logo",draggable:!1}),i.jsxs("div",{children:[i.jsx("div",{className:"mm-eyebrow",children:"Message me · Step 2 of 2"}),i.jsxs("h2",{className:"mm-title",children:["Verify your ",i.jsx("em",{children:"number."})]})]})]}),i.jsx("p",{className:"mm-lead",children:"We'll text you a code. Once verified, Gem messages you on WhatsApp and your signup continues there."}),C&&i.jsx("div",{className:"mm-alert mm-alert--error",children:C}),i.jsxs("form",{className:"mm-form",onSubmit:te=>{te.preventDefault(),H?ee():z()},children:[i.jsxs("div",{className:"mm-form-grid",children:[i.jsxs("div",{className:"mm-field mm-field--full",children:[i.jsxs("div",{className:"mm-label-row",children:[i.jsxs("label",{htmlFor:"mm-phone",children:["Phone number",i.jsx("span",{className:"mm-req",children:"*"})]}),H&&i.jsx("button",{type:"button",className:"mm-link-btn",onClick:()=>void z(),disabled:j,children:"Resend code"})]}),i.jsxs("div",{className:"mm-phone-row",children:[i.jsx("select",{value:u,onChange:te=>{h(te.target.value),P(!1)},className:"mm-select",disabled:j,"aria-label":"Country code",children:Wu.map(te=>i.jsxs("option",{value:te.code,children:[te.flag," ",te.code]},te.code))}),i.jsx("input",{id:"mm-phone",type:"tel",autoComplete:"tel-national",placeholder:"5551234567",value:f,onChange:te=>{p(te.target.value),P(!1)},className:"mm-input",disabled:j})]})]}),H&&i.jsxs("div",{className:"mm-field mm-field--full",children:[i.jsxs("label",{htmlFor:"mm-otp",children:["Verification code",i.jsx("span",{className:"mm-req",children:"*"})]}),i.jsx("input",{id:"mm-otp",type:"text",inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,placeholder:"6-digit code",value:d,onChange:te=>w(te.target.value.replace(/\D/g,"").slice(0,6)),className:"mm-input mm-otp-input",disabled:j}),i.jsxs("p",{className:"mm-hint",children:["Code sent to ",u," ",f.replace(/\D/g,"")]})]})]}),i.jsxs("button",{type:"submit",className:"mm-submit",disabled:ne,children:[j&&i.jsx(bn,{className:"w-4 h-4 animate-spin"}),j?"Please waitâ¦":H?"Verify":"Send verification code"]}),i.jsxs("button",{type:"button",className:"mm-link-btn mm-back-btn",onClick:()=>{E(""),c("details")},disabled:j,children:[i.jsx(tl,{size:14}),"Back"]})]})]}),l==="done"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mm-success-icon",children:i.jsx(ex,{size:22})}),i.jsx("h2",{className:"mm-success-title",children:V||J?"Check WhatsApp":"Almost there"}),i.jsx("p",{className:"mm-success-sub",children:V?"Gem just messaged you on WhatsApp. Open the chat and reply to continue your signup there.":J?"Gem already messaged this number recently â open your WhatsApp chat with Gem to continue."
1786:"Your number is verified, but the WhatsApp message didn't go out."}),A&&i.jsx("div",{className:"mm-alert mm-alert--warn",children:A}),i.jsxs("div",{className:"mm-success-actions",children:[(V||J)&&i.jsx("button",{type:"button",className:"mm-submit",onClick:X,children:"Open WhatsApp"}),i.jsx("button",{type:"button",className:"mm-submit mm-submit--secondary",onClick:B,children:"Close"})]})]})]})})}):null}const HI=m.createContext(null);function b7({children:e}){const[t,n]=m.useState(!1),[r,s]=m.useState({}),o=m.useCallback(l=>{s(l??{}),n(!0)},[]),a=m.useCallback(()=>n(!1),[]);return i.jsxs(HI.Provider,{value:{openMessageMe:o,closeMessageMe:a},children:[e,i.jsx(w7,{open:t,onClose:a,initialFirstName:r.initialFirstName,initialLastName:r.initialLastName,initialEmail:r.initialEmail,lockEmail:r.lockEmail,note:r.note})]})}function um(){const e=m.useContext(HI);if(!e)throw new Error("useMessageMeModal must be used within MessageMeModalProvider");return e}function Xr(e){return{Authorization:`Bearer ${e}`}}function dm(e){return{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}function IY(e){return fetch(`${dt()}/api/gemphere/profile`,{headers:Xr(e)})}function S7(e){return fetch(`${dt()}/api/gemphere/parameter/getSectors`,{headers:Xr(e)})}function j7(e){return fetch(`${dt()}/api/gemphere/parameter/getAsks`,{headers:Xr(e)})}function AY(e){return fetch(`${dt()}/api/gemphere/profile/goals`,{headers:Xr(e)})}function RY(e){return fetch(`${dt()}/api/gemphere/profile/who-i-know`,{headers:Xr(e)})}function _Y(e){return fetch(`${dt()}/api/gemphere/profile/intro-blurb`,{headers:Xr(e)})}function OY(e){return fetch(`${dt()}/api/gemphere/profile/persona`,{headers:Xr(e)})}function MY(e,t){return fetch(`${dt()}/api/gemphere/profile/intro-blurb`,{method:"PUT",headers:dm(e),body:JSON.stringify({blurb:t})})}function LY(e){return fetch(`${dt()}/api/gemphere/connection/getUserConnections`,{headers:Xr(e)})}function $Y(e){return fetch(`${dt()}/api/gemphere/account/user-contacts`,{headers:Xr(e)})}function DY(e,t){return fetch(`${dt()}/api/gemphere/profile/who-i-know`,{method:"POST",headers:dm(e),body:JSON.stringify(t)})}function FY(e,t){return fetch(`${dt()}/api/gemphere/account/updateUserDetails`,{method:"POST",headers:dm(e),body:JSON.stringify(t)})}function BY(e,t){return fetch(`${dt()}/api/gemphere/profile`,{method:"POST",headers:dm(e),body:JSON.stringify(t)})}function UY(e,t){return fetch(`${dt()}/api/gemphere/profile/by-id?id=${encodeURIComponent(t)}`,{headers:Xr(e)})}function VY(e,t){return fetch(`${dt()}/api/users?ids=${encodeURIComponent(t)}`,{headers:Xr(e)})}function zY(e){return Vu("/api/gemphere/account/user-contacts",e)}function WY(e){return Vu("/api/gemphere/account/my-invites",e)}function GY(e,t){return Vu(`/api/gemphere/warm-intro/make-intro-candidates?viewerUserId=${e}`,t)}function HY(e,t){return Vu(`/api/gemphere/connections/user?userId=${e}`,t)}function qY(e,t){return Vu(`/api/gemphere/getUser/${e}`,t)}function Ks(e,t){return fetch(`${dt()}${e}`,{headers:{Authorization:`Bearer ${t}`}})}function Cw(e,t,n){return fetch(`${dt()}${e}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(t)})}function KY(e,t,n,r){return Ks(`/api/gemphere/integrations/nylas/meetings/summary?userId=${e}&from=${t}&to=${n}&limit=500&sort=count`,r)}function YY(e,t){return Ks(`/api/gemphere/integrations/nylas/signals?userId=${e}&limit=500&sort=recent`,t)}function JY(e,t,n,r,s){return Ks(`/api/gemphere/integrations/nylas/meetings?userId=${e}&with=${encodeURIComponent(t)}&from=${n}&to=${r}&group_by=month`,s)}function QY(e,t,n,r,s){return Ks(`/api/gemphere/integrations/nylas/meetings?userId=${e}&with=${encodeURIComponent(t)}&from=${n}&to=${r}&limit=200`,s)}function XY(e,t){return Cw("/api/gemphere/account/user-contacts/enrich-apollo",{contactIds:e},t)}function ZY(e){return Ks("/api/gemphere/parameter/getSectors",e)}function eJ(e){return Ks("/api/gemphere/parameter/getAsks",e)}function k7(e,t){return Ks(`/api/gemphere/getUser/${e}`,t)}function tJ(e,t){return Cw("/api/gemphere/account/invite-by-email",e,t)}function nJ(e,t){return Cw("/api/gemphere/warm-intro/request",e,t)}function N7(e,t){return Ks(`/api/gemphere/warm-intro/make-intro-candidates?viewerUserId=${e}`,t)}function C7(e){return Ks("/api/gemphere/account/myAccount",e)}function E7(e){if(!e)return[];const t=[],n=(a,l)=>{if(l)if(Array.isArray(l)){const c=l.filter(u=>u&&String(u).trim());if(!c.length)return;t.push([a,c.map(u=>`⢠${u}`).join(` 1787`)])}else{const c=String(l).trim();c&&t.push([a,c])}},r=e.person_type?String(e.person_type).trim():"";r&&n("PERSON TYPE",r.charAt(0).toUpperCase()+r.slice(1)),n("TITLE",e.title),n("LOCATION",e.location),n("PUBLIC BIO",e.public_bio),n("TWITTER / X",e.twitter),n("EDUCATION",e.education),n("WORK HISTORY",e.past_roles),n("ACHIEVEMENTS & AWARDS",e.achievements);const s=e.investor;s&&(n("FUND NAME",s.fund_name),n("INVESTOR ROLE",s.role),n("AUM / FUND SIZE",s.aum),n("GEOGRAPHIC FOCUS",s.geo_focus),n("LEAD VS FOLLOW-ON",s.lead_or_follow),n("NOTABLE EXITS",s.notable_exits),n("FREQUENT CO-INVESTORS",s.co_investors),n("FUND TEAM MEMBERS",s.team_members),n("INVESTMENT THESIS",s.thesis),n("PORTFOLIO COMPANIES",s.portfolio_companies),n("PORTFOLIO FOUNDERS",s.portfolio_founders),n("ANTI-PORTFOLIO / PASSES",s.anti_portfolio),n("OPERATING BACKGROUND",s.operating_background));const o=e.founder;
1787return o&&(n("COMPANY STAGE",o.company_stage),n("LAST ROUND RAISED",o.last_round),n("TOTAL FUNDING RAISED",o.total_funding),n("CAP TABLE / INVESTORS",o.cap_table_investors),n("CO-FOUNDERS",o.co_founders),n("TEAM SIZE",o.team_size),n("REVENUE STAGE",o.revenue_stage),n("PRODUCT CATEGORY",o.product_category),n("CUSTOMER SEGMENT",o.customer_segment),n("CURRENTLY FUNDRAISING",o.currently_fundraising),n("PREVIOUS STARTUPS",o.previous_startups),n("ACCELERATOR / INCUBATOR",o.accelerator),n("HIRING / OPEN ROLES",o.hiring_needs)),n("SPEAKING & CONFERENCES",e.speaking),n("PODCASTS",e.podcasts),n("RECENT CONTENT",e.recent_content),t}function qI(e,t){const n=(t.companyRole||"").trim(),r=(t.title||"").trim();return e===2?r||n:n||r}function T7(e,t){const n=qI(e,t),r=e===2?(t.fundName||t.companyName||"").trim():(t.companyName||"").trim();return[n,r].filter(Boolean).join(" · ")}const ej=["purple","green","amber","blue","red","teal"];function P7(e){return ej[Math.abs(e)%ej.length]}function I7(e){const t=(e||"").replace(/\s+/g," ").trim().split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():(e||"?").slice(0,2).toUpperCase()||"?"}function A7(e){if(!e)return null;let t=e.trim();return t?/^https?:\/\//i.test(t)?t:/^www\./i.test(t)?`https://${t}`:/^linkedin\.com/i.test(t)?`https://www.${t}`:t.startsWith("/in/")||t.startsWith("/")?`https://www.linkedin.com${t}`:`https://www.linkedin.com/in/${t.replace(/^@/,"")}`:null}function R7(e){return e?e.trim().replace(/^https?:\/\//i,"").replace(/^www\./i,""):""}function tj(e){return e===1?"Founder":e===2?"Investor":e===3?"Scout":"Member"}let Op=null,Mp=null,nj=null;async function _7(e){if(nj===e&&Op&&Mp)return{sectors:Op,asks:Mp};const[t,n]=await Promise.all([S7(e),j7(e)]),r={},s={};if(t.ok){const o=await t.json(),a=Array.isArray(o)?o:(o==null?void 0:o.data)??[];for(const l of a)(l==null?void 0:l.id)!=null&&(l!=null&&l.name)&&(r[String(l.id)]=l.name)}if(n.ok){const o=await n.json(),a=Array.isArray(o)?o:(o==null?void 0:o.data)??[];for(const l of a)(l==null?void 0:l.id)!=null&&(l!=null&&l.name)&&(s[String(l.id)]=l.name)}return Op=r,Mp=s,nj=e,{sectors:r,asks:s}}function rj(e,t){if(e==null)return null;const n=String(e).trim();if(!n||n==="-1,-1,-1"||n==="-1")return null;if(!n.includes("-1")&&!/^\d/.test(n))return n;const r=n.split(",").map(s=>s.trim()).filter(s=>s&&s!=="-1"&&s!=="0").map(s=>t[s]).filter(s=>!!s);return r.length>0?r.join(", "):null}function O7({open:e,onClose:t,userId:n,fallbackName:r,fallbackPhoto:s,fallbackRole:o,mode:a="view",hideActions:l=!1,fallbackEmail:c=null,fallbackLinkedinUrl:u=null,fallbackTitle:h=null,fallbackLocation:f=null,fallbackCompanyName:p=null,fallbackCompanyWebsite:d=null,fallbackGeminiSummary:w=null,fallbackGeminiProfile:v=null}){const{user:x}=Ht(),y=x==null?void 0:x.accessToken,[g,b]=m.useState(null),[S,j]=m.useState(!1),[T,C]=m.useState(null),[E,A]=m.useState("none"),[R,V]=m.useState(null),[D,J]=m.useState(null),[F,Y]=m.useState(null),W=(x==null?void 0:x.userId)??null,H=!l&&a==="view"&&typeof n=="number"&&n>0,P=m.useCallback(async()=>
1787{if(!(!y||!n)){if(j(!0),C(null),b(null),A("none"),V(null),Y(null),n<=0){b({fullname:r||null,photo:s||null,title:h,role:o??0,linkedinUrl:u,email:c,location:f,companyName:p,geminiSummary:w,geminiProfile:v}),j(!1);return}try{const{sectors:ae,asks:Se}=await _7(y),_e=await k7(n,y);if(!_e.ok)throw new Error(`profile HTTP ${_e.status}`);const Ce=await _e.json(),Fe=Ce!=null&&Ce.data&&typeof Ce.data=="object"?Ce.data:Ce,Le=(Fe==null?void 0:Fe.connection)??null,Ot=(Le==null?void 0:Le.status)??(Le==null?void 0:Le.Status),ct=(Le==null?void 0:Le.id)??(Le==null?void 0:Le.ID)??null,xt=(Le==null?void 0:Le.fromUserId)??(Le==null?void 0:Le.FromUserId)??null;ct!=null&&V(Number(ct)),Ot===1?A("connected"):Ot===0&&(W!=null&&xt!=null&&Number(xt)===Number(W)?A("pending_outgoing"):W!=null&&xt!=null?A("pending_incoming"):A("pending_outgoing"));const Oe=Ce!=null&&Ce.data&&typeof Ce.data=="object"?Ce.data:Ce,Xe=Oe!=null&&Oe.user&&typeof Oe.user=="object"?Oe.user:Oe,wt=Oe!=null&&Oe.founder&&typeof Oe.founder=="object"?Oe.founder:{},He=Oe!=null&&Oe.investor&&typeof Oe.investor=="object"?Oe.investor:{},at={...Xe,...wt,...He},$=ke=>{const Ye=at[ke];if(Ye==null)return null;const Te=(typeof Ye=="string"?Ye:String(Ye)).trim();return Te&&Te!=="Not provided"?Te:null},xe=Number($("role"))||(o??0),Re={fullname:$("fullname")||$("Fullname")||r||null,photo:$("profilePhoto")||$("ProfilePhoto")||$("photo")||s||null,title:$("title")||$("Title"),companyRole:$("companyRole")||$("company_role"),role:xe||0,linkedinUrl:$("linkedinProfile")||$("linkedinUrl")||$("linkedin_url"),email:$("email"),location:$("location")||$("city"),school:$("school")||$("education"),experience:$("experience"),companyName:$("companyName")||$("company"),companyOverview:$("companyOverview"),traction:$("traction"),superpower:$("superpower"),why:$("why"),sector:rj($("sectorIndustryFocus")||$("industryFocus")||$("sector")||$("sectors"),ae),fundName:$("fundName")||$("fund"),checkSize:rj($("askInitialCheck")||$("initialCheck")||$("checkSize")||$("check_size")||$("ask"),Se),commonAdvice:$("commonAdvice"),whatThey:$("whatThey"),favPitchStyle:$("favPitchStyle")};b(Re)}catch(ae){C(ae instanceof Error?ae.message:"Failed to load profile")}finally{j(!1)}}},[y,n,r,s,o,W,c,u,h,f,p,w,v]);m.useEffect(()=>{e&&n&&P(),e||(b(null),C(null),A("none"),V(null),J(null),Y(null))},[e,n,P]);const _=async()=>{if(!(!y||!n||E!=="none"||D)){J("connect"),Y(null);try{await T5(y,n),await P()}catch(ae){Y(ae instanceof Error?ae.message:"Connection request failed")}finally{J(null)}}},k=async ae=>{if(!(!y||!R||D)&&!(ae==="unfollow"&&!window.confirm(`Unfollow ${(g==null?void 0:g.fullname)||r||"this user"}? You can follow again any time.`))){J(ae),Y(null);try{await P5(y,R),A("none"),V(null)}catch(Se){Y(Se instanceof Error?Se.message:ae==="cancel"?"Failed to cancel request":"Failed to unfollow")}finally{J(null)}}},N=async ae=>{if(!(!y||!R||D)){J(ae?"accept":"reject"),Y(null);try{await I5(y,R,ae),ae?A("connected"):(A("none"),V(null))}catch(Se){Y(Se instanceof Error?Se.message:ae?"Failed to accept request":"Failed to reject request")}finally{J(null)}}},B=()=>{Y(null);const ae=((g==null?void 0:g.email)??"").trim();if(!ae){Y("No email on file for this profile.");return}const Se=encodeURIComponent("Hello from Gemphere"),_e=((g==null?void 0:g.fullname)||r||"there").split(" ")[0]||"there",Ce=encodeURIComponent(`Hi ${_e}, 1788 1789`),Fe=document.createElement("a");Fe.href=`mailto:${ae}?subject=${Se}&body=${Ce}`,Fe.rel="noopener noreferrer",Fe.click()};if(!e)return null;const L=(g==null?void 0:g.fullname)||r||(n?`User ${n}`:"Profile"),z=(g==null?void 0:g.photo)||s||null,ee=(g==null?void 0:g.role)??o??0,X=T7(ee,{companyRole:g==null?void 0:g.companyRole,title:(g==null?void 0:g.title)||h,companyName:(g==null?void 0:g.companyName)||p,fundName:(g==null?void 0:g.fundName)||p})||tj(ee),G=[];n&&n>0&&G.push(["Role",tj(ee)]);const ne=qI(ee,{companyRole:g==null?void 0:g.companyRole,title:(g==null?void 0:g.title)||h});if(ne&&G.push(["Title",ne]),ee===2){const ae=(g==null?void 0:g.fundName)||p;ae&&G.push(["Firm",ae])}else{const ae=(g==null?void 0:g.companyName)||p;ae&&G.push(["Company",ae])}
1789d&&G.push(["Website",d]),g!=null&&g.sector&&G.push(["Sectors",g.sector]),ee===2&&(g!=null&&g.checkSize)&&G.push(["Initial Check Size",g.checkSize]),g!=null&&g.school&&G.push(["Education",g.school]),g!=null&&g.experience&&G.push(["Experience",g.experience]);const te=(g==null?void 0:g.location)||f;te&&G.push(["Location",te]);const je=(g==null?void 0:g.email)||c;je&&G.push(["Email",je]);const q=g&&ee===2?[...g.commonAdvice?[["INVESTMENT THESIS",g.commonAdvice]]:[],...g.whatThey?[["WHAT I LOOK FOR IN A FOUNDER",g.whatThey]]:[],...g.favPitchStyle?[["FAVOURITE QUOTE",g.favPitchStyle]]:[]]:g?[...g.companyOverview?[["COMPANY OVERVIEW",g.companyOverview]]:[],...g.traction?[["TRACTION",g.traction]]:[],...g.superpower?[["SUPERPOWER",g.superpower]]:[],...g.why?[["WHY WE BUILD THIS",g.why]]:[]]:[],ie=(g==null?void 0:g.geminiProfile)||v||null,me=E7(ie),he=(g==null?void 0:g.linkedinUrl)||u,fe=A7(he);return i.jsx("div",{className:"modal-overlay open",onClick:ae=>{ae.target===ae.currentTarget&&t()},children:i.jsxs("div",{className:"modal profile-modal",onClick:ae=>ae.stopPropagation(),style:{maxWidth:600},children:[i.jsxs("div",{className:"modal-head",children:[i.jsxs("div",{className:"profile-modal-head-main",children:[i.jsx("div",{className:`profile-modal-av ${P7(n||0)}`,children:z?i.jsx("img",{src:z,alt:"",onError:ae=>{ae.currentTarget.style.display="none"}}):I7(L)}),i.jsxs("div",{className:"profile-modal-head-text",children:[i.jsx("div",{className:"mod-title",children:L}),X?i.jsx("div",{className:"mod-sub",children:X}):null,fe?i.jsxs("a",{href:fe,target:"_blank",rel:"noopener noreferrer",className:"profile-modal-link",children:["â ",R7(he)]}):null]})]}),i.jsx("button",{className:"mod-close",onClick:t,"aria-label":"Close",children:"Ã"})]}),i.jsxs("div",{className:"profile-modal-body",children:[i.jsx("div",{className:"req-sec-lbl",children:"Profile & intel"}),S?i.jsx("div",{className:"sp-intel",style:{fontSize:12,color:"#888",padding:"8px 0"},children:"Loading profileâ¦"}):T?i.jsx("div",{className:"info-banner",style:{background:"#fdecea",borderColor:"#f3c3bb",color:"#9a3a2a",marginBottom:0},children:T}):i.jsx("div",{className:"sp-intel",children:G.map(([ae,Se])=>{const Ce=ae==="Website"?Se.startsWith("http")?Se:`https://${Se.replace(/^\/+/,"")}`:null;return i.jsxs("div",{className:"sp-intel-row",children:[i.jsx("span",{className:"sp-intel-key",children:ae}),i.jsx("span",{className:"sp-intel-val",style:{textAlign:"right",maxWidth:"65%",wordBreak:"break-word"},children:Ce?i.jsx("a",{href:Ce,target:"_blank",rel:"noopener noreferrer",style:{color:"#0F6E56",textDecoration:"underline"},children:Se.replace(/^https?:\/\//,"").replace(/^www\./,"")}):Se})]},ae)})}),!S&&!T&&((g==null?void 0:g.geminiSummary)||w)&&i.jsxs("div",{children:[i.jsxs("div",{className:"req-sec-lbl",children:["About"," ",i.jsx("span",{className:"profile-modal-research-tag",children:"· web research"})]}),i.jsx("div",{className:"sp-why-fits",style:{whiteSpace:"pre-wrap"},children:(g==null?void 0:g.geminiSummary)||w})]}),!S&&!T&&me.map(([ae,Se])=>i.jsxs("div",{children:[i.jsxs("div",{className:"req-sec-lbl",children:[ae," ",i.jsx("span",{className:"profile-modal-research-tag",children:"· web research"})]}),i.jsx("div",{className:"sp-why-fits",style:{whiteSpace:"pre-wrap"},children:Se})]},`gem-${ae}`)),!S&&!T&&q.map(([ae,Se])=>i.jsxs("div",{children:[i.jsx("div",{className:"req-sec-lbl",children:ae}),i.jsx("div",{className:"sp-why-fits",style:{whiteSpace:"pre-wrap"},children:Se})]},ae))]}),H&&!S&&!T&&i.jsxs("div",{className:"profile-modal-foot",children:[F?i.jsx("div",{className:"profile-modal-action-error",children:F}):null,i.jsxs("div",{className:"profile-modal-foot-actions",children:[je?i.jsx("button",{type:"button",className:"profile-modal-btn",onClick:B,children:"Message"}):null,E==="none"&&i.jsx("button",{type:"button",className:"profile-modal-btn profile-modal-btn--primary",onClick:_,disabled:D==="connect"||!y||!n,children:D==="connect"?"Sendingâ¦":"Follow"}),E==="pending_outgoing"&&i.jsx("button",{type:"button",className:"profile-modal-btn profile-modal-btn--pending",onClick:()=>
1789k("cancel"),disabled:!R||D==="cancel",title:R?"Cancel the follow request you sent":"Loading request detailsâ¦",children:D==="cancel"?"Cancellingâ¦":"Cancel request"}),E==="pending_incoming"&&i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"profile-modal-btn profile-modal-btn--danger",onClick:()=>N(!1),disabled:!R||D!==null,children:D==="reject"?"Rejectingâ¦":"Decline"}),i.jsx("button",{type:"button",className:"profile-modal-btn profile-modal-btn--primary",onClick:()=>N(!0),disabled:!R||D!==null,children:D==="accept"?"Acceptingâ¦":"Accept"})]}),E==="connected"&&i.jsx("button",{type:"button",className:"profile-modal-btn profile-modal-btn--connected",onClick:()=>k("unfollow"),disabled:!R||D==="unfollow",title:"Unfollow â you can follow again any time",children:D==="unfollow"?"Unfollowingâ¦":"Following"})]})]})]})})}const KI=m.createContext(null);function M7({children:e}){const[t,n]=m.useState(null),r=m.useCallback((a,l)=>{a==null||!Number.isFinite(a)||a<=0||n({userId:a,name:(l==null?void 0:l.name)??void 0,photo:(l==null?void 0:l.photo)??null,role:l==null?void 0:l.role})},[]),s=m.useCallback(()=>n(null),[]),o=m.useMemo(()=>({openProfile:r,closeProfile:s}),[r,s]);return i.jsxs(KI.Provider,{value:o,children:[e,i.jsx(O7,{open:t!=null,onClose:s,userId:(t==null?void 0:t.userId)??null,fallbackName:t==null?void 0:t.name,fallbackPhoto:(t==null?void 0:t.photo)??null,fallbackRole:t==null?void 0:t.role,mode:"view"})]})}function YI(){const e=m.useContext(KI);return e||{openProfile:()=>{},closeProfile:()=>{}}}const kd={sarah:"https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=150&h=150&fit=crop&crop=face",david:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face",emily:"https://images.unsplash.com/photo-1580489944761-15a19d654956?w=150&h=150&fit=crop&crop=face",marcus:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face",rosa:"https://images.unsplash.com/photo-1580489944761-15a19d654956?w=150&h=150&fit=crop&crop=face"},yr=[{number:"01",title:"I track your target accounts",description:"I proactively surface intros into any account on your target list, handle the double opt-in, and close the loop for you.",icon:mO,blocks:[{kind:"stamp",text:"Today 9:41"},{kind:"message",role:"ai",text:"Ramp has been on your target list for six weeks. A path opened there today."},{kind:"opportunity",label:"Connection opportunity",chain:[{initials:"You",me:!0},{initials:"P"},{initials:"S"}],chainLabels:["You","Priya","Sam"],actions:["Not now","Request Intro"]},{kind:"message",role:"ai",text:"You just closed Lumen as your customer. Priya at Lumen knows Sam Ellis, Ramp's Head of AI â they worked together for three years."},{kind:"message",role:"user",text:"Yes -- Request Intro"}]},{number:"02",title:"I answer on demand",description:"A customer, an investor for your round, a partnership, a hire. Name what you need and I come back with the people actually worth reaching.",icon:Fh,blocks:[{kind:"message",role:"user",text:"Raising our next round â find me investors. Min $2M check."},{kind:"message",role:"ai",text:"Found 3 strong matches. Sarah Chen at Horizon is the best fit."},{kind:"profile",label:"Top match · 98%",profile:{name:"Sarah Chen",role:"Managing Partner",company:"Horizon Capital",match:98,avatar:"SC",avatarUrl:kd.sarah},showActions:!0},{kind:"profile",slim:!0,profile:{name:"David Kim",role:"Managing Director",company:"Everline",match:94,avatar:"DK",avatarUrl:kd.david}},{kind:"message",role:"user",text:"Sarah's great â how can I reach her?"}]},{number:"03",title:"I surface the intro you can request",description:"Then I show you the warm intro you can request: who on your side reaches them, and the ask already drafted. Nothing leaves until both sides agree.",icon:OC,blocks:[{kind:"message",role:"ai",text:"Through Marcus. He co-invests with Sarah, and Horizon is on your target list."},{kind:"profile",connector:!0,profile:{name:"Marcus Johnson",role:"GP",company:"TechFlow Ventures",match:0,avatar:"MJ",avatarUrl:kd.marcus}},{kind:"chain",nodes:[{initials:"You",label:"You",me:!0},{initials:"MJ",label:"Marcus"},{initials:"SC",label:"Sarah"}]},{kind:"message",role:"ai",text:"That's a warm intro you can request today."},{kind:"message",role:"user",text:"Perfect â draft the ask and send it."},{kind:"draft",to:"Marcus",status:"â Sent · now",text:"Hi Marcus â we're raising our next round and would love a warm intro to Sarah Chen at Horizon. Strong fit for her investment thesis. Open to connecting us?"},{kind:"note",text:"Marcus has co-invested with Sarah and they still talk regularly. He's introduced 4 GPs to her this year."}]},{number:"04",title:"I follow through",description:"Who helped, what landed, and which relationships are going quiet. I tell you when it is time to check in.",icon:tx,blocks:[{kind:"message",role:"ai",text:"Here's where your intros stand this week."},{kind:"introList",label:"Your intros",items:[{initials:"SC",name:"Sarah Chen",sub:"Horizon Capital",status:"Meeting set"},{initials:"DK",name:"David Kim",sub:"Endowment Partners",status:"Awaiting",warn:!0},{initials:"L",name:"Lumen â Stripe",sub:"via Priya Nair",status:"Connected"}]},{kind:"message",role:"ai",text:"I keep your connections warm too. You haven't spoken to Priya since March â want me to draft a check-in?"},{kind:"message",role:"user",text:"Yes, keep her warm."}]},{number:"05",title:"I'm a connector myself",description:"When the path isn't inside your firm, it may be inside mine. Tell me what you need and I'll make the introduction.",icon:dO,blocks:[{kind:"message",role:"user",text:"Need a fractional CFO who has taken a company through Series B."},{kind:"message",role:"ai",text:"That one sits outside your firm's network â but I know two people myself."},{kind:"profile",label:"From Gem's network",profile:{name:"Rosa Alvarez",role:"Fractional CFO",company:"ex-Ramp",match:92,avatar:"RA",avatarUrl:kd.rosa},showActions:!0},{kind:"message",role:"ai",text:"Say the word and I'll make the introduction."},{kind:"message",role:"user",text:"Please do."}]}],L7=280,sj=2,Ao=(e,t)=>{const n=Math.abs(e-t);return t===yr.length-1&&e>=t-.1||n<.38?1:n>.52?0:1-(n-.38)/.14},$7=(e,t)=>{const n=Ao(e,t);return n<=0?0:n>=.9?1:n/.9},JI=e=>1-Math.pow(1-Math.min(1,Math.max(0,e)),3),D7=e=>Math.pow(Math.min(1,Math.max(0,e)),3),F7=(e,t,n=!1)=>{const r=t===yr.length-1,s=t-.28,o=t+.06,a=t+.26,l=t+.54;return e<s?0:e<o?JI((e-s)/(o-s)):n||r||e<a?1:e<l?1-D7((e-a)/(l-a)):0},ij=(e,t,n=0)=>{const r=t-.2+n,s=t+.14+n;return e<r?0:e>s?1:JI((e-r)/(s-r))},B7=()=>{const[e,t]=m.useState(()=>typeof window<"u"?window.matchMedia("(max-width: 900px)").matches:!1);return m.useEffect(()=>{const n=window.matchMedia("(max-width: 900px)"),r=()=>t(n.matches);return r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e},kc=(e,t,n)=>{const r=B7(),s=(n==null?void 0:n.delay)??0,o=(n==null?void 0:n.holdAtEnd)??!1,a=zt(e,w=>{const v=F7(w,t,o);return s<=0?v:v*ij(w,t,s)}),l=zt(e,w=>ij(w,t,s)),c=r?s>0?4:6:s>0?22:30,u=r?s>0?2:3:s>0?10:14,h=zt(l,[0,1],[c,0]),f=zt(l,[0,1],[u,0]),p=zt(l,[0,1],[.86,1]),d=zt(l,[0,1],[s>0?2:-4,s>0?1:-1.5]);return{opacity:a,x:h,y:f,scale:p,rotate:d}},U7=()=>{const e=m.useRef(null),{scrollYProgress:t}=OU({target:e,offset:["start start","end end"]}),n=zt(t,r=>Math.min(yr.length-1,r*(yr.length-1+sj)));return i.jsxs("section",{id:"how-it-works",className:"hiw-week",children:[i.jsxs("div",{className:"wrap hiw-week-head",children:[i.jsx("p",{className:"eyebrow",children:"In your pocket"}),i.jsx("h2",{children:"A week with me."}),i.jsx("p",{className:"lede",style:{marginTop:20},children:"Five things I do, most of them before you ask."})]}),i.jsx("div",{ref:e,className:"hiw-scroll-story relative",style:{height:`${(yr.length+sj)*L7}vh`},children:i.jsx("div",{className:"hiw-scroll-sticky",children:i.jsx("div",{className:"wrap hiw-scroll-inner",children:i.jsxs("div",{className:"hiw-scroll-grid",children:[i.jsxs("div",{className:"hiw-step-col",children:[i.jsx("div",{className:"hiw-step-stack relative",children:yr.map((r,s)=>i.jsx(eG,{step:r,index:s,progress:n},s))}),i.jsx("div",{className:"hiw-step-indicators flex items-center gap-2 mt-6",children:yr.map((r,s)=>i.jsx(tG,{index:s,progress:n,isLast:s===yr.length-1},s))})]}),i.jsx("div",{className:"hiw-phone-col",children:i.jsx("div",{className:"hiw-phone-wrap",children:i.jsxs(it.div,{className:"hiw-phone-motion relative origin-center",initial:{opacity:0}
1789,whileInView:{opacity:1},viewport:{once:!0,margin:"-50px"},transition:{duration:.7,ease:[.22,1,.36,1]},children:[i.jsx(V7,{stepProgress:n}),i.jsx(z7,{stepProgress:n}),i.jsx("div",{className:"hiw-phone-glow"}),i.jsxs("div",{className:"hiw-phone",children:[i.jsx("span",{className:"hiw-phone-side-btn hiw-phone-side-btn--left","aria-hidden":!0}),i.jsx("span",{className:"hiw-phone-side-btn hiw-phone-side-btn--right-top","aria-hidden":!0}),i.jsx("span",{className:"hiw-phone-side-btn hiw-phone-side-btn--right-bottom","aria-hidden":!0}),i.jsxs("div",{className:"hiw-phone-screen",children:[i.jsx("div",{className:"hiw-phone-island","aria-hidden":!0}),i.jsxs("div",{className:"hiw-status",children:[i.jsx("span",{children:"9:41"}),i.jsxs("div",{className:"hiw-status-icons",children:[i.jsxs("div",{className:"hiw-signal","aria-hidden":!0,children:[i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{})]}),i.jsx("div",{className:"hiw-wifi","aria-hidden":!0}),i.jsx("div",{className:"hiw-battery","aria-hidden":!0})]})]}),i.jsxs("div",{className:"hiw-apphead",children:[i.jsxs("div",{className:"hiw-apphead-left",children:[i.jsx("div",{className:"hiw-applogo",children:i.jsx("img",{src:kn,alt:""})}),i.jsxs("div",{children:[i.jsx("div",{className:"hiw-appname",children:"Gemphere"}),i.jsx("div",{className:"hiw-appsub",children:"AI Head of Ecosystem"})]})]}),i.jsx("span",{className:"hiw-online","aria-label":"Online"})]}),i.jsxs("div",{className:"hiw-chat-area",children:[i.jsx("div",{className:"absolute inset-0",children:yr.map((r,s)=>i.jsx(Z7,{step:r,index:s,progress:n},s))}),i.jsx("div",{className:"hiw-inputbar",children:i.jsxs("div",{className:"hiw-input-row",children:[i.jsx("div",{className:"hiw-input",children:"Ask Gem anythingâ¦"}),i.jsx("div",{className:"hiw-send",children:i.jsx(tx,{className:"w-3.5 h-3.5"})})]})})]}),i.jsx("div",{className:"hiw-homebar","aria-hidden":!0})]})]})]})})})]})})})})]})},V7=({stepProgress:e})=>{var c,u,h,f,p,d;const t=(u=(c=yr[1])==null?void 0:c.blocks.find(w=>w.kind==="profile"))==null?void 0:u.profile,n=(f=(h=yr[2])==null?void 0:h.blocks.find(w=>w.kind==="profile"))==null?void 0:f.profile,r=(d=(p=yr[4])==null?void 0:p.blocks.find(w=>w.kind==="profile"))==null?void 0:d.profile,s=kc(e,1),o=kc(e,2,{delay:.05}),a=kc(e,4,{holdAtEnd:!0,delay:.06}),l=({profile:w,popMotion:v,offsetY:x,showMatch:y,label:g})=>i.jsx(it.div,{style:{opacity:v.opacity,x:v.x,y:v.y,scale:v.scale,rotate:v.rotate},className:`hiw-float-card hiw-float-card--profile ${x}`,children:i.jsxs("div",{className:"hiw-float-card-inner",children:[g&&i.jsxs("div",{className:"flex items-center gap-1.5 mb-3",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),i.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:g})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative flex-shrink-0",children:[i.jsx("img",{src:w.avatarUrl??`https://i.pravatar.cc/96?u=${encodeURIComponent(w.name)}`,alt:w.name,className:"h-11 w-11 rounded-full object-cover ring-2 ring-background shadow-md"}),i.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 rounded-full bg-card border-2 border-background flex items-center justify-center",children:i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-primary"})})]}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"text-[13px] font-semibold text-foreground truncate",children:w.name}),i.jsxs("p",{className:"text-[11px] text-muted-foreground truncate",children:[w.role," · ",w.company]})]})]}),y&&w.match>0&&i.jsxs("div",{className:"mt-3 pt-3 border-t border-border/30",children:[i.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[i.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:"Match score"}),i.jsxs("span",{className:"text-xs font-bold text-foreground",children:[w.match,"%"]})]}),i.jsx("div",{className:"h-1.5 bg-muted/60 rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full bg-gradient-to-r from-primary/80 to-primary rounded-full",style:{width:`${w.match}%`}})})]}),!y&&i.jsxs("div",{className:"mt-3 pt-3 border-t border-border/30 flex items-center gap-1.5",children:[i.jsx(Zv,{className:"w-3.5 h-3.5 text-primary"}),i.jsx("span",{className:"text-[11px] text-muted-foreground font-medium",children:"Mutual connection"})]})]})});return i.jsxs(i.Fragment,{children:[t&&i.jsx(l,{profile:t,popMotion:s,offsetY:"hiw-float-card--pos-a",showMatch:!0,label:"Top match"}),n&&i.jsx(l,{profile:n,popMotion:o,offsetY:"hiw-float-card--pos-b",label:"Connector"}),r&&i.jsx(l,{profile:r,popMotion:a,offsetY:"hiw-float-card--pos-c",showMatch:!0,label:"From Gem's network"})]})},z7=({stepProgress:e})=>{const t=kc(e,0,{delay:.08}),n=kc(e,2,{delay:.18});return i.jsxs(i.Fragment,{children:[i.jsx(it.div,{style:{opacity:t.opacity,x:t.x,y:t.y,scale:t.scale,rotate:t.rotate},className:"hiw-float-card hiw-float-card--alert hiw-float-card--alert-target",children:i.jsxs("div",{className:"hiw-float-card-inner hiw-float-card-inner--sm",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:i.jsx(tx,{className:"w-3 h-3 text-primary"})}),i.jsx("span",{className:"text-[10px] font-semibold text-foreground",children:"Target account alert"})]}),i.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:"Lumen â Ramp. Priya Nair is your path in."})]})}),i.jsx(it.div,{style:{opacity:n.opacity,x:n.x,y:n.y,scale:n.scale,rotate:n.rotate},className:"hiw-float-card hiw-float-card--alert hiw-float-card--alert-intro",children:i.jsxs("div",{className:"hiw-float-card-inner hiw-float-card-inner--sm",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:i.jsx(Zv,{className:"w-3 h-3 text-primary"})}),i.jsx("span",{className:"text-[10px] font-semibold text-foreground",children:"Intro Sent!"})]}),i.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:"Marcus will introduce you to Sarah"})]})})]})},Lp=(e,t)=>{if(Ao(e,t)<.4)return 0;const r=e-t;return Math.abs(r)<.28?1:r>0?Math.min(1,r/.22):Math.min(1,1+r/.22)},Fn=(e,t,n,r=.09)=>{const s=c=>Math.max(0,Math.min(1,(c-n*r)*4.5)),o=zt(e,c=>{const u=Ao(c,t);return u>=.97?1:u<.45?0:Math.min(s(Lp(c,t)),u)}),a=zt(e,c=>Ao(c,t)>=.97?0:12*(1-s(Lp(c,t)))),l=zt(e,c=>Ao(c,t)>=.97?1:.95+.05*s(Lp(c,t)));return{opacity:o,y:a,scale:l}},W7=({text:e,reveal:t})=>i.jsx(it.p,{style:t,className:"hiw-chat-stamp",children:e}),G7=({role:e,text:t,reveal:n})=>i.jsxs(it.div,{style:n,className:`hiw-bubble-row ${e==="user"?"hiw-bubble-row--user":""}`,children:[e==="ai"&&i.jsx("span",{className:"hiw-bubble-ava",children:i.jsx("img",{src:kn,alt:""})}),i.jsx("div",{className:`hiw-bubble ${e==="user"?"hiw-bubble--user":"hiw-bubble--ai"}`,children:t})]}),H7=({block:e,reveal:t})=>i.jsxs(it.div,{style:t,className:"hiw-opp-card",children:[i.jsx("p",{className:"hiw-opp-label",children:e.label}),i.jsx("div",{className:"hiw-opp-chain",children:e.chain.map((n,r)=>i.jsxs(m.Fragment,{children:[r>0&&i.jsx("span",{className:"hiw-opp-chain-line","aria-hidden":!0}),i.jsxs("div",{className:"hiw-opp-chain-col",children:[i.jsx("span",{className:`hiw-opp-av${n.me?" hiw-opp-av--me":""}`,children:n.initials}),i.jsx("span",{className:"hiw-opp-chain-lbl",children:e.chainLabels[r]})]})]},`${n.initials}-${r}`))}),i.jsxs("div",{className:"hiw-opp-actions",children:[i.jsx("span",{children:e.actions[0]}),i.jsx("span",{className:"hiw-opp-actions-go",children:e.actions[1]})]})]}),q7=({block:e,reveal:t})=>i.jsxs(it.div,{style:t,className:`hiw-pcard ${e.connector?"hiw-pcard--connector":""} ${e.slim?"hiw-pcard--slim":""}`,children:[e.label&&i.jsx("p",{className:"hiw-pcard-label",children:e.label}),i.jsxs("div",{className:"hiw-pcard-top",children:[i.jsx("img",{src:e.profile.avatarUrl??`https://i.pravatar.cc/72?u=${encodeURIComponent(e.profile.name)}`,alt:e.profile.name,className:`hiw-pcard-avatar ${e.connector?"hiw-pcard-avatar--connector":""}`}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:"hiw-pcard-name truncate",children:e.profile.name}),i.jsxs("div",{className:"hiw-pcard-role truncate",children:[e.profile.role," · ",e.profile.company]})]}),e.profile.match>0&&i.jsxs("span",{className:"hiw-pcard-match",children:[e.profile.match,"%"]}),e.connector&&i.jsx(Zv,{className:"w-3.5 h-3.5 text-primary flex-shrink-0"})]}),e.showActions&&i.jsxs("div",{className:"hiw-pcard-actions",children:[i.jsxs("button",{type:"button",className:"hiw-pcard-btn hiw-pcard-btn--ghost",children:[i.jsx(pO,{className:"w-3 h-3"}),"Swap"]}),i.jsxs("button",{type:"button",className:"hiw-pcard-btn hiw-pcard-btn--solid",children:[i.jsx(_C,{className:"w-3 h-3"}),"Connect"]})]})]}),K7=({block:e,reveal:t})=>i.jsxs(it.div,{style:t,className:"hiw-warm-chain",children:[i.jsx("div",{className:"hiw-warm-chain-row",children:e.nodes.map((n,r)=>i.jsxs("span",{className:"hiw-warm-chain-node",children:[r>0&&i.jsx("span",{className:"hiw-warm-chain-line","aria-hidden":!0}),i.jsx("span",{className:`hiw-warm-av${n.me?" hiw-warm-av--me":""}`,children:n.initials})]},n.label))}),i.jsx("div",{className:"hiw-warm-chain-labels",children:e.nodes.map(n=>i.jsx("span",{children:n.label},n.label))})]}),Y7=({block:e,reveal:t})=>i.jsxs(it.div,{style:t,className:"hiw-draft-card",children:[i.jsxs("div",{className:"hiw-draft-head",children:[i.jsxs("span",{children:["Draft to ",e.to]}),i.jsx("b",{children:e.status})]}),i.jsx("p",{children:e.text})]}),J7=({block:e,reveal:t})=>i.jsxs(it.div,{style:t,className:"hiw-intro-card",children:[i.jsx("p",{className:"hiw-intro-label",children:e.label}),e.items.map(n=>i.jsxs("div",{className:"hiw-intro-row",children:[i.jsx("span",{className:"hiw-intro-av",children:n.initials}),i.jsxs("span",{className:"hiw-intro-meta",children:[i.jsx("b",{children:n.name}),i.jsx("em",{children:n.sub})]}),i.jsx("span",{className:`hiw-intro-chip${n.warn?" hiw-intro-chip--warn":""}`,children:n.status})]},n.name))]}),Q7=({text:e,reveal:t})=>i.jsx(it.p,{style:t,className:"hiw-connector-note",children:e}),X7=(e,t,n)=>{switch(e.kind){case"stamp":return i.jsx(W7,{text:e.text,reveal:n},t);case"message":return i.jsx(G7,{role:e.role,text:e.text,reveal:n},t);case"opportunity":return i.jsx(H7,{block:e,reveal:n},t);case"profile":return i.jsx(q7,{block:e,reveal:n},t);case"chain":return i.jsx(K7,{block:e,reveal:n},t);case"draft":return i.jsx(Y7,{block:e,reveal:n},t);case"introList":return i.jsx(J7,{block:e,reveal:n},t);case"note":return i.jsx(Q7,{text:e.text,reveal:n},t);default:return null}},Z7=({step:e,index:t,progress:n})=>{const r=zt(n,T=>Ao(T,t)),s=zt(r,T=>T>
1789.5?"auto":"none"),o=Fn(n,t,0),a=Fn(n,t,1),l=Fn(n,t,2),c=Fn(n,t,3),u=Fn(n,t,4),h=Fn(n,t,5),f=Fn(n,t,6),p=Fn(n,t,7),d=Fn(n,t,8),w=Fn(n,t,9),v=Fn(n,t,10),x=Fn(n,t,11),y=Fn(n,t,12),g=Fn(n,t,13),b=[o,a,l,c,u,h,f,p,d,w,v,x,y,g];let S=0;const j=()=>b[Math.min(S++,b.length-1)];return i.jsx(it.div,{style:{opacity:r,pointerEvents:s},className:"hiw-chat-scroll absolute inset-0",children:e.blocks.map((T,C)=>{const E=j();return X7(T,C,E)})})},eG=({step:e,index:t,progress:n})=>{const r=zt(n,l=>Ao(l,t));zt(n,l=>{const c=l-t;return c<-.5?16:c>.5?-16:c*32});const s=zt(n,l=>$7(l,t)),o=zt(s,[0,1],[10,0]),a=zt(s,[0,1],[0,1]);return i.jsx(it.div,{style:{opacity:r},className:`hiw-step-content hiw-step-content-${t} absolute inset-0`,children:i.jsxs(it.div,{style:{opacity:s,y:o},children:[i.jsx("span",{className:"hiw-step-k",children:e.number}),i.jsx("h3",{className:"hiw-step-title",children:e.title}),i.jsx("p",{className:"hiw-step-desc",children:e.description}),i.jsx("span",{className:"hiw-step-bar","aria-hidden":!0,children:i.jsx(it.i,{style:{scaleX:a,transformOrigin:"left center"}})})]})})},tG=({index:e,progress:t})=>{const n=zt(t,s=>Math.round(s)===e?1:.35),r=zt(t,s=>Math.round(s)===e?1.35:.9);return i.jsx(it.div,{style:{scale:r,opacity:n},className:"hiw-step-dot shrink-0"})},QI="/assets/gem-cutout-QiJIlFE7.webp",XI=[QI];XI.forEach(e=>{const t=new Image;t.src=e});const $p=[{group:"Essentials",rows:[{feature:"Connect one calendar",free:!0,enterprise:!0},{feature:"See warm intro paths",free:!0,enterprise:!0},{feature:"I write the ask and send it double opt-in",free:!0,enterprise:!0},{feature:"Weekly digest of who is worth asking",free:!0,enterprise:!0},{feature:"Intro history, kept for you",free:!0,enterprise:!0},{feature:"Target accounts",free:"Limited",enterprise:"Unlimited"},{feature:"Intro requests",free:"Limited",enterprise:"Unlimited"}]},{group:"For teams",rows:[{feature:"Add team members â every seat widens the map",free:!1,enterprise:!0},{feature:"Add your connectors â calendar, CRM, LinkedIn, note-taker",free:"Limited",enterprise:"Unlimited"},{feature:"Add the companies you work with â seats included",free:"Limited",enterprise:"Unlimited"}]},{group:"Across the whole team",rows:[{feature:"Shared relationship map â see who in the extended network knows who",free:!1,enterprise:!0},{feature:"Ranked paths â I pick the strongest connector, not the first",free:!1,enterprise:!0},{feature:"Requests routed to the person who can actually open the door",free:!1,enterprise:!0},{feature:"Post-meeting reminders from your note-taker",free:!1,enterprise:!0},{feature:"Multi-step intro sequences",free:!1,enterprise:!0}]},{group:"Run it like a team",rows:[{feature:"Admin dashboard â intros asked, made and landed",free:!1,enterprise:!0},{feature:"Network coverage report on your target list",free:!1,enterprise:!0},{feature:"Custom integrations on request",free:!1,enterprise:!0},{feature:"Onboarding for the whole team and priority support",free:!1,enterprise:!0}]}],Nd=e=>e===!0||typeof e=="string"&&e.length>0,Dp=e=>[...e].sort((t,n)=>{const r=Nd(t.free)&&Nd(t.enterprise)?1:0;return(Nd(n.free)&&Nd(n.enterprise)?1:0)-r}),nG=({included:e})=>i.jsxs("span",{className:`price-mark${e?" price-mark--yes":" price-mark--no"}`,"aria-hidden":!0,children:[e?i.jsx(Xv,{className:"price-mark-icon",strokeWidth:2.5}):i.jsx(bu,{className:"price-mark-icon",strokeWidth:2.25}),i.jsx("span",{className:"sr-only",children:e?"Included":"Not included"})]}),Cd=({value:e})=>typeof e=="string"?i.jsx("span",{className:"price-compare-label",children:e}):i.jsx(nG,{included:e}),rG=[{q:"We already built something like this internally.",a:["Most internal builds map one thing: the contacts your own team already has. That is the easy half, and it starts going stale the day the person who built it moves on to something else.","The hard half is your extended network â everyone who does not work at your firm. Former colleagues and old teammates, the operators your partners came up with, your co-investors, the founders you back and the people inside their teams. That is
1789where most of the paths you actually need live.","And I am not a list of your connections. I am a team member, now working for you â I notice the week a path opens, write the ask so that it gets a yes, hold both sides until they agree, and remember who is owed afterwards."]},{q:"How is this different from a relationship CRM?",a:"A relationship CRM answers âwho do we know?â and then waits for you to do something about it. I answer âwho will actually make this introduction, and when?â â I rank the paths by warmth, bring you the one worth using this week, write the ask in your teammateâs voice, get both yeses and send it. A CRM is a record. I am a proactive agent, working for you."},{q:"Do you make introductions outside our teamâs extended network?",a:"Only when you want me to. By default I work inside your firmâs extended graph â your team and the people they already know: former colleagues and old teammates, your partners, your co-investors, and the founders and operators inside the companies you back. When there is no warm path in there, I say so rather than inventing one, and I can offer someone from my own network instead. You always see which of the two it is before anything is sent."},{q:"Do you ever send anything without my permission?",a:"No. I draft, you approve. No introduction, no message to a connector, no check-in goes out until you have read the wording and said yes â and the person on the other end has to agree before the introduction is made."},{q:"Do you read my email, or just my calendar?",a:"I do not read your email. I only get calendar access, to understand your network and the strength of your connections. That is what I use to map your relationships and score how warm each one is."}];function sG(){const e=m.useRef(null);return m.useEffect(()=>{const t=e.current;if(!t)return;const n=15,r=9,s=7,o=4;let a="";for(let l=0;l<r;l++)for(let c=0;c<n;c++){const u=Math.sqrt((c-s)**2*1+(l-o)**2*1.6);if(u===0){a+='<span class="hub"></span>';continue}const h=Math.max(.05,.62-u*.075);a+=`<span style="opacity:${h.toFixed(2)}"></span>`}t.innerHTML=a},[]),i.jsx("div",{className:"dots",ref:e})}const iG=()=>{const e=un(),[t,n]=ur(),{user:r,logout:s}=Ht(),{openLogin:o}=kw(),{openMessageMe:a}=um(),{openBookDemo:l}=ED(),[c,u]=m.useState(!1),h=m.useRef(null),f=m.useRef(null);m.useEffect(()=>{const x=t.get("messageMe")??t.get("message-me");if(!(x==="1"||x==="true"))return;a();const g=new URLSearchParams(t);g.delete("messageMe"),g.delete("message-me"),n(g,{replace:!0})},[t,n,a]);const p=m.useCallback(()=>{s(),e("/")},[s,e]),d=m.useCallback(()=>u(!1),[]);m.useEffect(()=>{const x=XI.map(y=>{const g=document.createElement("link");return g.rel="preload",g.as="image",g.href=y,document.head.appendChild(g),g});return()=>{x.forEach(y=>y.remove())}},[]),m.useEffect(()=>(c?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[c]),m.useEffect(()=>{const x=h.current;if(!x||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const y=new IntersectionObserver(g=>{g.forEach(b=>{b.isIntersecting&&(b.target.classList.add("in"),y.unobserve(b.target))})},{rootMargin:"0px 0px -8% 0px"});return x.querySelectorAll("section:not(.hero) .grid, section:not(.hero) .chal, .steps").forEach(g=>{g.classList.add("reveal"),y.observe(g)}),()=>y.disconnect()},[]),m.useEffect(()=>{const x=f.current;if(!x||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const y=window.matchMedia("(max-width: 960px)");let g=0,b=!1,S=!1,j,T;const C=new IntersectionObserver(([D])=>{S=D.isIntersecting},{threshold:.12});C.observe(x);const E=(D=3200)=>{b=!0,j&&clearTimeout(j),j=setTimeout(()=>{b=!1},D)},A=()=>{if(!y.matches){g=requestAnimationFrame(A);return}const D=x.scrollWidth-x.clientWidth;S&&!b&&D>8&&(x.scrollLeft>=D-2?(b=!0,T&&clearTimeout(T),T=setTimeout(()=>{x.scrollTo({left:0,behavior:"smooth"}),E(2400)},1400)):x.scrollLeft+=.55),g=requestAnimationFrame(A)},R=()=>{y.matches&&E()},V=()=>{y.matches&&E()};return g=requestAnimationFrame(A),x.addEventListener("pointerdown",R),x.addEventListener("wheel",V,{passive:!0}),x.addEventListener("touchstart",R,{passive:!0}),x.addEventListener("keydown",R),()=>{C.disconnect(),cancelAnimationFrame(g),j&&clearTimeout(j),T&&clearTimeout(T),x.removeEventListener("pointerdown",R),x.removeEventListener("wheel",V),x.removeEventListener("touchstart",R),x.removeEventListener("keydown",R)}},[]);const w=()=>{d(),o({redirectTo:"/home"})},v=()=>{d(),a()};return i.jsxs("div",{className:"nl-root",ref:h,style:{"--gem-img":`url(${QI})`},children:[i.jsx("header",{className:`nav${c?" nav-open":""}`,children:i.jsxs("div",{className:"nav-in",children:[i.jsxs("a",{href:"#home",className:"brand",onClick:d,children:[i.jsx("img",{src:kn,alt:"",className:"brand-mark",width:32,height:32}),"Gemphere"]}),i.jsx("button",{type:"button",className:"burger","aria-label":"Menu","aria-expanded":c,onClick:()=>u(x=>!x),children:c?"CLOSE":"MENU"}),i.jsxs("nav",{className:`nav-links${c?" open":""}`,id:"menu",children:[i.jsxs("div",{className:"nav-menu-primary",children:[i.jsx("a",{href:"#home",onClick:d,children:"Meet Gem"}),i.jsx("a",{href:"#how",onClick:d,children:"A week with me"}),i.jsx("a",{href:"#pricing",onClick:d,children:"Pricing"})]}),r?i.jsxs("div",{className:"nav-auth",children:[i.jsx(Fr,{to:"/home",className:"nav-user",title:r.fullName,onClick:d,children:r.fullName}),i.jsx("button",{type:"button",className:"nav-auth-link",onClick:p,"aria-label":"Log out",children:i.jsx(RC,{size:16,strokeWidth:2})})]}):i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"nav-auth-link nav-menu-login",onClick:w,children:"Log in"}),i.jsx("div",{className:"nav-menu-cta",children:i.jsx("button",{type:"button",className:"btn nav-msg-btn",onClick:v,children:"Message Gem"})})]})]})]})}),i.jsxs("main",{children:[i.jsxs("div",{className:"page is-active",id:"page-home",children:[i.jsx("section",{className:"hero",id:"home",children:i.jsxs("div",{className:"wrap hero-grid",children:[i.jsxs("div",{children:[i.jsxs("h1",{children:["Hey, Iâm Gem.",i.jsx("br",{}),i.jsx("span",{children:"Your Head of Ecosystem."})]}),i.jsx("p",{className:"lede",children:"I read your target accounts, map your team's extended network, and surface the warm intros you can request and make, even the ones two hops out."}),i.jsxs("div",{className:"cta-row",children:[i.jsx("button",{type:"button",className:"btn lg",onClick:a,children:"Message Gem"}),i.jsx(Fr,{to:"/sftw",className:"btn lg ghost",children:"SF Tech Week edition"})]})]}),i.jsx("div",{className:"gem-cutout",role:"img","aria-label":"Gem"})]})}),i.jsxs("section",{id:"why",children:[i.jsxs("div",{className:"wrap",children:[i.jsx("p",{className:"eyebrow",children:"Why I exist"}),i.jsxs("h2",{children:["Everyone you need is already two people away.",i.jsx("br",{}),"Nobody knows ",i.jsx("em",{className:"acc",children:"which two"}),"."]}),i.jsx("p",{className:"lede",style:{marginTop:20},children:"Four things go wrong in every company, every week. I was built for all four."})]}),i.jsx("div",{className:"chal-scroll",ref:f,tabIndex:0,"aria-label":"Why Gem exists â scroll through the four challenges",children:i.jsxs("div",{className:"chal",children:[i.jsxs("div",{className:"chal-card",children:[i.jsxs("div",{className:"chal-body",children:[i.jsx("p",{className:"minilabel top",children:"Network visibility"}),i.jsx("h3",{children:"Your extended network runs to thousands of people. You cannot see who you can actually introduce."}),i.jsx("p",{className:"muted",children:"Your colleagues, your investors, your advisors, your customers, and everyone all of them used to work with. Somewhere in there is a path to the account you've been cold emailing for six months. It's invisible."}),i.jsx("p",{className:"fix",children:"So I hold the map, and rank every path by how warm it actually is."})]}),i.jsx("div",{className:"viz",children:i.jsxs("div",{className:"panel",children:[i.jsx("p",{className:"opp-k light",children:"Four ways into Horizon Capital, ranked"}),i.jsxs("div",{className:"prow",children:[i.jsxs("div",{className:"meter-row",children:[i.jsxs("span",{children:[i.jsx("b",{className:"who-n",children:"Marcus"}
1789)," · 2 shared deals, met last month"]}),i.jsx("b",{children:"82%"})]}),i.jsx("div",{className:"bar",children:i.jsx("i",{style:{width:"82%"}})})]}),i.jsxs("div",{className:"prow",children:[i.jsxs("div",{className:"meter-row",children:[i.jsxs("span",{children:[i.jsx("b",{className:"who-n",children:"Dana"})," · former colleague at Stripe"]}),i.jsx("b",{children:"64%"})]}),i.jsx("div",{className:"bar",children:i.jsx("i",{style:{width:"64%"}})})]}),i.jsxs("div",{className:"prow",children:[i.jsxs("div",{className:"meter-row",children:[i.jsxs("span",{children:[i.jsx("b",{className:"who-n",children:"Priya"})," · one dinner, 2024"]}),i.jsx("b",{children:"38%"})]}),i.jsx("div",{className:"bar",children:i.jsx("i",{style:{width:"38%"}})})]}),i.jsxs("div",{className:"prow",children:[i.jsxs("div",{className:"meter-row",children:[i.jsxs("span",{children:[i.jsx("b",{className:"who-n",children:"Tom"})," · no contact since 2023"]}),i.jsx("b",{children:"12%"})]}),i.jsx("div",{className:"bar",children:i.jsx("i",{style:{width:"12%"}})})]}),i.jsxs("div",{className:"tags",children:[i.jsx("span",{className:"tag",children:"Intro likelihood 91%"}),i.jsx("span",{className:"tag",children:"Ask Marcus first"})]})]})})]}),i.jsxs("div",{className:"chal-card",children:[i.jsxs("div",{className:"chal-body",children:[i.jsx("p",{className:"minilabel top",children:"Timing"}),i.jsx("h3",{children:"You need the intro this week. You find out who could have made it next quarter."}),i.jsx("p",{className:"muted",children:"Someone in your team used to work with just joined the account you've been chasing. That is the week to ask. You'll hear about it in November, from someone else."}),i.jsx("p",{className:"fix",children:"So I watch what your team is chasing and tell you the week a path opens â nobody has to remember to ask."})]}),i.jsx("div",{className:"viz",children:i.jsxs("div",{className:"panel",children:[i.jsx(sG,{}),i.jsxs("p",{className:"pill",children:[i.jsx("i",{}),"847 paths surfaced"]})]})})]}),i.jsxs("div",{className:"chal-card",children:[i.jsxs("div",{className:"chal-body",children:[i.jsx("p",{className:"minilabel top",children:"Nothing is tracked"}),i.jsx("h3",{children:"Requests arrive over Slack, email and meetings. None of it is written down."}),i.jsx("p",{className:"muted",children:"There is no single place showing what was asked, who said yes, and what happened after. Introductions fall through the cracks, and favours are never repaid."}),i.jsx("p",{className:"fix",children:"So I hold all of it: who asked, who said yes, what never went out, and who owes you one."})]}),i.jsx("div",{className:"viz",children:i.jsxs("div",{className:"panel",children:[i.jsxs("div",{className:"req",children:[i.jsx("span",{className:"src",children:"Slack"}),i.jsx("span",{className:"q",children:"âAnyone know someone at Ramp?â"}),i.jsx("span",{className:"st",children:"untracked"})]}),i.jsxs("div",{className:"req",children:[i.jsx("span",{className:"src",children:"Email"}),i.jsx("span",{className:"q",children:"âFollowing up on that introâ¦â"}),i.jsx("span",{className:"st",children:"no owner"})]}),i.jsxs("div",{className:"req",children:[i.jsx("span",{className:"src",children:"Board"}),i.jsx("span",{className:"q",children:"âWe still need a design partner.â"}),i.jsx("span",{className:"st",children:"lost"})]}),i.jsxs("div",{className:"req",children:[i.jsx("span",{className:"src",children:"DM"}),i.jsx("span",{className:"q",children:"âCan you intro me to their CFO?â"}),i.jsx("span",{className:"st",children:"forgotten"})]}),i.jsxs("div",{className:"req",children:[i.jsx("span",{className:"src",children:"Call"}),i.jsx("span",{className:"q",children:"âWho do we know at Datadog?â"}),i.jsx("span",{className:"st",children:"untracked"})]}),i.jsxs("div",{className:"req",children:[i.jsx("span",{className:"src",children:"Text"}),i.jsx("span",{className:"q",children:"âDid that intro ever go out?â"}),i.jsx("span",{className:"st",children:"no answer"})]})]})})]}),i.jsxs("div",{className:"chal-card",children:[i.jsxs("div",{className:"chal-body",children:[i.jsx("p",{className:"minilabel top",children:"One place to ask"}),i.jsx("h3",{children:"Every need has its own tool. None of them opens a door."}),i.jsx("p",{className:"muted",children:"A CRM for pipeline, a spreadsheet for your round. Every one of them ends at a name you have no way to reach."}),i.jsx("p",{className:"fix",children:"So you tell me the goal, and I actively surface warm intros"})]}),i.jsxs("div",{className:"viz",children:[i.jsxs("p",{className:"eg",children:[i.jsx("span",{children:"e.g."})," ",i.jsx("em",{children:"âFind a lead investorâ"})," · ",i.jsx("em",{children:"âHire a VP Salesâ"})," ·"," ",i.jsx("em",{children:"âWarm intro to Rampâ"})," · ",i.jsx("em",{children:"âWho knows their CFO?â"})]}),i.jsx("p",{className:"minilabel",children:"For firms"}),i.jsxs("div",{className:"tags",children:[i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"LP connections"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Co-investment"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Deal flow"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Board candidates"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Senior hires"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Exit conversations"]})]}),i.jsx("p",{className:"minilabel",children:"For companies"}),i.jsxs("div",{className:"tags",children:[i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"First customers"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Executive hires"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Their next round"]}
1789),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Design partners"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Channel partners"]}),i.jsxs("span",{className:"tag",children:[i.jsx("i",{}),"Advisors"]})]})]})]})]})})]}),i.jsx("section",{id:"how",className:"nl-how font-sans",children:i.jsx(U7,{})}),i.jsx("section",{id:"faq",children:i.jsxs("div",{className:"wrap",children:[i.jsx("h2",{children:"The questions I get most."}),i.jsx("div",{className:"faq",children:rG.map(x=>i.jsxs("details",{children:[i.jsx("summary",{children:x.q}),Array.isArray(x.a)?x.a.map(y=>i.jsx("p",{children:y},y)):i.jsx("p",{children:x.a})]},x.q))})]})}),i.jsx("section",{id:"pricing",children:i.jsxs("div",{className:"wrap",children:[i.jsx("p",{className:"eyebrow",children:"Pricing"}),i.jsx("div",{className:"price-compare","aria-label":"Free and Enterprise feature comparison",children:i.jsx("div",{className:"price-compare-shell",children:i.jsxs("div",{className:"price-compare-table",children:[i.jsx("div",{className:"price-compare-plan-slot price-compare-plan-slot--feature",children:i.jsx("span",{className:"price-compare-eyebrow",children:"What's included"})}),i.jsxs("div",{className:"price-compare-plan-slot",children:[i.jsx("p",{className:"pc-name",children:"Free"}),i.jsx("p",{className:"pc-for",children:"For individuals"}),i.jsx("button",{type:"button",className:"pc-btn pc-btn--compare",onClick:a,children:"Message Gem"})]}),i.jsxs("div",{className:"price-compare-plan-slot is-hi",children:[i.jsx("p",{className:"pc-name",children:"Enterprise"}),i.jsx("p",{className:"pc-for",children:"For teams"}),i.jsx("button",{type:"button",className:"pc-btn pc-btn--compare go",onClick:l,children:"Book a demo"})]}),$p.map(x=>i.jsxs(m.Fragment,{children:[i.jsx("div",{className:"price-compare-group-row",children:x.group}),Dp(x.rows).map(y=>i.jsxs("div",{className:"price-compare-row",children:[i.jsx("div",{className:"price-compare-feature",children:y.feature}),i.jsxs("div",{className:"price-compare-cell",children:[i.jsx(Cd,{value:y.free}),i.jsxs("span",{className:"sr-only",children:["Free: ",typeof y.free=="string"?y.free:y.free?"included":"not included"]})]}),i.jsxs("div",{className:"price-compare-cell price-compare-cell--hi",children:[i.jsx(Cd,{value:y.enterprise}),i.jsxs("span",{className:"sr-only",children:["Enterprise:"," ",typeof y.enterprise=="string"?y.enterprise:y.enterprise?"included":"not included"]})]})]},y.feature))]},x.group))]})})}),i.jsx("div",{className:"price-mobile","aria-label":"Free and Enterprise plans",children:i.jsxs("div",{className:"price-mobile-grid",children:[i.jsxs("div",{className:"price-mobile-card price-mobile-card--free",children:[i.jsxs("div",{className:"price-mobile-card-head",children:[i.jsx("p",{className:"pc-name",children:"Free"}),i.jsx("p",{className:"pc-for",children:"For individuals"}),i.jsx("button",{type:"button",className:"pc-btn",onClick:a,children:"Message Gem"})]}),i.jsx("div",{className:"price-mobile-body",children:$p.map(x=>i.jsxs("div",{children:[i.jsx("p",{className:"price-mobile-group",children:x.group}),Dp(x.rows).map(y=>i.jsxs("div",{className:"price-mobile-feature",children:[i.jsx("span",{className:"price-mobile-feature-label",children:y.feature}),i.jsx("span",{className:"price-mobile-feature-value",children:i.jsx(Cd,{value:y.free})})]},`free-${y.feature}`))]},`free-${x.group}`))})]}),i.jsxs("div",{className:"price-mobile-card is-hi",children:[i.jsxs("div",{className:"price-mobile-card-head",children:[i.jsx("p",{className:"pc-name",children:"Enterprise"}),i.jsx("p",{className:"pc-for",children:"For teams"}),i.jsx("button",{type:"button",className:"pc-btn go",onClick:l,children:"Book a demo"})]}),i.jsx("div",{className:"price-mobile-body",children:$p.map(x=>i.jsxs("div",{children:[i.jsx("p",{className:"price-mobile-group",children:x.group}),Dp(x.rows).map(y=>i.jsxs("div",{className:"price-mobile-feature",children:[i.jsx("span",{className:"price-mobile-feature-label",children:y.feature}),i.jsx("span",{className:"price-mobile-feature-value",children:i.jsx(Cd,{value:y.enterprise})})]},`enterprise-${y.feature}`))]},`enterprise-${x.group}`))})]})]})})]})})]}),i.jsx("section",{style:{borderTop:"1px solid var(--line)"},children:i.jsx("div",{className:"wrap",children:i.jsxs("div",{className:"band",children:[i.jsxs("h2",{children:["Everyone wants to work with people they trust.",i.jsx("em",{children:"I find you the warm path to them."})]}),i.jsx("button",{type:"button",className:"btn lg",onClick:a,children:"Message Gem"})]})})})]}),i.jsx("footer",{className:"site-foot",children:i.jsx("div",{className:"wrap",children:i.jsxs("div",{className:"foot-bottom",children:[i.jsxs("div",{className:"foot-brand-row",children:[i.jsxs("a",{href:"#home",className:"brand foot-brand",children:[i.jsx("img",{src:kn,alt:"",className:"brand-mark",width:32,height:32}),"Gemphere"]}),i.jsxs("nav",{className:"foot-nav","aria-label":"Legal",children:[i.jsx(Fr,{to:"/terms",children:"Terms of Service"}),i.jsx(Fr,{to:"/privacy",children:"Privacy Policy"})]})]}),i.jsx("p",{className:"foot-copy",children:"© 2026 Gemphere. All rights reserved."})]})})})]})},oG=()=>{const e=Nr();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),i.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),i.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},aG=()=>i.jsx("div",{className:"min-h-screen bg-background text-black",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16",children:[i.jsxs(Fr,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-8 transition-colors",children:[i.jsx(tl,{className:"w-4 h-4"}),"Back to Home"]}),i.jsx("h1",{className:"text-4xl font-bold text-black mb-2",children:"Privacy Policy"}),i.jsx("p",{className:"text-muted-foreground mb-12",children:"Effective Date: 01/16/2026"}),i.jsxs("div",{className:"prose max-w-none space-y-8",children:[i.jsx("p",{className:"text-lg text-muted-foreground",children:'Gemphere, Inc. ("Gemphere," "we," "us," or "our") respects your privacy. This Privacy Policy explains how we
1789collect, use, and protect information when you use our services.'}),i.jsx("p",{className:"text-muted-foreground",children:"This policy applies to all users of Gemphere, including free access, paid plans, and future offerings."}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"1. Information We Collect"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"We collect information that you voluntarily share with us, including:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Name, email address, and account information"}),i.jsx("li",{children:"Company details, descriptions, and preferences"}),i.jsx("li",{children:"Messages, introductions, and communications"}),i.jsx("li",{children:"Payment and billing information (processed by third-party providers)"}),i.jsx("li",{children:"Calendar Integration Metadata (if connected): If you choose to link your Google Calendar or Microsoft 365 Calendar, we access only event metadata (specifically meeting times and participant names/emails) to compute meeting frequency and recency. We strictly do not read or store email contents, message bodies, or calendar event descriptions."})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Information may be shared with us through the service or through other communication channels, including email, LinkedIn, messaging apps, or calls, in connection with using Gemphere."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"We may also collect limited technical information (such as device type, browser type, and usage data) to operate and improve the service."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"2. How We Use Information"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"We use information only to:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Operate and provide the service"}),i.jsx("li",{children:"Facilitate discovery, matching, and introductions"}),i.jsx("li",{children:"Communicate with users about the service"}),i.jsx("li",{children:"Improve functionality, reliability, and user experience"}),i.jsx("li",{children:"Process payments and manage subscriptions"}),i.jsx("li",{children:"Comply with legal obligations"})]}),i.jsx("p",{className:"text-muted-foreground mt-4 font-medium",children:"We do not sell personal or company information."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"3. How Information Is Shared"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"We may share information only:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"With other users, as necessary to facilitate introductions and connections"}),i.jsx("li",{children:"With service providers who support our operations"}),i.jsx("li",{children:"When required by law or legal process"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"This may include sharing information via email or other communication channels as part of facilitating introductions and connections."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"We do not share information for advertising or unrelated commercial purposes."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"4. Use of Name & Company for Visibility"}),i.jsx("p",{className:"text-muted-foreground",children:"We may reference your name, company name, or logo for limited marketing or informational purposes, such as highlighting members of the Gemphere network or community updates."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"If you prefer that we do not use your name or company in this way, you may opt out at any time by contacting us, and we will respect your request."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"We will not imply endorsement or use your information in a misleading manner."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"5. Confidentiality & Use Limitations"}),i.jsx("p",{className:"text-muted-foreground",children:"Information shared with Gemphere is used only in connection with providing the service."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere does not claim ownership over user information and does not use it for purposes unrelated to operating and facilitating the service."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Users are responsible for how they share information with third parties following introductions."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"6. Data Security"}),i.jsx("p",{className:"text-muted-foreground",children:"We take reasonable administrative, technical, and organizational measures to protect information against unauthorized access, misuse, or disclosure."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"No system is completely secure, and we cannot guarantee absolute security."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"7. Data Retention"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"We retain information only for as long as necessary to:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Provide the service"}),i.jsx("li",{children:"Comply with legal requirements"}),i.jsx("li",{children:"Resolve disputes and enforce agreements"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"You may request deleti
1789on of your account, subject to legal and operational obligations."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"8. Your Choices"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"You may:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Update or correct your information"}),i.jsx("li",{children:"Request account deletion"}),i.jsx("li",{children:"Opt out of non-essential communications"}),i.jsx("li",{children:"Opt out of marketing references"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Requests can be made by contacting us at the email below."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"9. Third-Party Services"}),i.jsx("p",{className:"text-muted-foreground",children:"The service may rely on third-party tools or providers."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere is not responsible for the privacy practices of third parties outside of our control."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"10. Google API Services Disclosure"}),i.jsx("p",{className:"text-muted-foreground",children:"Gemphere's use and transfer of information received from Google APIs will adhere to the Google API Services User Data Policy, including the Limited Use requirements."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Information obtained through Google APIs is used solely to provide and improve the features and functionality of the Gemphere platform, including relationship intelligence, network mapping, contact insights, and user-requested services."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere does not sell Google user data to third parties."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere does not use data obtained from Google Workspace APIs for serving advertisements."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere does not allow humans to read Google user data except:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mt-4",children:[i.jsx("li",{children:"With the user's explicit consent for specific services"}),i.jsx("li",{children:"When necessary for security purposes such as investigating abuse"}),i.jsx("li",{children:"To comply with applicable laws or legal requirements"}),i.jsx("li",{children:"For limited internal operations permitted under the Google API Services User Data Policy"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Any transfer of information received from Google APIs to other applications will adhere to the Google API Services User Data Policy, including the Limited Use requirements."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"11. International Users"}),i.jsx("p",{className:"text-muted-foreground",children:"If you access the service from outside the United States, you understand that information may be processed and stored in the United States or other jurisdictions."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"12. Changes to This Policy"}),i.jsx("p",{className:"text-muted-foreground",children:"We may update this Privacy Policy from time to time. Material changes will be communicated reasonably. Continued use of the service after the effective date constitutes acceptance."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"13. Contact"}),i.jsx("p",{className:"text-muted-foreground",children:"For privacy questions or requests:"}),i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]})]})}),lG=()=>i.jsx("div",{className:"min-h-screen bg-background text-black",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16",children:[i.jsxs(Fr,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-8 transition-colors",children:[i.jsx(tl,{className:"w-4 h-4"}),"Back to Home"]}),i.jsx("h1",{className:"text-4xl font-bold text-black mb-2",children:"Terms of Service"}),i.jsx("p",{className:"text-muted-foreground mb-12",children:"Effective Date: 01/16/2026"}),i.jsxs("div",{className:"prose max-w-none space-y-8",children:[i.jsx("p",{className:"text-lg text-muted-foreground",children:'These Terms of Service ("Terms") govern your access to and use of the services provided by Gemphere, Inc. ("Gemphere," "we," "us," or "our"). By accessing the Gemphere platform, creating an account, or completing a payment, you ("User," "you," or "your") agree to be bound by these Terms.'}),i.jsx("p",{className:"text-muted-foreground",children:"These Terms apply to all Gemphere users and plans, including free access, Membership subscriptions, Fast Track, and any future offerings."}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"1. Nature of the Service"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Gemphere is a private, invite-only service designed to facilitate discovery, curated matching, and warm introductions through trusted relationships."}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Gemphere:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Facilitates introductions and connections only"}),i.jsx("li",{children:"Does not act as an investment advisor, broker, agent, or intermediary"}),i.jsx("li",{children:"Does not make investment decisions"}),i.jsx("li",{children:"Does not guarantee introductions, meetings, funding, or outcomes"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"All decisions related to investments, partnerships, hiring, or business transactions are made independently by users and third parties."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"2. Eligibility & Accounts"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"You must be at least 18 years old and legally capable of entering into binding agreements."}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"You agree to:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Provide accurate and truthful information"}),i.jsx("li",{children:"Keep your account credentials secure"}),i.jsx("li",{children:"Use the service professionally and in good faith"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere reserves the right to suspend or terminate access at any time if we reasonably believe a user has violated these Terms or undermined trust within the network."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Termination for cause does not entitle the user to a refund."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"3. Paid
1789Services & Billing"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Certain features or services may require payment."}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Pricing, billing frequency, duration, and payment terms are disclosed at the time of purchase."}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Paid services may include:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Recurring subscriptions (e.g., Membership)"}),i.jsx("li",{children:"One-time, time-bound services (e.g., Fast Track)"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Payments are processed by third-party payment providers. By completing a payment, you authorize Gemphere and its payment processor to charge the applicable fees."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"4. No Guarantees"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Gemphere provides access, tooling, and facilitation only."}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"We do not guarantee:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"The number of introductions or responses"}),i.jsx("li",{children:"Timing of introductions"}),i.jsx("li",{children:"Investor interest, meetings, funding, or outcomes"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"All introductions are subject to relevance, mutual interest, and availability."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"5. Refund Policy"}),i.jsx("p",{className:"text-muted-foreground",children:"Payments are non-refundable once services are activated, unless otherwise required by law or expressly agreed to in writing by Gemphere."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"6. Confidentiality"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Each party agrees to protect the other party's non-public, proprietary, or confidential information and to use such information solely in connection with use of the service."}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"Confidential Information does not include information that:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Is publicly available without breach"}),i.jsx("li",{children:"Was lawfully known prior to disclosure"}),i.jsx("li",{children:"Is independently developed without use of confidential information"})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"7. User Content & Permissions"}),i.jsx("p",{className:"text-muted-foreground",children:"By sharing or providing any information, materials, or content to Gemphere â whether through the service or via other communication channels â you represent that you have the right to share such information and that it does not infringe any third-party rights."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"You grant Gemphere a limited, non-exclusive, royalty-free license to use, display, and share this information solely for the purpose of operating and facilitating the service, including discovery, matching, and introductions."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"Gemphere does not claim ownership of your information and will not use it for purposes unrelated to providing the service."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"8. Intellectual Property"}),i.jsx("p",{className:"text-muted-foreground",children:"All software, features, workflows, content, branding, and materials associated with the service are owned by Gemphere or its licensors."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"You are granted a limited, non-exclusive, non-transferable license to use the service for internal business purposes only."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"You may not copy, resell, sublicense, reverse-engineer, or exploit the service without prior written consent."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"9. Platform Availability"}),i.jsx("p",{className:"text-muted-foreground",children:"Gemphere may modify, suspend, or discontinue any part of the service at any time. We do not guarantee uninterrupted or error-free operation."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"10. Disclaimer of Warranties"}),i.jsx("p",{className:"text-muted-foreground",children:'The service is provided "as is" and "as available."'}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"To the fullest extent permitted by law, Gemphere disclaims all warranties, including implied warranties of merchantability, fitness for a particular purpose, and n
1789on-infringement."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"11. Limitation of Liability"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"To the maximum extent permitted by law:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Gemphere shall not be liable for indirect, incidental, consequential, or special damages"}),i.jsx("li",{children:"Gemphere's total liability shall not exceed the amount paid by you to Gemphere in the 12 months preceding the claim"})]})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"12. Indemnification"}),i.jsx("p",{className:"text-muted-foreground mb-4",children:"You agree to indemnify and hold harmless Gemphere, its officers, directors, employees, and affiliates from any claims, damages, losses, or expenses (including reasonable legal fees) arising out of:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[i.jsx("li",{children:"Your use of the service"}),i.jsx("li",{children:"Content or information you provide"}),i.jsx("li",{children:"Any misrepresentation, violation of law, or breach of these Terms"})]}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"This applies only to the extent permitted by law."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"13. Non-Reliance"}),i.jsx("p",{className:"text-muted-foreground",children:"You acknowledge that you are not relying on any guarantees, representations, or promises outside of these Terms or the information presented at checkout."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"14. Privacy"}),i.jsx("p",{className:"text-muted-foreground",children:"Your use of the service is subject to our Privacy Policy, which explains how we collect, use, and protect personal and company information."}),i.jsx("p",{className:"text-muted-foreground mt-4",children:"By using Gemphere, you consent to data practices described in the Privacy Policy."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"15. Governing Law"}),i.jsx("p",{className:"text-muted-foreground",children:"These Terms are governed by the laws of the State of Delaware, without regard to conflict-of-law principles."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"16. Changes to These Terms"}),i.jsx("p",{className:"text-muted-foreground",children:"We may update these Terms from time to time. Material changes will be communicated reasonably. Continued use of the service after the effective date constitutes acceptance."})]}),i.jsxs("section",{children:[i.jsx("h2",{className:"text-2xl font-bold text-black mb-4",children:"17. Contact"}),i.jsx("p",{className:"text-muted-foreground",children:"For questions or legal notices:"}),i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]})]})}),cG=Qv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ew=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const a=r?f_:"button";return i.jsx(a,{className:rn(cG({variant:t,size:n,className:e})),ref:o,...s})});Ew.displayName="Button";const ec=m.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:rn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));ec.displayName="Input";var uG="Label",ZI=m.forwardRef((e,t)=>
1789i.jsx(Ln.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ZI.displayName=uG;var eA=ZI;const dG=Qv("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),tc=m.forwardRef(({className:e,...t},n)=>i.jsx(eA,{ref:n,className:rn(dG(),e),...t}));tc.displayName=eA.displayName;const hG=()=>{const[e,t]=m.useState(!1),[n,r]=m.useState({firstName:"",lastName:"",email:"",phone:""}),s=a=>{a.preventDefault(),t(!0)},o=a=>{r({...n,[a.target.name]:a.target.value})};return i.jsx("div",{className:"min-h-screen bg-background text-foreground",children:i.jsxs("div",{className:"max-w-xl mx-auto px-6 py-16",children:[i.jsxs(Fr,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-8 transition-colors",children:[i.jsx(tl,{className:"w-4 h-4"}),"Back to Home"]}),i.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Delete Your Data"}),i.jsx("p",{className:"text-muted-foreground mb-8",children:"Submit this form to request deletion of your account and associated data."}),e?i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[i.jsx("div",{className:"w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center mb-6",children:i.jsx(Xv,{className:"w-8 h-8 text-green-500"})}),i.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"Request Sent"}),i.jsx("p",{className:"text-muted-foreground",children:"We've received your request and will process it shortly."})]}):i.jsxs("form",{onSubmit:s,className:"space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(tc,{htmlFor:"firstName",children:"First Name"}),i.jsx(ec,{id:"firstName",name:"firstName",type:"text",required:!0,value:n.firstName,onChange:o,placeholder:"John",className:"bg-background border-border"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(tc,{htmlFor:"lastName",children:"Last Name"}),i.jsx(ec,{id:"lastName",name:"lastName",type:"text",required:!0,value:n.lastName,onChange:o,placeholder:"Doe",className:"bg-background border-border"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(tc,{htmlFor:"email",children:"Email"}),i.jsx(ec,{id:"email",name:"email",type:"email",required:!0,value:n.email,onChange:o,placeholder:"[email protected]",className:"bg-background border-border"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(tc,{htmlFor:"phone",children:"Phone Number"}),i.jsx(ec,{id:"phone",name:"phone",type:"tel",required:!0,value:n.phone,onChange:o,placeholder:"+1 (555) 000-0000",className:"bg-background border-border"})]}),i.jsx(Ew,{type:"submit",className:"w-full",children:"Submit Request"})]})]})})};var Tw={};(function e(t,n,r,s){var o=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),a=typeof Path2D=="function"&&typeof DOMMatrix=="function",l=function(){if(!t.OffscreenCanvas)return!1;try{var k=new OffscreenCanvas(1,1),N=k.getContext("2d");N.fillRect(0,0,1,1);var B=k.transferToImageBitmap();N.createPattern(B,"no-repeat")}catch{return!1}return!0}();function c(){}function u(k){var N=n.exports.Promise,B=N!==void 0?N:t.Promise;return typeof B=="function"?new B(k):(k(c,c),null)}var h=function(k,N){return{transform:function(B){if(k)return B;if(N.has(B))return N.get(B);var L=new OffscreenCanvas(B.width,B.height),z=L.getContext("2d");return z.drawImage(B,0,0),N.set(B,L),L},clear:function(){N.clear()}}}(l,new Map),f=function(){var k=Math.floor(16.666666666666668),N,B,L={},z=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(N=function(ee){var X=Math.random();return L[X]=requestAnimationFrame(function G(ne){z===ne||z+k-1<ne?(z=ne,delete L[X],ee()):L[X]=requestAnimationFrame(G)}),X},B=function(ee){L[ee]&&cancelAnimationFrame(L[ee])}):(N=function(ee){return setTimeout(ee,k)},B=function(ee){return clearTimeout(ee)}
vendor: 6,607 bytes, lines 1789-1790
1789),{frame:N,cancel:B}}(),p=function(){var k,N,B={};function L(z){function ee(X,G){z.postMessage({options:X||{},callback:G})}z.init=function(G){var ne=G.transferControlToOffscreen();z.postMessage({canvas:ne},[ne])},z.fire=function(G,ne,te){if(N)return ee(G,null),N;var je=Math.random().toString(36).slice(2);return N=u(function(q){function ie(me){me.data.callback===je&&(delete B[je],z.removeEventListener("message",ie),N=null,h.clear(),te(),q())}z.addEventListener("message",ie),ee(G,je),B[je]=ie.bind(null,{data:{callback:je}})}),N},z.reset=function(){z.postMessage({reset:!0});for(var G in B)B[G](),delete B[G]}}return function(){if(k)return k;if(!r&&o){var z=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(` 1790`);try{k=new Worker(URL.createObjectURL(new Blob([z])))}catch(ee){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("ð Could not load worker",ee),null}L(k)}return k}}(),d={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function w(k,N){return N?N(k):k}function v(k){return k!=null}function x(k,N,B){return w(k&&v(k[N])?k[N]:d[N],B)}function y(k){return k<0?0:Math.floor(k)}function g(k,N){return Math.floor(Math.random()*(N-k))+k}function b(k){return parseInt(k,16)}function S(k){return k.map(j)}function j(k){var N=String(k).replace(/[^0-9a-f]/gi,"");return N.length<6&&(N=N[0]+N[0]+N[1]+N[1]+N[2]+N[2]),{r:b(N.substring(0,2)),g:b(N.substring(2,4)),b:b(N.substring(4,6))}}function T(k){var N=x(k,"origin",Object);return N.x=x(N,"x",Number),N.y=x(N,"y",Number),N}function C(k){k.width=document.documentElement.clientWidth,k.height=document.documentElement.clientHeight}function E(k){var N=k.getBoundingClientRect();k.width=N.width,k.height=N.height}function A(k){var N=document.createElement("canvas");return N.style.position="fixed",N.style.top="0px",N.style.left="0px",N.style.pointerEvents="none",N.style.zIndex=k,N}function R(k,N,B,L,z,ee,X,G,ne){k.save(),k.translate(N,B),k.rotate(ee),k.scale(L,z),k.arc(0,0,1,X,G,ne),k.restore()}function V(k){var N=k.angle*(Math.PI/180),B=k.spread*(Math.PI/180);return{x:k.x,y:k.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:k.startVelocity*.5+Math.random()*k.startVelocity,angle2D:-N+(.5*B-Math.random()*B),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:k.color,shape:k.shape,tick:0,totalTicks:k.ticks,decay:k.decay,drift:k.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:k.gravity*3,ovalScalar:.6,scalar:k.scalar,flat:k.flat}}function D(k,N){N.x+=Math.cos(N.angle2D)*N.velocity+N.drift,N.y+=Math.sin(N.angle2D)*N.velocity+N.gravity,N.velocity*=N.decay,N.flat?(N.wobble=0,N.wobbleX=N.x+10*N.scalar,N.wobbleY=N.y+10*N.scalar,N.tiltSin=0,N.tiltCos=0,N.random=1):(N.wobble+=N.wobbleSpeed,N.wobbleX=N.x+10*N.scalar*Math.cos(N.wobble),N.wobbleY=N.y+10*N.scalar*Math.sin(N.wobble),N.tiltAngle+=.1,N.tiltSin=Math.sin(N.tiltAngle),N.tiltCos=Math.cos(N.tiltAngle),N.random=Math.random()+2);var B=N.tick++/N.totalTicks,L=N.x+N.random*N.tiltCos,z=N.y+N.random*N.tiltSin,ee=N.wobbleX+N.random*N.tiltCos,X=N.wobbleY+N.random*N.tiltSin;if(k.fillStyle="rgba("+N.color.r+", "+N.color.g+", "+N.color.b+", "+(1-B)+")",k.beginPath(),a&&N.shape.type==="path"&&typeof N.shape.path=="string"&&Array.isArray(N.shape.matrix))k.fill(H(N.shape.path,N.shape.matrix,N.x,N.y,Math.abs(ee-L)*.1,Math.abs(X-z)*.1,Math.PI/10*N.wobble));else if(N.shape.type==="bitmap"){var G=Math.PI/10*N.wobble,ne=Math.abs(ee-L)*.1,te=Math.abs(X-z)*.1,je=N.shape.bitmap.width*N.scalar,q=N.shape.bitmap.height*N.scalar,ie=new DOMMatrix([Math.cos(G)*ne,Math.sin(G)*ne,-Math.sin(G)*te,Math.cos(G)*te,N.x,N.y]);ie.multiplySelf(new DOMMatrix(N.shape.matrix));var me=k.createPattern(h.transform(N.shape.bitmap),"no-repeat");me.setTransform(ie),k.globalAlpha=1-B,k.fillStyle=me,k.fillRect(N.x-je/2,N.y-q/2,je,q),k.globalAlpha=1}else if(N.shape==="circle")k.ellipse?k.ellipse(N.x,N.y,Math.abs(ee-L)*N.ovalScalar,Math.abs(X-z)*N.ovalScalar,Math.PI/10*N.wobble,0,2*Math.PI):R(k,N.x,N.y,Math.abs(ee-L)*N.ovalScalar,Math.abs(X-z)*N.ovalScalar,Math.PI/10*N.wobble,0,2*Math.PI);else if(N.shape==="star")for(var he=Math.PI/2*3,fe=4*N.scalar,ae=8*N.scalar,Se=N.x,_e=N.y,Ce=5,Fe=Math.PI/Ce;Ce--;)Se=N.x+Math.cos(he)*ae,_e=N.y+Math.sin(he)*ae,k.lineTo(Se,_e),he+=Fe,Se=N.x+Math.cos(he)*fe,_e=N.y+Math.sin(he)*fe,k.lineTo(Se,_e),he+=Fe;else k.moveTo(Math.floor(N.x),Math.floor(N.y)),k.lineTo(Math.floor(N.wobbleX),Math.floor(z)),k.lineTo(Math.floor(ee),Math.floor(X)),k.lineTo(Math.floor(L),Math.floor(N.wobbleY));return k.closePath(),k.fill(),N.tick<N.totalTicks}function J(k,N,B,L,z){var ee=N.slice(),X=k.getContext("2d"),G,ne,te=u(function(je){function q(){G=ne=null,X.clearRect(0,0,L.width,L.height),h.clear(),z(),je()}function ie(){r&&!(L.width===s.width&&L.height===s.height)&&(L.width=k.width=s.width,L.height=k.height=s.height),!L.width&&!L.height&&(B(k),L.width=k.width,L.height=k.height),X.clearRect(0,0,L.width,L.height),ee=ee.filter(function(me){return D(X,me)}),ee.length?G=f.frame(ie):q()}G=f.frame(ie),ne=q});return{addFettis:function(je){return ee=ee.concat(je),te},canvas:k,promise:te,reset:function(){G&&f.cancel(G),ne&&ne()}}}function F(k,N){var B=!k,L=!!x(N||{},"resize"),z=!1,ee=x(N,"disableForReducedMotion",Boolean),X=o&&!!x(N||{},"useWorker"),G=X?p():null,ne=B?C:E,te=k&&G?!!k.__confetti_initialized:!1,je=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,q;function ie(he,fe,ae){for(var Se=x(he,"particleCount",y),_e=x(he,"angle",Number),Ce=x(he,"spread",Number),Fe=x(he,"startVelocity",Number),Le=x(he,"decay",Number),Ot=x(he,"gravity",Number),ct=x(he,"drift",Number),xt=x(he,"colors",S),Oe=x(he,"ticks",Number),Xe=x(he,"shapes"),wt=x(he,"scalar"),He=!!x(he,"flat"),at=T(he),$=Se,xe=[],Re=k.width*at.x,ke=k.height*at.y;$--;
vendor: 3,038 bytes, line 1790
1790)xe.push(V({x:Re,y:ke,angle:_e,spread:Ce,startVelocity:Fe,color:xt[$%xt.length],shape:Xe[g(0,Xe.length)],ticks:Oe,decay:Le,gravity:Ot,drift:ct,scalar:wt,flat:He}));return q?q.addFettis(xe):(q=J(k,xe,ne,fe,ae),q.promise)}function me(he){var fe=ee||x(he,"disableForReducedMotion",Boolean),ae=x(he,"zIndex",Number);if(fe&&je)return u(function(Fe){Fe()});B&&q?k=q.canvas:B&&!k&&(k=A(ae),document.body.appendChild(k)),L&&!te&&ne(k);var Se={width:k.width,height:k.height};G&&!te&&G.init(k),te=!0,G&&(k.__confetti_initialized=!0);function _e(){if(G){var Fe={getBoundingClientRect:function(){if(!B)return k.getBoundingClientRect()}};ne(Fe),G.postMessage({resize:{width:Fe.width,height:Fe.height}});return}Se.width=Se.height=null}function Ce(){q=null,L&&(z=!1,t.removeEventListener("resize",_e)),B&&k&&(document.body.contains(k)&&document.body.removeChild(k),k=null,te=!1)}return L&&!z&&(z=!0,t.addEventListener("resize",_e,!1)),G?G.fire(he,Se,Ce):ie(he,Se,Ce)}return me.reset=function(){G&&G.reset(),q&&q.reset()},me}var Y;function W(){return Y||(Y=F(null,{useWorker:!0,resize:!0})),Y}function H(k,N,B,L,z,ee,X){var G=new Path2D(k),ne=new Path2D;ne.addPath(G,new DOMMatrix(N));var te=new Path2D;return te.addPath(ne,new DOMMatrix([Math.cos(X)*z,Math.sin(X)*z,-Math.sin(X)*ee,Math.cos(X)*ee,B,L])),te}function P(k){if(!a)throw new Error("path confetti are not supported in this browser");var N,B;typeof k=="string"?N=k:(N=k.path,B=k.matrix);var L=new Path2D(N),z=document.createElement("canvas"),ee=z.getContext("2d");if(!B){for(var X=1e3,G=X,ne=X,te=0,je=0,q,ie,me=0;me<X;me+=2)for(var he=0;he<X;he+=2)ee.isPointInPath(L,me,he,"nonzero")&&(G=Math.min(G,me),ne=Math.min(ne,he),te=Math.max(te,me),je=Math.max(je,he));q=te-G,ie=je-ne;var fe=10,ae=Math.min(fe/q,fe/ie);B=[ae,0,0,ae,-Math.round(q/2+G)*ae,-Math.round(ie/2+ne)*ae]}return{type:"path",path:N,matrix:B}}function _(k){var N,B=1,L="#000000",z='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof k=="string"?N=k:(N=k.text,B="scalar"in k?k.scalar:B,z="fontFamily"in k?k.fontFamily:z,L="color"in k?k.color:L);var ee=10*B,X=""+ee+"px "+z,G=new OffscreenCanvas(ee,ee),ne=G.getContext("2d");ne.font=X;var te=ne.measureText(N),je=Math.ceil(te.actualBoundingBoxRight+te.actualBoundingBoxLeft),q=Math.ceil(te.actualBoundingBoxAscent+te.actualBoundingBoxDescent),ie=2,me=te.actualBoundingBoxLeft+ie,he=te.actualBoundingBoxAscent+ie;je+=ie+ie,q+=ie+ie,G=new OffscreenCanvas(je,q),ne=G.getContext("2d"),ne.font=X,ne.fillStyle=L,ne.fillText(N,me,he);var fe=1/B;return{type:"bitmap",bitmap:G.transferToImageBitmap(),matrix:[fe,0,0,fe,-je*fe/2,-q*fe/2]}}n.exports=function(){return W().apply(this,arguments)},n.exports.reset=function(){W().reset()},n.exports.create=F,n.exports.shapeFromPath=P,n.exports.shapeFromText=_})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Tw,!1);const Fp=Tw.exports;Tw.exports.create;const fG=()=>{const[e,t]=m.useState(!1),n=()=>
1790{if(e)return;t(!0);const s=Date.now()+2500,o=()=>{Fp({particleCount:4,angle:60,spread:55,origin:{x:.3,y:.8},colors:["#f59e0b","#ec4899","#8b5cf6","#06b6d4","#fbbf24"]}),Fp({particleCount:4,angle:120,spread:55,origin:{x:.7,y:.8},colors:["#f59e0b","#ec4899","#8b5cf6","#06b6d4","#fbbf24"]}),Date.now()<s&&requestAnimationFrame(o)};o(),setTimeout(()=>{Fp({particleCount:80,spread:100,origin:{y:.6},colors:["#f59e0b","#ec4899","#8b5cf6","#06b6d4","#fbbf24","#f97316"]})},400)};return i.jsxs("div",{className:"min-h-screen bg-amber-50/90 text-stone-900 flex flex-col items-center justify-center p-6 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-amber-100/50 via-transparent to-rose-100/30 pointer-events-none"}),i.jsx(it.h1,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-4xl md:text-6xl font-bold text-center mb-2 tracking-tight text-stone-800",children:"Happy birthday Eda !!!"}),i.jsx(it.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2,duration:.5},className:"text-stone-600 text-lg mb-10",children:"Make a wish and cut the cake"}),i.jsx(it.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.3},className:"relative flex items-end justify-center min-h-[380px] w-full max-w-md",children:i.jsxs("div",{className:"relative w-72 flex flex-col items-center justify-end",children:[i.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-80 h-5 rounded-full bg-gradient-to-b from-stone-100 to-stone-200 border-2 border-stone-300 shadow-[0_8px_24px_rgba(0,0,0,0.12),inset_0_1px_0_rgba(255,255,255,0.8)]"}),i.jsx("div",{className:"absolute -bottom-0.5 left-1/2 -translate-x-1/2 w-72 h-1 rounded-full bg-stone-300/60"}),i.jsx("div",{className:"relative w-64",style:{perspective:"800px"},children:i.jsx(af,{mode:"wait",children:e?i.jsxs(it.div,{initial:{opacity:0}
1790,animate:{opacity:1},transition:{duration:.3},className:"relative flex flex-col items-center",children:[i.jsx("div",{className:"w-full h-7 rounded-t-3xl flex justify-center overflow-hidden",style:{background:"linear-gradient(180deg, #fce7f3 0%, #fbcfe8 40%, #f9a8d4 100%)",boxShadow:"inset 0 2px 8px rgba(255,255,255,0.6)",border:"2px solid #f472b6"},children:i.jsx("div",{className:"w-px h-full bg-stone-500/70 shadow-sm",style:{marginLeft:"44%"}})}),i.jsx("div",{className:"w-full h-14 rounded-b-lg flex justify-center overflow-hidden border-2 border-amber-300/80",style:{background:"linear-gradient(180deg, #fef3c7 0%, #fde68a 25%, #fcd34d 70%, #fbbf24 100%)",boxShadow:"inset 0 3px 12px rgba(255,255,255,0.5)"},children:i.jsx("div",{className:"w-px h-full bg-stone-500/70",style:{marginLeft:"44%"}})}),i.jsx("div",{className:"w-[102%] h-2 -mt-px rounded-b-md bg-gradient-to-b from-rose-200 to-rose-300 flex justify-center",children:i.jsx("div",{className:"w-px h-full bg-stone-500/70",style:{marginLeft:"44%"}})}),i.jsx("div",{className:"w-[96%] h-16 rounded-b-xl flex justify-center overflow-hidden border-2 border-amber-300/80",style:{background:"linear-gradient(180deg, #fffbeb 0%, #fef3c7 30%, #fde68a 80%, #fcd34d 100%)",boxShadow:"inset 0 3px 14px rgba(255,255,255,0.6)"},children:i.jsx("div",{className:"w-px h-full bg-stone-500/70",style:{marginLeft:"44%"}})}),i.jsx("div",{className:"w-[102%] h-2.5 -mt-px rounded-b-lg bg-gradient-to-b from-rose-200 to-rose-300 flex justify-center",children:i.jsx("div",{className:"w-px h-full bg-stone-500/70",style:{marginLeft:"44%"}})}),i.jsx("div",{className:"w-[92%] h-20 rounded-b-2xl flex justify-center overflow-hidden border-2 border-amber-300/80",style:{background:"linear-gradient(180deg, #fefce8 0%, #fef9c3 25%, #fef08a 60%, #fde047 100%)",boxShadow:"inset 0 4px 16px rgba(255,255,255,0.5)"},children:i.jsx("div",{className:"w-px h-full bg-stone-500/70",style:{marginLeft:"44%"}})}),i.jsxs(it.div,{initial:{x:0,opacity:1},animate:{x:130,rotate:-10,opacity:1},transition:{duration:.65,ease:"easeOut"},className:"absolute left-0 top-0 w-[44%] flex flex-col items-stretch overflow-hidden rounded-l-3xl",style:{boxShadow:"6px 6px 20px rgba(0,0,0,0.18), 2px 0 0 rgba(0,0,0,0.05)"},children:[i.jsx("div",{className:"h-7 rounded-tl-3xl border-2 border-r-0 border-rose-300",style:{background:"linear-gradient(180deg, #fce7f3 0%, #f9a8d4 100%)"}}),i.jsx("div",{className:"h-14 border-2 border-r-0 border-amber-300/80",style:{background:"linear-gradient(180deg, #fef3c7 0%, #fbbf24 100%)"}}),i.jsx("div",{className:"h-2 bg-rose-200 border-x-0 border-t-0 border-rose-300/60"}),i.jsx("div",{className:"h-16 border-2 border-r-0 border-amber-300/80",style:{background:"linear-gradient(180deg, #fffbeb 0%, #fcd34d 100%)"}}),i.jsx("div",{className:"h-2.5 bg-rose-200 border-x-0 border-t-0 border-rose-300/60"}),i.jsx("div",{className:"h-20 rounded-bl-2xl border-2 border-r-0 border-amber-300/80",style:{background:"linear-gradient(180deg, #fefce8 0%, #fde047 100%)"}})]})]},"cut"):i.jsxs(it.div,{initial:{opacity:0}
1790,animate:{opacity:1},exit:{opacity:0},className:"relative flex flex-col items-center",children:[i.jsx("div",{className:"w-full h-7 rounded-t-3xl flex items-end justify-center gap-4 pb-1.5 px-2",style:{background:"linear-gradient(180deg, #fce7f3 0%, #fbcfe8 40%, #f9a8d4 100%)",boxShadow:"inset 0 2px 8px rgba(255,255,255,0.6), inset 0 -1px 4px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.08)",border:"2px solid #f472b6"},children:[1,2,3,4,5].map(r=>i.jsxs(it.div,{className:"relative flex flex-col items-center",animate:{scale:[1,1.08,1],filter:["brightness(1)","brightness(1.2)","brightness(1)"]},transition:{duration:1.5,repeat:1/0,delay:r*.12},children:[i.jsx("div",{className:"w-2 h-2.5 rounded-full bg-gradient-to-t from-amber-600 to-orange-400",style:{boxShadow:"0 0 10px rgba(251,146,60,0.9), 0 0 4px rgba(251,146,60,0.5)"}}),i.jsx("div",{className:"w-1.5 h-6 bg-gradient-to-b from-amber-200 to-amber-400 rounded-full mt-0.5 border border-amber-500/40 shadow-sm"})]},r))}),i.jsx("div",{className:"w-full h-14 rounded-b-lg border-2 border-amber-300/80",style:{background:"linear-gradient(180deg, #fef3c7 0%, #fde68a 25%, #fcd34d 70%, #fbbf24 100%)",boxShadow:"inset 0 3px 12px rgba(255,255,255,0.5), inset 0 -2px 8px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.06)"}}),i.jsx("div",{className:"w-[102%] h-2 -mt-px rounded-b-md bg-gradient-to-b from-rose-200 to-rose-300 border-x border-t-0 border-rose-300/60"}),i.jsx("div",{className:"w-[96%] h-16 rounded-b-xl border-2 border-amber-300/80",style:{background:"linear-gradient(180deg, #fffbeb 0%, #fef3c7 30%, #fde68a 80%, #fcd34d 100%)",boxShadow:"inset 0 3px 14px rgba(255,255,255,0.6), inset 0 -2px 10px rgba(0,0,0,0.07), 0 6px 10px rgba(0,0,0,0.08)"}}),i.jsx("div",{className:"w-[102%] h-2.5 -mt-px rounded-b-lg bg-gradient-to-b from-rose-200 to-rose-300 border-x border-t-0 border-rose-300/60"}),i.jsx("div",{className:"w-[92%] h-20 rounded-b-2xl border-2 border-amber-300/80",style:{background:"linear-gradient(180deg, #fefce8 0%, #fef9c3 25%, #fef08a 60%, #fde047 100%)",boxShadow:"inset 0 4px 16px rgba(255,255,255,0.5), inset 0 -3px 12px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1)"}})]},"whole")})})]})}),i.jsx(it.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6,duration:.5},className:"mt-14",children:i.jsx(Ew,{onClick:n,disabled:e,size:"lg",className:"bg-amber-500 hover:bg-amber-600 text-white font-semibold text-lg px-10 py-6 rounded-full shadow-lg hover:shadow-xl transition-all disabled:opacity-80",children:e?"ð Cake cut!":"Slice the cake"})})]})};function mG(e){return fetch(`${dt()}/api/slack/link-state?state=${encodeURIComponent(e)}`)}function pG(e,t){return fetch(`${dt()}/api/slack/link-confirm`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({state:e})})}function gG(){const e=un(),[t]=ur(),{user:n,isReady:r}=Ht(),s=t.get("state")||"",[o,a]=m.useState(null),[l,c]=m.useState(!0),[u,h]=m.useState(null),[f,p]=m.useState(!1),[d,w]=m.useState(!1);m.useEffect(()=>{let x=!1;if(!s){h("Missing link state. Open the link from your Slack DM again."),c(!1);return}return(async()=>{try{const y=await mG(s),g=await y.json().catch(()=>({}));if(x)return;if(!y.ok){h(y.status===410?"This link expired. Open Gem AI in Slack again to get a new link.":(g==null?void 0:g.error)||"This link is invalid. Open Gem AI in Slack again to get a new link."),c(!1);return}a({channelUserId:g.channelUserId,teamId:g.teamId,teamName:g.teamName||"your Slack workspace"})}catch(y){x||h((y==null?void 0:y.message)||"Network error")}finally{x||c(!1)}})(),()=>{x=!0}},[s]),m.useEffect(()=>{if(!r||l||u||!o||n!=null&&n.accessToken)return;const x=`/auth/slack/link?state=${encodeURIComponent(s)}`;e(`/signup?next=${encodeURIComponent(x)}`,{replace:!0})},[r,l,u,o,n==null?void 0:n.accessToken,e,s]);const v=async()=>{if(!(!(n!=null&&n.accessToken)||!s)){p(!0),h(null);try{const x=await pG(s,n.accessToken),y=await x.json().catch(()=>({}));if(!x.ok){h(x.status===410?"This link expired. Open Gem AI in Slack again to get a new link.":(y==null?void 0:y.error)||`Failed to connect (${x.status})`);return}w(!0)}catch(x){h((x==null?void 0:x.message)||"Network error")}finally{p(!1)}}};return i.jsx("div",{className:"min-h-screen bg-[#f5f2ea] flex items-center justify-center p-6",children:i.jsxs("div",{className:"bg-white rounded-2xl shadow-md border border-[#e8e3d8] w-full max-w-[440px] overflow-hidden",children:[i.jsxs("div",{className:"bg-[#4A154B] text-white px-6 py-5 flex items-center gap-3",children:[i.jsx(vO,{className:"w-6 h-6"}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[15px] font-bold",children:"Gem AI for Slack"}),i.jsx("div",{className:"text-[11.5px] opacity-80",children:"Connect your Slack to Gemphere"})]})]}),i.jsxs("div",{className:"px-6 py-6",children:[l&&i.jsxs("div",{className:"text-center py-6",children:[i.jsx("div",{className:"w-6 h-6 mx-auto rounded-full border-2 border-[#4A154B] border-t-transparent animate-spin"}),i.jsx("div",{className:"mt-3 text-[12px] text-[#888]",children:"Checking your Slack linkâ¦"})]}),!l&&u&&!d&&i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"text-[14px] text-[#1a1a1a] font-semibold",children:"We can't open this link"}),i.jsx("div",{className:"text-[12.5px] text-[#5a5040] leading-relaxed",children:u}),i.jsxs("button",{onClick:()=>e("/gem-ai"),className:"inline-flex items-center gap-1.5 mt-2 text-[12px] text-[#4A154B] hover:underline",children:[i.jsx(tl,{className:"w-3.5 h-3.5"}),"Back to Gem AI"]})]}),!l&&!u&&!d&&o&&(n==null?void 0:n.accessToken)&&i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"text-[13px] text-[#5a5040] leading-relaxed",children:["Connect ",i.jsx("span",{className:"font-bold text-[#1a1a1a]",children:o.teamName})," Slack to your Gemphere account?"]}),i.jsx("div",{className:"bg-[#fafaf6] border border-[#e8e3d8] rounded-lg px-3.5 py-3 text-[11.5px] text-[#666] leading-relaxed",children:"Once connected, you can DM Gem AI from Slack to find warm introductions to investors, customers, and talent in your network."}),i.jsxs("div",{className:"text-[11px] text-[#888]",children:["Signed in as ",i.jsx("span",{className:"font-semibold text-[#1a1a1a]",children:n.fullName||n.email||`User ${n.userId}`})]}),i.jsx("button",{onClick:v,disabled:f,className:"w-full px-4 py-2.5 bg-[#4A154B] text-white text-[13px] font-semibold rounded-lg hover:bg-[#3a103b] transition-colors disabled:opacity-50",children:f?"Connectingâ¦":"Connect"}),i.jsx("button",{onClick:()=>e("/gem-ai"),className:"block w-full text-center text-[11.5px] text-[#888] hover:text-[#1a1a1a] transition-colors",children:"Cancel"})]}),d&&i.jsxs("div",{className:"text-center py-2 space-y-3",children:[i.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-[#E1F5EE] flex items-center justify-center",children:i.jsx(Xv,{className:"w-6 h-6 text-[#0F6E56]"})}),i.jsx("div",{className:"text-[15px] font-bold text-[#1a1a1a]",children:"Connected!"}),i.jsxs("div",{className:"text-[12.5px] text-[#5a5040] leading-relaxed",children:["Return to Slack â Gem AI is ready to help in ",(o==null?void 0:o.teamName)||"your workspace","."]}),i.jsxs("button",{onClick:()=>e("/gem-ai"),className:"mt-2 inline-flex items-center gap-1.5 text-[12px] text-[#4A154B] hover:underline",children:[i.jsx(tl,{className:"w-3.5 h-3.5"}),"Back to Gem AI"]})]})]})]})})}function hl({message:e,variant:t="section",className:n}){return i.jsxs("div",{className:rn("gp-page-loading",`gp-page-loading--${t}`,n),role:"status","aria-live":"polite","aria-busy":"true",children:[i.jsxs("div",{className:"gp-page-loading__spinner","aria-hidden":"true",children:[i.jsx("div",{className:"gp-page-loading__ring"}),i.jsx("img",{src:kn,alt:"",className:"gp-page-loading__mark",draggable:!1})]}),e?i.jsx("p",{className:"gp-page-loading__msg",children:e}):null,t==="page"?i.jsxs("div",{className:"gp-page-loading__skeleton","aria-hidden":"true",children:[i.jsx("div",{className:"gp-page-loading__skeleton-line gp-page-loading__skeleton-line--wide"}),i.jsx("div",{className:"gp-page-loading__skeleton-line"}),i.jsx("div",{className:"gp-page-loading__skeleton-line gp-page-loading__skeleton-line--short"})]}):null]})}function yG(e,t){return fetch(`${dt()}/api/gemphere/search`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({search:e})})}function oj(e){return e===1?"Founder":e===2?"Investor":e===3?"Scout":""}function vG(e){const t=e.replace(/\s+/g," ").trim().split(" ").filter(
1790Boolean);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():e.slice(0,2).toUpperCase()||"?"}function xG({photo:e,name:t}){const[n,r]=m.useState(!1),s=e&&String(e).trim()&&!n;return i.jsx("div",{className:"search-result-av",children:s?i.jsx("img",{src:String(e).trim(),alt:"",onError:()=>r(!0),className:"search-result-av-img"}):i.jsx("span",{children:vG(t)})})}function wG(){const{user:e}=Ht(),{openLogin:t}=kw(),{openProfile:n}=YI(),[r]=ur(),[s,o]=m.useState(()=>r.get("q")??""),[a,l]=m.useState(""),[c,u]=m.useState([]),[h,f]=m.useState(!1),[p,d]=m.useState(null),w=m.useCallback(async x=>{const y=x.trim();if(!(e!=null&&e.accessToken)){u([]);return}if(!y){u([]),l("");return}f(!0),d(null),l(y);try{const g=await yG(y,e.accessToken),b=await g.json(),S=Array.isArray(b==null?void 0:b.users)?b.users:[];u(S.filter(j=>(j.userId??j.id)!=null).map(j=>({userId:Number(j.userId??j.id),fullname:String(j.fullname??j.fullName??"").trim()||`User ${j.userId??j.id}`,photo:j.photo??j.profilePhoto??null,role:Number(j.role??0),handle:j.handle??null}))),g.ok===!1&&!(b!=null&&b.users)&&d((b==null?void 0:b.message)??(b==null?void 0:b.error)??"Search failed")}catch(g){d(g instanceof Error?g.message:"Search failed"),u([])}finally{f(!1)}},[e==null?void 0:e.accessToken]),v=m.useRef(null);return m.useEffect(()=>{if(!(e!=null&&e.accessToken))return;const x=s.trim();if(!x){u([]),l(""),f(!1);return}return v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{w(x),v.current=null},300),()=>{v.current&&clearTimeout(v.current)}},[s,e==null?void 0:e.accessToken,w]),e?i.jsxs("div",{className:"page active page-search",children:[i.jsxs("div",{className:"top-header",children:[i.jsxs("div",{className:"header-left",children:[i.jsx("div",{className:"search-kicker",children:"Directory"}),i.jsx("div",{className:"page-h",children:"Search"}),i.jsx("div",{className:"page-sub",children:"Find founders, investors, and scouts. Connect or refer from their profile."})]}),a&&c.length>0?i.jsxs("div",{className:"search-header-stat",children:[i.jsx("div",{className:"search-header-stat-num",children:c.length}),i.jsx("div",{className:"search-header-stat-lbl",children:"Results"})]}):null]}),i.jsx("div",{className:"search-find-row",children:i.jsxs("div",{className:"search-box",children:[i.jsx("span",{className:"search-ico","aria-hidden":!0,children:"â"}),i.jsx("input",{type:"text",placeholder:"Search by name...",value:s,onChange:x=>o(x.target.value)})]})}),p?i.jsx("div",{className:"search-error",role:"alert",children:p}):null,h?i.jsx(hl,{variant:"section",message:"Searchingâ¦"}):a&&c.length===0?i.jsxs("div",{className:"search-empty-panel",children:[i.jsx("div",{className:"search-empty-title",children:"No results"}),i.jsx("p",{className:"search-empty-desc",children:"Try a different search term."})]}):c.length>0?i.jsx("ul",{className:"search-results-list",children:c.map(x=>i.jsx("li",{children:i.jsxs("button",{type:"button",className:"search-result-row",onClick:()=>n(x.userId,{name:x.fullname,photo:x.photo}),children:[i.jsx(xG,{photo:x.photo,name:x.fullname}),i.jsxs("div",{className:"search-result-body",children:[i.jsx("div",{className:"search-result-name",children:x.fullname}),oj(x.role)?i.jsx("div",{className:"search-result-role",children:oj(x.role)}):null]}),i.jsx("span",{className:"search-result-action",children:"View profile"})]})},x.userId))}):null]}):i.jsxs("div",{className:"page active page-search",children:[i.jsx("div",{className:"top-header",children:i.jsxs("div",{className:"header-left",children:[i.jsx("div",{className:"search-kicker",children:"Directory"}),i.jsx("div",{className:"page-h",children:"Search"}),i.jsx("div",{className:"page-sub",children:"Find founders, investors, and scouts. Connect or refer from their profiles."})]})}),i.jsxs("div",{className:"search-signin-panel",children:[i.jsx("div",{className:"search-signin-title",children:"Sign in to search"}),i.jsx("p",{className:"search-signin-desc",children:"Search for founders, investors, and scouts. Connect or refer from their profiles."}),i.jsx("button",{type:"button",className:"gp-btn-solid",onClick:()=>t({redirectTo:"/search"}),children:"Log in"})]})]})}function bG(){const[e]=ur(),t=m.useMemo(()=>cl(e.get("returnTo"))||cl(e.get("next")),[e]),n=e.get("invite");if(m.useEffect(()=>{t&&xw(t)},[t]),t&&t.startsWith("/onboarding/"))return i.jsx(Wn,{to:t,replace:!0});if(n)return i.jsx(Wn,{to:`/onboarding/enterprise?invite=${encodeURIComponent(n)}`,replace:!0});const r=t?`/onboarding/enterprise?returnTo=${encodeURIComponent(t)}`:"/onboarding/enterprise";return i.jsx(Wn,{to:r,replace:!0})}function SG(){const[e]=ur(),{openLogin:t}=kw(),n=cl(e.get("next"))||cl(e.get("returnTo"));return m.useEffect(()=>{n&&xw(n),t({redirectTo:n||void 0})},[t,n]),i.jsx(Wn,{to:n||"/",replace:!0})}function jG(){var r;const[e]=ur(),{openMessageMe:t}=um(),n=((r=e.get("returnTo"))==null?void 0:r.trim())||"/";return m.useEffect(()=>{t()},[t]),i.jsx(Wn,{to:n.startsWith("/")?n:"/",replace:!0})}function kG(){const{openMessageMe:e}=um();return i.jsxs("div",{className:"lp-root",children:[i.jsx("style",{children:NG}),i.jsx("div",{className:"topnav",children:i.jsxs("div",{className:"brand-lockup",children:[i.jsx("img",{src:kn,alt:"",className:"brand-mark",draggable:!1}),i.jsx("span",{className:"brand-name",children:"Gemphere"})]})}),i.jsxs("div",{className:"hero",children:[i.jsxs("h1",{className:"hero-title",children:["Get ",i.jsx("em",{children:"warm intros"})," to anyone, through people who already have your back."]}),i.jsx("div",{className:"hero-cta-row",children:i.jsx("button",{type:"button",className:"btn primary",onClick:e,children:"Message me â"})}),i.jsx("div",{className:"hero-note",children:"Free to start · No credit card · Set up in two minutes"})]}),i.jsxs("div",{className:"section",children:[i.jsx("div",{className:"section-label",children:"Who this is for"}),i.jsxs("h2",{className:"section-title",children:["Built for people deep in the ",i.jsx("em",{children:"startup ecosystem"}),"."]}),i.jsx("p",{className:"section-sub",children:"If you've been around for a few years as a founder, investor, operator, or advisor, you already have a network most people would kill for. The problem isn't who you know. It's that your network has too many people to match in your head, in either direction."}),i.jsxs("div",{className:"problem-grid",children:[i.jsxs("div",{className:"problem-card",children:[i.jsx("div",{className:"problem-tag",children:"The problem"}),i.jsxs("div",{className:"problem-title",children:["Your network is ",i.jsx("em",{children:"too big"})," to map in your head."]}),i.jsxs("div",{className:"problem-body",children:["A few years in and you know hundreds of people. You can't actually think through all of them when you need something, let alone when ",i.jsx("em",{children:"they"}
vendor: 8,612 bytes, lines 1790-2045
1790)," need something. Most of the value in your network just sits there."]})]}),i.jsxs("div",{className:"problem-card",children:[i.jsx("div",{className:"problem-tag",children:"The problem"}),i.jsxs("div",{className:"problem-title",children:["You don't know the ",i.jsx("em",{children:"best fit"}),", either way."]}),i.jsx("div",{className:"problem-body",children:"Who's the right person to help you raise? Who in your network should you intro to that founder friend? Both questions are work no one has time to do by hand. So the right intros don't happen, in either direction."})]}),i.jsxs("div",{className:"problem-card solution",children:[i.jsx("div",{className:"problem-tag",children:"Gem AI"}),i.jsxs("div",{className:"problem-title",children:["Matches both sides, ",i.jsx("em",{children:"every week"}),"."]}),i.jsx("div",{className:"problem-body",children:"Gem reads the intents and the networks, and finds the fits. You get warm intros through people who have your back, and you help the people in your network get warm intros too. Both directions, always on."})]})]})]}),i.jsx("div",{className:"section",children:i.jsx("div",{className:"private-block",children:i.jsxs("div",{className:"private-grid",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"private-title",children:["Set up in ",i.jsx("em",{children:"two minutes"}),"."]}),i.jsx("div",{className:"private-body",children:"Two steps to tell Gem who you are and what you're working on. Two more to add your network and your connectors. Next Monday, the briefs start. No credit card, no demo."})]}),i.jsxs("div",{className:"private-form",children:[i.jsx("div",{className:"form-label",children:"Ready?"}),i.jsxs("button",{type:"button",className:"cta-large",onClick:e,children:[i.jsx("span",{className:"cta-large-text",children:"Message me"}),i.jsx("span",{className:"cta-large-arrow",children:"â"})]}),i.jsx("div",{className:"cta-sub-note",children:"Step 1 of 5 · ~2 minutes"})]})]})})}),i.jsxs("div",{className:"page-footer",children:[i.jsxs("div",{className:"brand-lockup",children:[i.jsx("img",{src:kn,alt:"",className:"brand-mark",draggable:!1}),i.jsx("span",{className:"brand-name",children:"Gemphere"})]}),i.jsxs("div",{className:"footer-links",children:[i.jsx("a",{href:"/privacy",children:"Privacy"}),i.jsx("a",{href:"/terms",children:"Terms"}),i.jsx("a",{href:"mailto:[email protected]",children:"Contact"})]})]})]})}const NG=` 1791.lp-root, .lp-root * { box-sizing: border-box; margin: 0; padding: 0; } 1792.lp-root { 1793 --lp-bg: #e8e2d2; 1794 --lp-card: #fff; 1795 --lp-card-warm: #fffdf9; 1796 --lp-card-alt: #faf8f4; 1797 --lp-border: #e8e3d8; 1798 --lp-border-soft: #ece6d8; 1799 --lp-border-warm: #f0ebd8; 1800 --lp-ink: #1a1a1a; 1801 --lp-ink-2: #2a2820; 1802 --lp-ink-3: #3a3a3a; 1803 --lp-muted: #6b6558; 1804 --lp-muted-2: #9a8a70; 1805 --lp-green: #1D9E75; 1806 --lp-green-bg: #E1F5EE; 1807 --lp-green-ink: #0F6E56; 1808 background: var(--lp-bg); 1809 color: var(--lp-ink-2); 1810 font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 1811 -webkit-font-smoothing: antialiased; 1812 -moz-osx-font-smoothing: grayscale; 1813 line-height: 1.5; 1814 min-height: 100vh; 1815} 1816 1817.lp-root .topnav { 1818 display: flex; align-items: center; 1819 padding: 22px 40px; 1820 max-width: 1120px; 1821 margin: 0 auto; 1822} 1823.lp-root .brand-lockup { display: flex; align-items: center; gap: 10px; } 1824.lp-root .brand-mark { 1825 width: 36px; height: 36px; 1826 object-fit: contain; 1827 display: block; 1828 flex-shrink: 0; 1829 background: transparent; 1830} 1831.lp-root .brand-name { 1832 font-family: 'Instrument Serif', Georgia, serif; 1833 font-size: 20px; 1834 color: var(--lp-ink); 1835 letter-spacing: -0.01em; 1836} 1837 1838.lp-root .hero { 1839 max-width: 720px; 1840 margin: 72px auto 0; 1841 padding: 0 40px; 1842 text-align: center; 1843} 1844.lp-root .hero-title { 1845 font-family: 'Instrument Serif', Georgia, serif; 1846 font-weight: 400; 1847 font-size: 56px; 1848 color: var(--lp-ink); 1849 letter-spacing: -0.02em; 1850 line-height: 1.08; 1851 margin-bottom: 24px; 1852} 1853.lp-root .hero-title em { font-style: italic; } 1854.lp-root .hero-cta-row { 1855 display: flex; gap: 10px; justify-content: center; 1856 margin-bottom: 20px; 1857} 1858.lp-root .btn { 1859 font-size: 13.5px; 1860 padding: 13px 20px; 1861 border-radius: 11px; 1862 font-family: inherit; 1863 font-weight: 500; 1864 cursor: pointer; 1865 letter-spacing: -0.005em; 1866 transition: all 0.15s; 1867 border: 1px solid var(--lp-border); 1868 background: #fff; 1869 color: var(--lp-ink-3); 1870 text-decoration: none; 1871 display: inline-block; 1872} 1873.lp-root .btn:hover { background: var(--lp-card-alt); } 1874.lp-root button.btn, 1875.lp-root button.cta-large { 1876 cursor: pointer; 1877 appearance: none; 1878} 1879.lp-root .btn.primary { 1880 background: var(--lp-ink-2); color: #fff; border-color: var(--lp-ink-2); 1881} 1882.lp-root .btn.primary:hover { background: #000; } 1883.lp-root .hero-note { 1884 font-size: 12px; 1885 color: var(--lp-muted-2); 1886 letter-spacing: -0.005em; 1887} 1888 1889.lp-root .section { 1890 max-width: 960px; 1891 margin: 120px auto 0; 1892 padding: 0 40px; 1893} 1894.lp-root .section-label { 1895 font-size: 11px; font-weight: 600; 1896 text-transform: uppercase; letter-spacing: 0.14em; 1897 color: var(--lp-muted-2); 1898 margin-bottom: 14px; 1899 text-align: center; 1900} 1901.lp-root .section-title { 1902 font-family: 'Instrument Serif', Georgia, serif; 1903 font-weight: 400; 1904 font-size: 36px; 1905 color: var(--lp-ink); 1906 letter-spacing: -0.015em; 1907 line-height: 1.15; 1908 margin: 0 auto 14px; 1909 text-align: center; 1910 max-width: 640px; 1911} 1912.lp-root .section-title em { font-style: italic; } 1913.lp-root .section-sub { 1914 font-size: 15px; color: var(--lp-muted); 1915 line-height: 1.65; 1916 text-align: center; 1917 max-width: 580px; 1918 margin: 0 auto 48px; 1919} 1920 1921.lp-root .problem-grid { 1922 display: grid; 1923 grid-template-columns: repeat(3, 1fr); 1924 gap: 18px; 1925} 1926.lp-root .problem-card { 1927 background: var(--lp-card); 1928 border: 1px solid var(--lp-border); 1929 border-radius: 20px; 1930 padding: 36px 32px 34px; 1931 min-height: 280px; 1932 display: flex; 1933 flex-direction: column; 1934} 1935.lp-root .problem-card.solution { 1936 background: var(--lp-ink-2); 1937 color: #fff; 1938 border-color: var(--lp-ink-2); 1939} 1940.lp-root .problem-tag { 1941 display: inline-block; 1942 font-size: 10.5px; font-weight: 600; 1943 text-transform: uppercase; letter-spacing: 0.14em; 1944 color: var(--lp-muted-2); 1945 margin-bottom: 24px; 1946} 1947.lp-root .problem-card.solution .problem-tag { color: rgba(255,255,255,0.55); } 1948.lp-root .problem-title { 1949 font-family: 'Instrument Serif', Georgia, serif; 1950 font-size: 28px; 1951 color: var(--lp-ink); 1952 line-height: 1.18; 1953 letter-spacing: -0.015em; 1954 margin-bottom: 16px; 1955} 1956.lp-root .problem-card.solution .problem-title { color: #fff; } 1957.lp-root .problem-title em { font-style: italic; } 1958.lp-root .problem-body { 1959 font-size: 14px; 1960 color: var(--lp-muted); 1961 line-height: 1.62; 1962} 1963.lp-root .problem-card.solution .problem-body { color: rgba(255,255,255,0.72); } 1964 1965.lp-root .private-block { 1966 background: var(--lp-ink-2); 1967 color: #fff; 1968 border-radius: 20px; 1969 padding: 48px 44px; 1970 position: relative; 1971 overflow: hidden; 1972} 1973.lp-root .private-grid { 1974 display: grid; 1975 grid-template-columns: 1.2fr 1fr; 1976 gap: 40px; 1977 align-items: center; 1978} 1979.lp-root .private-title { 1980 font-family: 'Instrument Serif', Georgia, serif; 1981 font-size: 32px; 1982 line-height: 1.15; 1983 letter-spacing: -0.015em; 1984 margin-bottom: 14px; 1985} 1986.lp-root .private-title em { font-style: italic; } 1987.lp-root .private-body { 1988 font-size: 14px; 1989 color: rgba(255,255,255,0.72); 1990 line-height: 1.65; 1991} 1992.lp-root .private-form { 1993 background: rgba(255,255,255,0.04); 1994 border: 1px solid rgba(255,255,255,0.1); 1995 border-radius: 14px; 1996 padding: 22px; 1997} 1998.lp-root .form-label { 1999 font-size: 11px; font-weight: 600; 2000 text-transform: uppercase; letter-spacing: 0.1em; 2001 color: rgba(255,255,255,0.55); 2002 margin-bottom: 10px; 2003} 2004.lp-root .cta-large { 2005 display: flex; 2006 align-items: center; 2007 justify-content: space-between; 2008 width: 100%; 2009 padding: 18px 22px; 2010 background: #fff; 2011 color: var(--lp-ink-2); 2012 border-radius: 12px; 2013 text-decoration: none; 2014 font-family: inherit; 2015 transition: all 0.15s; 2016 border: 1px solid rgba(255,255,255,0.12); 2017} 2018.lp-root .cta-large:hover { 2019 background: var(--lp-card-warm); 2020 transform: translateY(-1px); 2021} 2022.lp-root .cta-large-text { 2023 font-family: 'Instrument Serif', Georgia, serif; 2024 font-size: 22px; 2025 letter-spacing: -0.01em; 2026 line-height: 1; 2027} 2028.lp-root .cta-large-arrow { 2029 font-size: 20px; 2030 color: var(--lp-ink-2); 2031 transition: transform 0.15s; 2032} 2033.lp-root .cta-large:hover .cta-large-arrow { transform: translateX(3px); } 2034.lp-root .cta-sub-note { 2035 margin-top: 12px; 2036 font-size: 11.5px; 2037 color: rgba(255,255,255,0.5); 2038 text-align: center; 2039 letter-spacing: -0.005em; 2040} 2041 2042.lp-root .page-footer { 2043 max-width: 960px; 2044 margin: 120px auto 0; 2045 padding: 40px;
2046 border-top: 1px solid rgba(42, 40, 32, 0.12); 2047 display: flex; 2048 justify-content: space-between; 2049 align-items: center; 2050 font-size: 11.5px; 2051 color: var(--lp-muted-2); 2052 letter-spacing: -0.005em; 2053} 2054.lp-root .page-footer .brand-lockup { gap: 8px; } 2055.lp-root .page-footer .brand-name { font-size: 15px; } 2056.lp-root .page-footer .brand-mark { width: 28px; height: 28px; } 2057.lp-root .footer-links { display: flex; gap: 24px; } 2058.lp-root .footer-links a { color: var(--lp-muted-2); text-decoration: none; } 2059.lp-root .footer-links a:hover { color: var(--lp-ink-2); } 2060 2061@media (max-width: 760px) { 2062 .lp-root .hero-title { font-size: 42px; } 2063 .lp-root .section-title { font-size: 28px; } 2064 .lp-root .problem-grid { grid-template-columns: 1fr; } 2065 .lp-root .private-grid { grid-template-columns: 1fr; } 2066 .lp-root .private-block { padding: 32px 28px; } 2067 .lp-root .topnav, 2068 .lp-root .hero, 2069 .lp-root .section { padding-left: 24px; padding-right: 24px; } 2070} 2071`,CG=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i;function Ki(e,t){const n=(e||"").trim();if(!n||CG.test(n))return!0;const r=(t||"").trim().toLowerCase();return!!(r&&n.toLowerCase()===r)}function _l(e,t){const n=(e||"").trim();if(n&&!Ki(n,t))return n;const r=(t||(Ki(n,null)?n:"")).trim();return TG(r)||null}function Gn(e,t){const n=_l(e,t);if(n){const s=n.split(/\s+/)[0];if(s)return s}const r=fl(t);if(r)return r;if(Ki(e,null)){const s=fl(e.trim());if(s)return s}return"there"}function Pw(e,t){const n=Gn(e,t);return!n||n==="there"?"their email":`${n.endsWith("s")?`${n}'`:`${n}'s`} email`}function Nc(e,t){return!!_l(e,t)}function hh(e,t){const n=_l(e,t);return n?n.replace(/[^a-zA-Z]/g,"").length>=2:!1}function Ed(e,t){const n=(e.rawName??e.name).trim();return!hh(n,t)}function An(e,t){const n=_l(e,t);if(!n)return"them";const r=n.split(/\s+/).filter(Boolean)[0]||n;return Iw(r)}function Iw(e){const t=(e||"").trim();return t?t.split(/\s+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" "):""}function fl(e){const t=(e||"").trim();if(!t||!t.includes("@"))return"";const n=t.split("@")[0].replace(/\+.*$/,"").trim();if(!n)return"";const r=n.split(/[._-]/).find(o=>/[a-zA-Z0-9]/.test(o))||"";if(!r)return"";const s=r.replace(/[^a-zA-Z0-9]/g,"");return s?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():""}function rJ(e,t){const n=(e||"").trim();return n&&!Ki(n,t)&&!Ki(n,null)?Iw(n):fl(t)||fl(n)||""}const EG=new Set(["Member","Founder","Investor","Scout","Imported contact","Added by email"]);function aj(e){let n=[e.title,e.companyName].map(s=>(s||"").trim()).filter(Boolean).join(" · ");if(!n){const s=(e.role||"").trim();s&&!EG.has(s)&&(n=s)}const r=(e.email||"").trim();return{titleLine:n,emailLine:r}}function tA(e,t){const n=_l(e,t);if(n)return Iw(n);const r=fl(t);if(r)return r;if(Ki(e,null)){const s=fl(e.trim());if(s)return s}return"Contact"}function TG(e){const t=(e||"").trim();if(!t)return"";const n=t.split("@")[0]||"";return n?n.replace(/\./g," ").trim():""}async function PG(e){const t=await zu(`/api/unipile/status/${e}`);if(!t.ok)throw new Error("Failed to load import status");return t.json()}async function IG(e){const t=await zu(`/api/unipile/consume/${e}`);if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error((n==null?void 0:n.error)||"Auth not ready yet")}return t.json()}async function lj(e,t){const n=await BI("/api/unipile/complete",{nonce:e,account_id:t}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error((r==null?void 0:r.error)||"Completion failed");return r}async function xf(e,t){const n=Ma();if(!n||!e)return!1;const r=y7(),s={phoneNumber:n};r!=null&&r.fullName&&(s.fullname=r.fullName);const o=4;for(let a=0;a<o;a++)try{return await BE(e,s),s7(),!0}catch(l){if(a===o-1)return console.warn("[onboarding] failed to persist verified phone:",l),!1;await new Promise(c=>setTimeout(c,500*(a+1)))}return!1}const ba="gemphere_onboarding_invite";function ml(e){return String(e||"").trim().replace(/[^a-zA-Z0-9@._+-]/g,"").slice(0,255)}function La(){try{return ml(sessionStorage.getItem(ba)||localStorage.getItem(ba))}catch{return""}}function $a(e){const t=ml(e);try{t?(sessionStorage.setItem(ba,t),localStorage.setItem(ba,t)):(sessionStorage.removeItem(ba),localStorage.removeItem(ba))}catch{}}const zy="gemphere_onboarding_trial";function Fo(e){return String(e||"").trim().replace(/[^a-zA-Z0-9_-]/g,"").slice(0,64)}function Da(){try{return Fo(sessionStorage.getItem(zy))}catch{return""}}function Cc(e){const t=Fo(e);try{t?sessionStorage.setItem(zy,t):sessionStorage.removeItem(zy)}catch{}}function Wy(e){const t=new URLSearchParams;(e==null?void 0:e.step)!=null&&t.set("step",String(e.step)),e!=null&&e.gmailConnected&&t.set("gmailConnected","1");const n=Fo((e==null?void 0:e.trial)||Da());n&&t.set("trial",n);const r=t.toString();return r?`/onboarding/enterprise?${r}`:"/onboarding/enterprise"}const Gy="gemphere_onboarding_oauth_return",AG=["/onboarding","/sf-tech-week"];function Gu(e){try{sessionStorage.setItem(Gy,JSON.stringify(e))}catch{}}function RG(){try{const e=sessionStorage.getItem(Gy);if(!e)return null;sessionStorage.removeItem(Gy);const t=JSON.parse(e);if(!(t!=null&&t.path)||typeof t.path!="string"||!AG.some(r=>t.path.startsWith(r)))return null;const n=Number(t.step);return!Number.isInteger(n)||n<1?null:{path:t.path,step:n,...t.mailboxProvider?{mailboxProvider:t.mailboxProvider}:{}}}catch{return null}}function cj({path:e,step:t,mailboxProvider:n}){const[r,s=""]=e.split("#"),[o,a=""]=r.split("?"),l=new URLSearchParams(a);l.set("step",String(t)),l.set("mailboxConnected","1"),n&&l.set("mailboxProvider",n);const c=Da();c&&l.set("trial",c);const u=l.toString();return`${o}${u?`?${u}
2071`:""}${s?`#${s}`:""}`}function _G(e){if(e.get("oauth")==="1"||e.get("nylas")==="1")return!0;const t=e.get("nonce")||"",n=(e.get("provider")||"").toLowerCase();return!t||e.get("account_id")?!1:n==="google"||n==="microsoft"||n==="outlook"}function OG(){const[e]=ur(),t=un(),{user:n,login:r,refreshTier:s}=Ht(),o=_G(e),a=e.get("nonce")||"",l=(e.get("provider")||(o?"google":"")).toLowerCase(),c=l==="outlook"||l==="microsoft"?"microsoft":l,u=c==="microsoft",h=(e.get("mode")||"signup").toLowerCase(),f=e.get("account_id")||"",p=e.get("error")==="1",d=e.get("reason")||"",w=p&&d==="account_not_found",v=e.get("email")||"",[x,y]=m.useState(p?"error":"consuming"),[g,b]=m.useState(cu),[S,j]=m.useState(w?`There's no Gemphere account for ${v||"that email"}. Please sign up first.`:p?d?`Connection failed: ${d}`:"Connection cancelled or failed.":"Finishing sign-inâ¦"),[T,C]=m.useState(0),[E,A]=m.useState((n==null?void 0:n.userId)??null),R=m.useRef(!1),V=(n==null?void 0:n.userId)??E,D=m.useMemo(()=>h==="connect"?RG():null,[h]);return m.useEffect(()=>{if(p||R.current)return;R.current=!0,(async()=>{var F,Y,W;if(o){if(h==="connect"){if(s&&s(),D){t(cj({...D,mailboxProvider:D.mailboxProvider??(u?"microsoft":"google")}),{replace:!0});return}t("/settings",{replace:!0});return}for(let H=0;H<30;H++){try{const P=await u7(a);if((F=P==null?void 0:P.data)!=null&&F.accessToken&&P.data.userId){const _=(P.data.fullName||"").trim(),k=typeof P.data.email=="string"?P.data.email:null,N=_&&!Ki(_,k)?_:"New user";r({userId:P.data.userId,fullName:N,accessToken:P.data.accessToken,refreshToken:P.data.refreshToken}),A(P.data.userId),s&&s();const B=u?"microsoft":"google",z=o7()==="login"||h==="login";if(z||await xf(P.data.accessToken),!z&&gf()){r7(),v7().then(b),y("whatsapp"),j("");return}const ee=!!La();try{const X=await qn(P.data.accessToken),G=(X.pendingTeamInviteToken||"").trim();G&&!ee&&Io(G);const ne=z?await JW(P.data.accessToken,P.data.userId,X,{ignorePendingTeamInvite:ee}):await QW(P.data.accessToken,P.data.userId,X,{mailboxProvider:B,ignorePendingTeamInvite:ee});t(ne,{replace:!0})}catch{t(z?"/":`/onboarding/enterprise?step=1&mailboxProvider=${B}`,{replace:!0})}return}}catch{}await new Promise(P=>setTimeout(P,1500))}y("error"),j("We couldn't complete sign-in in time. Please try again.");return}if(h==="connect"){if(f)try{await lj(a,f)}catch{}if(D){t(cj(D),{replace:!0});return}t("/settings",{replace:!0});return}if(f)try{const H=await lj(a,f);if((Y=H==null?void 0:H.data)!=null&&Y.accessToken&&H.data.userId){r({userId:H.data.userId,fullName:H.data.fullName||"New user",accessToken:H.data.accessToken,refreshToken:H.data.refreshToken}),A(H.data.userId),y("importing"),j("Importing your contacts â this runs in the background.");return}}catch(H){console.warn("[oauth-done] complete failed, falling back to consume poll:",H)}for(let H=0;H<30;H++){try{const P=await IG(a);if((W=P==null?void 0:P.data)!=null&&W.accessToken&&P.data.userId){r({userId:P.data.userId,fullName:P.data.fullName||"New user",accessToken:P.data.accessToken,refreshToken:P.data.refreshToken}),A(P.data.userId),y("importing"),j("Importing your contacts â this runs in the background.");return}}catch{}await new Promise(P=>setTimeout(P,2e3))}y("error"),j("We couldn't complete sign-in in time. Please try again.")})()},[p,o,a,h,c,u,f,r,t,D,s]),m.useEffect(()=>{if(x!=="importing"||!V)return;let J=!0,F=0;const Y=48,W=async()=>{F+=1;try{const P=o?await c7(V):await PG(V);if(!J)return;const _=P.providers.find(k=>k.provider===c);if(!_){F>=Y&&h==="connect"&&t("/settings",{replace:!0});return}C(_.imported_count||0),_.status==="done"?(y("done"),j(`Imported ${_.imported_count||0} contacts.`)):_.status==="error"?(y("error"),j(_.last_error||"Contact import failed.")):F>=Y&&h==="connect"&&t("/settings",{replace:!0})}catch{F>=Y&&h==="connect"&&t("/settings",{replace:!0})}};W();const H=window.setInterval(W,2500);return()=>{J=!1,window.clearInterval(H)}},[x,V,c,o,h,t]),m.useEffect(()=>{if(x!=="done")return;const J=window.setTimeout(()=>{const F=h==="connect"?"/settings":Wy({step:2});t(F,{replace:!0})},1200);return()=>window.clearTimeout(J)},[x,h,t]),i.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-background",children:i.jsxs("div",{className:"max-w-md w-full text-center space-y-6 p-8 rounded-2xl border border-border bg-card",children:[i.jsx("div",{className:"flex justify-center",children:x==="consuming"||x==="importing"?i.jsx(bn,{className:"w-10 h-10 animate-spin text-primary"}):x==="done"||x==="whatsapp"?i.jsx(ex,{className:"w-10 h-10 text-green-500"}):i.jsx(wO,{className:"w-10 h-10 text-destructive"})}),i.jsxs("h1",{className:"text-2xl font-bold",children:[x==="consuming"&&"Signing you inâ¦",x==="importing"&&"Importing your contacts",x==="done"&&"All set!",x==="whatsapp"&&"Account created â
",x==="error"&&(w?"Account not found":"Something went wrong")]}),x==="whatsapp"?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-muted-foreground",children:"You're done here â Gem is picking things up in WhatsApp with a couple of quick questions. Head back to the chat."}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("a",{href:g,className:"block w-full py-3 px-6 rounded-xl bg-primary text-primary-foreground font-medium",children:"Open WhatsApp"}),i.jsx("button",{type:"button",className:"block w-full py-3 px-6 rounded-xl border border-border text-foreground font-medium",onClick:()=>t("/home",{replace:!0}),children:"Go to home page"})]})]}):i.jsx("p",{className:"text-muted-foreground",children:S}),x==="importing"&&i.jsx("p",{className:"text-sm text-muted-foreground",children:T>0?`${T} contacts imported so farâ¦`:"Fetching your networkâ¦"}),x==="error"&&(w?i.jsxs("div",{className:"space-y-3",children:[i.jsx("button",{type:"button",className:"block w-full py-3 px-6 rounded-xl bg-primary text-primary-foreground font-medium",onClick:()=>t("/",{replace:!0}),children:"Sign up"}),i.jsx("button",{type:"button",className:"block w-full py-3 px-6 rounded-xl border border-border text-foreground font-medium",onClick:()=>t("/login",{replace:!0}),children:"Back to log in"})]}):i.jsx("button",{type:"button",className:"py-3 px-6 rounded-xl bg-primary text-primary-foreground font-medium",onClick:()=>t(h==="connect"?"/settings":"/onboarding/enterprise",{replace:!0}),children:"Try again"}))]})})}function ms({eyebrow:e,title:t,subtitle:n,step:r,totalSteps:s,children:o,flowLabel:a}){return i.jsx("div",{className:"ob-root",children:i.jsxs("div",{className:"ob-shell",children:[e||n||t?i.jsxs("div",{className:"ob-gallery-header",children:[e?i.jsx("div",{className:"eyebrow",children:e}):null,i.jsx("h1",{children:t}),n?i.jsx("p",{children:n}):null]}):null,i.jsx("div",{className:"ob-step-frame",children:i.jsxs("div",{className:"ob-card",children:[i.jsxs("div",{className:"ob-card-brand",children:[i.jsx("img",{src:kn,alt:"",className:"ob-brand-mark",draggable:!1}),i.jsx("span",{className:"ob-brand-name",children:"Gemphere"}),a?i.jsxs("span",{className:"ob-brand-crumb",children:["· ",a]}):null,i.jsxs("span",{className:"ob-progress",children:["Step ",r," of ",s]})]}),i.jsx("div",{className:"ob-card-body",children:o})]})}),i.jsx("div",{className:"ob-step-dots",children:Array.from({length:s}).map((l,c)=>i.jsx("span",{className:`ob-step-dot ${c<r?"active":""}`},c))})]})})}function nA({emoji:e,name:t,tag:n,desc:r,selected:s,onClick:o}){return i.jsxs("button",{type:"button",className:`ob-option ${s?"selected":""}`,onClick:o,children:[e?i.jsx("span",{className:"ob-option-emoji",children:e}):i.jsx("span",{}),i.jsxs("span",{className:"ob-option-info",children:[i.jsxs("span",{className:"ob-option-heading",children:[i.jsx("span",{className:"ob-option-name",children:t}),n?i.jsx("span",{className:"ob-option-tag",children:n}):null]}),r?i.jsx("span",{className:"ob-option-desc",children:r}):null]}),i.jsx("span",{className:"ob-option-check",children:s?"â":""})]})}function et({label:e,children:t}){return i.jsxs("div",{className:"ob-field",children:[i.jsx("label",{children:e}),t]})}function an({onBack:e,onNext:t,nextLabel:n="Continue",backLabel:r="Back",disabled:s,loading:o}){return i.jsxs("div",{className:"ob-actions",children:[e?i.jsx("button",{type:"button",className:"ob-btn ob-btn-ghost",onClick:e,disabled:o,children:r}):i.jsx("span",{}),t?i.jsx("button",{type:"button",className:"ob-btn ob-btn-primary",onClick:t,disabled:s||o,children:o?"Savingâ¦":n}):null]})}function pl({icon:e,name:t,desc:n,connected:r,onToggle:s}){return i.jsxs("div",{className:"ob-integration",children:[i.jsx("div",{className:"ob-integration-icon",children:e||"â"}),i.jsxs("div",{className:"ob-integration-info",children:[t,n?i.jsx("div",{className:"sub",children:n}):null]}),i.jsx("button",{type:"button",className:`ob-integration-btn ${r?"connected":""}`,onClick:s,children:r?"Connected":"Connect"})]})}const Di=5,MG=new Set(["portfolio","default","onboarding"]);function _s(e){return e.split(/\n|,/).map(t=>
2071t.trim()).filter(Boolean)}function Dr(e){const t=new Set,n=[];for(const r of e){const s=r.trim();if(!s)continue;const o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function rA(e,t,n=Di){const r=Math.max(0,n-t);return Dr(e).slice(0,r)}function LG(e){return Dr(_s(e)).length}function uu(e,t,n=Di){const r=e.endsWith(` 2072`),s=rA(_s(e),t,n);let o=s.join(` 2073`);const a=Math.max(0,n-t);return r&&s.length<a&&(o+=` 2074`),o}async function hm(e,t){const n=Number(t??0);if(n>0)return n;try{const r=await qn(e),s=Number(r.userId??0);if(s>0)return s}catch{}return 0}function $G(e){return!MG.has(String(e.source||"").trim().toLowerCase())}async function fm(e,t){try{const{accounts:n}=await O5(e,t);return n.filter($G).length}catch{return 0}}async function Aw(e,t,n){if(n==="INDIVIDUAL")return!0;try{const r=await Nu(e,t);if(QE(r))return!1;if((r==null?void 0:r.requiresUpgrade)===!0)return!0}catch{}return n!=="ENTERPRISE"}async function sA(e,t,n){const r=Dr(t);if(r.length===0)return{deduped:r,toSave:[],skippedCount:0,viewerUserId:0,isFree:!1};const s=await hm(e,n.authUserId);if(s<=0)return{deduped:r,toSave:[],skippedCount:r.length,viewerUserId:0,isFree:!1,error:"Could not save target accounts. You can add them from the Accounts page after finishing setup."};const o=n.forceFreeTier!==void 0?n.forceFreeTier:await Aw(e,s,n.accountType);let a=r,l=0;if(o){const c=await fm(e,s);if(a=rA(r,c),l=r.length-a.length,a.length===0)return{deduped:r,toSave:[],skippedCount:r.length,viewerUserId:s,isFree:!0,error:`Free Starter includes up to ${Di} target accounts. Upgrade to add more.`}}return{deduped:r,toSave:a,skippedCount:l,viewerUserId:s,isFree:o}}async function fh(e,t,n={}){const r=await sA(e,t,n);if(r.error&&r.toSave.length===0)return{savedCount:0,skippedCount:r.skippedCount,viewerUserId:r.viewerUserId,savedNames:[],error:r.error};if(r.toSave.length===0)return{savedCount:0,skippedCount:0,viewerUserId:r.viewerUserId,savedNames:[]};try{const{added:s}=await zE(e,r.viewerUserId,r.toSave,"manual");return{savedCount:Math.max(s,r.toSave.length),skippedCount:r.skippedCount,viewerUserId:r.viewerUserId,savedNames:r.toSave,error:r.skippedCount>0?`Free Starter includes up to ${Di} target accounts. Only ${r.toSave.length} were saved â upgrade to add more.`:void 0}}catch(s){const o=s instanceof Error?s.message:"Failed to save target accounts",a=o.toLowerCase().includes("free")||o.toLowerCase().includes("upgrade")||o.toLowerCase().includes("limited");return{savedCount:0,skippedCount:r.deduped.length,viewerUserId:r.viewerUserId,savedNames:[],error:a?o:`Target accounts could not be saved: ${o}`}}}async function uj(e,t,n={}){const r=await sA(e,t,n);if(r.toSave.length===0)return{savedCount:0,skippedCount:r.skippedCount,viewerUserId:r.viewerUserId,savedNames:[],error:r.error};const s=r.toSave.map(o=>({kind:"company",value:o}));await Yh(e,s);try{const{added:o}=await zE(e,r.viewerUserId,r.toSave,"manual");return{savedCount:Math.max(o,r.toSave.length),skippedCount:r.skippedCount,viewerUserId:r.viewerUserId,savedNames:r.toSave,error:r.skippedCount>0?`Free Starter includes up to ${Di} target accounts. Only ${r.toSave.length} were saved â upgrade to add more.`:void 0}}catch(o){const a=o instanceof Error?o.message:"Failed to save target accounts",l=a.toLowerCase().includes("free")||a.toLowerCase().includes("upgrade")||a.toLowerCase().includes("limited");return{savedCount:0,skippedCount:r.deduped.length,viewerUserId:r.viewerUserId,savedNames:[],error:l?a:`Target accounts could not be saved: ${a}`}}}function du({targetText:e,existingUsed:t=0,isFreeTier:n}){if(!n)return null;const r=LG(e),s=t+r,o=Math.max(0,Di-t),a=r>o;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"aa-free-quota",style:{marginBottom:10,marginTop:4},children:[i.jsxs("span",{children:["Free Starter includes up to ",Di," target accounts",t>0?` (${t} already saved)`:""]}),i.jsxs("strong",{children:[Math.max(0,Di-s)," left"]})]}),a?i.jsx("div",{className:"portco-upgrade-notice",style:{marginBottom:10},children:i.jsxs("div",{className:"portco-upgrade-notice-sub",children:["Only ",o," can be added on Free Starter. Extra names will be dropped â upgrade to add unlimited companies."]})}):null]})}const DG=[{type:"fundraise",emoji:"ð°",name:"Raise capital",desc:"Reach relevant investors via warm paths."},{type:"hire",emoji:"ð§âð»",name:"Hire senior talent",desc:"Find top candidates through your network."},{type:"sell",emoji:"ð",name:"Close enterprise customers",desc:"Reach buyers at target accounts."},{type:"partner",emoji:"ð¤",name:"Find strategic partners",desc:"Channel, integration, or co-marketing partners."}],FG=[{type:"source_deals",emoji:"ð¯",name:"Source deals",desc:"Founders in your thesis, before anyone else"},{type:"win_allocations",emoji:"ð",name:"Win allocations",desc:"Get into competitive rounds via warm intros"},{type:"help_portfolio",emoji:"ð",name:"Help portfolio",desc:"Intros for portcos â customers, hires, next-round"},{type:"co_invest",emoji:"ð¤",name:"Co-invest & syndicate",desc:"Build with partners at other funds"}],dj=5;function BG(){const{user:e}=Ht(),t=un(),[n,r]=ur(),[s,o]=m.useState(1),[a,l]=m.useState(!1),[c,u]=m.useState(""),[h,f]=m.useState("company"),[p,d]=m.useState((e==null?void 0:e.fullName)||""),[w,v]=m.useState((e==null?void 0:e.email)||""),[x,y]=m.useState(""),[g,b]=m.useState(""),[S,j]=m.useState(""),[T,C]=m.useState(""),E=m7({role:1}),A=!!(e!=null&&e.accessToken),R=(e==null?void 0:e.accessToken)||"",[V,D]=m.useState([]),[J,F]=m.useState(""),[Y,W]=m.useState(""),[H,P]=m.useState(""),[_,k]=m.useState(""),[N,B]=m.useState(""),[L,z]=m.useState(""),[ee,X]=m.useState(""),[G,ne]=m.useState(""),[te,je]=m.useState(!1),[q,ie]=m.useState(0),[me,he]=m.useState(["source_deals"]),[fe,ae]=m.useState(""),[Se,_e]=m.useState(""),[Ce,Fe]=m.useState(""),[Le,Ot]=m.useState(""),[ct,xt]=m.useState(""),[Oe,Xe]=m.useState([]),[wt,He]=m.useState(""),[at,$]=m.useState([]),[xe,Re]=m.useState(""),[ke,Ye]=m.useState([]),[yt,Te]=m.useState(""),[Je,ze]=m.useState(""),[Ct,Ft]=m.useState(""),[dn,qe]=m.useState(!1),[bt,Zn]=m.useState(!1),[U,ue]=m.useState(""),[Pe,Ie]=m.useState([{name:"",email:"",role:"member"}]);m.useEffect(()=>{if(!A||!R)return;let I=!1;return(async()=>{var oe;try{const ge=await qn(R);if(I)return;const re=ge.profile||{};re.fullName&&d(Ee=>Ee||re.fullName),re.email&&v(Ee=>Ee||re.email),re.companyName&&y(Ee=>Ee||re.companyName),re.companyRole&&b(Ee=>Ee||re.companyRole),re.companyOneLiner&&j(Ee=>Ee||re.companyOneLiner),re.linkedinProfile&&C(Ee=>Ee||re.linkedinProfile),(oe=ge.team)!=null&&oe.name&&!re.companyName&&y(Ee=>Ee||ge.team.name),(Array.isArray(ge.goals)?ge.goals:[]).some(Ee=>Ee?Ee.goalType==="_account_subtype"?(Ee.icp||"").toLowerCase().includes("vc"):["source_deals","win_allocations","help_portfolio","co_invest"].includes(Ee.goalType):!1)&&f("vc")}catch{}})(),()=>{I=!0}},[A,R]),m.useEffect(()=>{if(!A||!R){je(!1),ie(0);return}let I=!1;return(async()=>{const oe=await hm(R,e==null?void 0:e.userId);if(oe<=0||I)return;const ge=await Aw(R,oe,"ENTERPRISE"),re=ge?await fm(R,oe):0;I||(je(ge),ie(re))})(),()=>{I=!0}},[A,R,e==null?void 0:e.userId]),m.useEffect(()=>{const I=Number(n.get("step")),oe=n.get("mailboxProvider"),ge=n.get("mailboxConnected")||n.get("gmailConnected");let re=!1,$e=null;if(Number.isInteger(I)&&I>=1&&(I===5?$e=4:I===6?$e=5:I<=dj&&($e=I)),$e!=null&&(o($e),re=!0),oe==="google"?(qe(!0),re=!0):oe==="microsoft"?(Zn(!0),re=!0):ge==="1"&&(qe(!0),re=!0),re){const nt=new URLSearchParams(n);nt.delete("step"),nt.delete("mailboxConnected"),nt.delete("mailboxProvider"),nt.delete("gmailConnected"),r(nt,{replace:!0})}},[]);const mt=I=>D(oe=>oe.includes(I)?oe.filter(ge=>ge!==I):[...oe,I]),Nn=I=>he(oe=>oe.includes(I)?oe.filter(ge=>ge!==I):[...oe,I]),Tt=(I,oe,ge,re)=>{const $e=oe.trim().replace(/,$/,"").trim();if(!$e)return;const nt=$e.toLowerCase();if(I.some(Ee=>Ee.toLowerCase()===nt)){re();return}ge([...I,$e]),re()},We=(I,oe,ge)=>ge(I.filter((re,$e)=>$e!==oe)),hn=()=>V.map(I=>
2074{switch(I){case"fundraise":return{goalType:"fundraise",round:J,targetAmount:Y};case"hire":return{goalType:"hire",roles:H.split(",").map(oe=>oe.trim()).filter(Boolean)};case"sell":return{goalType:"sell",icp:_};case"partner":return{goalType:"partner",partnerTypes:N.split(",").map(oe=>oe.trim()).filter(Boolean)};default:return{goalType:I}}}),fn=I=>I.split(/\n|,/).map(oe=>oe.trim()).filter(Boolean),no=()=>{const I=J.trim(),oe=Y.trim();return!I&&!oe?null:I&&oe?`${I} · ${oe}`:I||oe},Ys=()=>{const I=[],oe=[],ge=[];if(V.includes("fundraise")){const $e=no();$e&&I.push($e),ge.push("Raising capital")}if(V.includes("sell")){const $e=_.trim();$e&&I.push($e)}if(V.includes("hire")){for(const $e of fn(H))oe.push($e);ge.push("Hiring")}if(V.includes("partner"))for(const $e of fn(N))ge.push($e);for(const $e of fn(ee))oe.push($e);for(const $e of fn(G))ge.push($e);const re=$e=>{const nt=new Set,Ee=[];for(const qt of $e){const mn=qt.toLowerCase();nt.has(mn)||(nt.add(mn),Ee.push(qt))}return Ee};return{firmo:re(I),persona:re(oe),signal:re(ge)}};async function xs(I){if(!I)return;const oe=Ys();if(oe.firmo.length===0&&oe.persona.length===0&&oe.signal.length===0)return;let ge={firmo:[],persona:[],signal:[]};try{ge=await Jh(I)}catch{}const re=(nt,Ee)=>{const qt=new Set,mn=[];for(const Zt of[...nt??[],...Ee]){const fr=(Zt||"").trim();if(!fr)continue;const Cr=fr.toLowerCase();qt.has(Cr)||(qt.add(Cr),mn.push(fr))}return mn},$e={firmo:re(ge.firmo,oe.firmo),persona:re(ge.persona,oe.persona),signal:re(ge.signal,oe.signal)};try{await Qh(I,$e)}catch{}}async function ws(I){await po(I,{accountType:"ENTERPRISE",fullName:p,email:w,companyName:x,companyRole:g,companyOneLiner:S,linkedinProfile:T.trim()||void 0});try{await Si(I,[{goalType:"_account_subtype",icp:h==="vc"?"vc_firm":"b2b_company"}])}catch{}}async function ro(){if(u(""),A&&R){l(!0);try{await ws(R),o(2)}catch(I){u(I instanceof Error?I.message:"Save failed")}finally{l(!1)}return}await E.sendCode({fullName:p,email:w})}async function Ho(){const I=await E.verifyAndSignup({fullName:p,email:w});if(I){l(!0),u("");try{await ws(I.accessToken),o(2)}catch(oe){u(oe instanceof Error?oe.message:"Save failed")}finally{l(!1)}}}async function so(){if(!V.length){u("Pick at least one goal");return}l(!0),u("");try{await Si(R,hn()),await xs(R),o(3)}catch(I){u(I instanceof Error?I.message:"Save failed")}finally{l(!1)}}async function qo(){l(!0),u("");try{const I=Dr(_s(L));let oe=I;if(I.length>0){const re=await fh(R,I,{authUserId:e==null?void 0:e.userId,accountType:"ENTERPRISE"});if(re.error&&re.savedNames.length===0){u(re.error);return}oe=re.savedNames.length?re.savedNames:I,re.error&&u(re.error)}const ge=[...oe.map(re=>({kind:"company",value:re})),...fn(ee).map(re=>({kind:"title",value:re})),...fn(G).map(re=>({kind:"investor",value:re}))];await Yh(R,ge),await xs(R),o(4)}catch(I){u(I instanceof Error?I.message:"Save failed")}finally{l(!1)}}const bs=()=>{const I=[];return me.includes("source_deals")&&I.push({goalType:"source_deals",round:fe.trim()||void 0,targetAmount:Se.trim()||void 0,sectorFocus:Ce.trim()||void 0}),me.includes("win_allocations")&&I.push({goalType:"win_allocations",icp:Le.trim()||void 0}),me.includes("help_portfolio")&&I.push({goalType:"help_portfolio",icp:ct.trim()||void 0}),me.includes("co_invest")&&I.push({goalType:"co_invest"}),I};async function Ko(){if(!me.length){u("Pick at least one hunt");return}l(!0),u("");try{await Si(R,bs());const I=Dr(_s(Le)),oe=Dr(_s(ct)),ge=Dr([...I,...oe]);let re=ge;if(ge.length){const Ee=await fh(R,ge,{authUserId:e==null?void 0:e.userId,accountType:"ENTERPRISE"});if(Ee.error&&Ee.savedNames.length===0){u(Ee.error);return}re=Ee.savedNames.length?Ee.savedNames:ge,Ee.error&&u(Ee.error)}const $e=new Set(re.map(Ee=>Ee.toLowerCase())),nt=[...I.filter(Ee=>$e.has(Ee.toLowerCase())).map(Ee=>({kind:"company",value:Ee})),...oe.filter(Ee=>$e.has(Ee.toLowerCase())).map(Ee=>({kind:"company",value:Ee}))];if(nt.length)try{await Yh(R,nt)}catch{}o(3)}catch(I){u(I instanceof Error?I.message:"Save failed")}finally{l(!1)}}async function io(){l(!0),u("");try{const I=[...at],oe=[...ke],ge=[...Oe],re=Je.trim();re&&ge.push(`Avoid: ${re}`);try{const nt=await Jh(R).catch(()=>({firmo:[],persona:[],signal:[]})),Ee=(mn,Zt)=>{const fr=new Set,Cr=[];for(const O of[...mn??[],...Zt]){const K=(O||"").trim();if(!K)continue;const ye=K.toLowerCase();fr.has(ye)||(fr.add(ye),Cr.push(K))}return Cr},qt={firmo:Ee(nt.firmo,I),persona:Ee(nt.persona,oe),signal:Ee(nt.signal,ge)};await Qh(R,qt)}catch{}try{await Si(R,[{goalType:"vc_thesis",sectorFocus:at.join(", ")||void 0,roles:ke,icp:Oe.join(", ")||void 0,extra:{antiPattern:Je,namesOnRadar:fn(Ct),signals:Oe}}])}catch{}const $e=Dr(_s(Ct).flatMap(nt=>{var Zt;const Ee=nt.match(/\(([^)]+)\)/),qt=((Zt=Ee==null?void 0:Ee[1])==null?void 0:Zt.trim())||"";return[nt.replace(/\([^)]*\)/g,"").split(/\s+[ââ-]\s+/)[0].trim(),qt].filter(
2074Boolean)}));if($e.length){const nt=await fh(R,$e,{authUserId:e==null?void 0:e.userId,accountType:"ENTERPRISE"});if(nt.error&&nt.savedNames.length===0){u(nt.error);return}nt.error&&u(nt.error)}o(4)}catch(I){u(I instanceof Error?I.message:"Save failed")}finally{l(!1)}}async function oo(){l(!0),u("");try{await ju(R,[{provider:"gmail",connected:dn},{provider:"google_calendar",connected:dn},{provider:"outlook",connected:bt}]),o(5)}catch(I){u(I instanceof Error?I.message:"Save failed")}finally{l(!1)}}async function Ge(I="google"){if(!R){ue("You need to be signed in to connect your calendar. Go back to step 1 to verify your phone.");return}ue("");try{Gu({path:"/onboarding/legacy",step:4,mailboxProvider:I}),await Rl(R,I)}catch(oe){const ge=I==="microsoft"?"Outlook":"Google Calendar";ue(oe instanceof Error?oe.message:`Failed to start ${ge} connect`)}}async function pe(){const I=Pe.filter(oe=>oe.name.trim()&&oe.email.trim());l(!0),u("");try{I.length&&await qE(R,I),await ku(R),t("/home")}catch(oe){u(oe instanceof Error?oe.message:"Finish failed")}finally{l(!1)}}const Zr=s===1&&!A&&E.phase==="otp",pt=h==="vc",Yo={1:Zr?i.jsxs(i.Fragment,{children:["Verify your ",i.jsx("em",{children:"phone"}),"."]}):pt?i.jsxs(i.Fragment,{children:["Set up your ",i.jsx("em",{children:"firm"}),"."]}):i.jsxs(i.Fragment,{children:["Set up your ",i.jsx("em",{children:"company"}),"."]}),2:pt?i.jsxs(i.Fragment,{children:["What are you ",i.jsx("em",{children:"hunting?"})]}):i.jsxs(i.Fragment,{children:["Pick your ",i.jsx("em",{children:"goals"}),"."]}),3:pt?i.jsxs(i.Fragment,{children:["Your thesis, ",i.jsx("em",{children:"in your words."})]}):i.jsxs(i.Fragment,{children:["Who are you ",i.jsx("em",{children:"going after?"})]}),4:i.jsxs(i.Fragment,{children:["Connect your ",i.jsx("em",{children:"accounts"}),"."]}),5:i.jsxs(i.Fragment,{children:["Confirm & ",i.jsx("em",{children:"send invites"}),"."]})},hr={1:Zr?`We sent a 6-digit code to ${E.countryCode} ${E.phone.replace(/\D/g,"")}.`:pt?"Tell us who you are and a one-liner about the firm / thesis.":"Tell us who you are and a one-liner about your company.",2:pt?"Pick 1-3. Gem ties every warm intro to one of these â so your fund's pipeline always moves something forward.":"We'll focus the weekly digest around these.",3:pt?"The sharper this is, the better Gem matches founders to you. Skip what doesn't apply yet.":"Target companies, titles and investors help us route warm paths.",4:"Gemphere uses these to build warm-intro paths â your data stays private.",5:"Invite teammates into the workspace, then hit send."};return i.jsxs(ms,{eyebrow:pt?"Enterprise · VC firm":"Enterprise · Founder / Admin",title:Yo[s],subtitle:hr[s],step:s,totalSteps:dj,flowLabel:"Enterprise",children:[i.jsx("div",{id:"recaptcha-container",style:{position:"absolute",width:0,height:0,opacity:0},"aria-hidden":!0}),c||s===1&&!A&&E.err?i.jsx("div",{className:"ob-error",children:c||E.err}):null,s===1&&!A&&E.phase==="otp"&&i.jsxs(i.Fragment,{children:[i.jsx(et,{label:"6-digit code",children:i.jsx("input",{inputMode:"numeric",maxLength:6,value:E.otp,onChange:I=>E.setOtp(I.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"000000",style:{letterSpacing:"0.4em",textAlign:"center",fontSize:18}})}),i.jsx(an,{onBack:E.backToInfo,backLabel:"Change phone",onNext:Ho,nextLabel:"Verify & continue",loading:a||E.loading,disabled:E.otp.replace(/\D/g,"").length!==6})]}),s===1&&(A||E.phase==="info")&&i.jsxs(i.Fragment,{children:[i.jsx(et,{label:"Account type",children:i.jsxs("div",{className:"ob-subtype-toggle",role:"tablist","aria-label":"Account type",children:[i.jsxs("button",{type:"button",role:"tab","aria-selected":h==="vc",className:`ob-subtype-btn ${h==="vc"?"active":""}`,onClick:()=>f("vc"),children:[i.jsx("span",{className:"ob-subtype-icon","aria-hidden":!0,children:"â"}),"VC firm"]}),i.jsxs("button",{type:"button",role:"tab","aria-selected":h==="company",className:`ob-subtype-btn ${h==="company"?"active":""}`,onClick:()=>f("company"),children:[i.jsx("span",{className:"ob-subtype-icon","aria-hidden":!0,children:"ð¢"}),"Company"]})]})}),i.jsx(et,{label:"Your name",children:i.jsx("input",{value:p,onChange:I=>d(I.target.value),placeholder:"Ada Lovelace"})}),i.jsx(et,{label:"Work email",children:i.jsx("input",{value:w,onChange:I=>v(I.target.value),placeholder:pt?"[email protected]":"[email protected]"})}),!A&&i.jsx(et,{label:"Phone number",children:i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"120px 1fr",gap:8},children:[i.jsx("select",{value:E.countryCode,onChange:I=>E.setCountryCode(I.target.value),children:Wu.map(I=>i.jsxs("option",{value:I.code,children:[I.flag," ",I.code]},I.code))}),i.jsx("input",{type:"tel",inputMode:"tel",value:E.phone,onChange:I=>E.setPhone(I.target.value),placeholder:"555 123 4567"})]})}),i.jsx(et,{label:pt?"Firm name":"Company name",children:i.jsx("input",{value:x,onChange:I=>y(I.target.value),placeholder:pt?"Sequoia Capital":"Analytics Co."})}),i.jsx(et,{label:"LinkedIn URL",children:i.jsx("input",{type:"url",inputMode:"url",autoComplete:"url",value:T,onChange:I=>C(I.target.value),placeholder:"https://www.linkedin.com/in/you"})}),i.jsx(et,{label:"Your role",children:i.jsx("input",{value:g,onChange:I=>b(I.target.value),placeholder:pt?"Partner":"CEO / Founder"})}),i.jsx(et,{label:pt?"One-liner about the firm / thesis":"One-liner about the company",children:i.jsx("textarea",{value:S,onChange:I=>j(I.target.value),placeholder:pt?"Early-stage B2B SaaS, US + EU, $1â4M checks.":"We help B2B SaaS teams understand churn."})}),i.jsx(an,{onNext:ro,loading:a||E.loading,nextLabel:A?"Continue":"Send code",disabled:!p||!x||!A&&(!w||!E.phone)})]}),s===2&&!pt&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"ob-option-grid",children:DG.map(I=>i.jsx(nA,{emoji:I.emoji,name:I.name,desc:I.desc,selected:V.includes(I.type),onClick:()=>mt(I.type)},I.type))}),V.includes("fundraise")&&i.jsxs(i.Fragment,{children:[i.jsx(et,{label:"Round",children:i.jsx("input",{value:J,onChange:I=>F(I.target.value),placeholder:"Series A"})}),i.jsx(et,{label:"Target amount",children:i.jsx("input",{value:Y,onChange:I=>W(I.target.value),placeholder:"$8M"})})]}),V.includes("hire")&&i.jsx(et,{label:"Roles (comma-separated)",children:i.jsx("input",{value:H,onChange:I=>P(I.target.value),placeholder:"VP Sales, Head of Eng"})}),V.includes("sell")&&i.jsx(et,{label:"Ideal customer profile",children:i.jsx("textarea",{value:_,onCh
2074ange:I=>k(I.target.value),placeholder:"Series B B2B SaaS, US, 100â500 employees, VP of Data as ICP."})}),V.includes("partner")&&i.jsx(et,{label:"Partner types (comma-separated)",children:i.jsx("input",{value:N,onChange:I=>B(I.target.value),placeholder:"Channel, integrations, co-marketing"})}),i.jsx(an,{onBack:()=>o(1),onNext:so,loading:a})]}),s===2&&pt&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"ob-option-grid",children:FG.map(I=>{const oe=me.includes(I.type);return i.jsxs("div",{className:`ob-option ob-vc-card ${oe?"selected":""}`,children:[i.jsxs("button",{type:"button",className:"ob-vc-card-head",onClick:()=>Nn(I.type),children:[i.jsx("span",{className:"ob-option-emoji",children:I.emoji}),i.jsxs("span",{className:"ob-option-info",children:[i.jsx("span",{className:"ob-option-name",children:I.name}),i.jsx("span",{className:"ob-option-desc",children:I.desc})]}),i.jsx("span",{className:"ob-option-check",children:oe?"â":""})]}),oe&&I.type==="source_deals"&&i.jsxs("div",{className:"ob-goal-subfields",children:[i.jsxs("div",{className:"ob-field ob-field-tight",children:[i.jsx("label",{children:"Stage"}),i.jsx("input",{value:fe,onChange:ge=>ae(ge.target.value),placeholder:"Seed â Series A"})]}),i.jsxs("div",{className:"ob-field ob-field-tight",children:[i.jsx("label",{children:"Check size"}),i.jsx("input",{value:Se,onChange:ge=>_e(ge.target.value),placeholder:"$1â4M"})]}),i.jsxs("div",{className:"ob-field ob-field-tight ob-field-span2",children:[i.jsx("label",{children:"Thesis focus"}),i.jsx("input",{value:Ce,onChange:ge=>Fe(ge.target.value),placeholder:"AI infra, dev tools, agent platforms"})]})]}),oe&&I.type==="win_allocations"&&i.jsx("div",{className:"ob-goal-subfields ob-goal-subfields-single",children:i.jsxs("div",{className:"ob-field ob-field-tight ob-field-span2",children:[i.jsx("label",{children:"Deals you're chasing"}),i.jsx("input",{value:Le,onChange:ge=>Ot(ge.target.value),placeholder:"Anysphere, Browserbase, Replicate"})]})}),oe&&I.type==="help_portfolio"&&i.jsx("div",{className:"ob-goal-subfields ob-goal-subfields-single",children:i.jsxs("div",{className:"ob-field ob-field-tight ob-field-span2",children:[i.jsx("label",{children:"Active portcos"}),i.jsx("input",{value:ct,onChange:ge=>xt(ge.target.value),placeholder:"Linear, Vercel, Browserbase"})]})})]},I.type)})}),i.jsx(an,{onBack:()=>o(1),onNext:Ko,loading:a})]}),s===3&&!pt&&i.jsxs(i.Fragment,{children:[i.jsxs(et,{label:"Target companies (one per line)",children:[i.jsx(du,{targetText:L,existingUsed:q,isFreeTier:te}),i.jsx("textarea",{value:L,onChange:I=>z(te?uu(I.target.value,q):I.target.value),placeholder:`Stripe 2075Notion 2076Shopify`})]}),i.jsx(et,{label:"Target titles / personas",children:i.jsx("textarea",{value:ee,onChange:I=>X(I.target.value),placeholder:"VP Data, Head of Analytics"})}),i.jsx(et,{label:"Target investors (optional)",children:i.jsx("textarea",{value:G,onChange:I=>ne(I.target.value),placeholder:"Sequoia, a16z"})}),i.jsx(an,{onBack:()=>o(2),onNext:qo,loading:a})]}),s===3&&pt&&i.jsxs(i.Fragment,{children:[i.jsxs(et,{label:"Signals",children:[i.jsxs("div",{className:"ob-field-help",children:["Traction or qualities that catch your eye. E.g."," ",i.jsx("em",{children:"Just raised seed"}),", ",i.jsx("em",{children:"Top-tier engineering team"}),","," ",i.jsx("em",{children:"Defensible moat / data"}),"."]}),i.jsxs("div",{className:"ob-chip-input",children:[Oe.map((I,oe)=>i.jsxs("span",{className:"ob-chip ob-chip-signal",children:[I,i.jsx("button",{type:"button",className:"ob-chip-x",onClick:()=>We(Oe,oe,Xe),"aria-label":`Remove ${I}`,children:"Ã"})]},`${I}-${oe}`)),i.jsx("input",{className:"ob-chip-input-field",value:wt,onChange:I=>He(I.target.value),onKeyDown:I=>{I.key==="Enter"||I.key===","?(I.preventDefault(),Tt(Oe,wt,Xe,()=>He(""))):I.key==="Backspace"&&!wt&&Oe.length&&Xe(Oe.slice(0,-1))},onBlur:()=>Tt(Oe,wt,Xe,()=>He("")),placeholder:Oe.length?"":"Just raised seed, Top-tier engineering teamâ¦"})]})]}),i.jsxs(et,{label:"Sectors / themes",children:[i.jsx("div",{className:"ob-field-help",children:"Where you actively write checks."}),i.jsxs("div",{className:"ob-chip-input",children:[at.map((I,oe)=>i.jsxs("span",{className:"ob-chip ob-chip-firmo",children:[I,i.jsx("button",{type:"button",className:"ob-chip-x",onClick:()=>We(at,oe,$),"aria-label":`Remove ${I}`,children:"Ã"})]},`${I}-${oe}`)),i.jsx("input",{className:"ob-chip-input-field",value:xe,onChange:I=>Re(I.target.value),onKeyDown:I=>{I.key==="Enter"||I.key===","?(I.preventDefault(),Tt(at,xe,$,()=>Re(""))):I.key==="Backspace"&&!xe&&at.length&&$(at.slice(0,-1))},onBlur:()=>Tt(at,xe,$,()=>Re("")),placeholder:at.length?"":"AI infra, Dev toolsâ¦"})]})]}),i.jsxs(et,{label:"Founder profile â what gets you excited?",children:[i.jsx("div",{className:"ob-field-help",children:"Who Gem should prioritize on warm paths."}),i.jsxs("div",{className:"ob-chip-input",children:[ke.map((I,oe)=>i.jsxs("span",{className:"ob-chip ob-chip-persona",children:[I,i.jsx("button",{type:"button",className:"ob-chip-x",onClick:()=>We(ke,oe,Ye),"aria-label":`Remove ${I}`,children:"Ã"})]},`${I}-${oe}`)),i.jsx("input",{className:"ob-chip-input-field",value:yt,onChange:I=>Te(I.target.value),onKeyDown:I=>{I.key==="Enter"||I.key===","?(I.preventDefault(),Tt(ke,yt,Ye,()=>Te(""))):I.key==="Backspace"&&!yt&&ke.length&&Ye(ke.slice(0,-1))},onBlur:()=>Tt(ke,yt,Ye,()=>Te("")),placeholder:ke.length?"":"Technical, Ex-FAANG, 2nd-time founderâ¦"})]})]}),i.jsxs(et,{label:"Anti-pattern â what's not a fit?",children:[i.jsx("div",{className:"ob-field-help",children:"Fastest way for Gem to skip wrong matches."}),i.jsx("input",{value:Je,onChange:I=>ze(I.target.value),placeholder:"Solo non-technical, pre-product, services"})]}),i.jsxs(et,{label:"Names on your radar",children:[i.jsx("div",{className:"ob-field-help",children:"Companies, funds, LPs you want as target accounts. One per line."}),i.jsx(du,{targetText:Ct,existingUsed:q,isFreeTier:te}),i.jsx("textarea",{className:"ob-tall-textarea",value:Ct,onChange:I=>Ft(te?uu(I.target.value,q):I.target.value),placeholder:`Anthropic 2077Perplexity 2078Lightspeed Venture Partners â co-invest 2079Cendana Capital â LP`})]}),i.jsxs("div",{className:"ob-actions",children:[i.jsx("button",{type:"button",className:"ob-btn ob-btn-ghost",onClick:()=>o(2),disabled:a,children:"Back"}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx("button",{type:"button",className:"ob-link-btn",onClick:()=>o(4),disabled:a,children:"Skip for now"}),i.jsx("button",{type:"button",className:"ob-btn ob-btn-primary",onClick:io,disabled:a,children:a?"Savingâ¦":"Continue"})]})]})]}),s===4&&i.jsxs(i.Fragment,{children:[U?i.jsx("div",{className:"ob-error",children:U}):null,i.jsx(pl,{icon:"G",name:"Google Calendar",desc:"Read-only calendar access to map meetings and book intros â granted in one Google sign-in.",connected:dn,onToggle:dn?()=>qe(!1):()=>Ge("google")}),i.jsx(pl,{icon:"â",name:"Outlook + Microsoft 365 Calendar",desc:"Use this if your work calendar is on Outlook / Microsoft 365.",connected:bt,onToggle:bt?()=>Zn(!1):()=>Ge("microsoft")}),i.jsx("p",{className:"ob-muted",style:{marginTop:10},children:"One sign-in grants calendar access. You can connect more sources later from Settings."}),i.jsx(an,{onBack:()=>o(3),onNext:oo,loading:a})]}),s===5&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"ob-muted",style:{marginBottom:16},children:"Invite your teammates to the workspace (optional)."}),Pe.map((I,oe)=>i.jsxs("div",{className:"ob-invitee-row",children:[i.jsx("input",{placeholder:"Name",value:I.name,onChange:ge=>{const re=[...Pe];re[oe]={...I,name:ge.target.value},Ie(re)}}),i.jsx("input",{placeholder:"Email",value:I.email,onChange:ge=>{const re=[...Pe];re[oe]={...I,email:ge.target.value},Ie(re)}}),i.jsx("button",{type:"button",onClick:()=>{const ge=Pe.filter((re,$e)=>$e!==oe);Ie(ge.length?ge:[{name:"",email:"",role:"member"}])},children:"â"})]},oe)),i.jsx("button",{type:"button",className:"ob-link-btn",onClick:()=>Ie([...Pe,{name:"",email:"",role:"member"}]),children:"+ Add another teammate"}),i.jsx(an,{onBack:()=>o(4),onNext:pe,nextLabel:"Finish & send invites",loading:a})]})]})}function UG(e){let t="";const n=[];let r=!1;for(let s=0;s<e.length;s+=1){const o=e[s];o==='"'||o==="'"?r=!r:o===","&&!r?(n.push(t.trim().replace(/^["']|["']$/g,"")),t=""):t+=o}return n.push(t.trim().replace(/^["']|["']$/g,"")),n}function VG(e){const t=Math.min(e.length,12);for(let n=0;n<t;n+=1){const r=(e[n]||[]).join(" ").toLowerCase();if(r.includes("first name")&&(r.includes("last name")||r.includes("url")))return n}return 0}
2079function iA(e){return e.split(/\s+/).filter(Boolean).map(t=>t[0]).join("").slice(0,2).toUpperCase()}const zG=["investor","venture capital","venture partner","general partner","managing partner","investing partner","investment partner","angel investor","family office","private equity","portfolio manager","fund manager","venture scout","investment scout","limited partner","solo capitalist","solo gp","vc"],WG=["venture","ventures","capital","vc","fund","funds","equity","angel","investment","investments","investing","portfolio"],GG=["partner","principal","gp","managing director","associate","analyst","scout","investor"],HG=["sales","account executive","account manager","marketing","recruit","recruiter","recruiting","recruitment","talent acquisition","accountant","accounting","bookkeep","auditor","attorney","lawyer","legal counsel","paralegal","administrative","executive assistant","personal assistant","human resources","customer success","customer support","customer service","community manager","social media","public relations","press","journalist","teacher","professor","student","nurse","therapist","realtor","real estate agent","channel partner","referral partner","solutions partner","implementation partner"],qG=["founder","co-founder","cofounder","co founder","owner","co-owner","entrepreneur"],KG=["advisor","adviser","board member","board of directors","board director","non-executive director","mentor","consultant"],YG=["ceo","cto","cfo","coo","cro","cpo","cmo","cio","ciso","chief","president","vice president","vp","svp","evp","head of","general manager"];function hj(e){return(e||"").toLowerCase().replace(/[^a-z0-9\s/&+.-]+/g," ").replace(/\s+/g," ").trim()}function JG(e,t){if(!e||!t)return!1;const r=t.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?<![a-z0-9])${r}(?![a-z0-9])`,"i").test(e)}function lo(e,t){return t.some(n=>JG(e,n))}function oA(e,t){const n=hj(e);if(!n)return"catchall";const r=`${n} ${hj(t||"")}`.trim(),s=lo(n,HG),o=lo(n,zG),a=lo(r,WG),l=lo(n,GG);return o||a&&l&&!s?"investor":lo(n,qG)?"founder":lo(n,KG)?"advisor":lo(n,YG)?"operator":"cat
2079chall"}function QG(e){const t=e.split(/\r?\n/).filter(p=>p.trim());if(t.length<=1)return[];const n=t.map(p=>UG(p)),r=VG(n),s=(n[r]||[]).map(p=>p.toLowerCase()),o=s.findIndex(p=>p.includes("first name")||p==="first"),a=s.findIndex(p=>p.includes("last name")||p==="last"),l=s.findIndex(p=>p.includes("company")),c=s.findIndex(p=>p.includes("position")||p.includes("title")),u=s.findIndex(p=>p.includes("email")),h=s.findIndex(p=>p==="url"||p.includes("linkedin")),f=[];for(let p=r+1;p<n.length;p+=1){const d=n[p];if(!d||d.length<2)continue;const w=o>=0?d[o]||"":d[0]||"",v=a>=0?d[a]||"":d[1]||"",x=l>=0&&d[l]||"",y=c>=0&&d[c]||"",g=u>=0&&d[u]||"",b=h>=0&&d[h]||"",S=`${w} ${v}`.trim();S&&f.push({id:`li-csv-${p}`,name:S,initials:iA(S),company:x||"",title:y||"",email:g||"",linkedinUrl:b||null})}return f}function XG(e){return e.map(t=>({...t,cat:oA(t.title,t.company)}))}function fj(e,t,n){const r=(n||"").trim().toLowerCase().replace(/\/+$/,"");return r?`url:${r}`:`nc:${e.trim().toLowerCase()}|${t.trim().toLowerCase()}`}function sJ(e,t){const n=new Map,r=new Map;for(const s of t){const o=fj(s.fullName,s.companyName||"",s.linkedinUrl);n.set(o,s.id),n.set(`name:${s.fullName.trim().toLowerCase()}`,s.id),r.set(s.id,s.strengthLabel??null)}return e.map(s=>{const o=fj(s.name,s.company,s.linkedinUrl),a=n.get(o)??n.get(`name:${s.name.trim().toLowerCase()}`);return typeof a!="number"?s:{...s,id:a,strengthLabel:r.get(a)??s.strengthLabel}})}const aA=[{id:1,cat:"investor",short:"Close investors",q:"Which investors are you close to?",clar:"People you'd reach out to about a deal, a question, or just to catch up â and they'd respond within a day.",prompt:"Search by name â pick the investors you'd actually call:",cols:4},{id:2,cat:"advisor",short:"Close advisors",q:"Which advisors are you close to?",clar:"Domain experts, formal or informal advisors, board members â people you'd recommend to a founder who needed deep expertise.",prompt:"Search by name â who would you recommend as an advisor?",cols:4},{id:3,cat:"operator",short:"Close operators",q:"Which C-level operators are you close to?",clar:"CEOs, CTOs, CROs, CFOs, COOs at named companies â people you'd intro to a portco for hiring, partnerships, or expertise.",prompt:"Search by name â which operators do you know well?",cols:4},{id:4,cat:"founder",short:"Close founder peers",q:"Which founders are you close to, outside your portfolio?",clar:"Founder peers you actually talk to about your work â not people who pitched you, but real friends and collaborators.",prompt:"Search by name â which founder peers are you close to?",cols:4},{id:5,cat:"dealflow",short:"Deal-flow partners",q:"Which investors do you actually pass deals through?",clar:"Investors who send you deals, or who you send your passes to. Two-way deal flow â not just people you know.",prompt:"Search investors â â marks ones you already flagged close:",cols:4},{id:6,cat:"connector",short:"Best connectors",q:"Who are your best connectors?",clar:`The people you'd ask "who do I talk to about X?" before anyone else. The super-connectors in your life.`,prompt:"Search by name â who opens doors for you?",dynamic:"added",cols:4},{id:7,cat:"catchall",short:"Anyone we missed",q:"Anyone you'd vouch for who didn't come up?",clar:"Investors and founders show by default â but search to vouch for anyone else in your network: old friends, mentors, operators, family in relevant industries.",prompt:"Search anyone in your network â no need to scroll through everyone:",cols:4,freetext:!1}];function ZG(e){const t=new Set;return e.filter(n=>t.has(n.name)?!1:(t.add(n.name),!0))}function e9(e,t,n,r,s=!1){if(e.dynamic==="added"){const a=t.filter(l=>l.cat==="investor");return ZG([...n,...a])}if(e.cat==="catchall")return s?t:t.filter(a=>a.cat==="investor"||a.cat==="founder");const o=t.filter(a=>e.cat==="dealflow"?a.cat==="investor":a.cat===e.cat);return e.id===5?o.map(a=>({...a,cat:"dealflow"})):o}function Bp(e,t,n){return e===5&&!!n[t]}function mj(e,t,n=8){const r=t.trim().toLowerCase();if(!r)return[];const s=[];for(const o of e)if((o.name.toLowerCase().includes(r)||o.title.toLowerCase().includes(r)||o.company.toLowerCase().includes(r))&&(s.push(o),s.length>=n))break;return s}function t9(e,t,n=8){const r=[],s=[...e].sort((o,a)=>o.name.localeCompare(a.name));for(const o of s)if(!t.has(o.id)&&(r.push(o),r.length>=n))break;return r}const hu={you:{key:"you",label:"You",color:"#ffd27d"},auto:{key:"auto",label:"Auto-imported",color:"#cdbf9e"},star:{key:"star",label:"Connection",color:"#f4f7ff"},investor:{key:"investor",label:"Close investors",color:"#1fc796"},advisor:{key:"advisor",label:"Close advisors",color:"#8a7df0"},operator:{key:"operator",label:"Operators",color:"#f5743f"},founder:{key:"founder",label:"Founder peers",color:"#e8ad42"},dealflow:{key:"dealflow",label:"Deal-flow",color:"#1fc796"},connector:{key:"connector",label:"Best connectors",color:"#f5c84e"},catchall:{key:"catchall",label:"Catch-all",color:"#b3a890"}},Bn=Math.PI*2;function n9(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)}const r9={investor:-.65,dealflow:.15,advisor:.95,operator:1.85,founder:2.75,catchall:3.75,connector:4.7},pj={connector:[105,150],default:[150,255]},Td={};function Up(e){if(Td[e])return Td[e];const t=document.createElement("canvas");t.width=t.height=1;const n=t.getContext("2d");if(!n)return[128,128,128];n.fillStyle=e,n.fillRect(0,0,1,1);const r=n.getImageData(0,0,1,1).data;return Td[e]=[r[0],r[1],r[2]],Td[e]}class lA{constructor(t,n=hu){st(this,"cv");st(this,"ctx");st(this,"pal");st(this,"nodes",[]);st(this,"edges",[]);st(this,"byId",{});st(this,"byName",{});st(this,"you",null);st(this,"dpr");st(this,"cam",{s:1,ts:1,x:0,y:0,tx:0,ty:0});st(this,"centerFrac",{x:.5,y:.5});st(this,"fitFactor",.46);st(this,"addMode","comet");st(this,"spriteCache",{});st(this,"running",!1);st(this,"t",0);st(this,"stars",[]);st(this,"w",0);st(this,"h",0);st(this,"_ro",null);st(this,"_resize");st(this,"_loop");this.cv=t;const r=t.getContext("2d");if(!r)throw new Error("Canvas 2d context unavailable");this.ctx=r,this.pal=n,this.dpr=Math.min(2,window.devicePixelRatio||1),this._resize=()=>this.resize(),this._loop=s=>this.loop(s),this.resize(),this._ro=new ResizeObserver(this._resize),this._ro.observe(t)}destroy(){var t;this.stop(),(t=this._ro)==null||t.disconnect()}resize(){const t=this.cv.getBoundingClientRect();this.w=t.width,this.h=t.height,this.cv.width=Math.max(1,t.width*this.dpr),this.cv.height=Math.max(1,t.height*this.dpr),this.genStars()}genStars(){const t=Math.round(this.w*this.h/9e3);this.stars=[];for(let n=0;n<t;n++)this.stars.push({x:Math.random()*this.w,y:Math.random()*this.h,r:Math.random()<.14?1.3+Math.random()*1:.5+Math.random()*.9,ph:Math.random()*Math.PI*2,sp:.01+Math.random()*.03,tint:Math.random()<.5?"#f3ecd6":Math.random()<.5?"#7fe6c4":"#f5cf8a"})}setCenterFrac(t,n){this.centerFrac={x:t,y:n}}screenToWorld(t,n){return{x:(t-this.cam.x)/this.cam.s,y:(n-this.cam.y)/this.cam.s}}addYou(){return this.you={id:"YOU",cat:"you",x:0,y:0,vx:0,vy:0,r:30,scale:0,alpha:0,you:!0,name:"YOU",tAng:0,tRad:0,age:0,k:.0032,fly:!1,trail:[],glow:1,ping:1,ripple:0,big:!1,label:null,seed:Math.random()*Bn},this.nodes.push(this.you),this.byId.YOU=this.you,this.you}polar(t){const n=Math.random;if(t==="auto"||t==="star")return{ang:n()*Bn,rad:90+Math.sqrt(n())*235};const r=(r9[t]??n()*Bn)+(n()-.5)*.7,s=pj[t]||pj.default;return{ang:r,rad:s[0]+n()*(s[1]-s[0])}}addNode(t,n={}){if(t.name&&this.byName[t.name]&&!t.isAuto){const h=this.byName[t.name];return h.ping=1,h.glow=1,n.mode&&(h.mode=n.mode),h}const r=this.polar(t.cat),s=Math.cos(r.ang)*r.rad,o=Math.sin(r.ang)*r.rad,a=n.mode??this.addMode;let l,c;if(a==="bloom")l=s,c=o;else if(a==="ascend"){const h=Math.random()*Bn;l=Math.cos(h)*30,c=Math.sin(h)*30}else if(n.from){const h=this.screenToWorld(n.from.x,n.from.y);l=h.x,c=h.y}else l=s*.45,c=o*.45;const u={...t,tAng:r.ang,tRad:r.rad,x:l,y:c,vx:0,vy:0,r:t.cat==="auto"||t.cat==="star"?4:n.big?9.5:6.5,scale:0,alpha:0,age:0,mode:a,k:a==="comet"?.024:a==="ascend"?.0018:a==="bloom"?.006:.0032,fly:a==="comet",trail:[],glow:n.pulse===!1?0:a==="bloom"||a==="comet"?1.5:1,ping:n.pulse===!1?0:a==="ascend"?.6:1,ripple:a==="bloom"?1:0,big:!!n.big,label:n.big?t.initials||"":null,seed:Math.random()*Bn};if(this.nodes.push(u),this.byId[u.id]=u,u.name&&(this.byName[u.name]=u),n.edgeToYou&&this.addEdge("YOU",u.id,{w:.8,anim:!0}),a==="bloom")for(const h of this.nodes){if(h===u||h.you)continue;const f=h.x-s,p=h.y-o,d=Math.hypot(f,p);if(d<110&&d>.1){const w=(1-d/110)*3.4;h.vx+=f/d*w,h.vy+=p/d*w}}return u}addEdge(t,n,r={}){!this.byId[t]||!this.byId[n]||this.edges.push({a:t,b:n,w:r.w||1,a0:r.anim?0:1})}autoWire(){const t={};
2079this.nodes.forEach(n=>{!n.you&&n.cat&&(t[n.cat]=t[n.cat]||[]).push(n)}),Object.values(t).forEach(n=>{for(let r=0;r<n.length;r++)if(Math.random()<.3){const s=Math.floor(Math.random()*n.length);s!==r&&this.addEdge(n[r].id,n[s].id,{w:.55})}}),this.nodes.forEach(n=>{!n.you&&!n.isAuto&&!n.big&&Math.random()<.08&&this.addEdge("YOU",n.id,{w:.4})})}start(){this.running||(this.running=!0,requestAnimationFrame(this._loop))}stop(){this.running=!1}dim(t,n){const r=this.byName[t];r&&(r.dimmed=n,n||(r.glow=1,r.ping=1))}wirePeerEdges(t,n,r=2){const s=this.nodes.filter(o=>o.cat===n&&o.id!==t&&o.name&&!o.you);for(let o=0;o<r&&s.length;o++){const a=s[Math.random()*s.length|0];a&&this.addEdge(t,a.id,{w:.6,anim:!0})}}physics(){const t=this.nodes,n=t.length;for(let r=0;r<n;r++){const s=t[r];if(s.you){s.x+=(0-s.x)*.2,s.y+=(0-s.y)*.2;continue}const o=Math.cos(s.tAng)*s.tRad,a=Math.sin(s.tAng)*s.tRad;s.vx+=(o-s.x)*(s.k||.0032),s.vy+=(a-s.y)*(s.k||.0032),s.fly||(s.vx+=Math.cos(this.t*.01+s.seed)*.012,s.vy+=Math.sin(this.t*.011+s.seed)*.012),s.fly?(s.trail.push({x:s.x,y:s.y}),s.trail.length>16&&s.trail.shift(),Math.hypot(o-s.x,a-s.y)<40&&(s.fly=!1,s.ping=1,s.glow=1.6)):s.trail.length&&s.trail.shift()}for(let r=0;r<n;r++){const s=t[r];for(let o=r+1;o<n;o++){const a=t[o];let l=s.x-a.x,c=s.y-a.y,u=l*l+c*c;if(u>9e3)continue;u<1&&(u=1);const h=240/u,f=Math.sqrt(u),p=l/f,d=c/f;s.you||(s.vx+=p*h,s.vy+=d*h),a.you||(a.vx-=p*h,a.vy-=d*h)}}for(const r of this.edges){const s=this.byId[r.a],o=this.byId[r.b];if(!s||!o)continue;r.a0+=(1-r.a0)*.06;const a=o.x-s.x,l=o.y-s.y,c=Math.sqrt(a*a+l*l)||1,u=(c-72)*8e-4*r.w,h=a/c,f=l/c;s.you||(s.vx+=h*u,s.vy+=f*u),o.you||(o.vx-=h*u,o.vy-=f*u)}for(let r=0;r<n;r++){const s=t[r];if(s.you)continue;const o=s.fly?.82:.88;s.vx*=o,s.vy*=o,s.x+=s.vx,s.y+=s.vy,s.age++;const a=s.dimmed?.14:1;s.alpha+=(a-s.alpha)*(s.mode==="ascend"?.06:s.mode==="comet"?.22:.12),s.mode==="bloom"?s.scale=n9(Math.min(1,s.age/24)):s.scale+=(1-s.scale)*(s.mode==="ascend"?.06:s.mode==="comet"?.24:.14),s.glow>0&&(s.glow*=.95),s.ping>0&&(s.ping=Math.max(0,s.ping-.018)),s.ripple>0&&(s.ripple=Math.max(0,s.ripple-.013))}}fit(){let t=130;for(const n of this.nodes){const r=Math.hypot(n.x,n.y);r>t&&(t=r)}this.cam.ts=Math.min(this.w,this.h)*this.fitFactor/(t*1.16),this.cam.tx=this.w*this.centerFrac.x,this.cam.ty=this.h*this.centerFrac.y,this.cam.s+=(this.cam.ts-this.cam.s)*.045,this.cam.x+=(this.cam.tx-this.cam.x)*.07,this.cam.y+=(this.cam.ty-this.cam.y)*.07}sprite(t){var f;if(this.spriteCache[t])return this.spriteCache[t];const n=Up(((f=this.pal[t])==null?void 0:f.color)??"#6b6558"),r=64,s=document.createElement("canvas");s.width=s.height=r*2;const o=s.getContext("2d"),a=r,l=r;let c=o.createRadialGradient(a,l,0,a,l,r);c.addColorStop(0,`rgba(${n[0]},${n[1]},${n[2]},0.6)`),c.addColorStop(.34,`rgba(${n[0]},${n[1]},${n[2]},0.16)`),c.addColorStop(1,`rgba(${n[0]},${n[1]},${n[2]},0)`),o.fillStyle=c,o.beginPath(),o.arc(a,l,r,0,Bn),o.fill();const u=13,h=o.createRadialGradient(a-4,l-4,1,a,l,u);return h.addColorStop(0,`rgba(${Math.min(255,n[0]+45)},${Math.min(255,n[1]+45)},${Math.min(255,n[2]+45)},1)`),h.addColorStop(1,`rgba(${n[0]},${n[1]},${n[2]},1)`),o.fillStyle=h,o.beginPath(),o.arc(a,l,u,0,Bn),o.fill(),o.strokeStyle="rgba(255,255,255,0.25)",o.lineWidth=1.5,o.beginPath(),o.arc(a,l,u,0,Bn),o.stroke(),this.spriteCache[t]={canvas:s,R:r,dr:u,rgb:n},this.spriteCache[t]}sparkle(t,n,r,s,o){const a=this.ctx,l=[[r,0],[0,r]];a.save(),a.globalCompositeOperation="lighter";for(const[c,u]of l){const h=a.createLinearGradient(t-c,n-u,t+c,n+u);h.addColorStop(0,`rgba(${s[0]},${s[1]},${s[2]},0)`),h.addColorStop(.5,`rgba(255,255,255,${o})`),h.addColorStop(1,`rgba(${s[0]},${s[1]},${s[2]},0)`),a.strokeStyle=h,a.lineWidth=1.1,a.beginPath(),a.moveTo(t-c,n-u),a.lineTo(t+c,n+u),a.stroke()}a.restore()}draw(){const t=this.ctx;t.setTransform(this.dpr,0,0,this.dpr,0,0),t.clearRect(0,0,this.w,this.h);const n=this.cam.x,r=this.cam.y,s=Math.max(this.w,this.h)*.78,o=t.createRadialGradient(n,r,0,n,r,s);o.addColorStop(0,"rgba(13, 33, 28, 0.92)"),o.addColorStop(.32,"rgba(16, 38, 33, 0.82)"),o.addColorStop(.62,"rgba(22, 44, 39, 0.5)"),o.addColorStop(.85,"rgba(34, 52, 46, 0.16)"),o.addColorStop(1,"rgba(48, 60, 54, 0)"),t.fillStyle=o,t.fillRect(0,0,this.w,this.h);const a=t.createRadialGradient(n+s*.18,r-s*.12,0,n+s*.18,r-s*.12,s*.55);a.addColorStop(0,"rgba(31, 199, 150, 0.1)"),a.addColorStop(.5,"rgba(232, 173, 66, 0.05)"),a.addColorStop(1,"rgba(0, 0, 0, 0)"),t.s
2079ave(),t.globalCompositeOperation="lighter",t.fillStyle=a,t.fillRect(0,0,this.w,this.h),t.restore(),t.save();for(const c of this.stars){const u=.35+.65*(.5+.5*Math.sin(this.t*c.sp+c.ph));t.globalAlpha=u*.6,t.fillStyle=c.tint,t.beginPath(),t.arc(c.x,c.y,c.r,0,Bn),t.fill(),c.r>1.1&&u>.6&&this.sparkle(c.x,c.y,c.r*6,[255,244,214],(u-.6)*.55)}t.restore(),t.globalAlpha=1,t.save(),t.translate(this.cam.x,this.cam.y),t.scale(this.cam.s,this.cam.s),t.lineWidth=1/this.cam.s;for(const c of this.edges){const u=this.byId[c.a],h=this.byId[c.b];if(!u||!h)continue;const f=.16*Math.min(u.alpha,h.alpha)*c.w*c.a0;t.strokeStyle=`rgba(107, 101, 88, ${f})`;const p=(u.x+h.x)/2+(h.y-u.y)*.12,d=(u.y+h.y)/2-(h.x-u.x)*.12;t.beginPath(),t.moveTo(u.x,u.y),t.quadraticCurveTo(p,d,h.x,h.y),t.stroke()}for(const c of this.nodes){if(!c.trail||c.trail.length<2)continue;const u=this.sprite(c.cat),h=c.trail;t.save(),t.globalCompositeOperation="lighter",t.lineCap="round";for(let f=1;f<h.length;f++){const p=f/h.length*.6*c.alpha;t.strokeStyle=`rgba(${u.rgb[0]},${u.rgb[1]},${u.rgb[2]},${p})`,t.lineWidth=f/h.length*3.5/this.cam.s,t.beginPath(),t.moveTo(h[f-1].x,h[f-1].y),t.lineTo(h[f].x,h[f].y),t.stroke()}t.restore()}for(const c of this.nodes){if(c.you||c.ping<=0)continue;const u=this.sprite(c.cat),h=c.r+(1-c.ping)*26;t.globalAlpha=c.ping*.5,t.strokeStyle=`rgba(${u.rgb[0]},${u.rgb[1]},${u.rgb[2]},1)`,t.lineWidth=1.6/this.cam.s,t.beginPath(),t.arc(c.x,c.y,h,0,Bn),t.stroke(),t.globalAlpha=1}for(const c of this.nodes){if(c.you||!c.ripple||c.ripple<=0)continue;const u=this.sprite(c.cat),h=c.r+(1-c.ripple)*80;t.globalAlpha=c.ripple*.5,t.strokeStyle=`rgba(${u.rgb[0]},${u.rgb[1]},${u.rgb[2]},1)`,t.lineWidth=2/this.cam.s,t.beginPath(),t.arc(c.x,c.y,h,0,Bn),t.stroke(),t.globalAlpha=1}for(const c of this.nodes){if(c.you)continue;const u=this.sprite(c.cat),h=c.r/u.dr*c.scale*(1+c.glow*1.3),f=u.R*h,p=c.big?.85+.15*Math.sin(this.t*.05+c.seed):.6+.4*(.5+.5*Math.sin(this.t*.045+c.seed));t.globalAlpha=c.alpha*p,t.drawImage(u.canvas,c.x-f,c.y-f,f*2,f*2),c.label&&c.scale>.85&&this.cam.s>.42&&(t.globalAlpha=c.alpha*Math.min(1,(this.cam.s-.42)*6),t.fillStyle="rgba(255,255,255,0.92)",t.save(),t.translate(c.x,c.y),t.scale(1/this.cam.s,1/this.cam.s),t.font=`600 ${Math.max(8,c.r*this.cam.s*.95)}px "IBM Plex Mono", monospace`,t.textAlign="center",t.textBaseline="middle",t.fillText(c.label,0,.5),t.restore()),t.globalAlpha=1}if(this.you){const c=this.you;c.alpha+=(1-c.alpha)*.08,c.scale+=(1-c.scale)*.1;const u=Up(this.pal.you.color),h=c.r*c.scale;t.globalAlpha=c.alpha;const f=1+Math.sin(this.t*.05)*.06;let p=t.createRadialGradient(c.x,c.y,0,c.x,c.y,h*3.4*f);p.addColorStop(0,`rgba(${u[0]},${u[1]},${u[2]},0.5)`),p.addColorStop(1,`rgba(${u[0]},${u[1]},${u[2]},0)`),t.fillStyle=p,t.beginPath(),t.arc(c.x,c.y,h*3.4*f,0,Bn),t.fill();const d=t.createRadialGradient(c.x-h*.3,c.y-h*.3,1,c.x,c.y,h);d.addColorStop(0,"rgba(255,240,205,1)"),d.addColorStop(1,`rgba(${u[0]},${u[1]},${u[2]},1)`),t.fillStyle=d,t.beginPath(),t.arc(c.x,c.y,h,0,Bn),t.fill(),t.strokeStyle="rgba(255,255,255,0.5)",t.lineWidth=1.5/this.cam.s,t.beginPath(),t.arc(c.x,c.y,h,0,Bn),t.stroke(),t.fillStyle="rgba(255,255,255,0.95)",t.save(),t.translate(c.x,c.y),t.scale(1/this.cam.s,1/this.cam.s),t.font=`600 ${Math.max(9,h*this.cam.s*.42)}px "IBM Plex Mono", monospace`,t.textAlign="center",t.textBaseline="middle",t.fillText("YOU",0,.5),t.restore(),t.globalAlpha=1}t.restore();const l=(c,u,h)=>{const f=this.cam.x+c.x*this.cam.s,p=this.cam.y+c.y*this.cam.s,d=u*(.55+.45*Math.sin(this.t*.06+(c.seed||0)))*c.alpha,w=c.r*this.cam.s*2.6+9;this.sparkle(f,p,w,h,d),t.save(),t.globalCompositeOperation="lighter";const v=w*.42;for(const[x,y]of[[v,v],[v,-v]]){const g=t.createLinearGradient(f-x,p-y,f+x,p+y);g.addColorStop(0,`rgba(${h[0]},${h[1]},${h[2]},0)`),g.addColorStop(.5,`rgba(255,255,255,${d*.7})`),g.addColorStop(1,`rgba(${h[0]},${h[1]},${h[2]},0)`),t.strokeStyle=g,t.lineWidth=1,t.beginPath(),t.moveTo(f-x,p-y),t.lineTo(f+x,p+y),t.stroke()}t.restore()};for(const c of this.nodes)c.big&&c.scale>.6&&l(c,.62,this.sprite(c.cat).rgb);this.you&&this.you.alpha>.3&&l(this.you,1.05,Up(this.pal.you.color))}loop(t){this.running&&(this.t++,this.physics(),this.fit(),this.draw(),requestAnimationFrame(this._loop))}}const s9=40,i9=6,o9=220;function a9(e,t){const n=m.useRef(null);return m.useEffect(()=>{if(!t||!e.current)return;const r=new lA(e.current,hu);r.addYou(),r.start(),r.addMode="comet";const s={g:r,seq:0,autoAdded:!1,starPool:[],starsShown:0,focus(o,a){r.setCenterFrac(o,a)},setFit(o){r.fitFactor=o},addCSVNodes(o){this.autoAdded||!o.length||(this.autoAdded=!0,this.starPool=o.slice(),this.revealStars(s9))}
2079,revealStars(o){const a=o9-this.starsShown,l=Math.min(o,a,this.starPool.length);if(l<=0)return;let c=0;const u=()=>{for(let h=0;h<6&&c<l;h++,c++){const f=this.starPool.shift();if(!f)break;r.addNode({id:`star-${f.id}`,cat:"star",isAuto:!0},{pulse:!1,mode:"bloom"}),this.starsShown++}c<l&&setTimeout(u,45)};setTimeout(u,120)},addNamed(o,a){const l=`live-${this.seq++}`,c=r.addNode({id:l,cat:o.cat,name:o.name,initials:o.initials},{big:!0,pulse:!0,edgeToYou:!0,from:a,mode:r.addMode});(c==null?void 0:c.id)===l&&r.wirePeerEdges(l,o.cat),this.revealStars(i9)},dim(o,a){r.dim(o,a)},filled:!1,fillSummary(){if(this.filled)return;this.filled=!0,Object.entries({investor:28,advisor:14,operator:18,founder:22,dealflow:10,catchall:8,connector:3}).forEach(([a,l])=>{for(let c=0;c<l;c++)r.addNode({id:`${a}-fl${c}`,cat:a},{pulse:!1})}),setTimeout(()=>r.autoWire(),200)}};return n.current=s,()=>{r.destroy(),n.current=null}},[t,e]),n}function l9(e){const t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2}}const Pd=aA.length,Id=10,c9=8,u9=2,gj=14;function d9(e){return e<=560?140:e<=900?150:160}function h9(e){const t=d9(e);return Math.max(2,Math.floor((e+gj)/(t+gj)))}const Ad=50,yj=[20,40,60,80,100],f9=[[5,"Strong start â 5 mapped"],[10,"Warm path unlocked â¦"],[15,"Top 20% of mappers"],[25,"Your sky is glowing â 25"],[40,"Exceptional reach â 40"]];function Rd(e){return[e.title,e.company].filter(Boolean).join(" · ")||"LinkedIn connection"}const m9={1:"investor",2:"advisor",3:"operator",4:"founder",5:"dealflow",6:"connector",7:"catchall"},p9=[{cat:"investor",label:"Close investors"},{cat:"advisor",label:"Close advisors"},{cat:"operator",label:"Close C-level operators"},{cat:"founder",label:"Close founder peers"},{cat:"dealflow",label:"Deal-flow partners"},{cat:"connector",label:"Best connectors",star:!0}
2079,{cat:"catchall",label:"Catch-all"}];function g9({active:e,token:t,csvContacts:n,onBack:r,onFinish:s,loading:o=!1}){const a=m.useRef(null),l=a9(a,e),c=m.useRef(!1),u=m.useRef({}),h=m.useRef(null),f=m.useRef(null),p=m.useRef(null),[d,w]=m.useState(4),[v,x]=m.useState(0),[y,g]=m.useState({}),[b,S]=m.useState(""),[j,T]=m.useState(!1),[C,E]=m.useState(!1),[A,R]=m.useState(Ad),[V,D]=m.useState(null),[J,F]=m.useState(null),[Y,W]=m.useState(null),[H,P]=m.useState(""),[_,k]=m.useState(!1),[N,B]=m.useState(0),L=aA[v],z=m.useMemo(()=>{const $=new Map;return Object.values(y).forEach(xe=>{Object.values(xe).forEach(Re=>{$.has(Re.name)||$.set(Re.name,Re)})}),[...$.values()]},[y]),ee=y[1]||{},X=m.useMemo(()=>{if(!L)return[];const $=b.trim().length>0;return e9(L,n,z,ee,$)},[L,n,z,ee,b]),G=m.useMemo(()=>{const $={investor:0,advisor:0,operator:0,founder:0,dealflow:0,connector:0,catchall:0};return Object.entries(y).forEach(([xe,Re])=>{const ke=m9[Number(xe)];ke&&($[ke]+=Object.keys(Re).length)}),$},[y]),ne=y[(L==null?void 0:L.id)??0]||{},te=Object.keys(ne).length,je=m.useMemo(()=>new Set(Object.values(ne).map($=>$.id)),[ne]),q=m.useMemo(()=>Object.values(ne),[ne]),ie=m.useMemo(()=>mj(X,b,c9),[X,b]),me=d*u9,he=m.useMemo(()=>t9(X,je,me),[X,je,me]),fe=m.useMemo(()=>b.trim().toLowerCase()?mj(X,b,X.length):[...X].sort((Re,ke)=>Re.name.localeCompare(ke.name)),[X,b]),ae=fe.slice(0,A),Se=A<fe.length,_e=z.length,Ce=Math.max(Id,Math.round(n.length*.35)),Fe=Math.min(100,Math.round(_e/Ce*100)),Le=yj.filter($=>$<=Fe).length,Ot=_e>=Id,ct=n.length+z.length;m.useEffect(()=>{!e||!l.current||(l.current.focus(.5,.74),l.current.setFit(.44),l.current.addCSVNodes(n))},[e,n,l]),m.useEffect(()=>{!e||!l.current||(l.current.focus(.5,.74),l.current.setFit(.44))},[e,v,l]),m.useEffect(()=>{if(!_||!l.current)return;l.current.focus(.5,.5),l.current.setFit(.5),l.current.fillSummary();const $=z.length;B(0);const xe=performance.now(),Re=900;let ke=0;const Ye=yt=>{const Te=Math.min(1,(yt-xe)/Re),Je=1-Math.pow(1-Te,3);B(Math.round($*Je)),Te<1&&(ke=requestAnimationFrame(Ye))};return ke=requestAnimationFrame(Ye),()=>cancelAnimationFrame(ke)},[_,l,z.length]),m.useEffect(()=>{const $=z.length;for(const[xe,Re]of f9)if($>=xe&&!u.current[xe]){u.current[xe]=!0,W(Re);const ke=setTimeout(()=>W(Ye=>Ye===Re?null:Ye),2400);return()=>clearTimeout(ke)}},[z.length]),m.useEffect(()=>{if(!e)return;const $=xe=>{var Re;(Re=h.current)!=null&&Re.contains(xe.target)||T(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[e]),m.useEffect(()=>{R(Ad)},[v,b,C]),m.useEffect(()=>{const $=p.current;if(!$)return;const xe=()=>w(h9($.clientWidth));xe();const Re=new ResizeObserver(xe);return Re.observe($),()=>Re.disconnect()},[v,C,e]);const xt=$=>$==="connector"?"connector":"strong_connection",Oe=m.useCallback(async($,xe)=>{if(!L||!t)return;const Re=L.id,ke=!!ne[$.id],Ye=xt(L.cat),yt=typeof $.id=="number",Te=xe!=null&&xe.currentTarget&&!ke?l9(xe.currentTarget):null,Je=L.cat;if(g(ze=>{var dn,qe;const Ct={...ze[Re]||{}};ke?delete Ct[$.id]:Ct[$.id]=$;const Ft={...ze,[Re]:Ct};return ke?Object.values(Ft).some(Zn=>Object.values(Zn).some(U=>U.name===$.name))||(qe=l.current)==null||qe.dim($.name,!0):((dn=l.current)==null||dn.addNamed({name:$.name,initials:$.initials,cat:Je},Te),P($.name)),Ft}),!!yt){D($.id);try{ke?await B5(t,$.id):await F5(t,$.id,Ye)}catch{}finally{D(null)}}},[L,t,ne,l]),Xe=()=>{if(c.current)return;c.current=!0;const $=te>0?`${te} ${(L==null?void 0:L.short.toLowerCase())||"contact"} mapped`:"Skipped â moving on";F($),setTimeout(()=>{F(null),v<Pd-1?(x(xe=>xe+1),S(""),T(!1),E(!1)):k(!0),c.current=!1},1200)},wt=()=>{if(v>0){x($=>$-1),S(""),T(!1),E(!1);return}r()},He=($,xe)=>{const Re=!!ne[$.id],ke=Bp(L.id,$.id,ee),Ye=V===$.id;return i.jsxs("button",{type:"button",className:`ob-conn-card${Re?" is-selected is-lit":""}${Ye?" is-busy":""}`,onClick:yt=>{Oe($,yt)},disabled:o||Ye,children:[i.jsx("span",{className:"ob-conn-card-star","aria-hidden":!0,children:"â¦"}),Re?i.jsx("span",{className:"ob-conn-card-check",children:"â"}):null,ke?i.jsx("span",{className:"ob-conn-card-flag",children:"â close"}):null,i.jsx("div",{className:`ob-conn-avatar ob-conn-avatar-${$.cat}`,children:$.initials}),i.jsx("div",{className:"ob-conn-card-name",title:$.name,children:$.name}),i.jsx("div",{className:"ob-conn-card-role",title:Rd($),children:Rd($)})]},String($.id))},at=$=>{const xe=!!ne[$.id],Re=Bp(L.id,$.id,ee),ke=V===$.id;return i.jsxs("button",{type:"button",className:`ob-conn-row${xe?" is-selected":""}${ke?" is-busy":""}`,onClick:Ye=>void Oe($,Ye),disabled:o||ke,children:[i.jsx("div",{className:`ob-conn-row-avatar ob-conn-avatar-${$.cat}`,children:$.initials}),i.jsxs("div",{className:"ob-conn-row-body",children:[i.jsxs("div",{className:"ob-conn-row-name",children:[$.name,Re?i.jsx("span",{className:"ob-conn-row-flag",children:"close"}):null]}),i.jsx("div",{className:"ob-conn-row-role",children:Rd($)})]}),i.jsx("span",{className:`ob-conn-row-action${xe?" is-on":""}`,children:xe?"Added â":"+ Add"})]},String($.id))};return!e||!L?null:i.jsxs("section",{className:"ob-conn-screen",children:[i.jsx("canvas",{ref:a,className:"ob-conn-graph-canvas","aria-hidden":!0}),!_&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"ob-conn-progress-wrap",children:i.jsx("div",{className:"ob-conn-progress-bar",style:{width:`${(v+1)/Pd*100}%`}})}),i.jsxs("header",{className:"ob-conn-header",children:[i.jsxs("div",{className:"ob-conn-header-left",children:[i.jsx("span",{className:"ob-conn-step-label",children:"Step 3 of 3"}),i.jsxs("span",{className:"ob-conn-step-label",children:["Question ",L.id," / ",Pd]}),i.jsxs("span",{className:"ob-conn-counter-pill",children:["Network ",i.jsx("strong",{children:ct.toLocaleStr
2079ing()})," mapped"]}),i.jsx("button",{type:"button",className:"ob-conn-link-btn",onClick:wt,children:"â Back"})]}),H?i.jsxs("span",{className:"ob-conn-last-added",children:["+ ",H]}):null]}),i.jsxs("div",{className:"ob-conn-stage ob-conn-q-enter",children:[i.jsx("div",{className:"ob-conn-stage-head ob-conn-stage-head-stack",children:i.jsxs("div",{className:"ob-conn-title-block",children:[i.jsx("h1",{className:"ob-conn-h1",children:L.q}),i.jsx("p",{className:"ob-conn-clar",children:L.clar})]})}),i.jsx("p",{className:"ob-conn-prompt",children:L.prompt}),i.jsxs("div",{className:"ob-conn-picker",ref:h,children:[i.jsxs("div",{className:`ob-conn-search ob-conn-search-hero${j?" is-open":""}`,children:[i.jsx("span",{className:"ob-conn-search-ic","aria-hidden":!0,children:"â"}),i.jsx("input",{ref:f,value:b,onChange:$=>{S($.target.value),T(!0)},onFocus:()=>T(!0),placeholder:`Search ${X.length.toLocaleString()} ${L.short.toLowerCase()}â¦`,"aria-expanded":j&&ie.length>0,"aria-controls":"ob-conn-search-results",autoComplete:"off"}),b?i.jsx("button",{type:"button",className:"ob-conn-search-clear",onClick:()=>{var $;S(""),T(!1),($=f.current)==null||$.focus()},"aria-label":"Clear search",children:"Ã"}):null]}),j&&b.trim()&&ie.length>0?i.jsx("div",{className:"ob-conn-search-dropdown",id:"ob-conn-search-results",role:"listbox",children:ie.map($=>{const xe=!!ne[$.id],Re=Bp(L.id,$.id,ee);return i.jsxs("button",{type:"button",role:"option","aria-selected":xe,className:`ob-conn-search-hit${xe?" is-selected":""}`,onClick:ke=>{var Ye;Oe($,ke),xe||(S(""),T(!1),(Ye=f.current)==null||Ye.focus())},children:[i.jsx("div",{className:`ob-conn-row-avatar ob-conn-avatar-${$.cat}`,children:$.initials}),i.jsxs("div",{className:"ob-conn-search-hit-body",children:[i.jsxs("div",{className:"ob-conn-search-hit-name",children:[$.name,Re?i.jsx("span",{className:"ob-conn-row-flag",children:"close"}):null]}),i.jsx("div",{className:"ob-conn-search-hit-role",children:Rd($)})]}),i.jsx("span",{className:`ob-conn-row-action${xe?" is-on":""}`,children:xe?"Added â":"+ Add"})]},String($.id))})}):null,j&&b.trim()&&ie.length===0?i.jsx("div",{className:"ob-conn-search-empty",children:"No matches â try another spelling or company name."}):null]}),q.length>0?i.jsxs("div",{className:"ob-conn-selected",children:[i.jsxs("div",{className:"ob-conn-selected-label",children:["Added for this question · ",i.jsx("strong",{children:q.length})]}),i.jsx("div",{className:"ob-conn-chips",children:q.map($=>i.jsxs("button",{type:"button",className:"ob-conn-chip",onClick:xe=>void Oe($,xe),title:`Remove ${$.name}`,children:[i.jsx("span",{className:`ob-conn-chip-av ob-conn-avatar-${$.cat}`,children:$.initials}),i.jsx("span",{className:"ob-conn-chip-name",children:$.name}),i.jsx("span",{className:"ob-conn-chip-x","aria-hidden":!0,children:"Ã"})]},String($.id)))})]}):null,X.length===0?i.jsx("div",{className:"ob-conn-empty",children:"No imported contacts match this category. Skip to continue."}):C?i.jsxs("div",{className:"ob-conn-browse",children:[i.jsxs("div",{className:"ob-conn-browse-head",children:[i.jsxs("span",{className:"ob-conn-browse-title",children:["Browsing ",fe.length.toLocaleString()," ",L.short.toLowerCase()]}),i.jsx("button",{type:"button",className:"ob-conn-link-btn",onClick:()=>E(!1),children:"Back to search"})]}),i.jsx("div",{className:"ob-conn-list",children:ae.map($=>at($))}),Se?i.jsxs("button",{type:"button",className:"ob-conn-load-more",onClick:()=>R($=>$+Ad),children:["Show ",Math.min(Ad,fe.length-A).toLocaleString()," more"]}):null]}):i.jsx("div",{ref:p,className:"ob-conn-suggestions-anchor",children:i.jsxs(i.Fragment,{children:[he.length>0?i.jsxs("div",{className:"ob-conn-suggestions",children:[i.jsxs("div",{className:"ob-conn-suggestions-head",children:[i.jsx("span",{className:"ob-conn-suggestions-label",children:"Quick picks"}),i.jsx("span",{className:"ob-conn-suggestions-sub",children:"A few matches â search above for anyone else"})]}),i.jsx("div",{className:"ob-conn-grid ob-conn-grid-suggestions",style:{"--ob-conn-cols":d},children:he.map($=>He($))})]}):null,X.length>me?i.jsxs("button",{type:"button",className:"ob-conn-browse-toggle",onClick:()=>
2079E(!0),children:["Browse all ",X.length.toLocaleString()," ",L.short.toLowerCase()," â"]}):null]})}),i.jsxs("div",{className:"ob-conn-controls",children:[i.jsxs("span",{className:"ob-conn-count",children:["Added ",i.jsx("strong",{children:te}),L.max?` / ${L.max}`:""]}),i.jsx("div",{className:"ob-conn-footer",children:i.jsx("button",{type:"button",className:`sv4-thesis-btn sv4-thesis-btn-primary${te?"":" ob-conn-skip"}`,onClick:Xe,disabled:o,children:o?"Savingâ¦":v===Pd-1?"Finish":te?"Done â":"Skip â"})})]})]},v),i.jsx("div",{className:"ob-conn-constellation-label",children:"Your constellation"}),i.jsxs("div",{className:"ob-conn-skydock",children:[i.jsxs("div",{className:"ob-conn-skydock-inner",children:[i.jsxs("div",{className:"ob-conn-skydock-row",children:[i.jsxs("span",{className:"ob-conn-skydock-label",children:["Your sky · ",Fe,"% lit"]}),i.jsx("span",{className:`ob-conn-skydock-goal${Ot?" done":""}`,children:Ot?"â first warm path unlocked":`warm path unlocks at ${Id} · ${Math.max(0,Id-_e)} to go`})]}),i.jsxs("div",{className:"ob-conn-skytrack",children:[i.jsx("div",{className:"ob-conn-skyfill",style:{width:`${Fe}%`}}),yj.map(($,xe)=>i.jsx("div",{className:`ob-conn-skypip${xe<Le?" lit":""}${xe===Le?" next":""}`,style:{left:`${$}%`}},$))]}),i.jsx("p",{className:"ob-conn-skymsg",children:Ot?"Your sky's bright â Gem is already tracing warm paths for you.":"Each person you add lights up a star. Keep going â your sky's just getting started."})]}),i.jsxs("div",{className:"ob-conn-collect",children:[i.jsx("div",{className:"ob-conn-collect-avatars",children:z.slice(-5).reverse().map(($,xe)=>i.jsx("div",{className:`ob-conn-collect-av ob-conn-avatar-${$.cat}`,style:{marginLeft:xe?-10:0,zIndex:5-xe},title:$.name,children:$.initials},$.name))}),_e>0?i.jsxs("div",{className:"ob-conn-lit-count",children:[i.jsx("div",{className:"ob-conn-lit-num",children:_e}),i.jsx("div",{className:"ob-conn-lit-label",children:"LIT"})]}):null]})]})]}),_?i.jsx("div",{className:"ob-conn-summary ob-conn-q-enter",children:i.jsxs("div",{className:"ob-conn-summary-grid",children:[i.jsxs("div",{className:"ob-conn-summary-copy",children:[i.jsx("span",{className:"ob-conn-summary-eyebrow",children:"You're all set â¦"}),i.jsx("h1",{className:"ob-conn-summary-h1",children:"Your network, mapped."}),i.jsxs("p",{className:"ob-conn-summary-lede",children:[i.jsx("strong",{children:N})," relationships you told me about, layered onto the ",n.length.toLocaleString()," connections from your LinkedIn import."]}),i.jsx("p",{className:"ob-conn-summary-sub",children:"I've already started tracing the warmest intro paths through your constellation â your dashboard is ready when you are."}),i.jsxs("div",{className:"ob-conn-summary-actions",children:[i.jsx("button",{type:"button",className:"sv4-thesis-btn sv4-thesis-btn-primary",onClick:s,disabled:o,children:o?"Savingâ¦":"Go to your dashboard â"}),i.jsx("button",{type:"button",className:"ob-conn-link-btn",onClick:()=>k(!1),disabled:o,children:"Refine the map"})]})]}),i.jsxs("div",{className:"ob-conn-summary-panel",children:[i.jsx("div",{className:"ob-conn-summary-panel-title",children:"Your Gemphere network"}),i.jsxs("div",{className:"ob-conn-statrow",children:[i.jsxs("span",{className:"ob-conn-statrow-left",children:[i.jsx("span",{className:"ob-conn-stat-swatch",style:{background:hu.auto.color}}),"Imported connections"]}),i.jsx("span",{className:"ob-conn-statrow-n",children:n.length.toLocaleString()})]}),p9.map($=>{var xe;return i.jsxs("div",{className:"ob-conn-statrow",children:[i.jsxs("span",{className:"ob-conn-statrow-left",children:[i.jsx("span",{className:"ob-conn-stat-swatch",style:{background:(xe=hu[$.cat])==null?void 0:xe.color}}),$.label,$.star?i.jsx("span",{className:"ob-conn-stat-star",children:" â"}):null]}),i.jsx("span",{className:"ob-conn-statrow-n",children:G[$.cat]??0})]},$.cat)}),i.jsxs("div",{className:"ob-conn-statrow ob-conn-statrow-total",children:[i.jsx("span",{className:"ob-conn-statrow-left",children:"Total typed relationships"}),i.jsx("span",{className:"ob-conn-statrow-n",children:N})]})]})]})}):null,Y?i.jsx("div",{className:"ob-conn-milestone-pop",role:"status",children:i.jsxs("div",{className:"ob-conn-milestone-pill",children:[i.jsx("span",{className:"ob-conn-milestone-star",children:"â¦"}),i.jsx("span",{className:"ob-conn-milestone-txt",children:Y})]})}):null,J?i.jsx("div",{className:"ob-conn-flourish",role:"status",children:i.jsxs("div",{className:"ob-conn-flourish-pill",children:[i.jsx("span",{className:"ob-conn-flourish-tick",children:"â"}),i.jsx("span",{className:"ob-conn-flourish-txt",children:J})]})}):null]})}const cA=[{key:"coinvestor",label:"co-investors on your closed deals"},{key:"portfolio_founder",label:"founders in your portfolio",sub:"from your fund's investment history"},{key:"team_member",label:"people on your fund team"},{key:"coinvestor_team",label:"co-investor team members"}],y9=Array.from({length:48},(e,t)=>({id:t,left:`${(t*17+7)%100}%`,top:`${(t*23+11)%100}%`,size:t%5===0?3:t%3===0?2:1.5,dur:`${2.4+t%7*.35}s`,delay:`${t%11*.18}s`,lo:.12+t%4*.04,hi:.7+t%3*.1}));function Hy(e,t,n){var o,a;const r=(o=t==null?void 0:t.counts)==null?void 0:o[e];if(typeof r=="number"&&r>0)return r;const s=(a=n==null?void 0:n.groups)==null?void 0:a[e];return Array.isArray(s)?s.length:0}function v9(e,t){var n;return typeof((n=e==null?void 0:e.counts)==null?void 0:n.total)=="number"&&e.counts.total>0?e.counts.total:typeof(t==null?void 0:t.total)=="number"&&t.total>0?t.total:cA.reduce((r,s)=>r+Hy(s.key,e,t),0)}function x9(e,t){const[n,r]=m.useState(0),s=m.useRef(0);return m.useEffect(()=>{if(!t)return;const o=s.current,a=e;if(o===a)return;const l=performance.now(),c=520;let u=0;const h=f=>{const p=Math.min(1,(f-l)/c),d=1-Math.pow(1-p,3);r(Math.round(o+(a-o)*d)),p<1?u=requestAnimationFrame(h):s.current=a};return u=requestAnimationFrame(h),()=>cancelAnimationFrame(u)},[e,t]),n}function w9({active:e,accessToken:t,onContinue:n}){const r=m.useRef(null),s=m.useRef(null),o=m.useRef(0),[a,l]=m.useState(null),[c,u]=m.useState(null),[h,f]=m.useState(36),p=m.useCallback(async()=>{var b;if(!(!t||!e))try{const S=await $5(t);
2079if(l(S),S.status==="completed"||S.status==="failed"||(((b=S.counts)==null?void 0:b.total)??0)>0){const j=await D5(t);u(j)}}catch{}},[t,e]);m.useEffect(()=>{if(!e)return;p();const b=setInterval(()=>void p(),2800);return()=>clearInterval(b)},[e,p]);const d=v9(a,c),w=x9(d,e),v=(a==null?void 0:a.status)==="running"||(a==null?void 0:a.status)==="pending"||(a==null?void 0:a.status)==="none"||!a,x=cA.filter(b=>Hy(b.key,a,c)>0),y=d>0,g=m.useMemo(()=>Math.min(Math.max(d||h,v?h:0),200),[d,h,v]);return m.useEffect(()=>{if(!e||!v)return;const b=setInterval(()=>{f(S=>Math.min(S+3,d>0?d:72))},1400);return()=>clearInterval(b)},[e,v,d]),m.useEffect(()=>{if(!e||!r.current)return;const b=new lA(r.current,hu);return b.setCenterFrac(.68,.5),b.fitFactor=.42,b.start(),s.current=b,o.current=0,()=>{b.destroy(),s.current=null,o.current=0}},[e]),m.useEffect(()=>{const b=s.current;if(!b||!e||g<=o.current)return;for(let j=o.current;j<g;j++)b.addNode({id:`nm-${j}`,cat:"star",isAuto:!0},{pulse:j%4===0,mode:"bloom"});o.current=g;const S=setTimeout(()=>b.autoWire(),220);return()=>clearTimeout(S)},[e,g]),e?i.jsxs("section",{className:"nm-screen",children:[i.jsx("div",{className:"nm-starfield","aria-hidden":!0,children:i.jsx("div",{className:"nm-starfield-drift",children:y9.map(b=>i.jsx("span",{className:"nm-bg-star",style:{left:b.left,top:b.top,width:b.size,height:b.size,"--dur":b.dur,"--delay":b.delay,"--lo":String(b.lo),"--hi":String(b.hi)}},b.id))})}),i.jsx("canvas",{ref:r,className:"nm-graph-canvas","aria-hidden":!0}),i.jsxs("div",{className:"nm-grid",children:[i.jsxs("div",{className:"nm-copy",children:[i.jsx("span",{className:"nm-eyebrow",children:"Your network, mapped"}),i.jsx("h1",{className:"nm-headline",children:d>0||v?i.jsxs(i.Fragment,{children:["I already mapped"," ",i.jsx("strong",{className:y?"nm-count-pop":"",children:w.toLocaleString()},d)," ","of your warm ties."]}):i.jsx(i.Fragment,{children:"Your network is ready to grow."})}),i.jsx("p",{className:"nm-lede",children:d>0?"From your fund's history and public sources I could already place your:":"From your fund's history and public sources I'm placing your network now:"}),v?i.jsxs("div",{className:"nm-loading",role:"status","aria-live":"polite",children:[i.jsx("div",{className:"nm-loading-track",children:i.jsx("div",{className:"nm-loading-fill"})}),i.jsxs("div",{className:"nm-loading-label",children:[i.jsxs("span",{className:"nm-loading-dots","aria-hidden":!0,children:[i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{})]}),"Mapping team, portfolio & co-investors from public sources"]})]}):null,x.length>0?i.jsx("ul",{className:"nm-stats",children:x.map((b,S)=>{const j=Hy(b.key,a,c);return i.jsxs("li",{className:"nm-stat",style:{animationDelay:`${.08*S}s`},children:[i.jsx("span",{className:"nm-stat-n",children:j.toLocaleString()}),i.jsxs("span",{className:"nm-stat-copy",children:[b.label,b.sub?i.jsx("span",{className:"nm-stat-sub",children:b.sub}):null]})]},b.key)})}):null,i.jsxs("div",{className:"nm-actions",children:[i.jsx("button",{type:"button",className:"nm-btn nm-btn-primary",onClick:n,children:"Continue to pricing â"}),v?i.jsx("span",{className:"nm-bg-note",children:"Mapping keeps running in the background â you can continue anytime."}):null]})]}),i.jsx("div",{className:"nm-visual","aria-hidden":!0,children:v?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"nm-visual-pulse"}),i.jsx("span",{className:"nm-visual-pulse"})]}):null})]})]}):null}const qy="gemphere_onboarding_offer";function Rw(e){return String(e||"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function b9(){try{return Rw(sessionStorage.getItem(qy))}catch{return""}}function S9(e){const t=Rw(e);try{t?sessionStorage.setItem(qy,t):sessionStorage.removeItem(qy)}catch{}}const gl="gemphere_pending_onboarding_account_choice",j9={founder:"Founder / Advisor",investor:"Investor"};function uA(e,t){return{tier:e,role:t,accountType:e==="individual"?"INDIVIDUAL":"ENTERPRISE",persona:t==="investor"?"investor":"founder",roleNumber:t==="investor"?2:1,companyRoleLabel:j9[t]}}function k9(e){if(!e||typeof e!="object")return null;const t=e,n=t.tier==="individual"?"individual":t.tier==="enterprise"?"enterprise":null,r=t.role==="founder"||t.role==="advisor"?"founder":t.role==="investor"?"investor":null;return!n||!r?null:uA(n,r)}function vj(){try{const e=sessionStorage.getItem(gl)||localStorage.getItem(gl);return e?k9(JSON.parse(e)):null}catch{return null}}function xj(e){const t=JSON.stringify({tier:e.tier,role:e.role});try{sessionStorage.setItem(gl,t),localStorage.setItem(gl,t)}catch{}}function N9(){try{sessionStorage.removeItem(gl),localStorage.removeItem(gl)}catch{}}function C9(e){return(e==null?void 0:e.tier)==="individual"}const dA="individualInvite",mm="gemphere-individual-founder-investor",_w="gemphere_individual_onboarding_invite";function hA(e){const t=e.get(dA);return t===mm||t==="true"}function E9(){try{sessionStorage.setItem(_w,mm)}catch{}}function T9(){try{sessionStorage.removeItem(_w)}catch{}}function wj(e){if(e&&hA(e))return!0;try{return sessionStorage.getItem(_w)===mm}catch{return!1}}function P9(e){return hA(e)?(E9(),!0):!1}function I9(e){const t=new URLSearchParams;return t.set(dA,mm),`/onboarding/enterprise?${t.toString()}`}function iJ(e){return`${e.replace(/\/+$/,"")}${I9()}`}function A9(){return!!Da()}const bj=8,R9=150,_9=49;function Zo(e,t){const n=(e||"").trim();if(!(!n||Ki(n,t)))return n}const O9=[{id:"build_pipeline",emoji:"ð¯",label:"Build pipeline"},{id:"close_deals",emoji:"ð",label:"Close deals"},{id:"hiring",emoji:"ð©âð»",label:"Hiring"},{id:"expand_accounts",emoji:"ð",label:"Expand accounts"},{id:"partnerships",emoji:"ð¤",label:"Partnerships"},{id:"design_partners",emoji:"ð¨",label:"Design partners"}],M9=[{id:"source_deals",emoji:"ð¯",label:"Source deals"},{id:"win_allocations",emoji:"ð",label:"Win allocations"},{id:"hiring",emoji:"ð©âð»",label:"Hiring"},{id:"help_portfolio",emoji:"ð",label:"Help portfolio"},{id:"co_invest",emoji:"ð¤",label:"Co-invest & syndicate"},{id:"lp_relationships",emoji:"ð¼",label:"LP relationships"}];function L9(e){return e.split(/\n|,/).map(t=>
2079t.trim()).filter(Boolean)}async function Vp(e){const r=[];let s=0,o=1/0;for(;r.length<o&&s<25e3;){const a=await L5(e,{limit:500,offset:s});if(o=a.total||r.length+a.contacts.length,r.push(...a.contacts),!a.contacts.length)break;s+=500}return r.map(a=>({id:a.id,name:a.fullName,initials:iA(a.fullName),title:a.title||"",company:a.companyName||"",email:a.email||"",linkedinUrl:a.linkedinUrl,cat:oA(a.title||"",a.companyName||""),strengthLabel:a.strengthLabel}))}function mo(e){const t=new Set,n=[];for(const r of e){const s=(r||"").trim();if(!s)continue;const o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function ea(e,t){return mo([...e??[],...t])}function Fa({values:e,draft:t,setDraft:n,onAdd:r,onRemove:s,placeholder:o,chipClass:a="sv4-chip-signal"}){return i.jsxs("div",{className:"sv4-chip-well",children:[e.map((l,c)=>i.jsxs("span",{className:`sv4-chip ${a}`,children:[l,i.jsx("button",{type:"button",className:"sv4-chip-x","aria-label":`Remove ${l}`,onClick:()=>s(c),children:"Ã"})]},`${l}-${c}`)),i.jsx("input",{className:"sv4-chip-bare",value:t,onChange:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"||l.key===","?(l.preventDefault(),r()):l.key==="Backspace"&&!t&&e.length&&s(e.length-1)},onBlur:r,placeholder:e.length?"":o??"Addâ¦"})]})}function $9(){const{user:e,refreshTier:t}=Ht(),n=un(),[r,s]=ur(),{openMessageMe:o}=um(),[a,l]=m.useState(()=>new URLSearchParams(window.location.search).get("paymentOnly")==="1"?4:2),[c,u]=m.useState(!1),[h,f]=m.useState(""),[p,d]=m.useState(null),[w,v]=m.useState(()=>{const M=new URLSearchParams(window.location.search);return wj(M)||Ni(M.get("waOnboarding"))||gf()?"individual":"enterprise"}),[x,y]=m.useState(()=>{var M;return((M=vj())==null?void 0:M.role)??"founder"}),[g,b]=m.useState(""),[S,j]=m.useState("+1"),[T,C]=m.useState(""),[E,A]=m.useState("phone"),[R,V]=m.useState(null),[D,J]=m.useState(!1),[F,Y]=m.useState(""),[W,H]=m.useState(""),[P,_]=m.useState(!1),[k,N]=m.useState(()=>Ma()?!0:null),[B,L]=m.useState(""),[z,ee]=m.useState(null),[X,G]=m.useState(""),[ne,te]=m.useState(""),[je,q]=m.useState(_9),[ie,me]=m.useState(Qf),[he,fe]=m.useState(()=>{const M=Fo(new URLSearchParams(window.location.search).get("trial")),Q=Da(),le=M||Q;return M&&Cc(M),le}),[ae,Se]=m.useState(()=>
2079{const M=ml(new URLSearchParams(window.location.search).get("invite")),Q=La(),le=M||Q;return M&&$a(M),le}),[_e,Ce]=m.useState(!1),[Fe,Le]=m.useState(!1),[Ot,ct]=m.useState(""),[xt,Oe]=m.useState(""),[Xe,wt]=m.useState(()=>{const M=Ni(new URLSearchParams(window.location.search).get("waOnboarding")),Q=dh(),le=M||Q;return M&&Uy(M),le}),He=m.useRef(null),at=m.useRef(!1),$=m.useRef(!1),xe=m.useRef(!1);if(He.current===null){const M=Number(r.get("step"));He.current=Number.isInteger(M)&&M>=1&&M<=bj?M:null,at.current=r.get("gmailConnected")==="1"}const Re=!!he,ke=!!ae&&!Re,Ye=Re&&!Ot&&(_e||Fe);function yt(){const M=((e==null?void 0:e.email)??"").trim();return M&&qg(M)?3:4}const[Te,Je]=m.useState(null),[ze,Ct]=m.useState({companyName:"",linkedinProfile:"",companyOverview:"",buyingSignals:[],industries:[],personas:[],antiPattern:"",targetAccounts:"",hunts:["build_pipeline"]}),[Ft,dn]=m.useState({signal:"",industry:"",persona:""}),[qe,bt]=m.useState({firmName:"",linkedinProfile:"",title:"",investmentThesis:"",signals:[],sectors:[],founderProfiles:[],antiPattern:"",namesOnRadar:"",hunts:["source_deals"]}),[Zn,U]=m.useState({signal:"",sector:"",profile:""}),[ue,Pe]=m.useState(null),[Ie,mt]=m.useState(null),[Nn,Tt]=m.useState(""),[We,hn]=m.useState(()=>r.get("paymentOnly")==="1"),[fn,no]=m.useState(!1),[Ys,xs]=m.useState([]),[ws,ro]=m.useState(!1),[Ho,so]=m.useState(!1),[qo,bs]=m.useState(""),Ko=m.useRef(null),[io,oo]=m.useState(0),Ge=!!(e!=null&&e.accessToken),pe=(e==null?void 0:e.accessToken)||"",Zr=wj(r),pt=!!(Ni(r.get("waOnboarding"))||dh()||gf()),Yo=Zr||pt,hr=m.useMemo(()=>ae.includes("@")?ae.toLowerCase():"",[ae]),I=ke&&!Ge&&!We&&!pt&&!P,oe=m.useRef(!1);m.useEffect(()=>{I&&(oe.current||(oe.current=!0,o({initialEmail:hr,lockEmail:!!hr,note:"You were invited to Gemphere. Verify your number and Gem takes it from there on WhatsApp."})))},[I,hr,o]);const ge=w==="individual"&&!Yo?"enterprise":w,re=m.useMemo(()=>!ge||!x?null:uA(ge,x),[ge,x]),$e=m.useMemo(()=>ge==="individual"?"INDIVIDUAL":ge==="enterprise"?"ENTERPRISE":(re==null?void 0:re.accountType)??"ENTERPRISE",[ge,re]),nt=i7((re==null?void 0:re.accountType)??null),Ee=(re==null?void 0:re.persona)??null,qt=(re==null?void 0:re.roleNumber)??void 0,mn=(re==null?void 0:re.companyRoleLabel)??void 0,Zt=C9(re)&&!We&&!Re&&!B,fr=(z==null?void 0:z.price_usd_per_month)??R9,Cr=(z==null?void 0:z.billing_interval)??"monthly",O=(z==null?void 0:z.price_usd_per_quarter)??(Cr==="quarterly"?fr*3:null),K=(z==null?void 0:z.label)??"",ye=!Ye&&!K;m.useEffect(()=>{if(!pe||!(e!=null&&e.userId))return;let M=!1;return(async()=>{var Q;try{const le=await jx(pe,Number(e.userId));if(M||!le)return;(Q=le.proPlan)!=null&&Q.price_usd_per_month&&q(le.proPlan.price_usd_per_month),le.bookDemoUrl&&me(le.bookDemoUrl)}catch{}})(),()=>{M=!0}},[pe,e==null?void 0:e.userId]),m.useEffect(()=>{if(P9(r)&&w!=="individual"){v("individual");return}!Zr&&w==="individual"&&v("enterprise")},[r,w,Zr]),m.useEffect(()=>{re&&xj(re)},[re]),m.useEffect(()=>{We||!Ge||!pe||!re||xe.current||(xe.current=!0,po(pe,{accountType:re.accountType,fullName:Zo(e==null?void 0:e.fullName,e==null?void 0:e.email),email:e==null?void 0:e.email,companyRole:re.companyRoleLabel,role:re.roleNumber}).catch(()=>{xe.current=!1}))},[We,Ge,pe,re,e==null?void 0:e.fullName,e==null?void 0:e.email]),m.useEffect(()=>{const M=Rw(r.get("offer")),Q=b9(),le=M||Q;M&&S9(M),le&&le!==B&&L(le)},[r]),m.useEffect(()=>{if(!B){ee(null),G("");return}let M=!1;return(async()=>{G("");const Q=await eD(B);if(!M){if(Q.ok&&Q.offer){ee(Q.offer);return}ee(null),G(Q.error||"This onboarding link is not configured.")}})(),()=>{M=!0}},[B]),m.useEffect(()=>{const M=Fo(r.get("trial")),Q=Da(),le=M||Q;M&&Cc(M),le&&le!==he&&fe(le)},[r]),m.useEffect(()=>{const M=ml(r.get("invite")),Q=La(),le=M||Q;M&&($a(M),MI()),le&&le!==ae&&Se(le)},[r]),m.useEffect(()=>{if(!he){Ce(!1),Le(!1),ct(""),Oe("");return}let M=!1;return(async()=>{Le(!0),ct("");const Q=await Q5(he);M||(Q.success&&Q.valid?(Ce(!0),Q.trialEndsAt&&Oe(new Date(Q.trialEndsAt).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}))):(Ce(!1),ct(Q.reason==="expired"?"This trial link has expired. Ask your Gemphere contact for a new one.":"This trial link is not val
2079id.")),M||Le(!1))})(),()=>{M=!0}},[he]),m.useEffect(()=>{const M=Ni(r.get("waOnboarding")),Q=dh(),le=M||Q;M&&Uy(M),le&&le!==Xe&&wt(le)},[r]),m.useEffect(()=>{if(!Xe){_(!1),H("");return}let M=!1;return(async()=>{_(!0),H("");const Q=await rD(Xe);M||(Q.ok&&Q.phoneNumber?(yf(Q.phoneNumber),(Q.fullName||Q.email)&&Nw({fullName:Q.fullName||"",email:Q.email||""}),VI(Xe),UI(),wt(""),v("individual"),N(!0),(Q.role==="investor"||Q.role==="founder")&&y(Q.role),l(le=>le<=1?2:le),s(le=>{const rt=new URLSearchParams(le);return rt.delete("waOnboarding"),rt},{replace:!0})):H("This onboarding link is invalid or has expired. Verify your phone number to continue."),M||_(!1))})(),()=>{M=!0}},[Xe,s]),m.useEffect(()=>()=>{rr()},[]),m.useEffect(()=>{if(ke||pt||P)return;const M=ls();if(M){n($r(M),{replace:!0});return}if(!Ge||!pe)return;let Q=!1;return(async()=>{try{const le=await qn(pe);if(Q)return;const rt=(le.pendingTeamInviteToken||"").trim();rt&&(Io(rt),n($r(rt),{replace:!0}))}catch{}})(),()=>{Q=!0}},[n,Ge,pe,ke,pt,P]),m.useEffect(()=>{if(!We||ke||pt||P)return;const M=ls();M&&n($r(M),{replace:!0})},[We,n,ke,pt,P]),m.useEffect(()=>{if(!fn||!We||!Ge)return;let M=!1;return(async()=>{try{const Q=await qn(pe);if(M)return;if(au(Q,{ignorePendingTeamInvite:ke})){const le=(ke?"":Q.pendingTeamInviteToken||ls()||"").trim();if(le){Io(le),n($r(le),{replace:!0});return}}}catch{}!M&&a!==4&&l(4)})(),()=>{M=!0}},[fn,We,Ge,a,pe,n,ke]),m.useEffect(()=>{if(!Ge||!pe){no(!0);return}let M=!1;return(async()=>{try{const Q=await qn(pe);if(M)return;if(Q.isComplete){if(au(Q,{ignorePendingTeamInvite:ke})){const rt=(ke?"":Q.pendingTeamInviteToken||ls()||"").trim();if(rt){Io(rt),n($r(rt),{replace:!0});return}n(jc()||"/home",{replace:!0});return}const le=Number((e==null?void 0:e.userId)??Q.userId);if(le>0&&await lu(pe,le,Q,{ignorePendingTeamInvite:ke})){hn(!0),l(4);return}n(jc()||"/home",{replace:!0});return}if(ww(Q)){const le=Number((e==null?void 0:e.userId)??Q.userId);le>0&&await lu(pe,le,Q,{ignorePendingTeamInvite:ke})&&(hn(!0),l(4))}}catch{}finally{M||no(!0)}})(),()=>{M=!0}},[Ge,pe,n,e==null?void 0:e.userId,ke]),m.useEffect(()=>{if(!Ge||!pe)return;let M=!1;return(async()=>{try{const Q=await qn(pe);if(M)return;const le=Q.profile||{};le.phoneNumber||jd()?N(!0):N(Be=>Be===!0);const en=(Array.isArray(Q.goals)?Q.goals:[]).find(Be=>Be&&Be.goalType==="_account_subtype");if(en){const Be=(en.icp||"").toLowerCase();Be.includes("vc")?Je("investor"):Be&&Je("founder")}le.companyName&&(Ct(Be=>({...Be,companyName:Be.companyName||le.companyName})),bt(Be=>({...Be,firmName:Be.firmName||le.companyName}))),le.linkedinProfile&&(Ct(Be=>({...Be,linkedinProfile:Be.linkedinProfile||le.linkedinProfile})),bt(Be=>({...Be,linkedinProfile:Be.linkedinProfile||le.linkedinProfile}))),le.companyOneLiner&&(Ct(Be=>({...Be,companyOverview:Be.companyOverview||le.companyOneLiner})),bt(Be=>({...Be,investmentThesis:Be.investmentThesis||le.companyOneLiner}))),le.companyRole&&bt(Be=>({...Be,title:Be.title||le.companyRole}));const Hu=Array.isArray(Q.integrations)?Q.integrations:[],Dn=Hu.find(Be=>(Be==null?void 0:Be.provider)==="gmail"&&Be.connected);if(Hu.find(Be=>(Be==null?void 0:Be.provider)==="outlook"&&Be.connected)?Pe("microsoft"):Dn&&Pe("google"),Hu.find(Be=>(Be==null?void 0:Be.provider)==="linkedin"&&Be.connected)){ro(!0);try{const Be=await Vp(pe);!M&&Be.length&&xs(Be)}catch{}}}catch{}})(),()=>{M=!0}},[Ge,pe]),m.useEffect(()=>{if(a!==6||!pe||!Zt){oo(0);return}let M=!1;return(async()=>{const Q=await hm(pe,e==null?void 0:e.userId);if(Q<=0||M)return;const le=await fm(pe,Q);M||oo(le)})(),()=>{M=!0}},[a,pe,Zt,e==null?void 0:e.userId]);const Ue=m.useRef(r.get("stripe_session_id")||r.get("session_id")||""),Ae=m.useRef(r.get("stripe_return")==="1"||!!Ue.current||r.get("stripe")==="success"),De=m.useRef(!1);m.useEffect(()=>{const M=r.get("stripe"),Q=r.get("stripe_return")==="1"||r.has("stripe_session_id"),le=A9();let rt=!1;M==="success"||Q?(Ae.current=!0,gm(),rt=!0):at.current||He.current===3?(l(3),rt=!0):He.current===2?(l(2),rt=!0):le?(Ge?He.current===3||at.current?l(3):He.current!=null&&He.current>=4?l(He.current):Ma()?l(2):l(1):l(2),rt=!0):He.current!=null&&(l(He.current),rt=!0);const en=r.get("mailboxProvider");if((r.get("mailboxConnected")==="1"||r.get("gmailConnected")==="1"||at.current)&&(en==="google"||en==="microsoft"?mt(en):at.current&&mt("google"),rt=!0),rt){const Dn=new URLSearchParams(r);Dn.delete("step"),Dn.delete("gmailConnected"),Dn.delete("mailboxConnected"),Dn.delete("mailboxProvider"),Dn.delete("stripe"),Dn.delete("stripe_return"),Dn.delete("stripe_session_id"),Dn.delete("stripe_cancelled"),B&&Dn.set("offer",B);const ym=Da();ym&&Dn.set("trial",ym);const vm=La();vm&&Dn.set("invite",vm),s(Dn,{replace:!0})}},[]),m.useEffect(()=>{if(!Ge||!pe||!(e!=null&&e.userId)||a!==4||Re||ke)return;let M=!1;return(async()=>
2079{const Q=await Nu(pe,Number(e.userId));M||!(Q!=null&&Q.allowed)||gm()})(),()=>{M=!0}},[Ge,pe,e==null?void 0:e.userId,a,Re,ke]),m.useEffect(()=>{if(!Ae.current||!Ge||!pe||!(e!=null&&e.userId)||De.current)return;De.current=!0;let M=!1;return(async()=>{te("Confirming your payment with Stripeâ¦");const Q=Ue.current||void 0;try{await Z5(pe,Number(e.userId),!0,Q);let le=await hc(pe,Number(e.userId),Q);if(!le.applied){if(await new Promise(rt=>setTimeout(rt,3500)),M)return;le=await hc(pe,Number(e.userId),Q)}if(M)return;le.applied?(await t(),te("")):te("Payment received â if seat access looks wrong, contact [email protected].")}catch{M||te("Could not confirm payment yet. You can continue onboarding.")}})(),()=>{M=!0}},[Ge,pe,e==null?void 0:e.userId,t]),m.useEffect(()=>{if(!Ge||!pe||!Ma())return;let M=!1;return(async()=>{const Q=await xf(pe);!M&&Q&&N(!0)})(),()=>{M=!0}},[Ge,pe]),m.useEffect(()=>{if(We||a!==1)return;if(!Ge){l(2);return}(k===!0||jd())&&(N(!0),l(yt()))},[a,Ge,k,We,e==null?void 0:e.email]),m.useEffect(()=>{if(!Ge||We||a!==3)return;const M=((e==null?void 0:e.email)??"").trim();M&&!qg(M)&&l(4)},[Ge,a,We,e==null?void 0:e.email]),m.useEffect(()=>{if(!fn||We||!Ge||a!==2||!ge||!x)return;const M=()=>l(yt());if(Re){(He.current===3||at.current)&&M();return}(He.current===3||at.current)&&M()},[Ge,a,Re,fn,We,ge,x,e==null?void 0:e.email]),m.useEffect(()=>{We||a!==1||!(k===!0||jd())||l(Ge?yt():2)},[a,k,Ge,We,e==null?void 0:e.email]),m.useEffect(()=>{We||Ge&&k!==!0&&k!==null&&(jd()||a>1&&l(1))},[a,k,We,Ge]),m.useEffect(()=>{We||a!==5||!re||$.current||($.current=!0,pm(re.persona))},[We,a,re]);async function Ne(M){if(f(""),!re){f("Choose your account type and role before continuing.");return}xj(re),d(M);try{await WI(M,{googleScopeTier:M==="google"?nt:void 0,role:re.roleNumber})}catch(Q){d(null),f(Q instanceof Error?Q.message:"Failed to start sign-in")}}async function Ze(M){if(!pe){bs("Sign in first to upload your LinkedIn CSV.");return}so(!0),bs(""),Tt("");try{const Q=await M.text(),le=XG(QG(Q));if(!le.length)throw new Error("Could not parse contacts. Use LinkedIn Connections.csv (First Name, Last Name, Position, Company).");await C5(pe,M.name,Q);const rt=await Vp(pe);xs(rt.length?rt:le),ro(!0),bs(`Imported ${(rt.length||le.length).toLocaleString()} LinkedIn contact${(rt.length||le.length)===1?"":"s"}.`)}catch(Q){bs(Q instanceof Error?Q.message:"Upload failed")}finally{so(!1)}}async function St(){if(Y(""),!nl(g)){Y("Enter a valid phone number (7â15 digits)");return}if(!$u()){Y("Phone login isn't configured. Add Firebase env vars and try again.");return}J(!0);try{const M=gs(g,S),Q=await Du(M);V(Q),A("otp"),C("")}catch(M){Y(Bu(M))}finally{J(!1)}}async function mr(){const M=T.replace(/\D/g,"");if(M.length!==6){Y("Enter the 6-digit code");return}if(!R){Y("Session expired. Request a new code.");return}J(!0),Y("");try{await Fu(R,M);const Q=gs(g,S);yf(Q),(async()=>{const le=await yw();if(!le)return;const rt=Zo(e==null?void 0:e.fullName,e==null?void 0:e.email)||((e==null?void 0:e.email)||"").split("@")[0]||"Friend";await kx(Q,le,{fullName:rt,email:(e==null?void 0:e.email)||""})})().catch(()=>{}),Ge&&pe&&await xf(pe),rr(),V(null),N(!0),l(Ge?yt():2)}catch(Q){Y(Q instanceof Error?Q.message:"Verification failed")}finally{J(!1)}}function Js(){A("phone"),C(""),Y(""),rr(),V(null)}async function $n(M){await po(pe,{accountType:M,fullName:Zo(e==null?void 0:e.fullName,e==null?void 0:e.email),email:e==null?void 0:e.email,companyRole:mn,role:qt??(e==null?void 0:e.role)??(x==="investor"?2:1)})}async function Jo(){if(!Ge){f("Sign in with Google or Outlook first."),l(2);return}if(Fe){f("Still checking your trial linkâ¦");return}if(!he||!_e){f(Ot||"This trial link is not valid.");return}u(!0),f("");try{await $n("ENTERPRISE");const M=(e==null?void 0:e.userId)||0,Q=await X5(pe,M,he);if(!Q.ok){f(Q.error||"Could not start your free trial.");return}Cc(null),await t(),gm()}catch(M){f(M instanceof Error?M.message:"Trial error")}finally{u(!1)}}async function Qo(){if(!Ge){f("Sign in with Google or Outlook first."),l(2);return}u(!0),f("");try{await $n("INDIVIDUAL");const M=(e==null?void 0:e.userId)||0,Q=await Xh(pe,M,null,{checkoutContext:"onboarding",plan:"pro"});if(Q.ok&&Q.url){window.location.href=Q.url;return}f(Q.error||"Could not create Stripe checkout link")}catch(M){f(M instanceof Error?M.message:"Stripe error")}finally{u(!1)}}async function kA(){if(!Ge){f("Sign in with Google or Outlook first."),l(2);return}if(Re){await Jo();return}u(!0),f("");try{await $n("ENTERPRISE");const M=(e==null?void 0:e.userId)||0,Q=await Xh(pe,M,null,{offerSlug:B||void 0,checkoutContext:"onboarding"});if(Q.ok&&Q.url){window.location.href=Q.url;return}f(Q.error||"Could not create Stripe checkout link")}catch(M){f(M instanceof Error?M.message:"Stripe error")}finally{u(!1)}}
2079async function NA(){if(!Ge){f("Sign in with Google or Outlook first."),l(2);return}if(!re||!Zt){f("Only individual accounts can skip pricing.");return}u(!0),f("");const M=re.persona;Je(M),l(6);try{await $n("INDIVIDUAL"),await Mw(M),t()}catch(Q){Je(null),l(4),f(Q instanceof Error?Q.message:"Could not continue without payment")}finally{u(!1)}}async function Mw(M){if(pe)try{await po(pe,{accountType:$e,fullName:Zo(e==null?void 0:e.fullName,e==null?void 0:e.email),email:e==null?void 0:e.email,companyRole:M===Ee?mn:void 0,role:M===Ee&&qt?qt:M==="investor"?2:1}),await Si(pe,[{goalType:"_account_subtype",icp:M==="investor"?"vc_firm":"b2b_company"}])}catch{}}async function pm(M){Je(M),f(""),l(6);try{await Mw(M)}catch{}}function gm(){if(re){pm(re.persona);return}l(5)}async function CA(){u(!0),f("");try{await po(pe,{accountType:$e,fullName:Zo(e==null?void 0:e.fullName,e==null?void 0:e.email),email:e==null?void 0:e.email,companyName:ze.companyName,companyRole:Ee==="founder"?mn:void 0,companyOneLiner:ze.companyOverview,linkedinProfile:ze.linkedinProfile.trim()||void 0,role:Ee==="founder"&&qt?qt:1});const M=ze.hunts.map(en=>({goalType:en}));M.push({goalType:"_account_subtype",icp:"b2b_company"}),await Si(pe,M);const Q={firmo:mo(ze.industries),persona:mo(ze.personas),signal:mo([...ze.buyingSignals,...ze.antiPattern.trim()?[`Avoid: ${ze.antiPattern.trim()}`]:[]])};let le={firmo:[],persona:[],signal:[]};try{le=await Jh(pe)}catch{}await Qh(pe,{firmo:ea(le.firmo,Q.firmo),persona:ea(le.persona,Q.persona),signal:ea(le.signal,Q.signal)});const rt=Dr(_s(ze.targetAccounts));if(rt.length){const en=await uj(pe,rt,{authUserId:e==null?void 0:e.userId,accountType:$e,forceFreeTier:Zt});if(en.error&&en.savedCount===0){f(en.error);return}}l(7)}catch(M){f(M instanceof Error?M.message:"Save failed")}finally{u(!1)}}async function EA(){u(!0),f("");try{await po(pe,{accountType:$e,fullName:Zo(e==null?void 0:e.fullName,e==null?void 0:e.email),email:e==null?void 0:e.email,companyName:qe.firmName,companyRole:qe.title||mn,companyOneLiner:qe.investmentThesis,linkedinProfile:qe.linkedinProfile.trim()||void 0,role:2}),await E5(pe,{role:2,title:qe.title,fundName:qe.firmName,companyName:qe.firmName,commonAdvice:qe.investmentThesis,companyOverview:qe.investmentThesis,linkedinProfile:qe.linkedinProfile.trim()||void 0});const M=qe.hunts.map(en=>({goalType:en}));M.push({goalType:"_account_subtype",icp:"vc_firm"}),M.push({goalType:"vc_thesis",sectorFocus:qe.sectors.join(", ")||void 0,roles:qe.founderProfiles,icp:qe.signals.join(", ")||void 0,extra:{antiPattern:qe.antiPattern,namesOnRadar:L9(qe.namesOnRadar),signals:qe.signals}}),await Si(pe,M);const Q={firmo:mo(qe.sectors),persona:mo(qe.founderProfiles),signal:mo([...qe.signals,...qe.antiPattern.trim()?[`Avoid: ${qe.antiPattern.trim()}`]:[]])};let le={firmo:[],persona:[],signal:[]};try{le=await Jh(pe)}catch{}await Qh(pe,{firmo:ea(le.firmo,Q.firmo),persona:ea(le.persona,Q.persona),signal:ea(le.signal,Q.signal)});const rt=Dr(_s(qe.namesOnRadar));if(rt.length){const en=await uj(pe,rt,{authUserId:e==null?void 0:e.userId,accountType:$e,forceFreeTier:Zt});if(en.error&&en.savedCount===0){f(en.error);return}}l(7)}catch(M){f(M instanceof Error?M.message:"Save failed")}finally{u(!1)}}async function Lw(){u(!0),f("");try{const M=vj();(ge==="individual"||$e==="INDIVIDUAL"||Zr&&(M==null?void 0:M.tier)==="individual")&&await $n("INDIVIDUAL"),await ju(pe,[{provider:"gmail",connected:ue==="google"||Ie==="google"},{provider:"google_calendar",connected:ue==="google"||Ie==="google"},{provider:"outlook",connected:ue==="microsoft"||Ie==="microsoft"},{provider:"linkedin",connected:ws}]),await ku(pe),$a(null),await t(),n(jc()||"/home",{replace:!0}),N9(),T9()}catch(M){f(M instanceof Error?M.message:"Finish failed")}finally{u(!1)}}async function TA(){if(ws){if(Tt(""),!Ys.length&&pe){u(!0);try{const M=await Vp(pe);M.length&&xs(M)}catch(M){Tt(M instanceof Error?M.message:"Could not load LinkedIn contacts");return}finally{u(!1)}}l(8);return}Lw()}async function $w(M){if(pe){Tt("");try{Gu({path:"/onboarding/enterprise",step:7,mailboxProvider:M}),await Rl(pe,M,{googleScopeTier:M==="google"?nt:void 0})}catch(Q){const le=M==="microsoft"?"Outlook":"Google";Tt(Q instanceof Error?Q.message:`Failed to start ${le} connect`)}}}const PA=m.useMemo(()=>ue==="google"?"microsoft":ue==="microsoft"?"google":"microsoft",[ue]);return Ge&&!fn?i.jsx("div",{className:"sv4-root sv4-loading",children:i.jsx(bn,{className:"sv4-spinner","aria-hidden":!0})}):P?i.jsx("div",{className:"sv4-root sv4-loading",children:i.jsx(bn,{className:"sv4-spinner","aria-hidden":!0})}):I?i.jsx("div",{className:"sv4-root",children:i.jsx("div",{className:"sv4-screen sv4-invite-gate","data-active":"true",children:i.jsxs("div",{className:"sv4-invite-gate-card",children:[i.jsx("div",{className:"sv4-s1-r-tag",children:"You're invited"}),i.jsxs("h1",{className:"sv4-s1-r-title",children:["Gemphere runs on ",i.jsx("em",{children:"WhatsApp."})]}),i.jsx("p",{className:"sv4-s1-r-sub",children:"Verify your number and Gem messages you there â your whole signup happens in the chat. Nothing to install."}
2079),hr?i.jsxs("p",{className:"sv4-s1-r-sub",children:["Your invite was sent to ",i.jsx("strong",{children:hr}),". Use that address so you connect to whoever invited you."]}):null,i.jsx("button",{type:"button",className:"sv4-oauth-btn",onClick:()=>o({initialEmail:hr,lockEmail:!!hr,note:"You were invited to Gemphere. Verify your number and Gem takes it from there on WhatsApp."}),children:"Message Gem on WhatsApp"})]})})}):i.jsxs("div",{className:"sv4-root",children:[i.jsx(H9,{active:a===1&&!We,phase:E,countryCode:S,setCountryCode:j,phone:g,setPhone:b,otp:T,setOtp:C,onSendCode:St,onVerifyOtp:mr,onBackToPhone:Js,loading:D,error:W||F}),i.jsx(D9,{active:a===2&&!We,tierChoice:ge,onGmail:()=>Ne("google"),onOutlook:()=>Ne("microsoft"),busy:p,error:h}),Ge&&pe?i.jsx(w9,{active:a===3&&!We,accessToken:pe,onContinue:()=>l(4)}):null,i.jsx(F9,{active:a===4,pricePerSeat:fr,proPriceUsd:je,billingInterval:Cr,pricePerSeatQuarter:O,offerLabel:K,offerLoadErr:X,stripeReconcileMsg:ne,trialMode:Ye,trialValidating:Fe,trialLoadErr:Ot,trialEndsPreview:xt,showPlanChoice:ye,bookDemoUrl:ie,onProCheckout:()=>void Qo(),onContinue:kA,showSkip:Zt,onSkip:()=>void NA(),loading:c,error:h}),i.jsx(B9,{active:a===5&&!re,onPick:pm,loading:c}),Te==="founder"&&i.jsx(V9,{active:a===6,value:ze,setValue:Ct,drafts:Ft,setDrafts:dn,onContinue:CA,loading:c,error:h,isFreeTier:Zt,existingTargetCount:io}),Te==="investor"&&i.jsx(U9,{active:a===6,value:qe,setValue:bt,drafts:Zn,setDrafts:U,onContinue:EA,loading:c,error:h,isFreeTier:Zt,existingTargetCount:io}),i.jsx(z9,{active:a===7,stepNum:7,totalSteps:bj,isIndividual:(re==null?void 0:re.tier)==="individual",primaryProvider:ue,otherProvider:PA,secondaryMailbox:Ie,linkedinConnected:ws,linkedinRequired:!1,linkedinUploading:Ho,linkedinUploadMsg:qo,linkedinContactCount:Ys.length,linkedinFileRef:Ko,onLinkedinFile:M=>void Ze(M),onConnectGmail:()=>$w("google"),onConnectOutlook:()=>$w("microsoft"),onBack:()=>l(6),onContinue:()=>void TA(),loading:c,error:Nn||h}),i.jsx(g9,{active:a===8,token:pe,csvContacts:Ys,onBack:()=>l(7),onFinish:()=>void Lw(),loading:c}),i.jsx("div",{id:"recaptcha-container",style:{position:"absolute",width:0,height:0,opacity:0},"aria-hidden":!0})]})}function D9({active:e,tierChoice:t,onGmail:n,onOutlook:r,busy:s,error:o}){return e?i.jsxs("section",{className:"sv4-screen sv4-s1",children:[i.jsxs("div",{className:"sv4-s1-left",children:[i.jsx("div",{className:"sv4-s1-orb sv4-s1-orb-1"}),i.jsx("div",{className:"sv4-s1-orb sv4-s1-orb-2"}),i.jsxs("div",{className:"sv4-s1-logo",children:[i.jsx("img",{src:kn,alt:"",className:"sv4-s1-logo-mark",draggable:!1}),i.jsx("div",{className:"sv4-s1-logo-text",children:"Gemphere"})]}),i.jsxs("div",{className:"sv4-s1-headline-wrap",children:[i.jsxs("div",{className:"sv4-s1-headline",children:["The warmest path",i.jsx("br",{}),"to ",i.jsx("em",{children:"anyone."})]}),i.jsxs("div",{className:"sv4-s1-sub",children:[i.jsx("strong",{children:"Always double opt-in."})," We use AI to accelerate warm intros. Every connection still comes from someone you trust."]}),i.jsxs("div",{className:"sv4-s1-ava-card",children:[i.jsxs("div",{className:"sv4-s1-ava-top",children:[i.jsx("div",{className:"sv4-s1-ava-dot"}),i.jsx("div",{className:"sv4-s1-ava-label",children:"Gem · AI network analyst"})]}),i.jsx("div",{className:"sv4-s1-ava-msg",children:`"I'll find the warmest path to anyone you want to meet."`})]})]}),i.jsx("div",{className:"sv4-s1-foot","aria-hidden":!0})]}),i.jsxs("div",{className:"sv4-s1-right",children:[i.jsx("div",{className:"sv4-s1-r-tag",children:t==="individual"?"FREE STARTER":"ENTERPRISE"}),i.jsxs("div",{className:"sv4-s1-r-title",children:["Continue to ",i.jsx("em",{children:"Gemphere"})]}),i.jsx("div",{className:"sv4-s1-r-sub",children:"Sign in with Google or Outlook. Phone verification comes next."}),o?i.jsx("div",{className:"sv4-error",children:o}):null,i.jsxs("button",{type:"button",className:"sv4-oauth-btn",onClick:n,disabled:s!==null,children:[s==="google"?i.jsx(bn,{className:"sv4-spin"}):i.jsx(W9,{}),i.jsx("span",{children:"Continue with Google"})]}),i.jsxs("button",{type:"button",className:"sv4-oauth-btn",onClick:r,disabled:s!==null,children:[s==="microsoft"?i.jsx(bn,{className:"sv4-spin"}):i.jsx(G9,{}),i.jsx("span",{children:"Continue with Outlook"})]}),i.jsxs("div",{className:"sv4-s1-r-foot",children:["By continuing, you agree to our ",i.jsx("a",{href:"/terms",children:"Terms"})," and"," ",i.jsx("a",{href:"/privacy",children:"Privacy Policy"}),"."]})]})]}):null}function F9({active:e,pricePerSeat:t,proPriceUsd:n,billingInterval:r,pricePerSeatQuarter:s,offerLabel:o,offerLoadErr:a,stripeReconcileMsg:l,trialMode:c,trialValidating:u,trialLoadErr:h,trialEndsPreview:f,showPlanChoice:p,bookDemoUrl:d,onProCheckout:w,onContinue:v,showSkip:x,onSkip:y,loading:g,error:b}){if(!e)return null;
2079const S=r==="quarterly"&&s!=null,j=t.toLocaleString("en-US",{maximumFractionDigits:0}),T=n.toLocaleString("en-US",{maximumFractionDigits:0}),C=S?s.toLocaleString("en-US",{maximumFractionDigits:0}):null,E=new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return p?i.jsxs("section",{className:"sv4-screen sv4-s3",children:[i.jsx("div",{className:"sv4-s3-h1",children:"Choose your plan"}),i.jsx("div",{className:"sv4-s3-h1-sub",children:"Go Pro for solo use, or Enterprise when you need team seats and a shared warm-intro graph."}),b?i.jsx("div",{className:"sv4-error sv4-error-wide",children:b}):null,l?i.jsx("div",{className:"sv4-s3-h1-sub",style:{marginTop:8},children:l}):null,i.jsxs("div",{className:"sv4-plan-grid",children:[i.jsxs("div",{className:"sv4-plan-card sv4-plan-card--pro",children:[i.jsxs("div",{className:"sv4-plan-card-head",children:[i.jsxs("div",{children:[i.jsx("div",{className:"sv4-plan-name",children:"Pro"}),i.jsx("div",{className:"sv4-plan-tagline",children:"Everything you need solo â one seat."})]}),i.jsxs("div",{className:"sv4-plan-price",children:[i.jsxs("span",{className:"sv4-plan-price-num",children:["$",T]}),i.jsx("span",{className:"sv4-plan-price-unit",children:"/ mo"})]})]}),i.jsxs("ul",{className:"sv4-plan-features",children:[i.jsx("li",{children:"Unlimited target accounts"}),i.jsx("li",{children:"Connectors & warm intro paths"}),i.jsx("li",{children:"Gem AI & network tools"})]}),i.jsx("button",{type:"button",className:"sv4-stripe-btn",onClick:w,disabled:g,children:g?i.jsx(bn,{className:"sv4-spin"}):i.jsxs(i.Fragment,{children:["Go Pro â $",T,"/mo"]})})]}),i.jsxs("div",{className:"sv4-plan-card sv4-plan-card--enterprise",children:[i.jsxs("div",{className:"sv4-plan-card-head",children:[i.jsxs("div",{children:[i.jsx("div",{className:"sv4-plan-name",children:"Enterprise"}),i.jsx("div",{className:"sv4-plan-tagline",children:"Team seats, shared targets, firm-wide graph."})]}),i.jsxs("div",{className:"sv4-plan-price",children:[i.jsxs("span",{className:"sv4-plan-price-num",children:["$",j]}),i.jsx("span",{className:"sv4-plan-price-unit",children:"/ seat / mo"})]})]}),i.jsxs("ul",{className:"sv4-plan-features",children:[i.jsx("li",{children:"Everything in Pro, per seat"}),i.jsx("li",{children:"Invite teammates & share targets"}),i.jsx("li",{children:"Portfolio & team warm paths"})]}),i.jsx("button",{type:"button",className:"sv4-stripe-btn sv4-stripe-btn--secondary",onClick:v,disabled:g,children:g?i.jsx(bn,{className:"sv4-spin"}):i.jsx(i.Fragment,{children:"Continue to Stripe for team seats"})})]})]}),x?i.jsx("button",{type:"button",className:"sv4-skip-btn sv4-skip-btn--centered",onClick:y,disabled:g,children:"Skip for now â continue with Free Starter"}):null,i.jsxs("div",{className:"sv4-s3-foot",children:["Not sure which plan fits?"," ",i.jsx("a",{href:d,target:"_blank",rel:"noreferrer",children:"Book a demo"})," ","and we'll walk you through team pricing."]})]}):i.jsxs("section",{className:"sv4-screen sv4-s3",children:[i.jsx("div",{className:"sv4-s3-h1",children:c?"Your free trial":"Pricing"}),i.jsx("div",{className:"sv4-s3-h1-sub",children:c?i.jsxs(i.Fragment,{children:["Your ",i.jsx("strong",{children:"2-week free trial starts today"})," (",E,"). Full access to every feature â no card required",f?i.jsxs(i.Fragment,{children:[" ","through ",i.jsx("strong",{children:f})]}):null,". Teammates you invite during the trial get access too."]}):o?i.jsxs(i.Fragment,{children:["Custom plan for ",i.jsx("strong",{children:o}),S?i.jsxs(i.Fragment,{children:[" ","â $",j," per seat per month, billed quarterly ($",C," per seat every 3 months). Choose your seats on Stripe checkout."]}):i.jsxs(i.Fragment,{children:[" ","â $",j," per seat, per month. Choose your seats on Stripe checkout."]})]}):S?i.jsxs(i.Fragment,{children:["$",j," per seat per month, billed quarterly ($",C," per seat every 3 months). Choose your seats on Stripe checkout."]}):i.jsxs(i.Fragment,{children:["$",j," per seat, per month. Choose your seats on Stripe checkout."]})}),u?i.jsx("div",{className:"sv4-s3-h1-sub",style:{marginTop:8},children:"Checking your trial linkâ¦"}):null,h?i.jsx("div",{className:"sv4-error sv4-error-wide",children:h}):null,a?i.jsx("div",{className:"sv4-error sv4-error-wide",children:a}):null,l?i.jsx("div",{className:"sv4-s3-h1-sub",style:{marginTop:8},children:l}):null,b?i.jsx("div",{className:"sv4-error sv4-error-wide",children:b}):null,i.jsxs("div",{className:"sv4-pay-shell",children:[i.jsxs("div",{className:"sv4-pay-top-row",children:[i.jsxs("div",{children:[i.jsx("div",{className:"sv4-pay-brand",children:"Gemphere"}),i.jsx("div",{className:"sv4-pay-tag",children:"Everything's in. No tiers, no upsells."})]}),c?i.jsxs("div",{className:"sv4-pay-price",children:[i.jsx("span",{className:"sv4-pay-price-num",children:"Free"}),i.jsx("span",{className:"sv4-pay-price-unit",children:"/ 2 weeks"})]}):i.jsxs("div",{className:"sv4-pay-price",children:[i.jsxs("span",{className:"sv4-pay-price-num",children:["$",S?C:j
2079]}),i.jsx("span",{className:"sv4-pay-price-unit",children:S?"/ seat / quarter":"/ seat / mo"})]})]}),i.jsxs("div",{className:"sv4-pay-features",children:[i.jsxs("div",{className:"sv4-pay-feature",children:[i.jsx("span",{className:"sv4-pay-check",children:"â"})," Unlimited intro requests"]}),i.jsxs("div",{className:"sv4-pay-feature",children:[i.jsx("span",{className:"sv4-pay-check",children:"â"})," Shared warm-intro graph for your team"]}),i.jsxs("div",{className:"sv4-pay-feature",children:[i.jsx("span",{className:"sv4-pay-check",children:"â"})," Priority matching algorithm"]}),i.jsxs("div",{className:"sv4-pay-feature",children:[i.jsx("span",{className:"sv4-pay-check",children:"â"})," Connector score & analytics"]}),i.jsxs("div",{className:"sv4-pay-feature",children:[i.jsx("span",{className:"sv4-pay-check",children:"â"})," Direct message connectors"]}),i.jsxs("div",{className:"sv4-pay-feature",children:[i.jsx("span",{className:"sv4-pay-check",children:"â"})," Advanced profile visibility"]})]}),i.jsxs("div",{className:"sv4-seats-box",children:[i.jsxs("div",{className:"sv4-seats-info-row",children:[i.jsx("div",{className:"sv4-seats-info-icon",children:"i"}),i.jsx("div",{className:"sv4-seats-info-text",children:c?"Start your trial to continue onboarding. When it ends, add seats from billing settings.":"You'll pick how many seats you need on Stripe. You can add more anytime from billing settings."})]}),i.jsx("button",{type:"button",className:"sv4-stripe-btn",onClick:v,disabled:g||!!a||!!h||!!u,children:g||u?i.jsx(bn,{className:"sv4-spin"}):c?i.jsx(i.Fragment,{children:"Start free trial â"}):i.jsx(i.Fragment,{children:"Continue to Stripe â"})}),x&&!c?i.jsx("button",{type:"button",className:"sv4-skip-btn",onClick:y,disabled:g||!!u,children:"Skip for now â continue with Free Starter"}):null]})]}),i.jsxs("div",{className:"sv4-s3-foot",children:["Need volume pricing or SSO?"," ",i.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]})]})}function B9({active:e,onPick:t,loading:n}){return e?i.jsx("section",{className:"sv4-screen sv4-s4",children:i.jsxs("div",{className:"sv4-s4-wrap",children:[i.jsx("div",{className:"sv4-top-tag",children:"ONE LAST THING"}),i.jsxs("div",{className:"sv4-page-title",children:["Which side are you ",i.jsx("em",{children:"on?"})]}),i.jsx("div",{className:"sv4-page-sub",children:"We'll tailor Gemphere around how you use your network."}),i.jsxs("div",{className:"sv4-persona-grid",children:[i.jsxs("button",{type:"button",className:"sv4-persona-card",onClick:()=>t("investor"),disabled:n,children:[i.jsx("div",{className:"sv4-persona-glyph",children:"â"}),i.jsx("div",{className:"sv4-persona-title",children:i.jsx("em",{children:"Investor"})}),i.jsx("div",{className:"sv4-persona-sub",children:"VC, angel, platform"})]}),i.jsxs("button",{type:"button",className:"sv4-persona-card",onClick:()=>t("founder"),disabled:n,children:[i.jsx("div",{className:"sv4-persona-glyph",children:"â²"}),i.jsx("div",{className:"sv4-persona-title",children:i.jsx("em",{children:"Founder"})}),i.jsx("div",{className:"sv4-persona-sub",children:"CEO, operator, builder"})]})]})]})}):null}function U9({active:e,value:t,setValue:n,drafts:r,setDrafts:s,onContinue:o,loading:a,error:l,isFreeTier:c,existingTargetCount:u=0}){if(!e)return null;const h=p=>{n(d=>({...d,hunts:d.hunts.includes(p)?d.hunts.filter(w=>w!==p):[...d.hunts,p]}))},f=(p,d)=>{const w=r[d].trim().replace(/,$/,"").trim();w&&(n(v=>{const x=v[p]??[];return x.some(y=>y.toLowerCase()===w.toLowerCase())?v:{...v,[p]:[...x,w]}}),s(v=>({...v,[d]:""})))};return i.jsx("section",{className:"sv4-screen sv4-s5",children:i.jsxs("div",{className:"sv4-thesis-wrap",children:[i.jsxs("header",{className:"sv4-thesis-header",children:[i.jsxs("h1",{className:"sv4-thesis-h1",children:["Your thesis, ",i.jsx("em",{children:"in your words."})]}),i.jsx("p",{className:"sv4-thesis-sub",children:"The sharper this is, the better Gem matches founders to you. Skip what doesn't apply yet."})]}),l?i.jsx("div",{className:"sv4-error sv4-error-wide",children:l}):null,i.jsxs("section",{className:"sv4-thesis-card",children:[i.jsxs("div",{className:"sv4-thesis-card-head",children:[i.jsxs("div",{className:"sv4-thesis-brand",children:[i.jsx("span",{className:"sv4-thesis-logo",children:i.jsx("img",{src:kn,alt:"",draggable:!1})}),i.jsx("span",{children:"Gemphere"}),i.jsx("span",{className:"sv4-thesis-plan",children:"Enterprise"})]}),i.jsx("div",{className:"sv4-thesis-step",children:"Step 1 of 3"})]}),i.jsxs(Yt,{label:"Firm name",children:[i.jsx("div",{className:"sv4-thesis-help",children:"The name of your venture firm or fund."}),i.jsx("input",{className:"sv4-thesis-single sv4-thesis-single-text",value:t.firmName||"",onChange:p=>n(d=>({...d,firmName:p.target.value})),placeholder:"e.g. Sequoia Capital"})]}),i.jsxs(Yt,{label:"LinkedIn URL",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Your personal LinkedIn profile â used to match warm paths."}),i.jsx("input",{className:"sv4-thesis-single sv4-thesis-single-text",type:"url",inputMode:"url",autoComplete:"url",value:t.linkedinProfile||"",onChange:p=>n(d=>({...d,linkedinProfile:p.target.value})),placeholder:"https://www.linkedin.com/in/you"})]}),i.jsxs(Yt,{label:"Your title",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Your role at the firm."}),i.jsx("input",{className:"sv4-thesis-single sv4-thesis-single-text",value:t.title||"",onChange:p=>n(d=>({...d,title:p.target.value})),placeholder:"e.g. Partner, Associate, Managing Director"})]}),i.jsxs(Yt,{label:"Investment thesis",children:[i.jsx("div",{className:"sv4-thesis-help",children:"One sentence. Your firm's core focus and stage."}),i.jsx("textarea",{className:"sv4-thesis-area",value:t.investmentThesis||"",onChange:p=>n(d=>({...d,investmentThesis:p.target.value})),placeholder:"e.g. Early-stage B2B SaaS, pre-seed to Series A, US & Europe."})]}),i.jsxs(Yt,{label:"Signals",children:[i.jsxs("div",{className:"sv4-thesis-help",children:["Traction or qualities that catch your eye. E.g."," ",i.jsx("em",{children:"Just raised seed"}),", ",i.jsx("em",{children:"Top-tier engineering team"}),","," ",i.jsx("em",{children:"Defensible moat / data"}),"."]}),i.jsx(Fa,{values:t.signals,draft:r.signal,setDraft:p=>s(d=>({...d,signal:p})),onAdd:()=>f("signals","signal"),onRemove:p=>n(d=>({...d,signals:d.signals.filter((w,v)=>v!==p)}
2079)),placeholder:"Just raised seed, Defensible moatâ¦",chipClass:"sv4-chip-signal"})]}),i.jsxs(Yt,{label:"Sectors / themes",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Where you actively write checks."}),i.jsx(Fa,{values:t.sectors,draft:r.sector,setDraft:p=>s(d=>({...d,sector:p})),onAdd:()=>f("sectors","sector"),onRemove:p=>n(d=>({...d,sectors:d.sectors.filter((w,v)=>v!==p)})),placeholder:"AI infra, Dev toolsâ¦",chipClass:"sv4-chip-sector"})]}),i.jsxs(Yt,{label:"Founder profile â what gets you excited?",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Who Gem should prioritize on warm paths."}),i.jsx(Fa,{values:t.founderProfiles,draft:r.profile,setDraft:p=>s(d=>({...d,profile:p})),onAdd:()=>f("founderProfiles","profile"),onRemove:p=>n(d=>({...d,founderProfiles:d.founderProfiles.filter((w,v)=>v!==p)})),placeholder:"Repeat founder, Technical, Ex-FAANGâ¦",chipClass:"sv4-chip-founder"})]}),i.jsxs(Yt,{label:"Anti-pattern â what's not a fit?",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Fastest way for Gem to skip wrong matches."}),i.jsx("input",{className:"sv4-thesis-single",value:t.antiPattern,onChange:p=>n(d=>({...d,antiPattern:p.target.value})),placeholder:"NON TECHNICAL"})]}),i.jsxs(Yt,{label:"Names on your radar",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Companies, funds, LPs you want as target accounts. One per line."}),i.jsx(du,{targetText:t.namesOnRadar,existingUsed:u,isFreeTier:c}),i.jsx("textarea",{className:"sv4-thesis-area",value:t.namesOnRadar,onChange:p=>{const d=p.target.value;n(w=>({...w,namesOnRadar:c?uu(d,u):d}))},placeholder:`Perplexity 2080Anthropic 2081Lightspeed Venture Partners`})]}),i.jsx("div",{className:"sv4-thesis-divider"}),i.jsxs(Yt,{label:"What are you hunting?",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Pick any that apply. Gem ties every warm intro to one of these â so your pipeline always moves something forward."}),i.jsx("div",{className:"sv4-hunt-grid",children:M9.map(p=>{const d=t.hunts.includes(p.id);return i.jsxs("button",{type:"button",onClick:()=>h(p.id),className:`sv4-hunt ${d?"is-selected":""}`,children:[i.jsx("span",{className:"sv4-hunt-emoji",children:p.emoji}),i.jsx("span",{children:p.label}),i.jsx("span",{className:"sv4-hunt-check",children:"â"})]},p.id)})})]}),i.jsx("div",{className:"sv4-thesis-footer",children:i.jsxs("div",{className:"sv4-thesis-footer-right",children:[i.jsx("button",{type:"button",className:"sv4-thesis-skip",onClick:o,disabled:a,children:"Skip for now"}),i.jsx("button",{type:"button",className:"sv4-thesis-btn sv4-thesis-btn-primary",onClick:o,disabled:a,children:a?"Savingâ¦":"Continue"})]})})]})]})})}function V9({active:e,value:t,setValue:n,drafts:r,setDrafts:s,onContinue:o,loading:a,error:l,isFreeTier:c,existingTargetCount:u=0}){if(!e)return null;const h=p=>{n(d=>({...d,hunts:d.hunts.includes(p)?d.hunts.filter(w=>w!==p):[...d.hunts,p]}))},f=(p,d)=>{const w=r[d].trim().replace(/,$/,"").trim();w&&(n(v=>{const x=v[p];return x.some(y=>y.toLowerCase()===w.toLowerCase())?v:{...v,[p]:[...x,w]}}),s(v=>({...v,[d]:""})))};return i.jsx("section",{className:"sv4-screen sv4-s5",children:i.jsxs("div",{className:"sv4-thesis-wrap",children:[i.jsxs("header",{className:"sv4-thesis-header",children:[i.jsxs("h1",{className:"sv4-thesis-h1",children:["Your ICP, ",i.jsx("em",{children:"in your words."})]}),i.jsx("p",{className:"sv4-thesis-sub",children:"The sharper this is, the better Gem matches buyers to you. Skip what doesn't apply yet."})]}),l?i.jsx("div",{className:"sv4-error sv4-error-wide",children:l}):null,i.jsxs("section",{className:"sv4-thesis-card",children:[i.jsxs("div",{className:"sv4-thesis-card-head",children:[i.jsxs("div",{className:"sv4-thesis-brand",children:[i.jsx("span",{className:"sv4-thesis-logo",children:i.jsx("img",{src:kn,alt:"",draggable:!1})}),i.jsx("span",{children:"Gemphere"}),i.jsx("span",{className:"sv4-thesis-plan",children:"Enterprise"})]}),i.jsx("div",{className:"sv4-thesis-step",children:"Step 1 of 3"})]}),i.jsxs(Yt,{label:"Company name",children:[i.jsx("div",{className:"sv4-thesis-help",children:"What you'll be referred to in intros."}),i.jsx("input",{className:"sv4-thesis-single sv4-thesis-single-text",value:t.companyName,onChange:p=>n(d=>({...d,companyName:p.target.value})),placeholder:"Lattice AI"})]}),i.jsxs(Yt,{label:"LinkedIn URL",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Your personal LinkedIn profile â used to match warm paths."}),i.jsx("input",{className:"sv4-thesis-single sv4-thesis-single-text",type:"url",inputMode:"url",autoComplete:"url",value:t.linkedinProfile||"",onChange:p=>n(d=>({...d,linkedinProfile:p.target.value})),placeholder:"https://www.linkedin.com/in/you"})]}),i.jsxs(Yt,{label:"Company overview",children:[i.jsx("div",{className:"sv4-thesis-help",children:"One sentence. How you'd describe what you do to a buyer."}),i.jsx("textarea",{className:"sv4-thesis-area",value:t.companyOverview,onChange:p=>n(d=>({...d,companyOverview:p.target.value})),placeholder:"AI-native HRIS that replaces 6 disconnected people tools with one workflow layer."})]}),i.jsxs(Yt,{label:"Buying signals",children:[i.jsxs("div",{className:"sv4-thesis-help",children:["Triggers or qualities that make an account a hot target. E.g."," ",i.jsx("em",{children:"Just raised Series B"}),", ",i.jsx("em",{children:"Hiring VP People"}),","," ",i.jsx("em",{children:"New CRO joined"}),"."]}),i.jsx(Fa,{values:t.buyingSignals,draft:r.signal,setDraft:p=>s(d=>({...d,signal:p})),onAdd:()=>f("buyingSignals","signal"),onRemove:p=>n(d=>({...d,buyingSignals:d.buyingSignals.filter((w,v)=>v!==p)}
2081)),placeholder:"Just raised Series B, Hiring VP Peopleâ¦",chipClass:"sv4-chip-signal"})]}),i.jsxs(Yt,{label:"Industries / verticals",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Where you actively sell."}),i.jsx(Fa,{values:t.industries,draft:r.industry,setDraft:p=>s(d=>({...d,industry:p})),onAdd:()=>f("industries","industry"),onRemove:p=>n(d=>({...d,industries:d.industries.filter((w,v)=>v!==p)})),placeholder:"SaaS, Fintechâ¦",chipClass:"sv4-chip-sector"})]}),i.jsxs(Yt,{label:"Target personas / titles",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Who Gem should prioritize on warm paths."}),i.jsx(Fa,{values:t.personas,draft:r.persona,setDraft:p=>s(d=>({...d,persona:p})),onAdd:()=>f("personas","persona"),onRemove:p=>n(d=>({...d,personas:d.personas.filter((w,v)=>v!==p)})),placeholder:"VP People, Chief People Officerâ¦",chipClass:"sv4-chip-founder"})]}),i.jsxs(Yt,{label:"Anti-pattern â what's not a fit?",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Fastest way for Gem to skip wrong accounts."}),i.jsx("input",{className:"sv4-thesis-single",value:t.antiPattern,onChange:p=>n(d=>({...d,antiPattern:p.target.value})),placeholder:"UNDER 50 EMPLOYEES"})]}),i.jsxs(Yt,{label:"Target accounts",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Companies you want in. One per line."}),i.jsx(du,{targetText:t.targetAccounts,existingUsed:u,isFreeTier:c}),i.jsx("textarea",{className:"sv4-thesis-area",value:t.targetAccounts,onChange:p=>{const d=p.target.value;n(w=>({...w,targetAccounts:c?uu(d,u):d}))},placeholder:`Stripe 2082Ramp 2083Brex 2084JP Morgan`})]}),i.jsx("div",{className:"sv4-thesis-divider"}),i.jsxs(Yt,{label:"What are you hunting?",children:[i.jsx("div",{className:"sv4-thesis-help",children:"Pick any that apply. Gem ties every warm intro to one of these â so your pipeline always moves something forward."}),i.jsx("div",{className:"sv4-hunt-grid",children:O9.map(p=>{const d=t.hunts.includes(p.id);return i.jsxs("button",{type:"button",onClick:()=>h(p.id),className:`sv4-hunt ${d?"is-selected":""}`,children:[i.jsx("span",{className:"sv4-hunt-emoji",children:p.emoji}),i.jsx("span",{children:p.label}),i.jsx("span",{className:"sv4-hunt-check",children:"â"})]},p.id)})})]}),i.jsx("div",{className:"sv4-thesis-footer",children:i.jsxs("div",{className:"sv4-thesis-footer-right",children:[i.jsx("button",{type:"button",className:"sv4-thesis-skip",onClick:o,disabled:a,children:"Skip for now"}),i.jsx("button",{type:"button",className:"sv4-thesis-btn sv4-thesis-btn-primary",onClick:o,disabled:a,children:a?"Savingâ¦":"Continue"})]})})]})]})})}function z9({active:e,stepNum:t,totalSteps:n,isIndividual:r=!1,primaryProvider:s,otherProvider:o,secondaryMailbox:a,linkedinConnected:l,linkedinRequired:c,linkedinUploading:u,linkedinUploadMsg:h,linkedinContactCount:f,linkedinFileRef:p,onLinkedinFile:d,onConnectGmail:w,onConnectOutlook:v,onBack:x,onContinue:y,loading:g,error:b}){if(!e)return null;const S=s==="google"||a==="google",j=s==="microsoft"||a==="microsoft",T=c&&!l;return i.jsx("section",{className:"sv4-screen sv4-s6",children:i.jsxs("div",{className:"sv4-thesis-wrap",children:[i.jsxs("header",{className:"sv4-thesis-header",children:[i.jsxs("h1",{className:"sv4-thesis-h1",children:["Connect your ",i.jsx("em",{children:"accounts."})]}),i.jsx("p",{className:"sv4-thesis-sub",children:"Gemphere uses these to build warm-intro paths â your data stays private."})]}),b?i.jsx("div",{className:"sv4-error sv4-error-wide",children:b}):null,i.jsxs("section",{className:"sv4-thesis-card sv4-connect-card",children:[i.jsxs("div",{className:"sv4-thesis-card-head",children:[i.jsxs("div",{className:"sv4-thesis-brand",children:[i.jsx("span",{className:"sv4-thesis-logo",children:i.jsx("img",{src:kn,alt:"",draggable:!1})}),i.jsx("span",{children:"Gemphere"}),i.jsx("span",{className:"sv4-thesis-plan",children:r?"Starter":"Enterprise"})]}),i.jsx("div",{className:"sv4-thesis-step",children:"Step 2 of 3"})]}),i.jsx(Sj,{label:"Google Calendar",connected:S,hint:"Read-only access to your calendar to map meetings",onClick:()=>{S||w()},connectingPrimary:s==="google"}),i.jsx(Sj,{label:"Outlook integration",connected:j,onClick:()=>{j||v()},connectingPrimary:s==="microsoft"}),i.jsxs("div",{className:"sv4-connect-row",children:[i.jsx("div",{className:"sv4-connect-icon",style:{background:"#0a66c2",color:"#fff"},children:"in"}),i.jsxs("div",{className:"sv4-connect-meta",children:[i.jsxs("div",{className:"sv4-connect-title",children:["LinkedIn Network",c?" *":""]}),i.jsx("div",{className:"sv4-connect-sub",children:c?"Required â upload Connections.csv to map your network":"Upload Connections.csv to tag strongest relationships"}),h?i.jsx("div",{className:"sv4-connect-sub",style:{color:h.toLowerCase().includes("fail")?"#b32a2a":"#0F6E56",marginTop:6},children:h}):null]}),i.jsx("input",{ref:p,type:"file",accept:".csv,text/csv",style:{display:"none"},onChange:C=>{var A;const E=(A=C.target.files)==null?void 0:A[0];E&&d(E),C.target.value=""}}),i.jsx("button",{type:"button",className:`sv4-connect-btn ${l?"is-connected":""}`,disabled:u,onClick:()=>{var C;return(C=p.current)==null?void 0:C.click()},children:u?"Uploadingâ¦":l?`${f} imported`:"Upload CSV"})]}),i.jsxs("div",{className:"sv4-thesis-footer sv4-connect-footer",children:[i.jsx("button",{type:"button",className:"sv4-thesis-btn",onClick:x,disabled:g,children:"Back"}),i.jsx("button",{type:"button",className:"sv4-thesis-btn sv4-thesis-btn-primary",onClick:y,disabled:g||u||T,title:T?"Upload your LinkedIn Connections.csv to continue":void 0,children:g?"Savingâ¦":l?"Tag connections â":c?"Upload LinkedIn CSV":"Finish"})]})]}),i.jsx("div",{className:"sv4-connect-dots",children:Array.from({length:n}).map((C,E)=>i.jsx("span",{className:`sv4-dot ${E<t?"active":""}`,"aria-hidden":!0},E))})]})})}function Sj({label:e,hint:t,connected:n,onClick:r,connectingPrimary:s}){return i.jsxs("div",{className:"sv4-connect-row",children:[i.jsx("div",{className:"sv4-connect-icon",children:"â"}),i.jsxs("div",{className:"sv4-connect-meta",children:[i.jsx("div",{className:"sv4-connect-title",children:e}),t?i.jsx("div",{className:"sv4-connect-sub",children:t}):null]}),i.jsx("button",{type:"button",className:`sv4-connect-btn ${n?"is-connected":""}`,onClick:r,disabled:n,children:n?s?i.jsxs(i.Fragment,{children:["Connected â"," ",i.jsx("span",{className:"sv4-connect-signed-in",children:"(signed in)"})]}):"Connected â":"Connect"})]})}function Yt({label:e,children:t}){return i.jsxs("div",{className:"sv4-thesis-field",children:[i.jsx("div",{className:"sv4-thesis-label",children:e}),t]})}function W9(){return i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24","aria-hidden":"true",children:[i.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),i.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.99.66-2.25 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),i.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),i.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function G9(){return i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24","aria-hidden":"true",children:[i.jsx("rect",{x:"1",y:"1",width:"10",height:"10",fill:"#F25022"}),i.jsx("rect",{x:"13",y:"1",width:"10",height:"10",fill:"#7FBA00"}),i.jsx("rect",{x:"1",y:"13",width:"10",height:"10",fill:"#00A4EF"}),i.jsx("rect",{x:"13",y:"13",width:"10",height:"10",fill:"#FFB900"})]})}function H9({active:e,phase:t,countryCode:n,setCountryCode:r,phone:s,setPhone:o,otp:a,setOtp:l,onSendCode:c,onVerifyOtp:u,onBackToPhone:h,loading:f,error:p}){return e?i.jsx("section",{className:"sv4-screen sv4-s5",children:i.jsxs("div",{className:"sv4-thesis-wrap",children:[i.jsxs("header",{className:"sv4-thesis-header",children:[i.jsx("h1",{className:"sv4-thesis-h1",children:t==="phone"?i.jsxs(i.Fragment,{children:["Verify your ",i.jsx("em",{children:"phone number."})]}):i.jsxs(i.Fragment,{children:["Enter your ",i.jsx("em",{children:"verification code."})]})}),i.jsx("p",{className:"sv4-thesis-sub",children:t==="phone"?"We'll send you a 6-digit verification code. Phone verification is required to continue."
2084:`We sent a 6-digit code to ${n} ${s.replace(/\D/g,"")}.`})]}),p?i.jsx("div",{className:"sv4-error sv4-error-wide",children:p}):null,i.jsxs("section",{className:"sv4-thesis-card",children:[i.jsxs("div",{className:"sv4-thesis-card-head",children:[i.jsxs("div",{className:"sv4-thesis-brand",children:[i.jsx("span",{className:"sv4-thesis-logo",children:i.jsx("img",{src:kn,alt:"",draggable:!1})}),i.jsx("span",{children:"Gemphere"}),i.jsx("span",{className:"sv4-thesis-plan",children:"Enterprise"})]}),i.jsx("div",{className:"sv4-thesis-step",children:"Step 1 of 6"})]}),t==="phone"?i.jsxs("div",{className:"sv4-thesis-field",children:[i.jsxs("div",{className:"sv4-thesis-label",children:["Phone Number ",i.jsx("span",{style:{color:"#c45a20"},children:"*"})]}),i.jsx("div",{className:"sv4-thesis-help",children:"Select your country code and enter your mobile number."}),i.jsxs("div",{className:"gp-mobile-stack-grid sv4-phone-grid",style:{display:"grid",gridTemplateColumns:"130px 1fr",gap:12},children:[i.jsx("select",{className:"sv4-thesis-single",value:n,onChange:d=>r(d.target.value),style:{textTransform:"none",letterSpacing:0,fontWeight:"normal",background:"#faf6ee"},children:Wu.map(d=>i.jsxs("option",{value:d.code,children:[d.flag," ",d.code]},d.code))}),i.jsx("input",{type:"tel",inputMode:"tel",className:"sv4-thesis-single sv4-thesis-single-text",value:s,onChange:d=>o(d.target.value),placeholder:"555 123 4567",onKeyDown:d=>{d.key==="Enter"&&s.trim()&&(d.preventDefault(),c())}})]})]}):i.jsxs("div",{className:"sv4-thesis-field",children:[i.jsx("div",{className:"sv4-thesis-label",children:"6-digit Code"}),i.jsx("div",{className:"sv4-thesis-help",children:"Enter the code sent to your phone."}),i.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,className:"sv4-thesis-single sv4-thesis-single-text",value:a,onChange:d=>l(d.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"000000",style:{letterSpacing:"0.4em",textAlign:"center",fontSize:20,fontFamily:"inherit"},onKeyDown:d=>{d.key==="Enter"&&a.replace(/\D/g,"").length===6&&(d.preventDefault(),u())}})]}),i.jsxs("div",{className:"sv4-thesis-footer",children:[t==="otp"?i.jsx("button",{type:"button",className:"sv4-thesis-btn",onClick:h,disabled:f,children:"Change phone"}):i.jsx("span",{}),i.jsx("div",{className:"sv4-thesis-footer-right",children:t==="phone"?i.jsx("button",{type:"button",className:"sv4-thesis-btn sv4-thesis-btn-primary",onClick:c,disabled:f||!s.trim(),children:f?"Sending...":"Send code"}):i.jsx("button",{type:"button",className:"sv4-thesis-btn sv4-thesis-btn-primary",onClick:u,disabled:f||a.replace(/\D/g,"").length!==6,children:f?"Verifying...":"Verify & continue"})})]})]}),i.jsx("div",{className:"sv4-connect-dots",children:Array.from({length:6}).map((d,w)=>i.jsx("span",{className:`sv4-dot ${w<2?"active":""}`,"aria-hidden":!0},w))})]})}):null}function zp(e){const t=(e||"").trim().split(/\s+/).filter(Boolean);return t.length?t.length===1?{first:t[0],last:""}:{first:t[0],last:t.slice(1).join(" ")}:{first:"",last:""}}function Ow({inviteType:e,inviteToken:t,initialName:n="",initialFirstName:r,initialLastName:s,initialEmail:o="",doneNote:a,recaptchaId:l="wa-handoff-recaptcha",splitName:c=!1,appearance:u="default",submitLabel:h,otpSubmitLabel:f,hideHelperCopy:p=!1}){const d=un(),w=zp(n),[v,x]=m.useState("form"),[y,g]=m.useState(r??w.first),[b,S]=m.useState(s??w.last),[j,T]=m.useState(n),[C,E]=m.useState(o),[A,R]=m.useState("+1"),[V,D]=m.useState(""),[J,F]=m.useState(""),[Y,W]=m.useState(!1),[H,P]=m.useState(""),[_,k]=m.useState(""),[N,B]=m.useState(""),[L,z]=m.useState(!1),ee=m.useRef(null),X=u==="connector-invite",G=X?"ci-field":"ob-field",ne=c?[y.trim(),b.trim()].filter(Boolean).join(" "):j.trim();m.useEffect(()=>{c?(g(r??zp(n).first),S(s??zp(n).last)):T(n),E(o)},[n,r,s,o,c]);const te=ne.length>=2&&Wc(C.trim())&&nl(V),je=async()=>{if(P(""),!te){P("Fill in your name, a valid email, and a valid phone number.");return}if(!$u()){P("Phone verification isn't configured. Please try again later.");return}W(!0);try{const fe=gs(V,A);ee.current=await Du(fe,l),F(""),x("otp")}catch(fe){P(Bu(fe))}finally{W(!1)}},q=async()=>{P("");const fe=J.replace(/\D/g,"");if(fe.length!==6){P("Enter the 6-digit verification code");return}const ae=ee.current;if(!ae){P("Request a verification code first"),x("form");return}W(!0);try{await Fu(ae,fe);const Se=gs(V,A);rr(),ee.current=null;const _e=await yw();if(!_e){P("Phone session expired. Request a new verification code."),x("form");return}const Ce=await kx(Se,_e,{fullName:ne,email:C.trim(),inviteType:e,inviteToken:t});yf(Se),Nw({fullName:ne,email:C.trim()});const Fe=!!(Ce.ok&&(Ce.whatsappSent||Ce.alreadySent));z(Fe),B(Ce.whatsappUrl||cu),k(Fe?"":Ce.error||"Your number is verified, but the WhatsApp message didn't go out."),x("done")}catch(Se){P(Se instanceof Error?Se.message:"Verification failed")}finally{W(!1)}},ie=i.jsx("select",{value:A,onChange:fe=>R(fe.target.value),disabled:Y,"aria-label":"Country code",className:void 0,children:Wu.map(fe=>i.jsxs("option",{value:fe.code,children:[fe.flag," ",fe.label," ",fe.code]},fe.code))}),me=X?"ci-btn-primary":"ob-btn ob-btn-primary",he=X?"ci-btn-ghost":"ob-btn";return v==="done"?i.jsxs("div",{style:{textAlign:"center",padding:"8px 0"},children:[i.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:12},children:i.jsx(ex,{size:28,style:{color:"var(--ob-accent, #2e7d32)"}})}),i.jsx("h3",{style:{fontSize:18,marginBottom:8},children:L?"Check WhatsApp":"Almost there"}),i.jsx("p",{className:X?"ci-hero-sub":"ob-muted",style:{marginBottom:6},children:L?"Gem just messaged you on WhatsApp. Open the chat and reply â your signup continues there.":"Your number is verified, but the WhatsApp message didn't go out. Try again in a minute."}),L&&a?i.jsx("p",{className:X?"ci-hero-sub":"ob-muted",style:{marginBottom:6},children:a}):null,_?i.jsx("div",{className:"ob-error",style:{marginTop:8},children:_}):null,i.jsxs("div",{className:X?"ci-card-actions":"ob-btn-row",style:X?void 0:{justifyContent:"center",marginTop:14,flexWrap:"wrap"},children:[L?i.jsx("button",{type:"button",className:me,onClick:()=>window.open(N||cu,"_blank","noopener,noreferrer"),children:"Open WhatsApp"}):null,i.jsx("button",{type:"button",className:he,onClick:()=>d("/"),children:"Close"})]})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{id:l,style:{position:"absolute",width:0,height:0,opacity:0}
2084,"aria-hidden":!0}),H?i.jsx("div",{className:"ob-error",children:H}):null,v==="form"?i.jsxs("div",{className:X?"ci-form-fields":void 0,children:[c?i.jsxs("div",{className:X?"ci-field-row":void 0,style:X?void 0:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[i.jsxs("div",{className:G,children:[i.jsx("label",{htmlFor:`${l}-first`,children:"First name"}),i.jsx("input",{id:`${l}-first`,value:y,onChange:fe=>g(fe.target.value),placeholder:"Mike",disabled:Y,autoComplete:"given-name"})]}),i.jsxs("div",{className:G,children:[i.jsx("label",{htmlFor:`${l}-last`,children:"Last name"}),i.jsx("input",{id:`${l}-last`,value:b,onChange:fe=>S(fe.target.value),placeholder:"Chen",disabled:Y,autoComplete:"family-name"})]})]}):i.jsxs("div",{className:G,children:[i.jsx("label",{htmlFor:`${l}-name`,children:"Your name"}),i.jsx("input",{id:`${l}-name`,value:j,onChange:fe=>T(fe.target.value),placeholder:"Jamie Chen",disabled:Y,autoComplete:"name"})]}),i.jsxs("div",{className:G,children:[i.jsx("label",{htmlFor:`${l}-email`,children:c?"Work email":"Email"}),i.jsx("input",{id:`${l}-email`,type:"email",value:C,onChange:fe=>E(fe.target.value),placeholder:"[email protected]",disabled:Y,autoComplete:"email"})]}),i.jsxs("div",{className:G,children:[i.jsx("label",{htmlFor:`${l}-phone`,children:c?"WhatsApp number":"Phone number"}),i.jsxs("div",{className:X?"ci-phone-row":void 0,style:X?void 0:{display:"grid",gridTemplateColumns:"140px 1fr",gap:8},children:[ie,i.jsx("input",{id:`${l}-phone`,type:"tel",inputMode:"tel",value:V,onChange:fe=>D(fe.target.value),placeholder:c?"415 555 0134":"555 123 4567",disabled:Y,autoComplete:"tel-national"})]})]}),!p&&!X?i.jsx("p",{className:"ob-muted",style:{margin:"10px 0 14px"},children:"We'll text you a code. Once verified, Gem messages you on WhatsApp and your signup continues there â your invite is applied automatically."}):null,i.jsx("div",{className:X?"ci-card-actions":void 0,children:i.jsxs("button",{type:"button",className:me,onClick:()=>void je(),disabled:Y||!te,children:[Y?i.jsx(bn,{className:"w-4 h-4 animate-spin"}):null,Y?"Please waitâ¦":h||"Send verification code"]})})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:G,children:[i.jsx("label",{htmlFor:`${l}-otp`,children:"6-digit code"}),i.jsx("input",{id:`${l}-otp`,inputMode:"numeric",maxLength:6,value:J,onChange:fe=>F(fe.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"000000",style:{letterSpacing:"0.4em",textAlign:"center",fontSize:18},disabled:Y}),i.jsxs("p",{className:X?"ci-hero-sub":"ob-muted",style:{marginTop:6},children:["Code sent to ",A," ",V.replace(/\D/g,"")]})]}),i.jsxs("div",{className:X?"ci-actions-secondary":"ob-btn-row",children:[i.jsx("button",{type:"button",className:he,onClick:()=>{P(""),x("form")},disabled:Y,children:"Change phone"}),i.jsxs("button",{type:"button",className:me,onClick:()=>void q(),disabled:Y||J.replace(/\D/g,"").length!==6,children:[Y?i.jsx(bn,{className:"w-4 h-4 animate-spin"}):null,Y?"Verifyingâ¦":f||"Verify & continue on WhatsApp"]})]})]})]})}const _d=3;function q9(){var L,z,ee,X,G;const{token:e=""}=Kf(),{user:t}=Ht(),n=un(),[r,s]=ur(),[o,a]=m.useState(""),l=o||(t==null?void 0:t.accessToken)||"",[c,u]=m.useState(null),[h,f]=m.useState(""),[p,d]=m.useState(1),[w,v]=m.useState(!1),[x,y]=m.useState(""),[g,b]=m.useState(!1),[S,j]=m.useState(""),[T,C]=m.useState(!1),[E,A]=m.useState("weekly"),[R,V]=m.useState(3);m.useEffect(()=>{(async()=>{try{const ne=await W5(e);u(ne)}catch(ne){f(ne instanceof Error?ne.message:"Invite not found")}})()},[e]),m.useEffect(()=>{const ne=Number(r.get("step")),te=r.get("gmailConnected");let je=!1;if(Number.isInteger(ne)&&ne>=1&&ne<=_d&&(d(ne),je=!0),te==="1"&&(b(!0),je=!0),je){const q=new URLSearchParams(r);q.delete("step"),q.delete("gmailConnected"),s(q,{replace:!0})}},[]),m.useEffect(()=>{if(p!==2||!l)return;let ne=!1;return(async()=>{try{const te=await qn(l),q=(Array.isArray(te.integrations)?te.integrations:[]).some(ie=>((ie==null?void 0:ie.provider)==="gmail"||(ie==null?void 0:ie.provider)==="google"||(ie==null?void 0:ie.provider)==="google_nylas")&&ie.connected);!ne&&q&&b(!0)}catch{}})(),()=>{ne=!0}},[p,l]);async function D(ne){v(!0),y("");try{await q5(ne,e),a(ne),d(2)}catch(te){y(te instanceof Error?te.message:"Accept failed")}finally{v(!1)}}async function J(){l&&await D(l)}async function F(ne="google"){if(!l){j("Sign in first, then connect Google Calendar.");return}j(""),C(!0);try{Gu({path:`/onboarding/connector/${encodeURIComponent(e)}`,step:2}),await Rl(l,ne)}catch(te){const je=ne==="microsoft"?"Outlook":"Google Calendar";j(te instanceof Error?te.message:`Failed to start ${je} connect`)}finally{C(!1)}}async function Y(){v(!0),y("");try{await ju(l,[{provider:"gmail",connected:g},{provider:"google_calendar",connected:g}]),d(3)}catch(ne){y(ne instanceof Error?ne.message:"Save failed")}finally{v(!1)}}async function W(){v(!0),y("");try{await z5(l,{cadence:E,maxIntrosPerEmail:R}),await ku(l),n("/home")}catch(ne){y(ne instanceof Error?ne.message:"Finish failed")}finally{v(!1)}}if(h)return i.jsx(ms,{eyebrow:"Invited as connector",title:i.jsxs(i.Fragment,{children:["Invite ",i.jsx("em",{children:"not found"}),"."]}),subtitle:h,step:1,totalSteps:_d,flowLabel:"Connector",children:i.jsx("button",{className:"ob-btn ob-btn-primary",onClick:()=>n("/"),children:"Back to home"})});if(!c)return i.jsx(ms,{eyebrow:"Invited as connector",title:i.jsx(i.Fragment,{children:"Loadingâ¦"}),step:1,totalSteps:_d,flowLabel:"Connector",children:i.jsx("div",{className:"ob-muted",children:"Fetching your inviteâ¦"})});const H=((L=c.inviter)==null?void 0:L.fullname)||"Your friend",P=((z=c.team)==null?void 0:z.name)||"their team",_=((ee=c.team)==null?void 0:ee.oneLiner)||"",k=p===1&&!l,N={1:i.jsxs(i.Fragment,{children:[H," asked for ",i.jsx("em",{children:"your help"}),"."]}),2:i.jsxs(i.Fragment,{children:["Connect ",i.jsx("em",{children:"Google Calendar"}),"."]}),3:i.jsxs(i.Fragment,{children:["Pick your ",i.jsx("em",{children:"cadence"}),"."]})},B={1:`${H} at ${P} would love your help spotting warm intros for their goals.`,2:"Read-only access. Gemphere uses it to surface 1â3 intros per week. Your contacts never leave your inbox.",3:"How often should Gemphere email you? You can change this anytime."};return i.jsxs(ms,{eyebrow:"Invited as connector",title:N[p],subtitle:B[p],step:p,totalSteps:_d,flowLabel:"Connector",children:[x?i.jsx("div",{className:"ob-error",children:x}):null,p===1&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ob-banner",children:[i.jsx("div",{className:"ob-banner-av",children:(H||"?").slice(0,1).toUpperCase()}),i.jsxs("div",{className:"ob-banner-text",children:[i.jsx("strong",{children:H})," invited you as a connector for"," ",i.jsx("strong",{children:P}),".",_?i.jsxs(i.Fragment,{children:[" · ",i.jsx("span",{className:"light",children:_})]}):null]})]}),i.jsxs("p",{className:"ob-muted",style:{marginBottom:16},children:["Each week we'll email you a list of up to 3 people from your network who could help ",H,' most. You reply "yes" and we draft an intro in your voice â sent from your inbox. Pause anytime.']}),k?i.jsx(Ow,{inviteType:"connector_legacy",inviteToken:e,initialName:((X=c.invite)==null?void 0:X.name)||"",initialEmail:((G=c.invite)==null?void 0:G.email)||"",doneNote:`Your connector invite from ${H}
2084 is applied automatically once your account is created in the chat.`}):i.jsx(an,{onNext:J,nextLabel:"Accept & continue",loading:w})]}),S?i.jsx("div",{className:"ob-error",children:S}):null,p===2&&i.jsxs(i.Fragment,{children:[i.jsx(pl,{icon:"G",name:"Google Calendar",desc:"Read-only calendar access so Gemphere can spot warm paths",connected:g,onToggle:()=>{!g&&!T&&F("google")}}),T?i.jsx("div",{className:"ob-muted",style:{marginTop:8},children:"Opening Google sign-inâ¦"}):null,i.jsx(an,{onBack:()=>d(1),onNext:Y,loading:w})]}),p===3&&i.jsxs(i.Fragment,{children:[i.jsx(et,{label:"How often should we email you?",children:i.jsxs("select",{value:E,onChange:ne=>A(ne.target.value),children:[i.jsx("option",{value:"weekly",children:"Every Monday"}),i.jsx("option",{value:"biweekly",children:"Every 2 weeks"}),i.jsx("option",{value:"monthly",children:"Once a month"})]})}),i.jsx(et,{label:"Max intros per email",children:i.jsx("input",{type:"number",min:1,max:5,value:R,onChange:ne=>V(Number(ne.target.value||3))})}),i.jsx(an,{onBack:()=>d(2),onNext:W,nextLabel:"Finish",loading:w})]})]})}const Od=2;function K9(){var P,_,k,N,B;const{token:e=""}=Kf(),{user:t,refreshTier:n}=Ht(),r=un(),[s,o]=ur(),[a,l]=m.useState(null),[c,u]=m.useState(""),[h,f]=m.useState(1),[p,d]=m.useState(!1),[w,v]=m.useState(""),[x,y]=m.useState(""),[g,b]=m.useState(""),S=g||(t==null?void 0:t.accessToken)||"",[j,T]=m.useState(!1),[C,E]=m.useState(!1);m.useEffect(()=>{e&&($a(null),Io(e))},[e]),m.useEffect(()=>{(async()=>{try{const L=await G5(e);l(L)}catch(L){u(L instanceof Error?L.message:"Invite not found")}})()},[e]),m.useEffect(()=>{const L=Number(s.get("step")),z=s.get("gmailConnected");let ee=!1;if(Number.isInteger(L)&&L>=1&&L<=Od&&(f(L),ee=!0),z==="1"&&(T(!0),ee=!0),ee){const X=new URLSearchParams(s);X.delete("step"),X.delete("gmailConnected"),o(X,{replace:!0})}},[]),m.useEffect(()=>{if(h!==2||!S)return;let L=!1;return(async()=>{try{const z=await qn(S),X=(Array.isArray(z.integrations)?z.integrations:[]).some(G=>((G==null?void 0:G.provider)==="gmail"||(G==null?void 0:G.provider)==="google"||(G==null?void 0:G.provider)==="google_nylas")&&G.connected);!L&&X&&T(!0)}catch{}})(),()=>{L=!0}},[h,S]);async function A(L){d(!0),v("");try{await K5(L,e),b(L),await n(),f(2)}catch(z){v(z instanceof Error?z.message:"Accept failed")}finally{d(!1)}}async function R(){S&&await A(S)}async function V(L="google"){if(!S){y("Sign in first, then connect Google Calendar.");return}y(""),E(!0);try{Gu({path:`/onboarding/team/${encodeURIComponent(e)}`,step:2}),await Rl(S,L)}catch(z){const ee=L==="microsoft"?"Outlook":"Google Calendar";y(z instanceof Error?z.message:`Failed to start ${ee} connect`)}finally{E(!1)}}async function D(){d(!0),v("");try{await ju(S,[{provider:"gmail",connected:j},{provider:"google_calendar",connected:j}]),await ku(S),MI(),r("/home")}catch(L){v(L instanceof Error?L.message:"Finish failed")}finally{d(!1)}}if(c)return i.jsx(ms,{eyebrow:"Invited to a team",title:i.jsxs(i.Fragment,{children:["Invite ",i.jsx("em",{children:"not found"}),"."]}),subtitle:c,step:1,totalSteps:Od,flowLabel:"Team member",children:i.jsx("button",{className:"ob-btn ob-btn-primary",onClick:()=>r("/"),children:"Back to home"})});if(!a)return i.jsx(ms,{eyebrow:"Invited to a team",title:i.jsx(i.Fragment,{children:"Loadingâ¦"}),step:1,totalSteps:Od,flowLabel:"Team member",children:i.jsx("div",{className:"ob-muted",children:"Fetching your inviteâ¦"})});const J=((P=a.inviter)==null?void 0:P.fullname)||"Your admin",F=((_=a.team)==null?void 0:_.name)||"the team",Y=((k=a.team)==null?void 0:k.oneLiner)||"",W=a.members||[],H=h===1&&!S;return i.jsxs(ms,{eyebrow:"Invited to a team",title:h===1?i.jsxs(i.Fragment,{children:["Join ",i.jsx("em",{children:F}),"."]}):i.jsxs(i.Fragment,{children:["Connect ",i.jsx("em",{children:"your accounts"}),"."]}),subtitle:h===1?`${J} added you to ${F}. You'll see the team's goals once you join.`:"Your contacts stay private â only paths to the team's goals surface, and intros always send from your own inbox.",step:h,totalSteps:Od,flowLabel:"Team member",children:[w||x?i.jsx("div",{className:"ob-error",children:w||x}):null,h===1&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ob-banner",children:[i.jsx("div",{className:"ob-banner-av",children:(J||"?").slice(0,1).toUpperCase()}),i.jsxs("div",{className:"ob-banner-text",children:[i.jsx("strong",{children:J})," invited you to ",i.jsx("strong",{children:F}),Y?i.jsxs(i.Fragment,{children:[" · ",i.jsx("span",{className:"light",children:Y})]}):null]})]}),W.length>0&&i.jsxs("div",{style:{marginBottom:14},children:[i.jsxs("div",{className:"ob-muted",style:{marginBottom:6},children:["Existing members (",W.length,")"]}),i.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:W.slice(0,8).map(L=>i.jsx("span",{style:{fontSize:12,padding:"4px 10px",borderRadius:999,background:"var(--ob-card-alt)",border:"1px solid var(--ob-border-soft)",color:"var(--ob-ink-3)"},children:L.name},L.userId))})]}),H?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ob-note",style:{marginBottom:14},children:[i.jsx("strong",{children:"Create your account."})," Use the email this invite was sent to so you land in the right workspace."]}),i.jsx(Ow,{inviteType:"team",inviteToken:e,initialName:((N=a.invite)==null?void 0:N.name)||"",initialEmail:((B=a.invite)==null?void 0:B.email)||"",doneNote:`You'll join ${F} automatically once your account is created in the chat.`})]}):i.jsx(an,{onNext:R,nextLabel:"Join the team",loading:p})]}),h===2&&i.jsxs(i.Fragment,{children:[i.jsx(pl,{icon:"G",name:"Google Calendar",desc:"Read-only calendar access lets Gemphere map meetings into the team",connected:j,onToggle:()=>{!j&&!C&&V("google")}}),C?i.jsx("div",{className:"ob-muted",style:{marginTop:8},children:"Opening Google sign-inâ¦"}):null,i.jsx(an,{onBack:()=>f(1),onNext:D,nextLabel:"Finish",loading:p})]})]})}const Md=5,Y9=[{type:"fundraise",emoji:"ð°",name:"Raise capital",desc:"Reach relevant investors via warm paths."},{type:"hire",emoji:"ð§âð»",name:"Hire senior talent",desc:"Find top candidates through your network."},{type:"sell",emoji:"ð",name:"Close enterprise customers",desc:"Reach buyers at target accounts."},{type:"partner",emoji:"ð¤",name:"Find strategic partners",desc:"Channel, integration, or co-marketing partners."}];function J9(){var bt,Zn;const{token:e=""}=Kf(),{user:t}=Ht(),n=un(),[r,s]=ur(),[o,a]=m.useState(null),[l,c]=m.useState(""),[u,h]=m.useState(1),[f,p]=m.useState(!1),[d,w]=m.useState(""),[v,x]=m.useState((t==null?void 0:t.fullName)||""),[y,g]=m.useState((t==null?void 0:t.email)||""),[b,S]=m.useState(""),[j,T]=m.useState(""),[C,E]=m.useState(""),[A,R]=m.useState(""),[V,D]=m.useState(!1),[J,F]=m.useState(""),Y=!!(t!=null&&t.accessToken),W=J||(t==null?void 0:t.accessToken)||"",[H,P]=m.useState([]),[_,k]=m.useState(""),[N,B]=m.useState(""),[L,z]=m.useState(""),[ee,X]=m.useState(""),[G,ne]=m.useState(""),[te,je]=m.useState(""),[q,ie]=m.useState(""),[me,he]=m.useState(""),[fe,ae]=m.useState(!1),[Se,_e]=m.useState(0),[Ce,Fe]=m.useState(!1),[Le,Ot]=m.useState(!1),[ct,xt]=m.useState(""),[Oe,Xe]=m.useState([{name:"",email:"",role:"member"}]);m.useEffect(()=>{(async()=>{try{const U=await H5(e);a(U)}catch(U){c(U instanceof Error?U.message:"Invite not found")}})()},[e]),m.useEffect(()=>{var U,ue,Pe;!o||V||(y||g(((U=o.invite)==null?void 0:U.founderEmail)||""),v||x(((ue=o.invite)==null?void 0:ue.founderName)||""),b||S(((Pe=o.invite)==null?void 0:Pe.companyName)||""),D(!0))},[o,V,y,v,b]),m.useEffect(()=>{const U=Number(r.get("step")),ue=r.get("mailboxProvider"),Pe=r.get("mailboxConnected")||r.get("gmailConnected");let Ie=!1;if(Number.isInteger(U)&&U>=1&&U<=Md&&(h(U),Ie=!0),ue==="google"?(Fe(!0),Ie=!0):ue==="microsoft"?(Ot(!0),Ie=!0):Pe==="1"&&(Fe(!0),Ie=!0),Ie){const mt=new URLSearchParams(r);mt.delete("step"),mt.delete("mailboxConnected"),mt.delete("mailboxProvider"),mt.delete("gmailConnected"),s(mt,{replace:!0})}},[]),m.useEffect(()=>{if(!W){ae(!1),_e(0);return}let U=!1;return(async()=>{const ue=await hm(W,t==null?void 0:t.userId);if(ue<=0||U)return;const Pe=await Aw(W,ue,"ENTERPRISE"),Ie=Pe?await fm(W,ue):0;U||(ae(Pe),_e(Ie))})(),()=>{U=!0}},[W,t==null?void 0:t.userId]);const wt=U=>P(ue=>ue.includes(U)?ue.filter(Pe=>Pe!==U):[...ue,U]),He=()=>H.map(U=>
2084{switch(U){case"fundraise":return{goalType:"fundraise",round:_,targetAmount:N};case"hire":return{goalType:"hire",roles:L.split(",").map(ue=>ue.trim()).filter(Boolean)};case"sell":return{goalType:"sell",icp:ee};case"partner":return{goalType:"partner",partnerTypes:G.split(",").map(ue=>ue.trim()).filter(Boolean)};default:return{goalType:U}}}),at=U=>U.split(/\n|,/).map(ue=>ue.trim()).filter(Boolean);async function $(U){await po(U,{accountType:"ENTERPRISE",fullName:v,email:y,companyName:b,companyRole:j,companyOneLiner:C,linkedinProfile:A.trim()||void 0})}async function xe(U){try{await Y5(U,e)}catch(ue){console.warn("[portfolio-onboarding] accept invite warning:",ue)}}async function Re(){if(w(""),!v.trim()||!b.trim()){w("Add your name and the portfolio company name to continue.");return}if(!(!Y||!W)){p(!0);try{await $(W),await xe(W),h(2)}catch(U){w(U instanceof Error?U.message:"Save failed")}finally{p(!1)}}}async function ke(){if(!H.length){w("Pick at least one goal");return}p(!0),w("");try{await Si(W,He()),h(3)}catch(U){w(U instanceof Error?U.message:"Save failed")}finally{p(!1)}}async function Ye(){p(!0),w("");try{const U=Dr(_s(te));let ue=U;if(U.length>0){const Ie=await fh(W,U,{authUserId:t==null?void 0:t.userId,accountType:"ENTERPRISE"});if(Ie.error&&Ie.savedNames.length===0){w(Ie.error);return}ue=Ie.savedNames.length?Ie.savedNames:U,Ie.error&&w(Ie.error)}const Pe=[...ue.map(Ie=>({kind:"company",value:Ie})),...at(q).map(Ie=>({kind:"title",value:Ie})),...at(me).map(Ie=>({kind:"investor",value:Ie}))];await Yh(W,Pe),h(4)}catch(U){w(U instanceof Error?U.message:"Save failed")}finally{p(!1)}}async function yt(){p(!0),w("");try{await ju(W,[{provider:"gmail",connected:Ce},{provider:"google_calendar",connected:Ce},{provider:"outlook",connected:Le}]),h(5)}catch(U){w(U instanceof Error?U.message:"Save failed")}finally{p(!1)}}async function Te(U="google"){if(!W){xt("You need to be signed in first. Go back to step 1 to verify your phone.");return}xt("");try{Gu({path:`/onboarding/portfolio/${e}`,step:4,mailboxProvider:U}),await Rl(W,U)}catch(ue){const Pe=U==="microsoft"?"Outlook":"Google Calendar";xt(ue instanceof Error?ue.message:`Failed to start ${Pe} connect`)}}async function Je(){const U=Oe.filter(ue=>ue.name.trim()&&ue.email.trim());p(!0),w("");try{U.length&&await qE(W,U),await ku(W),n("/home")}catch(ue){w(ue instanceof Error?ue.message:"Finish failed")}finally{p(!1)}}if(l)return i.jsx(ms,{eyebrow:"Portfolio invite",title:i.jsxs(i.Fragment,{children:["Invite ",i.jsx("em",{children:"not found"}),"."]}),subtitle:l,step:1,totalSteps:Md,flowLabel:"Portfolio company",children:i.jsx("button",{className:"ob-btn ob-btn-primary",onClick:()=>n("/"),children:"Back to home"})});if(!o)return i.jsx(ms,{eyebrow:"Portfolio invite",title:i.jsx(i.Fragment,{children:"Loadingâ¦"}),step:1,totalSteps:Md,flowLabel:"Portfolio company",children:i.jsx("div",{className:"ob-muted",children:"Fetching your inviteâ¦"})});const ze=o.invite.companyName||"your company",Ct=((bt=o.team)==null?void 0:bt.name)||"the firm",Ft=((Zn=o.inviter)==null?void 0:Zn.fullname)||"Your investor",dn={1:i.jsxs(i.Fragment,{children:["Set up ",i.jsx("em",{children:ze}),"."]}),2:i.jsxs(i.Fragment,{children:["Pick your ",i.jsx("em",{children:"goals"}),"."]}),3:i.jsxs(i.Fragment,{children:["Who are you ",i.jsx("em",{children:"going after?"})]}),4:i.jsxs(i.Fragment,{children:["Connect your ",i.jsx("em",{children:"accounts"}),"."]}),5:i.jsxs(i.Fragment,{children:["Confirm & ",i.jsx("em",{children:"send invites"}),"."]})},qe={1:`${Ft} from ${Ct} invited ${ze} to Gemphere. Confirm a few details so warm paths route to your team.`,2:"We'll focus the weekly digest around these.",3:"Target companies, titles and investors help us route warm paths.",4:"Gemphere uses these to build warm-intro paths â your data stays private.",5:"Invite teammates into the workspace, then hit send."};return i.jsxs(ms,{eyebrow:"Portfolio invite",title:dn[u],subtitle:qe[u],step:u,totalSteps:Md,flowLabel:"Portfolio company",children:[d?i.jsx("div",{className:"ob-error",children:d}):null,u===1&&i.jsxs("div",{className:"ob-banner",style:{marginBottom:16},children:[i.jsx("div",{className:"ob-banner-av",children:(ze||"?").slice(0,1).toUpperCase()}),i.jsxs("div",{className:"ob-banner-text",children:[i.jsx("strong",{children:ze})," was added to ",i.jsx("strong",{children:Ct}),"'s portfolio graph",i.jsxs("span",{className:"light",children:[" · foun
2084der invite from ",Ft]})]})]}),u===1&&!Y&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ob-note",style:{marginBottom:14},children:[i.jsx("strong",{children:"Create your account."})," Use the email this invite was sent to so it connects to the right portfolio company."]}),i.jsx(Ow,{inviteType:"portfolio",inviteToken:e,initialName:v,initialEmail:y||o.invite.founderEmail||"",doneNote:`${ze} is linked to ${Ct} automatically once your account is created in the chat.`})]}),u===1&&Y&&i.jsxs(i.Fragment,{children:[i.jsx(et,{label:"Your name",children:i.jsx("input",{value:v,onChange:U=>x(U.target.value),placeholder:"Mira Patel"})}),i.jsx(et,{label:"Founder email",children:i.jsx("input",{type:"email",value:y,onChange:U=>g(U.target.value),placeholder:o.invite.founderEmail})}),i.jsx(et,{label:"Company name",children:i.jsx("input",{value:b,onChange:U=>S(U.target.value),placeholder:ze})}),i.jsx(et,{label:"LinkedIn URL",children:i.jsx("input",{type:"url",inputMode:"url",autoComplete:"url",value:A,onChange:U=>R(U.target.value),placeholder:"https://www.linkedin.com/in/you"})}),i.jsx(et,{label:"Your role",children:i.jsx("input",{value:j,onChange:U=>T(U.target.value),placeholder:"CEO / Founder"})}),i.jsx(et,{label:"One-liner about the company",children:i.jsx("textarea",{value:C,onChange:U=>E(U.target.value),placeholder:"We help B2B SaaS teams understand churn."})}),i.jsx(an,{onNext:Re,loading:f,nextLabel:"Continue",disabled:!v||!b})]}),u===2&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"ob-option-grid",children:Y9.map(U=>i.jsx(nA,{emoji:U.emoji,name:U.name,desc:U.desc,selected:H.includes(U.type),onClick:()=>wt(U.type)},U.type))}),H.includes("fundraise")&&i.jsxs(i.Fragment,{children:[i.jsx(et,{label:"Round",children:i.jsx("input",{value:_,onChange:U=>k(U.target.value),placeholder:"Series A"})}),i.jsx(et,{label:"Target amount",children:i.jsx("input",{value:N,onChange:U=>B(U.target.value),placeholder:"$8M"})})]}),H.includes("hire")&&i.jsx(et,{label:"Roles (comma-separated)",children:i.jsx("input",{value:L,onChange:U=>z(U.target.value),placeholder:"VP Sales, Head of Eng"})}),H.includes("sell")&&i.jsx(et,{label:"Ideal customer profile",children:i.jsx("textarea",{value:ee,onChange:U=>X(U.target.value),placeholder:"Series B B2B SaaS, US, 100â500 employees, VP of Data as ICP."})}),H.includes("partner")&&i.jsx(et,{label:"Partner types (comma-separated)",children:i.jsx("input",{value:G,onChange:U=>ne(U.target.value),placeholder:"Channel, integrations, co-marketing"})}),i.jsx(an,{onBack:()=>h(1),onNext:ke,loading:f})]}),u===3&&i.jsxs(i.Fragment,{children:[i.jsxs(et,{label:"Target companies (one per line)",children:[i.jsx(du,{targetText:te,existingUsed:Se,isFreeTier:fe}),i.jsx("textarea",{value:te,onChange:U=>je(fe?uu(U.target.value,Se):U.target.value),placeholder:`Stripe 2085Notion 2086Shopify`})]}),i.jsx(et,{label:"Target titles / personas",children:i.jsx("textarea",{value:q,onChange:U=>ie(U.target.value),placeholder:"VP Data, Head of Analytics"})}),i.jsx(et,{label:"Target investors (optional)",children:i.jsx("textarea",{value:me,onChange:U=>he(U.target.value),placeholder:"Sequoia, a16z"})}),i.jsx(an,{onBack:()=>h(2),onNext:Ye,loading:f})]}),u===4&&i.jsxs(i.Fragment,{children:[ct?i.jsx("div",{className:"ob-error",children:ct}):null,i.jsx(pl,{icon:"G",name:"Google Calendar",desc:"Read-only calendar access to map meetings and book intros â granted in one Google sign-in.",connected:Ce,onToggle:Ce?()=>Fe(!1):()=>Te("google")}),i.jsx(pl,{icon:"â",name:"Outlook + Microsoft 365 Calendar",desc:"Use this if your work calendar is on Outlook / Microsoft 365.",connected:Le,onToggle:Le?()=>Ot(!1):()=>Te("microsoft")}),i.jsx("p",{className:"ob-muted",style:{marginTop:10},children:"One sign-in grants calendar access. You can connect more sources later from Settings."}),i.jsx(an,{onBack:()=>h(3),onNext:yt,loading:f})]}),u===5&&i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"ob-muted",style:{marginBottom:16},children:["Invite your teammates at ",ze," to the workspace (optional)."]}),Oe.map((U,ue)=>i.jsxs("div",{className:"ob-invitee-row",children:[i.jsx("input",{placeholder:"Name",value:U.name,onChange:Pe=>{const Ie=[...Oe];Ie[ue]={...U,name:Pe.target.value},Xe(Ie)}}),i.jsx("input",{placeholder:"Email",value:U.email,onChange:Pe=>{const Ie=[...Oe];Ie[ue]={...U,email:Pe.target.value},Xe(Ie)}}),i.jsx("button",{type:"button",onClick:()=>{const Pe=Oe.filter((Ie,mt)=>mt!==ue);Xe(Pe.length?Pe:[{name:"",email:"",role:"member"}])},children:"â"})]},ue)),i.jsx("button",{type:"button",className:"ob-link-btn",onClick:()=>Xe([...Oe,{name:"",email:"",role:"member"}]),children:"+ Add another teammate"}),i.jsx(an,{onBack:()=>h(4),onNext:Je,nextLabel:"Finish & send invites",loading:f})]})]})}function Q9(e){if(!e||typeof e!="object")return null;const t=e,n=t.data??t,r=(n==null?void 0:n.data)??n,s=String((r==null?void 0:r.accessToken)??(n==null?void 0:n.accessToken)??(t==null?void 0:t.accessToken)??""),o=Number((r==null?void 0:r.userId)??(n==null?void 0:n.userId)??(r==null?void 0:r.id)??(n==null?void 0:n.id)??0),a=String((r==null?void 0:r.fullName)??(n==null?void 0:n.fullName)??(r==null?void 0:r.fullname)??(n==null?void 0:n.fullname)??"User");return!s||!o?null:{accessToken:s,refreshToken:(r==null?void 0:r.refreshToken)??(n==null?void 0:n.refreshToken)??(t==null?void 0:t.refreshToken),userId:o,fullName:a,email:(r==null?void 0:r.email)??(n==null?void 0:n.email)}}function X9(){const[e]=ur(),t=un(),{login:n}=Ht(),[r,s]=m.useState("loading"),[o,a]=m.useState("Verifying your emailâ¦"),l=e.get("mode")==="login",c=Fo(e.get("trial")),u=ml(e.get("invite"));return m.useEffect(()=>{!l&&c&&Cc(c),!l&&u&&$a(u)},[l,c,u]),m.useEffect(()=>{var p;const h=(p=e.get("token"))==null?void 0:p.trim();if(!h){s("err"),a(l?"Missing login token. Request a new link from the login screen.":"Missing verification token. Request a new link from signup.");return}let f=!1;return(async()=>{try{const d=l?await N5(h):await k5(h),w=Q9(d);if(!w)throw new Error(l?"Login succeeded but session was incomplete.":"Verification succeeded but session was incomplete.");if(f)return;if(!l){const v=Fo(d==null?void 0:d.trialToken),x=c||v;x&&Cc(x);const y=ml(d==null?void 0:d.inviteToken),g=u||y;g&&$a(g)}n({userId:w.userId,fullName:w.fullName,email:w.email,accessToken:w.accessToken,refreshToken:w.refreshToken}),l||await xf(w.accessToken);try{const v=await qn(w.accessToken),x=!!La(),y=(v.pendingTeamInviteToken||"").trim();y&&!x&&Io(y),s("ok"),l?(a("Logged in! Taking you to your dashboardâ¦"),t(Sw(v,{ignorePendingTeamInvite:x}),{replace:!0}
2086)):(a("Email verified! Continuing onboardingâ¦"),t(DI(v,{ignorePendingTeamInvite:x}),{replace:!0}))}catch{l?(s("ok"),a("Logged in! Taking you to your dashboardâ¦"),t("/home",{replace:!0})):(s("ok"),a("Email verified! Continuing onboardingâ¦"),t(Wy({step:1}),{replace:!0}))}}catch(d){if(f)return;s("err"),a(d instanceof Error?d.message:"Verification failed")}})(),()=>{f=!0}},[e,n,t,l,c,u]),i.jsx("div",{className:"sv4-root",children:i.jsx("section",{className:"sv4-screen",style:{justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{className:"sv4-thesis-card",style:{maxWidth:480,width:"100%",margin:"0 20px",textAlign:"center"},children:[r==="loading"?i.jsx(bn,{className:"sv4-spin",style:{margin:"0 auto 16px"}}):null,i.jsx("h1",{className:"sv4-thesis-h1",style:{fontSize:28,marginBottom:12},children:r==="ok"?l?"You're logged in":"You're verified":r==="err"?"Link expired":"Checking link"}),i.jsx("p",{style:{color:"#6b6558",fontSize:15,lineHeight:1.5},children:o}),r==="err"?i.jsx("p",{style:{marginTop:20},children:i.jsx(Fr,{to:l?"/":Wy({trial:c||void 0}),className:"sv4-thesis-btn sv4-thesis-btn-primary",children:l?"Back to login":"Back to signup"})}):null]})})})}function Z9(){const{introId:e}=Kf(),t=un(),[n,r]=m.useState(null),[s,o]=m.useState(null),[a,l]=m.useState(!1),c={requesterName:"Sara Chen",requesterInitials:"SC",requesterRole:"Founder · Gemphere · Series A",requesterDescription:"Building a relationship intelligence platform for institutional teams. Raising a Series A focused on gaming and marketplace networks.",targetName:"Fernando Vasconez",connectorRelation:"you work together at GDC",blurb:`"Hey Fernando â wanted to introduce you to Sara Chen, founder of Gemphere. She's raising a Series A focused on gaming and relationship intelligence â right in your wheelhouse. Worth a quick chat."`},u=w=>r(w),h=()=>{navigator.clipboard.writeText(c.blurb.replace(/^"|"$/g,"")),l(!0),setTimeout(()=>l(!1),2e3)},f=w=>o(w),p=()=>{const w=e?`?ref=${encodeURIComponent(e)}`:"";t(`/signup${w}`)},d=()=>{if(n){if(n==="gemphere"){p();return}f("manual")}};return s?i.jsx("div",{className:"min-h-screen bg-[#f0ece0] flex items-center justify-center p-4",children:i.jsxs("div",{className:"bg-white rounded-2xl p-8 max-w-[380px] w-full flex flex-col gap-4 text-center shadow-lg",children:[i.jsx("div",{className:rn("w-[52px] h-[52px] rounded-full flex items-center justify-center text-[22px] mx-auto",s==="decline"?"bg-[#FCEBEB]":"bg-[#E1F5EE]"),children:s==="decline"?"â":"â"}),i.jsxs("h3",{className:"text-[16px] font-bold text-[#1a1a1a]",children:[s==="gemphere"&&`Intro sent to ${c.targetName.split(" ")[0]} â`,s==="manual"&&"Thanks â you're all set",s==="decline"&&"No problem"]}),i.jsxs("p",{className:"text-[12px] text-[#888] leading-relaxed",children:[s==="gemphere"&&`Gemphere sent ${c.targetName.split(" ")[0]} the intro on your behalf. ${c.requesterName.split(" ")[0]} has been notified and will hear back when ${c.targetName.split(" ")[0]} replies.`,s==="manual"&&`Once you forward the blurb to ${c.targetName.split(" ")[0]}, you're done. ${c.requesterName.split(" ")[0]} will follow up with ${c.targetName.split(" ")[0]} directly.`,s==="decline"&&`${c.requesterName.split(" ")[0]} has been notified that this intro isn't a good fit right now.`]}),i.jsx("button",{onClick:()=>o(null),className:"text-[13px] font-semibold py-3 rounded-[10px] bg-[#2a2820] text-white",children:"Done"})]})}):i.jsx("div",{className:"min-h-screen bg-[#f0ece0] flex items-start justify-center py-8 px-5",children:i.jsxs("div",{className:"w-full max-w-[460px] bg-white border border-[#e8e3d8] rounded-2xl overflow-hidden",children:[i.jsxs("div",{className:"px-[22px] pt-[22px] pb-[18px] border-b border-[#ede8e0]",children:[i.jsx("span",{className:"text-[10px] font-bold text-[#633806] bg-[#FAEEDA] px-2.5 py-1 rounded-full inline-block mb-2.5",children:"Intro request"}),i.jsxs("h1",{className:"text-[20px] font-bold text-[#1a1a1a] leading-tight mb-1.5",children:[c.requesterName," wants an intro to ",c.targetName]}),i.jsxs("p",{className:"text-[13px] text-[#888] leading-snug",children:["She found ",c.targetName.split(" ")[0]," through Gemphere and thinks you're the best connector â ",c.connectorRelation,"."]}
2086)]}),i.jsxs("div",{className:"px-[22px] py-[18px] border-b border-[#ede8e0]",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#aaa] uppercase tracking-wider mb-2.5",children:"Who's asking"}),i.jsxs("div",{className:"bg-[#f5f2ea] rounded-[10px] p-3.5 space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-[#eaf2ea] flex items-center justify-center text-[13px] font-bold text-[#4a7a4a] flex-shrink-0",children:c.requesterInitials}),i.jsxs("div",{children:[i.jsx("p",{className:"text-[14px] font-bold text-[#1a1a1a]",children:c.requesterName}),i.jsx("p",{className:"text-[11px] text-[#888] mt-0.5",children:c.requesterRole})]})]}),i.jsx("p",{className:"text-[12px] text-[#5a5040] leading-relaxed",children:c.requesterDescription})]})]}),i.jsxs("div",{className:"px-[22px] py-[18px] border-b border-[#ede8e0]",children:[i.jsxs("p",{className:"text-[10px] font-bold text-[#aaa] uppercase tracking-wider mb-2.5",children:["Ready-to-send blurb for ",c.targetName.split(" ")[0]]}),i.jsx("div",{className:"bg-white border border-[#e8e3d0] rounded-[10px] p-3.5 text-[13px] text-[#2a2a2a] leading-relaxed italic",children:c.blurb})]}),i.jsxs("div",{className:"px-[22px] py-[18px] border-b border-[#ede8e0] space-y-2.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#aaa] uppercase tracking-wider mb-2.5",children:"How would you like to make this intro?"}),i.jsxs("div",{onClick:()=>u("gemphere"),className:rn("border rounded-xl overflow-hidden cursor-pointer transition-colors",n==="gemphere"?"border-2 border-[#2a2820]":"border-[1.5px] border-[#e8e3d8]"),children:[i.jsxs("div",{className:"px-4 py-3.5 flex items-center gap-3",children:[i.jsx("div",{className:"w-[38px] h-[38px] rounded-full bg-[#2a2820] flex items-center justify-center text-[13px] font-bold text-white flex-shrink-0",children:"G"}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx("p",{className:"text-[13px] font-bold text-[#1a1a1a]",children:"Send via Gemphere"})}),i.jsx("div",{className:rn("w-5 h-5 rounded-full border-[1.5px] flex items-center justify-center flex-shrink-0",n==="gemphere"?"border-[#2a2820] bg-[#2a2820]":"border-[#ddd8cc]"),children:n==="gemphere"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-white"})})]}),n==="gemphere"&&i.jsxs("div",{className:"border-t border-[#e8e3d8]",children:[i.jsxs("div",{className:"bg-[#2a2820] px-[18px] pt-[18px] pb-4",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#9FE1CB] uppercase tracking-wider mb-2",children:"Invite-only platform"}),i.jsx("p",{className:"text-[15px] font-bold text-white leading-tight mb-1.5",children:"Join Gemphere and send this intro in one click"}),i.jsx("p",{className:"text-[12px] text-white/60 leading-snug",children:"Gemphere is the invite-only platform where warm intros happen instantly â no awkward emails, no chasing replies."})]}),i.jsxs("div",{className:"bg-white px-[18px] py-4 space-y-2.5",children:[i.jsxs("p",{className:"text-[13px] font-semibold text-[#1a1a1a] leading-relaxed",children:["You were invited by ",c.requesterName.split(" ")[0],". Join free and we handle this intro â and every intro â for you."]}),i.jsx("div",{className:"space-y-2",children:[`${c.targetName.split(" ")[0]} gets a warm, professional intro`,"You get the credit for making it happen â zero effort",`${c.requesterName.split(" ")[0]} gets notified when ${c.targetName.split(" ")[0]} replies`,"Your network grows â every future intro is one click"].map((w,v)=>i.jsxs("div",{className:"flex items-start gap-2 text-[12px] text-[#555] leading-snug",children:[i.jsx("div",{className:"w-[18px] h-[18px] rounded-full bg-[#E1F5EE] flex items-center justify-center text-[9px] text-[#0F6E56] font-bold flex-shrink-0 mt-0.5",children:"â"}),w]},v))}),i.jsx("button",{onClick:w=>{w.stopPropagation(),p()},className:"w-full bg-[#2a2820] text-white text-[13px] font-bold py-3.5 rounded-[10px] mt-1",children:"Join Gemphere and send intro â"})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2.5 px-0.5",children:[i.jsx("div",{className:"flex-1 h-px bg-[#e2ddd4]"}),i.jsx("span",{className:"text-[12px] text-[#bbb]",children:"or"}),i.jsx("div",{className:"flex-1 h-px bg-[#e2ddd4]"})]}),i.jsxs("div",{onClick:()=>u("self"),className:rn("border rounded-xl overflow-hidden cursor-pointer transition-colors",n==="self"?"border-2 border-[#2a2820]":"border-[1.5px] border-[#e8e3d8]"),children:[i.jsxs("div",{className:"px-4 py-3.5 flex items-center gap-3",children:[i.jsx("div",{className:"w-[38px] h-[38px] rounded-full bg-[#f0ece0] flex items-center justify-center text-[16px] flex-shrink-0",children:"â"}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-[13px] font-bold text-[#1a1a1a]",children:"I'll send it myself"}),i.jsxs("p",{className:"text-[11px] text-[#888] mt-0.5 leading-snug",children:["Copy the blurb and forward it to ",c.targetName.split(" ")[0]," from your own email"]})]}),i.jsx("div",{className:rn("w-5 h-5 rounded-full border-[1.5px] flex items-center justify-center flex-shrink-0",n==="self"?"border-[#2a2820] bg-[#2a2820]":"border-[#ddd8cc]"),children:n==="self"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-white"})})]}),n==="self"&&i.jsxs("div",{className:"border-t border-[#e8e3d8] bg-white px-4 py-3.5 space-y-2.5",children:[i.jsx("div",{className:"bg-[#f5f2ea] border border-[#e8e3d0] rounded-lg p-3 text-[12px] text-[#2a2a2a] leading-relaxed italic",children:c.blurb}),i.jsx("button",{onClick:w=>{w.stopPropagation(),h()},className:rn("w-full text-[12px] font-semibold py-2.5 rounded-lg border transition-colors",a?"bg-[#E1F5EE] text-[#0F6E56] border-[#9FE1CB]":"bg-[#faf8f4] text-[#3a3a3a] border-[#ddd8cc]"),children:a?"â Copied":"ð Copy blurb"})]})]})]}),i.jsxs("div",{className:"px-[22px] py-4 flex items-center gap-3",children:[i.jsx("span",{onClick:()=>f("decline"),className:"text-[12px] text-[#aaa] cursor-pointer underline whitespace-nowrap",children:"Not right now"}),i.jsx("button",{onClick:d,className:rn("flex-1 text-[13px] font-semibold py-3.5 rounded-[10px] transition-colors",n?"bg-[#2a2820] text-white cursor-pointer":"bg-[#ccc] text-white cursor-default"),children:n==="gemphere"?"Join Gemphere & send intro â":n==="self"?"Copy the blurb & send â":"Confirm intro â"})]})]})})}function eH(){return i.jsx("div",{style:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",margin:0,backgroundColor:"#ffffff",color:"#1d1d1f",textAlign:"center",padding:"20px"},children:i.jsxs("div",{style:{maxWidth:400,width:"100%"},children:[i.jsx("h1",{style:{fontSize:"2.5rem",fontWeight:700,marginBottom:10,letterSpacing:"-0.02em"},children:"Gemphere"}),i.jsx("p",{style:{color:"#86868b",marginBottom:40,fontSize:"1.1rem"},children:"Message Gem on WhatsApp or sign up on the web â your AI ecosystem analyst for warm introductions."}),i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[i.jsx("a",{href:"https://wa.me/16507601639",style:jj("#25D366","#ffffff",!1),children:"Message Gem on WhatsApp"}),i.jsx("a",{href:"https://www.gemphere.com/signup",style:jj("#ffffff","#000000",!0),children:"Sign up on the web"})]}),i.jsx("div",{style:{marginTop:60,fontSize:"0.9rem",color:"#86868b"},children:"© 2026 Gemphere Inc."})]})})}function jj(e,t,n){return{display:"flex",alignItems:"center",justifyContent:"center",gap:12,padding:"16px 24px",background:e,color:t,border:n?"2px solid #000000":"none",textDecoration:"none",borderRadius:12,fontWeight:600,fontSize:"1rem"}}const fA=m.createContext(null),tH=180,nH=4e3;function rH({routeKey:e,children:t}){const[n,r]=m.useState(!1),s=m.useRef(Date.now()),o=m.useRef(0),a=m.useRef(null),l=m.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),c=m.useCallback(()=>{const h=o.current,f=Date.now()-s.current,p=Math.max(0,tH-f);l(),a.current=setTimeout(()=>{o.current===h&&(r(!0),a.current=null)},p)},[l]),u=m.useMemo(()=>({markReady:c}),[c]);return m.useEffect(()=>{o.current+=1;const h=o.current;s.current=Date.now(),r(!1),l();const f=setTimeout(()=>{o.current===h&&r(!0)},nH);return()=>{clearTimeout(f),l()}},[e,l]),i.jsxs(fA.Provider,{value:u,children:[i.jsx("div",{className:"gp-page-content gp-page-content--ready",children:t}),n?null:i.jsx("div",{className:"gp-page-loading-overlay","aria-hidden":n,children:i.jsx(hl,{variant:"page"})})]})}function sH(e){var n;const t=(n=m.useContext(fA))==null?void 0:n.markReady;m.useEffect(()=>{e&&(t==null||t())},[e,t])}
2086function Hl(e){return e.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0})}function iH(){const{user:e}=Ht(),t=un(),n=Nr(),r=e==null?void 0:e.accessToken,s=e==null?void 0:e.userId,[o,a]=m.useState(null),[l,c]=m.useState(!0);sH(!l);const[u,h]=m.useState(!1),[f,p]=m.useState(null),[d,w]=m.useState(!1),[v,x]=m.useState(null),y=m.useMemo(()=>{const k=new URLSearchParams(n.search),N=parseInt(k.get("seats")||"",10);return Number.isInteger(N)&&N>0?N:null},[n.search]),g=m.useMemo(()=>{const k=new URLSearchParams(n.search);return k.get("stripe_return")==="1"||k.has("stripe_session_id")},[n.search]),b=m.useCallback(async()=>{if(!r||!s){c(!1);return}c(!0);try{const k=await jx(r,Number(s));a(k)}catch{a(null)}finally{c(!1)}},[r,s]);m.useEffect(()=>{b()},[b]);const S=m.useRef(!1);m.useEffect(()=>{if(!g||!r||!s||S.current)return;S.current=!0;let k=!1;return(async()=>{w(!0),x("Confirming your seats with Stripeâ¦");try{let N=await hc(r,Number(s));if(!N.applied){if(await new Promise(B=>setTimeout(B,3500)),k)return;N=await hc(r,Number(s))}if(await b(),k)return;N.applied?x(`Synced ${N.seats} seat${N.seats===1?"":"s"} from Stripe.`):x("We're still waiting on Stripe to confirm your payment. If the seat count doesn't update in a minute, hit Refresh from Stripe.")}catch(N){k||x(N instanceof Error?`Couldn't sync with Stripe: ${N.message}`:"Couldn't sync with Stripe right now.")}finally{k||w(!1)}})(),()=>{k=!0}},[g,r,s,b]);const j=m.useCallback(async()=>{if(!(!r||!s)){w(!0),x(null);try{const k=await hc(r,Number(s));await b(),k.applied?x(`Synced ${k.seats} seat${k.seats===1?"":"s"} from Stripe.`):k.reason==="already_in_sync"?x("Already in sync with Stripe."):x("No new paid Stripe checkout found in the last 30 days.")}catch(k){x(k instanceof Error?`Couldn't sync: ${k.message}`:"Couldn't sync right now.")}finally{w(!1)}}},[r,s,b]),T=m.useMemo(()=>!o||!o.plans||o.plans.length===0?null:o.plans[0],[o]),C=o?Math.max(1,o.usage.total):1,E=T?T.seats:1e3,A=(T==null?void 0:T.price_usd_per_month)??0,R=Math.max(C,y??0),V=o?A*o.seatLimit:0,[D,J]=m.useState(1);m.useEffect(()=>{y&&y>0&&J(Math.min(E,y))},[y,E]);const F=Math.max(1,Math.min(E,D||1)),Y=Math.max(R,F),W=A*Y,H=()=>J(k=>Math.min(E,Math.max(1,(k||1)+1))),P=()=>J(k=>Math.max(1,(k||1)-1)),_=async()=>{if(!r||!s){p("Please sign in again to buy seats.");return}if(!(o!=null&&o.isAdmin)){p("Only the team admin can buy seats.");return}h(!0),p(null);const k=await Xh(r,Number(s),Y);!k.ok||!k.url?(p(k.error||"Could not open Stripe Checkout."),h(!1)):window.location.assign(k.url)};return i.jsx("div",{className:"page page-pricing active",children:i.jsxs("div",{className:"page-pricing-inner",children:[i.jsx("button",{type:"button",onClick:()=>t(-1),style:{background:"transparent",border:0,padding:0,color:"#3a4f6e",cursor:"pointer",fontSize:14,marginBottom:12},children:"â Back"}),i.jsx("h1",{style:{fontSize:28,fontWeight:700,color:"#2a2a2a",margin:"4px 0 8px"},children:"Pricing"}),i.jsx("p",{style:{color:"#5a5448",fontSize:15,margin:"0 0 24px",maxWidth:640},children:"One plan, every feature. Choose your seat quantity in Stripe Checkout; you're charged $150 per seat per month."}),l?i.jsx(hl,{variant:"page",message:"Loading your planâ¦"}):!o||!T?i.jsx("div",{style:{background:"#fdecea",borderColor:"#f3c3bb",border:"1px solid #f3c3bb",color:"#9a3a2a",padding:16,borderRadius:10},children:"We couldn't load your plan right now. Please refresh and try again."}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{padding:"12px 16px",borderRadius:10,background:"#faf8f4",border:"1px solid #e8e3d8",color:"#4f4638",marginBottom:12,fontSize:14,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap"},children:[i.jsxs("div",{children:[i.jsx("strong",{children:o.usage.total})," seat",o.usage.total===1?"":"s"," in use ·"," ",i.jsx("strong",{children:o.seatLimit})," seat",o.seatLimit===1?"":"s"," purchased",!o.team&&" (solo workspace)"]}),o.isAdmin&&i.jsx("button",{type:"button",onClick:j,disabled:d,title:"Pull the latest paid seat quantity from Stripe.",style:{background:"transparent",border:"1px solid #d8d1c2",borderRadius:999,padding:"6px 14px",fontSize:12,color:"#4f4638",curs
2086or:d?"default":"pointer",opacity:d?.6:1},children:d?"Syncingâ¦":"â» Refresh seats from Stripe"})]}),v&&i.jsx("div",{style:{padding:"10px 14px",borderRadius:8,background:"#eef5ec",border:"1px solid #cfe1cb",color:"#28543a",marginBottom:16,fontSize:13},children:v}),f&&i.jsx("div",{style:{padding:"10px 14px",borderRadius:8,background:"#fdecea",border:"1px solid #f3c3bb",color:"#9a3a2a",marginBottom:16,fontSize:14},children:f}),i.jsxs("div",{style:{border:"1px solid #e8e3d8",background:"#ffffff",borderRadius:14,padding:28,display:"flex",flexDirection:"column",gap:18},children:[i.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between"},children:[i.jsx("div",{style:{fontSize:20,fontWeight:700,color:"#2a2a2a"},children:T.name}),i.jsxs("div",{style:{fontSize:14,color:"#7c715f"},children:[Hl(A)," ",i.jsx("span",{style:{fontSize:12},children:"/ seat / mo"})]})]}),i.jsx("div",{style:{color:"#5a5448",fontSize:14},children:T.description}),i.jsx("ul",{className:"pricing-plan-grid",style:{margin:0,padding:0,listStyle:"none",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:"8px 20px",color:"#4f4638",fontSize:13},children:T.features.map(k=>i.jsxs("li",{style:{paddingLeft:18,position:"relative"},children:[i.jsx("span",{style:{position:"absolute",left:0,top:6,width:8,height:8,background:"#9aa6b8",borderRadius:"50%"}}),k]},k))}),i.jsxs("div",{style:{marginTop:4,padding:"18px 20px",borderRadius:12,background:"#f4f6fa",border:"1px solid #d8e0ec",display:"flex",flexDirection:"column",gap:14},children:[i.jsx("div",{style:{fontSize:13,fontWeight:600,color:"#3a4f6e",letterSpacing:.3,textTransform:"uppercase"},children:"Seats"}),i.jsx("div",{style:{color:"#5a5448",fontSize:14,lineHeight:1.5},children:"Pick how many seats you want â the price below updates live. We'll pre-fill the quantity in Stripe Checkout so you only need to enter card details."}),i.jsxs("div",{className:"pricing-seat-row",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap"},children:[i.jsx("div",{style:{color:"#3a4f6e",fontSize:13,fontWeight:600},children:"Number of seats"}),i.jsxs("div",{style:{display:"inline-flex",alignItems:"center",border:"1px solid #c9d3e3",borderRadius:999,overflow:"hidden",background:"#ffffff"},children:[i.jsx("button",{type:"button",onClick:P,disabled:F<=1,"aria-label":"Decrease seats",style:{width:36,height:36,background:"transparent",border:0,fontSize:18,fontWeight:600,color:F<=1?"#bcc4d3":"#3a4f6e",cursor:F<=1?"not-allowed":"pointer"},children:"â"}),i.jsx("input",{type:"number",min:1,max:E,value:D,onChange:k=>{const N=parseInt(k.target.value,10);if(!Number.isFinite(N)){J(1);return}J(Math.max(1,Math.min(E,N)))},style:{width:56,height:36,border:0,borderLeft:"1px solid #e3e8f0",borderRight:"1px solid #e3e8f0",textAlign:"center",fontSize:15,fontWeight:600,color:"#2a2a2a",outline:"none",background:"transparent"}}),i.jsx("button",{type:"button",onClick:H,disabled:F>=E,"aria-label":"Increase seats",style:{width:36,height:36,background:"transparent",border:0,fontSize:18,fontWeight:600,color:F>=E?"#bcc4d3":"#3a4f6e",cursor:F>=E?"not-allowed":"pointer"},children:"+"})]})]}),Y>F&&i.jsxs("div",{style:{padding:"10px 12px",borderRadius:8,background:"#fff7e6",border:"1px solid #f0d99a",color:"#7a5a1a",fontSize:13},children:["Your team is already using"," ",i.jsx("strong",{children:o.usage.total})," seat",o.usage.total===1?"":"s",", so we'll charge for at least ",i.jsx("strong",{children:Y})," on checkout."]}),y&&y>F&&i.jsxs("div",{style:{padding:"10px 12px",borderRadius:8,background:"#ffffff",border:"1px solid #d8e0ec",color:"#4f4638",fontSize:13},children:["To cover the invites you were sending, you'll want at least"," ",i.jsx("strong",{children:R})," seat",R===1?"":"s","."]}),i.jsxs("div",{style:{color:"#5a5448",fontSize:13},children:["Current usage: ",o.usage.total," seat",o.usage.total===1?"":"s"," · Current purchased:"," ",o.seatLimit," seat",o.seatLimit===1?"":"s"]}),i.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",paddingTop:8,borderTop:"1px dashed #d8e0ec"},children:[i.jsxs("div",{style:{color:"#5a5448",fontSize:13},children:[Y," à ",Hl(A)," / seat"]}),i.jsxs("div",{style:{fontSize:22,fontWeight:700,color:"#2a2a2a"},children:[Hl(W),i.jsx("span",{style:{fontSize:13,color:"#7c715f",fontWeight:500},children:" / mo"})]})]}),i.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",color:"#7c715f",fontSize:12},children:[i.jsx("span",{children:"Current plan total"}),i.jsxs("span",{children:[Hl(V)," / mo"]})]}),o.isAdmin?i.jsx("button",{type:"button",onClick:_,disabled:u,className:"btn-foot primary",children:u?"Opening Stripeâ¦":`Pay for ${Y} seat${Y===1?"":"s"} â ${Hl(W)}/mo`}):i.jsx("button",{disabled:!0,className:"btn-foot",title:"Only the team admin can buy seats.",children:"Admin only"})]})]}),i.jsxs("p",{style:{color:"#7c715f",fontSize:12,marginTop:24,lineHeight:1.5},children:["Need volume pricing, custom contracts, or SSO? Email us at"," ",i.jsx("a",{href:"mailto:[email protected]",style:{color:"#3a4f6e"},children:"[email protected]"}),"."]})]})]})})}const oH=()=>{const{hash:e,pathname:t}=Nr();return m.useEffect(()=>{if(e){const n=document.getElementById(e.replace("#",""));if(n){const r=setTimeout(()=>{n.scrollIntoView({behavior:"smooth"})},100);return()=>clearTimeout(r)}}},[e,t]),null},aH="sf_tech_week",lH="/sf-tech-week?start=attendee";function cH(e){return(e.integrations??[]).some(t=>t.connected&&(t.provider==="google_calendar"||t.provider==="outlook"))}function uH(e){var r;const t=(r=e.goals)==null?void 0:r.find(s=>
2086s.goalType===aH);if(!t)return!1;let n;try{n=t.extraJson?JSON.parse(t.extraJson).role:void 0}catch{n=void 0}return n==="organizer"?!1:!cH(e)}const mA="gemphere_sfw_calendar_gate_v1";function kj(e){try{return sessionStorage.getItem(mA)===String(e)}catch{return!1}}function dH(e){try{sessionStorage.setItem(mA,String(e))}catch{}}const Nj=Uu,hH=8e3,fH=5*60*1e3,Ky="gemphere_billing_gate_v1";function mH(e){try{const t=sessionStorage.getItem(Ky);if(!t)return null;const n=JSON.parse(t);return n.userId!==e||!n.expiresAt||Date.now()>n.expiresAt?(sessionStorage.removeItem(Ky),null):n.allowed?"allowed":null}catch{return null}}function Cj(e){try{sessionStorage.setItem(Ky,JSON.stringify({userId:e,allowed:!0,expiresAt:Date.now()+fH}))}catch{}}function pH(e,t){const[n,r]=m.useState(()=>t&&kj(t)?"open":"checking");return m.useEffect(()=>{if(!e||!t)return;if(kj(t)){r("open");return}let s=!1;return r("checking"),qn(e).then(o=>{s||(uH(o)?r("gated"):(dH(t),r("open")))}).catch(()=>{s||r("open")}),()=>{s=!0}},[e,t]),n}const Un=({children:e})=>{const{user:t,isReady:n}=Ht(),r=pH(t==null?void 0:t.accessToken,t==null?void 0:t.userId),[s,o]=m.useState("idle"),[a,l]=m.useState(Nj),c=m.useRef(!1);return m.useEffect(()=>{if(!n||!(t!=null&&t.accessToken)||!t.userId){c.current=!1,o("idle");return}let u=!1;if(vw()){c.current=!0,o("allowed");return}if(c.current){o("allowed");return}if(mH(t.userId)==="allowed"){c.current=!0,o("allowed");return}o("checking");const f=setTimeout(()=>{u||(c.current=!0,o("allowed"))},hH);return(async()=>{const p=!!La(),d=await Nu(t.accessToken,t.userId,{ignorePendingTeamInvite:p});if(clearTimeout(f),u)return;if(!d){c.current=!0,o("allowed");return}if(d.allowed){c.current=!0,Cj(t.userId),o("allowed");return}const w=p?null:ls();if(w){l($r(w)),o("blocked");return}try{const b=await qn(t.accessToken);if(u)return;if(!await lu(t.accessToken,t.userId,b,{ignorePendingTeamInvite:p})||b.isComplete&&$I(b)){c.current=!0,Cj(t.userId),o("allowed");return}if(au(b,{ignorePendingTeamInvite:p})){const S=p?"":(b.pendingTeamInviteToken||"").trim();S&&Io(S);const j=$r(S||w||"");if(j!=="/onboarding/team/"){l(j),o("blocked");return}if(b.accountType==="TEAM_MEMBER"){o("allowed");return}}}catch{}let v=d.redirectPath||Nj;if(v.includes("paymentOnly=1")){const b=p?null:ls();b&&(v=$r(b))}const x=new URLSearchParams(window.location.search),y=x.get("offer"),g=x.get("trial");if(y&&!v.includes("offer=")){const b=v.includes("?")?"&":"?";v=`${v}${b}offer=${encodeURIComponent(y)}`}if(g&&!v.includes("trial=")){const b=v.includes("?")?"&":"?";v=`${v}${b}trial=${encodeURIComponent(g)}`}l(v),o("blocked")})(),()=>{u=!0,clearTimeout(f)}},[n,t==null?void 0:t.accessToken,t==null?void 0:t.userId]),n?t?r==="gated"?i.jsx(Wn,{to:lH,replace:!0}):s==="checking"||s==="idle"||r==="checking"?i.jsx("div",{className:"gp-page-loading-screen",children:i.jsx(hl,{variant:"page",message:"Checking your accountâ¦"})}):s==="blocked"?i.jsx(Wn,{to:a,replace:!0}):i.jsx(i.Fragment,{children:e}):i.jsx(Wn,{to:"/",replace:!0}):i.jsx("div",{className:"gp-page-loading-screen",children:i.jsx(hl,{variant:"page",message:"Signing you inâ¦"})})};function gH({className:e=""}){return i.jsx("span",{className:`upgrade-label ${e}`.trim(),"aria-label":"Go Pro to unlock",children:"Go Pro"})}function yH(e,t){return fetch(`${dt()}${e}`,{headers:{Authorization:`Bearer ${t}`}})}function oJ(e){return fetch(`${dt()}/api/gemphere/profile`,{headers:{Authorization:`Bearer ${e}`}})}function aJ(e,t){return fetch(`${dt()}/api/gemphere/warm-intro/response`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}function lJ(e,t){return fetch(`${dt()}/api/gemphere/warm-intro/edit-draft`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}function cJ(e,t){return fetch(`${dt()}/api/gemphere/warm-intro/approve-connector`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}function uJ(e,t){return fetch(`${dt()}/api/gemphere/account/invite-by-email`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}const vH="/assets/gemphere-mark-light-CRt4FyfT.png";function Go(e){return`${dt()}${e}`}function dJ(e,t){return fetch(Go("/api/gemphere/accounts"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}function hJ(e,t){return fetch(Go("/api/gemphere/account/invite-by-email"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}function fJ(e){return fetch(Go("/api/gemphere/agent/sessions"),{headers:{Authorization:`Bearer ${e}`}})}function mJ(e,t){return fetch(Go(`/api/gemphere/agent/sessions/${t}/messages`),{headers:{Authorization:`Bearer ${e}`}})}function pJ(e,t){return fetch(Go("/api/gemphere/agent/chat"),{method:"POST",headers:e,body:JSON.stringify(t)})}function xH(e,t){return fetch(Go(`/api/gemphere/connections/user?userId=${t}`),{headers:{Authorization:`Bearer ${e}`}})}function gJ(e,t){return fetch(Go("/api/gemphere/warm-intro/request"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(t)})}const wH=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function bH({onAdd:e,hidden:t=!1,buttonLabel:n="+ Add by name & email",helperText:r="Not in your contacts, or missing an email? Add them on the fly.",layout:s="default"}){const[o,a]=m.useState(!1),[l,c]=m.useState(""),[u,h]=m.useState(""),[f,p]=m.useState(null);if(m.useEffect(()=>{t&&o&&a(!1)},[t,o]),t)return null;const d=()=>{const v=l.trim(),x=u.trim();if(!v){p("Add their name so the email greets them properly.");return}if(!wH.test(x)){p("That doesn't look like a valid email address.");return}p(null),e({name:v,email:x}),c(""),h(""),a(!1)},w=i.jsxs("div",{className:`pn-add-email-row${s==="inline"?" pn-add-email-inline-expanded":""}`,style:s==="inline"?void 0:{padding:"10px 12px",borderTop:"1px solid #ece7dc",background:"#fbf7ee",display:"flex",flexDirection:"column",gap:8},children:[i.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[i.jsx("input",{type:"text",autoFocus:!0,placeholder:"Full name",value:l,onCh
2086ange:v=>{c(v.target.value),f&&p(null)},onKeyDown:v=>{v.key==="Enter"?d():v.key==="Escape"&&a(!1)},style:{flex:"1 1 140px",minWidth:0,padding:"7px 10px",border:"1px solid #d8cfb8",borderRadius:7,fontSize:12.5,background:"#fff"}}),i.jsx("input",{type:"email",placeholder:"[email protected]",value:u,onChange:v=>{h(v.target.value),f&&p(null)},onKeyDown:v=>{v.key==="Enter"?d():v.key==="Escape"&&a(!1)},style:{flex:"2 1 200px",minWidth:0,padding:"7px 10px",border:"1px solid #d8cfb8",borderRadius:7,fontSize:12.5,background:"#fff"}})]}),i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsx("button",{type:"button",onClick:d,style:{background:"#1a1a1a",color:"#fff",border:"none",borderRadius:7,padding:"6px 14px",fontSize:12,fontWeight:700,cursor:"pointer"},children:"Add to picker"}),i.jsx("button",{type:"button",onClick:()=>{a(!1),p(null),c(""),h("")},style:{background:"transparent",border:"none",color:"#888",fontSize:12,cursor:"pointer"},children:"Cancel"}),f&&i.jsx("span",{style:{color:"#9a3a2a",fontSize:11.5,fontWeight:600},children:f})]})]});return s==="inline"?o?w:i.jsx("button",{type:"button",className:"pn-add-inline-btn",onClick:()=>a(!0),children:n}):o?w:i.jsxs("div",{className:"pn-add-email-row",style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",borderTop:"1px solid #ece7dc",background:"#fbf7ee",fontSize:12},children:[i.jsx("button",{type:"button",onClick:()=>a(!0),style:{background:"#fff",border:"1px solid #d8cfb8",borderRadius:8,padding:"6px 10px",fontWeight:600,color:"#5a4a18",cursor:"pointer",fontSize:12},children:n}),i.jsx("span",{style:{color:"#8a7c5a"},children:r})]})}function Ld({personEmail:e,value:t,onChange:n,message:r}){const s=r||(e?`We only have ${e} on file â add their name so the intro emails greet them properly.`:"Add their name so the intro emails greet them properly.");return i.jsxs("div",{style:{background:"#fff8e6",border:"1px solid #f0e0b3",borderRadius:10,padding:"10px 12px",marginTop:10,marginBottom:10,display:"flex",flexDirection:"column",gap:6},children:[i.jsxs("div",{style:{fontSize:12,color:"#7a5b10",fontWeight:600},children:["â ",s]}),i.jsx("input",{type:"text",placeholder:"Add name",value:t,onChange:o=>n(o.target.value),style:{padding:"7px 10px",border:"1px solid #e2d39a",borderRadius:7,fontSize:12.5,background:"#fff"}})]})}function Wp({personName:e,value:t,onChange:n,message:r}){const s=r||`${e} doesn't have an email on their contact card â add one to send the intro.`;return i.jsxs("div",{style:{background:"#fff8e6",border:"1px solid #f0e0b3",borderRadius:10,padding:"10px 12px",marginTop:10,marginBottom:10,display:"flex",flexDirection:"column",gap:6},children:[i.jsxs("div",{style:{fontSize:12,color:"#7a5b10",fontWeight:600},children:["â ",s]}),i.jsx("input",{type:"email",placeholder:Pw(e),value:t,onChange:o=>n(o.target.value),style:{padding:"7px 10px",border:"1px solid #e2d39a",borderRadius:7,fontSize:12.5,background:"#fff"}})]})}function $d({value:e,onChange:t,onFocus:n,placeholder:r="Type to search network",onAdd:s,addButtonLabel:o}){return i.jsxs("div",{className:"pn-search-row",children:[i.jsx("div",{className:"search-box pn-search-box",children:i.jsx("input",{className:"pn-search",type:"text",placeholder:r,value:e,onFocus:n,onChange:a=>t(a.target.value)})}),s?i.jsx(bH,{layout:"inline",onAdd:s,buttonLabel:o}):null]})}function Ej({open:e,children:t}){return i.jsx("div",{className:`pn-list-wrap${e?" open":""}`,children:i.jsx("div",{className:"pn-list-inner",children:t})})}function SH(e){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.connections))return t.connections;if(Array.isArray(t.data))return t.data}return[]}function jH(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.importContacts))return t.importContacts}return[]}function kH({mode:e,onChange:t,disabled:n=!1,compact:r=!1}){const s=l=>{n||t(l)},o={display:"flex",alignItems:"flex-start",gap:8,cursor:n?"default":"pointer",fontSize:12.5,color:"var(--gp-ink, #2a2820)",lineHeight:1.4},a={display:"block",color:"var(--gp-muted, #9a8a70)",fontSize:11.5,marginTop:2};return i.jsxs("div",{className:"intro-optin-modes",style:{display:"flex",flexDirection:"column",gap:r?6:8,marginTop:r?10:12,marginBottom:r?2:16,padding:r?"8px 10px":"10px 12px",background:"var(--gp-paper-2, #f7f4ee)",border:"1px solid var(--gp-border-solid, #e8e0d4)",borderRadius:10},children:[i.jsx("div",{style:{fontSize:10.5,fontWeight:600,color:"var(--gp-muted, #9a8a70)",textTransform:"uppercase",letterSpacing:"0.08em",fontFamily:"'Courier New', monospace"},children:"Opt-in options"}),i.jsxs("label",{style:o,children:[i.jsx("input",{type:"checkbox",checked:e==="double",disabled:n,onChange:()=>s("double"),style:{marginTop:2}}),i.jsxs("span",{children:[i.jsx("strong",{style:{fontWeight:600},children:"Double opt-in"}),i.jsx("span",{style:a,children:"We ask both sides first â highest reply rate, safest for everyone."})]})]}),i.jsxs("label",{style:o,children:[i.jsx("input",{type:"checkbox",checked:e==="single",disabled:n,onChange:()=>s("single"),style:{marginTop:2}}),i.jsxs("span",{children:[i.jsx("strong",{style:{fontWeight:600},children:"Single opt-in"}),i.jsx("span",{style:a,children:"You're pre-approved as the connector. We auto-accept the party most likely to say yes first â only the other person gets an opt-in email (all parties Cc'd)."})]})]}),i.jsxs("label",{style:o,children:[i.jsx("input",{type:"checkbox",checked:e==="disabled",disabled:n,onChange:()=>s("disabled"),style:{marginTop:2}}),i.jsxs("span",{children:[i.jsx("strong",{style:{fontWeight:600},children:"Disable opt-in"}),i.jsx("span",{style:a,children:"Skip all approval requests and connect the parties immediately."})]})]})]})}const NH=new Set(["connector","target","asker","select below","founder","member","person a","person b"]);function CH(e){let t=(e.title||"").trim(),n=(e.company||"").trim(),r
2086=(e.kindLabel||"").trim();const s=e.roleLine!=null?e.roleLine.trim():"";if(s&&!t&&!n)if(NH.has(s.toLowerCase()))r=r||s;else if(s.includes(" · ")){const o=s.indexOf(" · ");t=s.slice(0,o).trim(),n=s.slice(o+3).trim()}else t=s;return{title:t,company:n,kind:r}}function EH(e){const t=e.founder,n=e.investor,r=e.user;return{title:String((t==null?void 0:t.title)||(n==null?void 0:n.title)||(r==null?void 0:r.title)||(r==null?void 0:r.companyRole)||"").trim(),company:String((t==null?void 0:t.companyName)||(n==null?void 0:n.fundName)||(r==null?void 0:r.companyName)||"").trim()}}function ti(e,t){if(!e)return{title:"",company:""};const n=(e.title||"").trim(),r=(e.companyName||"").trim();if(n||r)return{title:n,company:r};const s=(e.role||"").trim();if(s.includes(" · ")){const o=s.indexOf(" · ");return{title:s.slice(0,o).trim(),company:s.slice(o+3).trim()}}return s&&s!=="Imported contact"&&s!=="Added by email"&&s!=="Member"?{title:s,company:""}:e.roleKind!=null&&t?{title:t(e.roleKind),company:""}:{title:"",company:""}}async function TH(e,t,n){if(!e||!t||t<=0)return{title:"",company:""};try{const r=await n7(n,t,e);if(!r.ok)return{title:"",company:""};const s=await r.json(),o=s!=null&&s.data&&typeof s.data=="object"?s.data:s,a=o!=null&&o.user&&typeof o.user=="object"?o.user:o,l=o!=null&&o.founder&&typeof o.founder=="object"?o.founder:a!=null&&a.founder&&typeof a.founder=="object"?a.founder:null,c=o!=null&&o.investor&&typeof o.investor=="object"?o.investor:a!=null&&a.investor&&typeof a.investor=="object"?a.investor:null,u=a!=null&&a.user&&typeof a.user=="object"?a.user:a;return EH({founder:l,investor:c,user:u})}catch{return{title:"",company:""}}}function pA(e){return(e||"?").split(/\s+/).map(t=>t[0]).filter(Boolean).slice(0,2).join("").toUpperCase()||"?"}function PH({parties:e,singleOptInFirstParty:t=null,onSelectFirstParty:n,makerName:r="You",fromName:s="",toName:o="",compact:a=!1}){const l=Gn(r)||"You",c=t==="to"?Gn(o)||o:Gn(s)||s,u=t==="to"?Gn(s)||s:Gn(o)||o,h=!!t&&!!n,f=(p,d)=>{const w=p.key==="from"||p.key==="to"?p.key:null,v=h&&w!==null,x=!!p.isApprover,y=x?"Approver":null,g=["intro-party-node",x?"approved selected":"",v?"selectable":""].filter(Boolean).join(" "),b=i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`intro-party-av${x?" approved":""}`,children:pA(p.name)}),i.jsx("div",{className:"intro-party-name",title:p.name,children:p.name}),i.jsx("div",{className:"intro-party-role",children:p.role}),y?i.jsx("span",{className:"intro-party-tag",children:y}):null]}),S=v?i.jsx("button",{type:"button",className:g,"aria-pressed":x,"aria-label":`${p.name}, ${p.role}${x?", approver":""}`,onClick:()=>{n(w==="from"?"to":"from")},children:b},p.key):i.jsx("div",{className:g,children:b},p.key),j=d<e.length-1?i.jsx("span",{className:"intro-party-arrow","aria-hidden":"true",children:"â"},`${p.key}-arrow`):null;return[S,j]};return i.jsxs("div",{className:`intro-parties-involved${a?" compact":""}`,children:[i.jsxs("div",{className:"intro-parties-head",children:[i.jsx("div",{className:"intro-parties-title",children:"Parties involved"}),h?i.jsx("div",{className:"intro-parties-hint",children:"Select approver"}):null]}),i.jsx("div",{className:"intro-parties-chain",children:e.flatMap((p,d)=>f(p,d))}),t?i.jsxs("p",{className:"intro-parties-summary",children:[i.jsx("strong",{children:l})," and ",i.jsx("strong",{children:c})," are pre-approved. Only ",i.jsx("strong",{children:u})," receives an opt-in email â all parties are Cc'd."]}):null]})}const IH={very_strong:{bg:"#E1F5EE",border:"#9FE1CB",fg:"#0F6E56",dot:"#0F6E56"},strong:{bg:"#ECF8F2",border:"#C2E6D5",fg:"#16876A",dot:"#16876A"},solid:{bg:"#F5F1E6",border:"#E2DAC4",fg:"#6B5E3C",dot:"#A48F5A"},light:{bg:"#F0EFEC",border:"#DCD9D2",fg:"#7A766C",dot:"#B7B2A7"}};function gA({tier:e,size:t="sm",style:n,className:r}){if(!e)return null;const s=IH[e],o=t==="sm",a={display:"inline-flex",alignItems:"center",gap:o?5:6,background:s.bg,border:`1px solid ${s.border}`,color:s.fg,borderRadius:999,padding:o?"2px 8px":"4px 10px",fontSize:o?10.5:11.5,fontWeight:600,letterSpacing:.2,lineHeight:1.2,whiteSpace:"nowrap",...n};return i.jsxs("span",{"data-tier":e,className:["relationship-tier-badge",r].filter(
2086Boolean).join(" "),style:a,"aria-label":`Relationship: ${qh(e)}`,children:[i.jsx("span",{"aria-hidden":!0,style:{width:o?6:7,height:o?6:7,borderRadius:"50%",background:s.dot,display:"inline-block"}}),qh(e)]})}const AH={you:"you",founder:"you",connector:"connector",target:"recipient"},RH={you:"You",founder:"Founder",connector:"Connector",target:"Target"};function _H({name:e,photo:t,tone:n,placeholder:r=!1}){const s=pA(e);return r?i.jsx("div",{className:`rc-av av ${n} rc-av-empty`,children:"?"}):t?i.jsx("div",{className:`rc-av av ${n}`,children:i.jsx("img",{src:t,alt:"",loading:"lazy",onError:o=>{const a=o.currentTarget;a.style.display="none";const l=a.parentElement;l&&!l.dataset.fallback&&(l.dataset.fallback="1",l.textContent=s)}})}):i.jsx("div",{className:`rc-av av ${n}`,children:s})}function OH({title:e,company:t,roleLine:n,kindLabel:r,variant:s="rc"}){const o=CH({title:e,company:t,roleLine:n,kindLabel:r}),a=s==="chain"?"chain":"rc";return!o.title&&!o.company&&!o.kind?i.jsx("div",{className:`${a}-role`,children:" "}):i.jsxs("div",{className:`${a}-meta`,children:[o.title?i.jsx("div",{className:`${a}-meta-line`,title:o.title,children:o.title}):null,o.company?i.jsx("div",{className:`${a}-meta-line`,title:o.company,children:o.company}):null,o.kind?i.jsx("div",{className:`${a}-kind`,children:o.kind}):null]})}function ta({name:e,photo:t,role:n,company:r,roleLine:s,kindLabel:o,badge:a,badgeLabel:l,avatarTone:c,tier:u,compactName:h=!0,placeholder:f=!1}){const p=h?An(e)||e||"?":e||"?";return i.jsxs("div",{className:`rc-person${h?"":" rc-person-wide"}`,children:[i.jsx("span",{className:`rc-badge rc-stage ${AH[a]}`,children:l||RH[a]}),i.jsx(_H,{name:e,photo:t,tone:c,placeholder:f}),i.jsx("div",{className:`rc-name${f?" rc-name-empty":""}`,title:e,children:p}),i.jsx(OH,{title:n,company:r,roleLine:s}),u?i.jsx("div",{className:"rc-tier",children:i.jsx(gA,{tier:u})}):null]})}function Dd(){return i.jsx("div",{className:"rc-arr","aria-hidden":"true",children:i.jsx("span",{className:"rc-arr-line"})})}function Tj({children:e}){return i.jsx("div",{className:"req-chain",children:e})}function yA(e){const t=String(e||"").replace(/\r\n/g,` 2087`).trim();if(!t)return"";const n=t.split(` 2088`),r=/^\s*(hi|hey|hello)\s+[^,\n]+,\s*$/i;for(;n.length&&n[0].trim()==="";)n.shift();for(n.length&&r.test(n[0])&&n.shift();n.length&&n[n.length-1].trim()==="";)n.pop();const s=/^\s*(best|thanks|cheers|warmly|regards|sincerely|all the best|thank you)[,!.]?\s*$/i,o=/^\s*[\u2013\u2014-]{1,2}\s*\S+/;if(n.length){const a=n[n.length-1].trim(),l=n.length>=2?n[n.length-2].trim():"";l&&s.test(l)&&/^[A-Za-z][A-Za-z\s\-'.]*$/.test(a)&&a.split(/\s+/).length<=4?(n.pop(),n.pop()):(s.test(a)||o.test(a)&&a.split(/\s+/).length<=4)&&n.pop()}for(;n.length&&n[0].trim()==="";)n.shift();for(;n.length&&n[n.length-1].trim()==="";)n.pop();return n.join(` 2089`).trim()}const MH="Warm intros to anyone, through people who already have your back.",LH=/(?:\bat\b|·|,|founder|investor|ceo|cto|manager|director|partner|head of|vp |chief )/i;function $H(e){return/\([^)]*(?:\bat\b|·)[^)]*\)/i.test(e)}function yJ(e,t,n){let r=yA(e).trim();if(!r)return"";const s=_l(t,n),o=An(t,n);if(s&&o!=="them"){const a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp(`${a}\\s*\\([^)]+\\)`,"gi"),o),r=r.replace(new RegExp(`\\b${a}\\b`,"gi"),o)}return r=r.replace(/\s*\([^)]+\)/g,a=>LH.test(a)?"":a),r.replace(/\s{2,}/g," ").replace(/\s+([,.!?])/g,"$1").trim()}function Yy(e,t){const n=An(e||"",t);return`${n!=="them"?n:"A contact"} is working on something super interesting. I think you two would click.`}function DH(e){return`${(e||"").trim()||"A contact"} is working on something super interesting. I think you two would click.`}function vJ(e,t){const n=(e||"").trim();if(!n)return!0;const r=(t||"").trim();return!!(r&&n===DH(r)||r&&n.startsWith(`${r} would love to connect`)||n.includes("Sharing this short blurb so you can decide"))}function FH(e,t,n){const r=(e||"").trim();if(!r||r===Yy(t,n)||r===Yy("A contact"))return!0;const s=(t||"").trim();if(s&&r.startsWith(`${s} would love to connect.`))return!0;const o=An(t||"",n);return!!(o!=="them"&&r.startsWith(`${o} would love to connect.`)||r.includes("Sharing this short blurb so you can decide"))}
2089function Pj(e,t,n,r,s){const o=An(e,t),a=r.trim()||"something super interesting",l=s==="working_on"?`${o} is working on ${a}. I think you two should catch up.`:`${o} is working on ${a}. I think you two would click.`,c=(n||"").trim();return!c||$H(c)?l:c}function BH(e){return e.endsWith("s")?`${e}'`:`${e}'s`}function vA({recipientName:e}){return i.jsxs("div",{className:"req-email-meta",children:["[email protected] · to ",e]})}function UH({recipientName:e,connectorName:t,otherName:n,blurb:r,bylineName:s,forwardedByName:o,onBlurbChange:a,embedded:l=!1,variant:c="default",hideFooter:u=!1,className:h=""}){const f=Gn(e),p=An(n),d=t||"A friend",w=s||n||p,v=yA(r),x=`${p}'s blurb appears here`,y=c==="offerIntro",g=(n||p).trim()||p,b=l?`intro-target-optin-preview intro-target-optin-embedded ${h}`.trim():`ob-draft-email-card intro-target-optin-preview ${h}`.trim();return i.jsxs("div",{className:b,children:[i.jsxs("p",{children:["Hi ",f,","]}),i.jsx("p",{children:y?`${d} would like to make an intro between you and ${g}. Sharing the blurb below.`:`${d} would like to intro you to ${p}.`}),a?i.jsx(xA,{label:y?"Blurb":"Your blurb",value:r,onChange:a,placeholder:x}):v?i.jsx("p",{className:"ob-draft-email-blurb",children:v}):i.jsxs("p",{className:"ob-draft-email-blurb ob-draft-email-blurb-placeholder",children:["[",BH(p)," blurb here]"]}),i.jsx("p",{children:y?i.jsxs(i.Fragment,{children:["If youâre open to it, hit ",i.jsx("strong",{children:"Accept intro"})," and weâll connect you both."]}):i.jsxs(i.Fragment,{children:["If youâre open to meeting ",p,", hit"," ",i.jsx("strong",{children:"Yes, connect us"})," and weâll loop you both in."]})}),i.jsxs("div",{className:"intro-optin-preview-btns","aria-hidden":!0,children:[i.jsx("span",{className:"intro-optin-preview-btn primary",children:y?"Accept intro":"Yes, connect us"}),y?i.jsx("span",{className:"intro-optin-preview-btn secondary",children:"Not right now"}):null,i.jsx("span",{className:"intro-optin-preview-btn ghost",children:"Pass"})]}),i.jsxs("p",{className:l?void 0:"ob-draft-email-sig",children:["Best,",i.jsx("br",{}),i.jsx("strong",{children:"Gem"}),i.jsx("br",{}),i.jsxs("span",{className:l?"req-email-byline":"ob-draft-email-byline",children:["Ecosystem analyst to ",w,o?` · forwarded by ${o}`:""]})]}),u?null:i.jsxs("p",{className:"intro-optin-preview-footer",children:["Via Gemphere. ",MH,i.jsx("br",{}),i.jsxs("span",{className:"intro-optin-preview-copyright",children:["© ",new Date().getFullYear()," Gemphere"]})]})]})}function wf({label:e="To",email:t}){const n=(t||"").trim();return n?i.jsxs("div",{className:"req-email-to-row",children:[i.jsx("span",{className:"req-email-to-label",children:e}),i.jsx("span",{className:"req-email-to-value",children:n})]}):i.jsxs("div",{className:"req-email-to-row req-email-to-missing",children:[i.jsx("span",{className:"req-email-to-label",children:e}),i.jsx("span",{className:"req-email-to-value req-email-to-missing-text",children:"add email below"})]})}function Jy({label:e="To",email:t,onChange:n,placeholder:r="their email",disabled:s,hint:o}){return i.jsxs("div",{className:"req-email-to-row req-email-to-editable",children:[i.jsx("span",{className:"req-email-to-label",children:e}),i.jsx("input",{type:"email",className:"req-email-to-input",value:t,onChange:a=>n(a.target.value),placeholder:r,disabled:s,"aria-label":`${e} email`}),o?i.jsx("span",{className:"req-email-to-hint",children:o}):null]})}function xA({label:e,value:t,onChange:n,placeholder:r}){return i.jsxs("div",{className:"req-editable-blurb",children:[i.jsxs("div",{className:"req-editable-blurb-label",children:[e," ",i.jsx("span",{children:"the only part you edit"})]}),i.jsx("textarea",{className:"req-editable-blurb-textarea",value:t,onChange:s=>n(s.target.value),placeholder:r})]})}function Gp({title:e,meta:t,recipientName:n,recipientEmail:r,otherName:s,otherEmail:o,connectorName:a,bylineName:l,forwardedByName:c,blurb:u,onBlurbChange:h}){const f=Gn(n,r),p=An(s,o),d=a||"A friend",w=l||d,v=Nc(n,r);return i.jsxs("div",{className:"req-email",children:[i.jsxs("div",{className:"req-email-head",children:[i.jsx("div",{children:i.jsx("strong",{children:e})}),i.jsx("span",{children:t||"Prewritten email - edit blurb only"})]}),i.jsx(wf,{email:r}),i.jsx("div",{className:"req-email-label",children:"Subject"}),i.jsxs("div",{className:"req-email-subject req-email-subject-fixed",children:[d," would like to intro you to ",p]}),i.jsx("div",{className:"req-email-label",children:"Message"}),i.jsxs("div",{className:"req-email-body req-email-preview-body",children:[i.jsxs("p",{children:["Hi ",v?f:"[add their name above]",","]}),i.jsxs("p",{children:[d," would like to intro you to ",p,"."]}),i.jsx(xA,{label:`Here is ${p}'s blurb.`,value:u,onChange:h,placeholder:`${p}'s blurb appears here`}),i.jsxs("p",{children:["If you're open to meeting ",p,", hit ",i.jsx("strong",{children:"Yes, connect us"})," and we'll loop you both in."]}),i.jsxs("p",{children:["Best,",i.jsx("br",{}),i.jsx("strong",{children:"Gem"}),i.jsx("br",{}),i.jsxs("span",{className:"req-email-byline",children:["Ecosystem analyst to ",w,c?` - forwarded by ${c}`:""]})]})]})]})}function VH({connectorName:e,connectorEmail:t,askerName:n,askerEmail:r,targetName:s,targetEmail:o,blurb:a,onBlurbChange:l,meta:c,stepLabel:u="1",onConnectorEmailChange:h,onAskerEmailChange:f,onTargetEmailChange:p,connectorSubject:d,connectorCoverMessage:w,onConnectorSubjectChange:v,onConnectorCoverMessageChange:x,showTargetOptIn:y=!0,variant:g="default",investorName:b,recipientRole:S="connector",layout:j="stacked",disabled:T}){const C=Gn(e,t),E=An(n,r),A=An(s,o),R=Nc(e,t),V=Nc(n,r),D=Nc(s,o),J=g==="offerIntro",F=j==="split",Y=String((Number(u)||1)+1).padStart(u.length>=2?2:1,"0"),W=`${e||"A friend"} would like to intro you to ${A}`,H=(d==null?void 0:d.trim())||(J&&b?`${An(b)} would like your help reaching ${A}
2089`:`${V?E:"A friend"} would like to meet ${A}`),P=(N,B,L,z,ee)=>L?i.jsx(Jy,{label:N,email:(B||"").trim(),onChange:L,disabled:T,hint:z,placeholder:Pw(ee||e)}):i.jsx(wf,{label:N,email:B}),_=y?i.jsxs("div",{className:`req-nested-preview${F?" req-mailcard req-mailcard--target":""}`,children:[F?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"req-email-head",children:[i.jsxs("div",{children:[i.jsx("span",{className:"req-email-num","aria-hidden":"true",children:String(Y).padStart(2,"0")}),i.jsxs("strong",{children:["To ",D?A:"the target"," â the target"]})]}),i.jsxs("span",{children:["Only if ",R?C:"the connector"," accepts"]})]}),P("To",o,p,"Target inbox",s),i.jsx("div",{className:"req-email-label",children:"Subject"}),i.jsx("div",{className:"req-email-subject req-email-subject-fixed",children:J?H:W}),i.jsx("div",{className:"req-email-label",children:"Message"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"req-nested-preview-lead",children:["Here's the email we'll send to ",D?A:"target"," for you:"]}),p?P("To",o,p,"Target inbox",s):null]}),i.jsx(UH,{recipientName:s,connectorName:e,otherName:n,blurb:a,onBlurbChange:l,bylineName:n,forwardedByName:e,variant:J?"offerIntro":"default",hideFooter:!0,className:"req-nested-target-preview"})]}):null,k=i.jsxs(i.Fragment,{children:[i.jsx(vA,{recipientName:e}),i.jsxs("div",{className:"req-email-head",children:[i.jsx("div",{children:F?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"req-email-num","aria-hidden":"true",children:String(u).padStart(2,"0")}),i.jsxs("strong",{children:["To ",R?C:"your connector"," â the ",S]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("strong",{children:[u," â Email to ",C]})," (",S,")"]})}),i.jsx("span",{children:F?"Sends now":c||"Prewritten email â edit addresses and copy"})]}),P("To",t,h,"Connector inbox",e),f?P("Cc",r,f,"Founder / asker",n):null,i.jsx("div",{className:"req-email-label",children:"Subject"}),v?i.jsx("input",{className:"req-email-subject",type:"text",value:d??H,onChange:N=>v(N.target.value),disabled:T}):i.jsx("div",{className:"req-email-subject req-email-subject-fixed",children:H}),i.jsx("div",{className:"req-email-label",children:"Message"}),x?i.jsx("textarea",{className:"req-email-textarea",value:w??"",onChange:N=>x(N.target.value),disabled:T,rows:J?9:7}):w!=null&&w.trim()?i.jsx("div",{className:"req-email-body req-email-preview-body",style:{whiteSpace:"pre-wrap"},children:w}):J&&b?i.jsxs("div",{className:"req-email-body req-email-preview-body",children:[i.jsxs("p",{children:["Hey ",R?C:"[connector]",","]}),i.jsxs("p",{children:[i.jsx("strong",{children:An(b)})," would like to intro you to"," ",i.jsx("strong",{children:A})," and thought it could be a fit."]}),i.jsxs("p",{children:["Open to the intro? They'll handle the outreach to ",A,"."]})]}):w!=null&&w.trim()?i.jsx("div",{className:"req-email-body req-email-preview-body",style:{whiteSpace:"pre-wrap"},children:w}):i.jsxs("div",{className:"req-email-body req-email-preview-body",children:[i.jsxs("p",{children:["Hey ",R?C:"[connector]",","]}),i.jsxs("p",{children:[i.jsx("strong",{children:V?E:"A friend"})," would like to reach"," ",i.jsx("strong",{children:A})," and noticed you two are connected."]}),i.jsxs("p",{children:["Open to making the intro? We'll handle the rest â ",A," gets to decide if it's a fit before anyone's looped in."]})]}),J&&b?i.jsxs("p",{className:"req-email-byline req-email-broker-caption",children:["Ecosystem analyst to ",n||E," · forwarded by ",b]}):null,F&&!J?i.jsx("div",{className:"req-email-body req-email-preview-body req-email-actions",children:i.jsxs("div",{className:"intro-optin-preview-btns","aria-hidden":!0,children:[i.jsx("span",{className:"intro-optin-preview-btn primary",children:"Make the intro"}),i.jsx("span",{className:"intro-optin-preview-btn ghost",children:"Pass"})]})}):null,F?null:_,J?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"req-email-label",style:{marginTop:12},children:"Response buttons (added automatically)"}),i.jsx("div",{className:"req-email-body req-email-preview-body",style:{marginTop:6},children:i.jsxs("div",{className:"intro-optin-preview-btns","aria-hidden":!0,
2089children:[i.jsxs("span",{className:"intro-optin-preview-btn primary",children:["Forward to ",D?A:"target"]}),i.jsx("span",{className:"intro-optin-preview-btn secondary",children:"Edit first"}),i.jsx("span",{className:"intro-optin-preview-btn ghost",children:"Pass"})]})})]}):null]});return F?i.jsxs("div",{className:"req-email req-email--split",children:[i.jsx("div",{className:"req-mailcard",children:k}),_]}):i.jsx("div",{className:"req-email",children:k})}function xJ({founderName:e,founderEmail:t,onFounderEmailChange:n,investorCcEmail:r,onInvestorCcEmailChange:s,subject:o,message:a,onSubjectChange:l,onMessageChange:c,disabled:u,meta:h,stepLabel:f="1"}){const p=Gn(e,t);return i.jsxs("div",{className:"req-email",children:[i.jsx(vA,{recipientName:e}),i.jsxs("div",{className:"req-email-head",children:[i.jsxs("div",{children:[i.jsxs("strong",{children:[f," â Email to ",p]})," (founder)"]}),i.jsx("span",{children:h||"Sent now â edit subject, message, and delivery email"})]}),n?i.jsx(Jy,{label:"To",email:(t||"").trim(),onChange:n,disabled:u,hint:"Founder inbox",placeholder:Pw(e,t)}):i.jsx(wf,{email:t,label:"To"}),s?i.jsx(Jy,{label:"Cc",email:(r||"").trim(),onChange:s,disabled:u,hint:"You (investor) â visibility copy"}):r?i.jsx(wf,{email:r,label:"Cc"}):null,i.jsx("div",{className:"req-email-label",children:"Subject"}),i.jsx("input",{className:"req-email-subject",type:"text",value:o,onChange:d=>l(d.target.value),disabled:u}),i.jsx("div",{className:"req-email-label",children:"Message"}),i.jsx("textarea",{className:"req-email-textarea",value:a,onChange:d=>c(d.target.value),disabled:u,rows:8}),i.jsx("div",{className:"req-email-label",style:{marginTop:12},children:"Response buttons (added automatically)"}),i.jsx("div",{className:"req-email-body req-email-preview-body",style:{marginTop:6},children:i.jsxs("div",{className:"intro-optin-preview-btns","aria-hidden":!0,children:[i.jsx("span",{className:"intro-optin-preview-btn primary",children:"Yes, intro me"}),i.jsx("span",{className:"intro-optin-preview-btn secondary",children:"Not right now"}),i.jsx("span",{className:"intro-optin-preview-btn ghost",children:"Already in touch"})]})})]})}const zH="https://gem-agent-38ae41bd5367.herokuapp.com",Ij=["purple","green","amber","blue","red","teal"];function na(e){return Ij[Math.abs(e)%Ij.length]}function Hp(e){const t=(e||"").replace(/\s+/g," ").trim().split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():(e||"?").slice(0,2).toUpperCase()||"?"}function Ns(e){return e===1?"Founder":e===2?"Investor":e===3?"Scout":"Member"}function wA(e){if(!e||typeof e!="object")return null;const t=e,n=t.signals||t.relationship||t;if(!n||typeof n!="object")return null;const r=u=>n[u],s=Number(r("meetings12mo")??r("meeting_count")??r("meetingCount")??0),o=Number(r("emailsSent90d")??r("sent_count")??r("sentCount")??0),a=Number(r("emailsReceived90d")??r("received_count")??r("receivedCount")??0),l=r("lastMeetingAt")??r("last_meeting_at")??null,c=r("lastEmailAt")??r("last_signal_at")??r("lastSignalAt")??null;return!s&&!o&&!a&&l==null&&c==null?null:{meetings12mo:s,emailsSent90d:o,emailsReceived90d:a,lastMeetingAt:l,lastEmailAt:c}}function bA(e){const t=e.user,n=(t!=null&&t.user&&typeof t.user=="object"?t.user:void 0)||(t&&typeof t=="object"&&"id"in t?t:void 0),r=(n==null?void 0:n.id)??0;if(!r)return null;const s=((n==null?void 0:n.fullname)||"").trim(),o=n!=null&&n.email?String(n.email).trim():null,a=tA(s,o)||`User ${r}`,l=(t==null?void 0:t.founder)??null,c=(t==null?void 0:t.investor)??null;let u="";l&&(l.title||l.companyName)?u=[l.title,l.companyName].filter(Boolean).join(" · "):c&&(c.title||c.fundName)?u=[c.title,c.fundName].filter(Boolean).join(" · "):n!=null&&n.title&&(u=n.title);const h=e.role??(n==null?void 0:n.role)??0,f=(l==null?void 0:l.title)||(c==null?void 0:c.title)||(n==null?void 0:n.title)||null,p=(l==null?void 0:l.companyName)||(c==null?void 0:c.fundName)||null;return{key:`u-${r}`,userId:r,name:a,rawName:s||a,role:u||Ns(h),title:f,companyName:p,email:n==null?void 0:n.email,photo:(n==null?void 0:n.profilePhoto)??null,roleKind:h,kind:"gem",isGem:!0,relationshipSignals:wA(e)}}function SA(e){const t=Number((e==null?void 0:e.contactId)||0);if(!t)return null;const n=Number((e==null?void 0:e.connectedUserId)||0),r=[e==null?void 0:e.title,e==null?void 0:e.company].filter(
2089Boolean).join(" · "),s=(e==null?void 0:e.strengthLabel)==="strong_connection"||(e==null?void 0:e.strengthLabel)==="connector"?e.strengthLabel:null,o=((e==null?void 0:e.displayName)||"").trim();return{key:`c-${t}`,userId:n>0?n:0,contactId:t,name:tA(o,(e==null?void 0:e.email)||null),rawName:o,role:r||"Imported contact",title:(e==null?void 0:e.title)??null,companyName:(e==null?void 0:e.company)??null,email:(e==null?void 0:e.email)||null,photo:null,roleKind:0,kind:"contact",isGem:n>0,relationshipSignals:wA(e),strengthLabel:s}}function WH(e,t,n){const r=e.trim();return{key:`adhoc-${n}`,userId:0,name:r||"Added contact",rawName:r,role:"Added by email",email:t.trim(),photo:null,roleKind:0,kind:"contact",isGem:!1}}function GH(e,t,n){const r=SH(e).map(o=>bA(o)).filter(o=>!!o&&o.userId!==t&&o.userId!==n),s=jH(e).map(o=>SA(o)).filter(o=>!(!o||o.userId>0&&(o.userId===t||o.userId===n)));return[...r,...s]}const qp={anchor:null,picked:null,activeSide:"from",note:"",email1Subject:"",email1Body:"",email2Subject:"",email2Body:""};function HH({open:e,onClose:t,onSent:n,initialMode:r="make",preselectedFrom:s=null,preselectedTo:o=null,prefillNote:a=""}){var ue,Pe,Ie,mt,Nn,Tt,We,hn,fn,no,Ys,xs,ws,ro,Ho,so,qo,bs,Ko,io,oo,Ge,pe,Zr,pt,Yo,hr,I,oe,ge,re,$e,nt,Ee,qt,mn,Zt,fr,Cr;const{user:l}=Ht(),c=l==null?void 0:l.accessToken,u=l==null?void 0:l.userId,h=!s&&!o,[f,p]=m.useState(h?r:"make"),[d,w]=m.useState(qp),[v,x]=m.useState(""),[y,g]=m.useState(!1),[b,S]=m.useState(null),[j,T]=m.useState([]),[C,E]=m.useState([]),[A,R]=m.useState(!1),[V,D]=m.useState(null),[J,F]=m.useState(!1),[Y,W]=m.useState(null),[H,P]=m.useState(null),[_,k]=m.useState("double"),[N,B]=m.useState("from"),L=m.useRef(null),[z,ee]=m.useState({userIds:new Set,contactIds:new Set}),[X,G]=m.useState(null),[ne,te]=m.useState(""),[je,q]=m.useState(""),[ie,me]=m.useState([]),[he,fe]=m.useState(0),[ae,Se]=m.useState({}),[_e,Ce]=m.useState({}),[Fe,Le]=m.useState({}),[Ot,ct]=m.useState("pick"),[xt,Oe]=m.useState({});m.useEffect(()=>{if(!e)return;p(h?r:"make");const O=[];let K="from",ye=s,Ue=o;s&&o?K="from":s?K="to":o&&(K="from"),s&&!s.isGem&&O.push(s),o&&!o.isGem&&o.key!==(s==null?void 0:s.key)&&O.push(o),w({...qp,note:a,anchor:ye,picked:Ue,activeSide:K}),me(O),x(""),W(null),P(null);const Ae=ep(s,o,{userIds:new Set,contactIds:new Set});k(Ae),B("from"),L.current=null,fe(O.length),Ce({}),Le({}),Oe({}),Se({}),E([]),D(null),ct("pick")},[e,s,o,a]),m.useEffect(()=>{if(!e||!c)return;let O=!1;return z0(c).then(K=>{O||(ee(K),k(ep(s,o,K)))}).catch(()=>{}),()=>{O=!0}},[e,c,s,o]),m.useEffect(()=>{if(!e||!c||!u)return;let O=!1;return nD(c,u).then(K=>{O||Se(K)}).catch(()=>{}),()=>{O=!0}},[e,c,u]),m.useEffect(()=>{var Ue,Ae,De,Ne;if(!e||!c)return;const O=[];(Ue=d.anchor)!=null&&Ue.userId&&d.anchor.userId>0&&O.push(d.anchor.userId),(Ae=d.picked)!=null&&Ae.userId&&d.picked.userId>0&&O.push(d.picked.userId),u&&(((De=d.anchor)==null?void 0:De.userId)===u&&O.push(u),((Ne=d.picked)==null?void 0:Ne.userId)===u&&O.push(u),f==="request"&&O.push(u));const K=Array.from(new Set(O));if(K.length===0)return;let ye=!1;return Promise.all(K.map(async Ze=>{const St=await J5(c,Ze);return[Ze,(St||"").trim()]})).then(Ze=>{ye||Oe(St=>{const mr={...St};for(const[Js,$n]of Ze)mr[Js]=$n;return mr})}),()=>{ye=!0}},[e,c,u,f,(ue=d.anchor)==null?void 0:ue.key,(Pe=d.picked)==null?void 0:Pe.key,(Ie=d.anchor)==null?void 0:Ie.userId,(mt=d.picked)==null?void 0:mt.userId,(Nn=d.anchor)==null?void 0:Nn.isGem,(Tt=d.picked)==null?void 0:Tt.isGem]),m.useEffect(()=>{if(!e||!c||!u)return;let O=!1;return(async()=>{var K;try{const[ye,Ue]=await Promise.all([C7(c).then(De=>De.ok?De.json():null),TH(c,u,zH)]);if(O)return;const Ae=((K=ye==null?void 0:ye.user)==null?void 0:K.profilePhoto)||(ye==null?void 0:ye.profilePhoto)||null;G(Ae||null),te(Ue.title),q(Ue.company)}catch{}})(),()=>{O=!0}},[e,c,u]);const Xe=m.useCallback(async()=>{if(!(!c||!u)){g(!0),S(null),T([]);try{const[O,K]=await Promise.all([N7(u,c),z0(c)]);if(ee(K),!O.ok)throw new Error(`Couldn't load your network (server ${O.status})`);const ye=await O.json(),Ue=Ne=>Ne.userId>0&&K.userIds.has(Ne.userId)?{...Ne,strengthLabel:"connector"}:Ne,Ae=(Array.isArray(ye==null?void 0:ye.gemConnections)?ye.gemConnections:[]).map(Ne=>bA(Ne)).filter(Ne=>!!Ne).map(Ue),De=(Array.isArray(ye==null?void 0:ye.importContacts)?ye.importContacts:[]).map(Ne=>SA(Ne)).filter(Ne=>!!Ne).map(Ne=>Ne.contactId&&K.contactIds.has(Ne.contactId)?{...Ne,strengthLabel:"connector"}:Ue(Ne));T([...Ae,...De])}catch(O){S(O instanceof Error?O.message:"Network error")}finally{g(!1)}}},[c,u]);m.useEffect(()=>{e&&Xe()},[e,Xe]);const wt=m.useCallback(async O=>{if(!(!c||!u)){R(!0),D(null),E([]);try{const K=await xH(c,O);if(!K.ok)throw new Error(`Couldn't load their network (server ${K.status})`);const ye=await K.json();E(GH(ye,u,O))}catch(K){D(K instanceof Error?K.message:"Network error")}finally{R(!1)}}},[c,u]);m.useEffect(()=>{var K;if(!e||f!=="request")return;
2089const O=(K=d.anchor)!=null&&K.isGem?d.anchor.userId:0;w(ye=>ye.picked?{...ye,picked:null}:ye),x(""),O>0?wt(O):(E([]),D(null))},[e,f,(We=d.anchor)==null?void 0:We.userId,(hn=d.anchor)==null?void 0:hn.isGem,wt]);const He=m.useMemo(()=>{const O={},K=[...j,...ie];for(const ye of K){let Ue=ye.relationshipSignals??null;if(!Ue){const Ae=(ye.email||"").trim().toLowerCase(),De=Ae?ae[Ae]:null;De&&(Ue={meetings12mo:De.meetingCount,emailsSent90d:De.sentCount,emailsReceived90d:De.receivedCount,lastMeetingAt:De.lastMeetingAt,lastEmailAt:De.lastSignalAt??De.lastSentAt??De.lastReceivedAt})}O[ye.key]=Ue?p5(Ue):null}return O},[j,ie,ae]),at=m.useMemo(()=>{var Ue,Ae;const O=[],K=d.activeSide==="from"?(Ue=d.picked)==null?void 0:Ue.key:(Ae=d.anchor)==null?void 0:Ae.key,ye=[...j,...ie];for(const De of ye){if(K&&De.key===K)continue;const Ne=He[De.key];Ne&&Ne.hidden||O.push(De)}return O.sort((De,Ne)=>{const Ze=He[De.key],St=He[Ne.key];return!Ze&&!St?0:DE({tier:(Ze==null?void 0:Ze.tier)??null,lastTouchMs:(Ze==null?void 0:Ze.lastTouchMs)??null},{tier:(St==null?void 0:St.tier)??null,lastTouchMs:(St==null?void 0:St.lastTouchMs)??null})}),O},[j,ie,d.activeSide,(fn=d.picked)==null?void 0:fn.key,(no=d.anchor)==null?void 0:no.key,He]),$=m.useMemo(()=>{const O=v.trim().toLowerCase();return O?at.filter(K=>K.name.toLowerCase().includes(O)||(K.role||"").toLowerCase().includes(O)||(K.email||"").toLowerCase().includes(O)):[]},[at,v]),xe=m.useMemo(()=>{const O=v.trim().toLowerCase(),K=C.filter(ye=>{var Ue;return ye.key!==((Ue=d.anchor)==null?void 0:Ue.key)});return O?K.filter(ye=>ye.name.toLowerCase().includes(O)||(ye.role||"").toLowerCase().includes(O)||(ye.email||"").toLowerCase().includes(O)):K},[C,v,(Ys=d.anchor)==null?void 0:Ys.key]);m.useEffect(()=>{if(!d.anchor||!d.picked)return;const O=`${d.anchor.key}:${d.picked.key}`;L.current!==O&&(L.current=O,B(g5(d.anchor,d.picked,z,He[d.anchor.key],He[d.picked.key])),k(ep(d.anchor,d.picked,z)))},[(xs=d.anchor)==null?void 0:xs.key,(ws=d.picked)==null?void 0:ws.key,(ro=d.anchor)==null?void 0:ro.roleKind,(Ho=d.picked)==null?void 0:Ho.roleKind,(so=d.anchor)==null?void 0:so.strengthLabel,(qo=d.picked)==null?void 0:qo.strengthLabel,(bs=d.anchor)==null?void 0:bs.userId,(Ko=d.picked)==null?void 0:Ko.userId,(io=d.anchor)==null?void 0:io.contactId,(oo=d.picked)==null?void 0:oo.contactId,He,z]),m.useEffect(()=>{if(f!=="make"||!d.anchor||!d.picked)return;const O=Je(d.anchor),K=Je(d.picked),ye=Te(d.anchor),Ue=Te(d.picked),Ae=An(O,ye),De=An(K,Ue),Ne=d.note.trim()||"something super interesting",Ze=(d.picked.userId>0&&xt[d.picked.userId]||"").trim(),St=(d.anchor.userId>0&&xt[d.anchor.userId]||"").trim(),mr=`Want me to intro you to ${De}?`,Js=Pj(K,Ue,Ze,Ne,"working_on"),$n=`Want me to intro you to ${Ae}?`,Jo=Pj(O,ye,St,Ne,"click");w(Qo=>!Qo.anchor||!Qo.picked?Qo:{...Qo,email1Subject:mr,email1Body:Js,email2Subject:$n,email2Body:Jo})},[f,(Ge=d.anchor)==null?void 0:Ge.key,(pe=d.picked)==null?void 0:pe.key,d.note,l==null?void 0:l.fullName,Fe,_e,xt[((Zr=d.anchor)==null?void 0:Zr.userId)||0],xt[((pt=d.picked)==null?void 0:pt.userId)||0]]),m.useEffect(()=>{if(f!=="request"||!d.anchor||!d.picked)return;const O=ze(d.anchor),K=An(Je(d.picked),Te(d.picked)),ye=(l==null?void 0:l.fullName)||"Me",Ue=`Would you be open to introducing me to ${K}?`,Ae=`Hi ${O}, 2090 2091Hope you're doing well. I noticed you're connected to ${K} â I'd love an intro if you're open to it. 2092 2093I've drafted a short blurb below you can forward as-is, or edit however you like. Totally understand if the timing isn't right. 2094 2095Thanks either way. 2096 2097${ye}`,De=`Intro: ${ye} â ${K}`,Ze=(u&&xt[u]||"").trim()||Yy(l==null?void 0:l.fullName,l==null?void 0:l.email);w(St=>{if(!St.anchor||!St.picked)return St;const mr=St.email2Body.trim()&&!FH(St.email2Body,l==null?void 0:l.fullName,l==null?void 0:l.email);return{...St,email1Subject:Ue,email1Body:Ae,email2Subject:De,email2Body:mr?St.email2Body:Ze}})},[f,(Yo=d.anchor)==null?void 0:Yo.key,(hr=d.picked)==null?void 0:hr.key,l==null?void 0:l.fullName,l==null?void 0:l.email,u,Fe,_e,xt[u||0]]);const Re=O=>
2097{w(K=>{if(K.activeSide==="from"){const Ue=K.picked&&K.picked.key===O.key?null:K.picked;return{...K,anchor:O,picked:Ue,activeSide:Ue?"from":"to"}}const ye=K.anchor&&K.anchor.key===O.key?null:K.anchor;return{...K,picked:O,anchor:ye,activeSide:ye?"to":"from"}})},ke=(O,K,ye)=>{const Ue=he+1;fe(Ue);const Ae=WH(K,ye,Ue);me(De=>[Ae,...De]),w(De=>{const Ne={...De,activeSide:O};return O==="from"?(Ne.anchor=Ae,De.picked&&De.picked.key===Ae.key&&(Ne.picked=null),Ne.activeSide=Ne.picked?"from":"to"):(Ne.picked=Ae,De.anchor&&De.anchor.key===Ae.key&&(Ne.anchor=null),Ne.activeSide=Ne.anchor?"to":"from"),Ne})},Ye=O=>{w(K=>O==="from"?{...K,anchor:null,activeSide:"from"}:{...K,picked:null,activeSide:"to"}),x("")},yt=(O,K)=>i.jsxs("div",{className:"pn-selected-chip",children:[O.photo?i.jsx("img",{src:O.photo,alt:"",className:`av sm ${na(O.userId||0)} no-border`,style:{objectFit:"cover"}}):i.jsx("div",{className:`av sm ${na(O.userId||O.contactId||0)} no-border`,children:Hp(O.name)}),i.jsxs("div",{className:"pn-selected-info",children:[i.jsx("div",{className:"pn-selected-name",children:O.name}),O.role?i.jsx("div",{className:"pn-selected-role",children:O.role}):null]}),i.jsx("button",{type:"button",className:"pn-selected-x","aria-label":`Change â remove ${O.name}`,onClick:()=>Ye(K),children:"Ã"})]}),Te=O=>{if(!O)return null;const K=_e[O.key];return K&&K.trim()?K.trim():O.email||null},Je=O=>{if(!O)return"";const K=Fe[O.key];return K&&K.trim()?K.trim():(O.rawName??O.name).trim()},ze=O=>Gn(Je(O),Te(O)),Ct=O=>{const K=Je(O),ye=Te(O);return Nc(K,ye)?An(K,ye):"Add their name"},Ft=()=>{J||(w(qp),T([]),me([]),fe(0),Ce({}),Le({}),Oe({}),W(null),P(null),k("double"),x(""),E([]),D(null),ct("pick"),p(h?r:"make"),t())},dn=async()=>{if(!c||!u){W("Please sign in again to send an intro.");return}if(f==="request"){if(!d.anchor){W("Pick a connector to ask first.");return}if(!d.picked){W("Pick who you want to meet first.");return}if(!(d.anchor.isGem&&d.anchor.userId>0)){W("You can only request an intro through someone who's on Gemphere.");return}const Ae=d.picked.isGem&&d.picked.userId>0,De=Te(d.picked);if(!Ae&&!De){W(`${d.picked.name} doesn't have an email yet â add one in the warning above.`);return}if(!Ae&&!hh(Je(d.picked),De)){W(`Add a name for ${d.picked.name} above â intro emails never greet someone by their email address.`);return}F(!0),W(null);try{const Ne={fromUserID:u,connectorUserID:d.anchor.userId,note:d.email1Body.trim()||"I'd love an intro!"};Ae?Ne.toUserID=d.picked.userId:(Ne.toUserID=0,De&&(Ne.toEmail=De),Ne.toName=Je(d.picked)),d.email1Body.trim()&&(Ne.connectorMessage=d.email1Body.trim()),d.email2Body.trim()&&(Ne.blurb=d.email2Body.trim()),d.email1Subject.trim()&&(Ne.connectorSubject=d.email1Subject.trim()),d.email2Subject.trim()&&(Ne.blurbSubject=d.email2Subject.trim()),await U0(c,Ne);
2097const Ze=`Asked ${d.anchor.name} to intro you to ${d.picked.name}.`;P(Ze),setTimeout(()=>{Ft(),n==null||n(Ze)},900)}catch(Ne){W(Ne instanceof Error?Ne.message:"Network error")}finally{F(!1)}return}if(!d.anchor){W("Pick the 'from' person first.");return}if(!d.picked){W("Pick the 'to' person first.");return}const O=d.anchor.isGem&&d.anchor.userId>0,K=d.picked.isGem&&d.picked.userId>0,ye=Te(d.anchor),Ue=Te(d.picked);if(!O&&!ye){W(`${d.anchor.name} doesn't have an email yet â add one in the warning above to send the intro.`);return}if(!K&&!Ue){W(`${d.picked.name} doesn't have an email yet â add one in the warning above to send the intro.`);return}if(!O&&!hh(Je(d.anchor),ye)){W(`Add a name for ${d.anchor.name} above â intro emails never greet someone by their email address.`);return}if(!K&&!hh(Je(d.picked),Ue)){W(`Add a name for ${d.picked.name} above â intro emails never greet someone by their email address.`);return}F(!0),W(null);try{const Ae={fromUserID:O?d.anchor.userId:u,note:d.note.trim()||"I think you two should connect!"};O||(ye&&(Ae.fromEmail=ye),Ae.fromName=Je(d.anchor)),K?Ae.toUserID=d.picked.userId:(Ae.toUserID=0,Ue&&(Ae.toEmail=Ue),Ae.toName=Je(d.picked)),d.email1Body.trim()&&(Ae.connectorMessage=d.email1Body.trim()),d.email2Body.trim()&&(Ae.blurb=d.email2Body.trim()),d.email1Subject.trim()&&(Ae.connectorSubject=d.email1Subject.trim()),d.email2Subject.trim()&&(Ae.blurbSubject=d.email2Subject.trim()),Object.assign(Ae,x5(_,N??void 0)),await U0(c,Ae);const De=N==="from"?d.picked.name:d.anchor.name,Ne=_==="disabled"?`Connected ${d.anchor.name} and ${d.picked.name}.`:_==="single"?`Intro started between ${d.anchor.name} and ${d.picked.name} (single opt-in â waiting on ${De}).`:`Intro started between ${d.anchor.name} and ${d.picked.name}.`;P(Ne),setTimeout(()=>{Ft(),n==null||n(Ne)},900)}catch(Ae){W(Ae instanceof Error?Ae.message:"Network error")}finally{F(!1)}},qe=O=>{var De,Ne;const K=O==="from"?(De=d.anchor)==null?void 0:De.key:(Ne=d.picked)==null?void 0:Ne.key,Ue=!!(d.activeSide===O?v:"").trim(),Ae=f==="request"&&O==="from"?$.filter(Ze=>Ze.isGem&&Ze.userId>0):$;return i.jsx(Ej,{open:Ue,children:i.jsx("div",{className:"pn-list",children:y?i.jsx("div",{className:"pn-empty",children:"Loadingâ¦"}):b?i.jsx("div",{className:"pn-empty",style:{color:"#9a3a2a"},children:b}):Ae.length===0?i.jsx("div",{className:"pn-empty",children:f==="request"&&O==="from"?"No Gemphere connections match â you can only ask someone on Gemphere.":"No matches â try a different search."}):Ae.map(Ze=>{const St=K===Ze.key,mr=He[Ze.key],Js=c5((mr==null?void 0:mr.tier)??null,Ze.strengthLabel);return i.jsxs("div",{className:`pn-row${St?" selected":""}`,onClick:()=>{w($n=>({...$n,activeSide:O})),Re(Ze),x("")},children:[Ze.photo?i.jsx("img",{src:Ze.photo,alt:"",className:`av sm ${na(Ze.userId||0)} no-border`,style:{objectFit:"cover"}}):i.jsx("div",{className:`av sm ${na(Ze.userId||Ze.contactId||0)} no-border`,children:Hp(Ze.name)}),i.jsxs("div",{className:"pn-info",children:[i.jsx("div",{className:"pn-name",children:Ze.name}),(()=>{const{titleLine:$n,emailLine:Jo}=aj(Ze);return i.jsxs(i.Fragment,{children:[$n?i.jsx("div",{className:"pn-role",children:$n}):null,Jo?i.jsx("div",{className:"pn-email",children:Jo}):null]})})()]}),Js?i.jsx(gA,{tier:Js,size:"sm",style:{marginLeft:"auto",flexShrink:0}}):null]},Ze.key)})})})};if(!e)return null;const bt=!d.anchor||!d.picked||!(d.anchor.isGem&&d.anchor.userId>0)||!(d.picked.isGem&&d.picked.userId>0)&&!Te(d.picked),Zn=!!(d.picked&&!(d.picked.isGem&&d.picked.userId>0)&&!Te(d.picked)),U=f==="request"&&Ot==="compose"&&!!d.anchor&&!!d.picked;return i.jsx("div",{className:"modal-overlay open request-intro-portal",onClick:Ft,children:i.jsxs("div",{className:`modal req-modal req-modal--wide${U?"":" make-intro-modal"}`,onClick:O=>O.stopPropagation(),children:[i.jsxs("div",{className:"modal-head",children:[i.jsxs("div",{children:[f==="request"?i.jsxs("div",{className:"req-step-kicker",children:[i.jsx("span",{children:U?"Step 2 of 2 · What Gem sends":"Step 1 of 2 · Who to reach"}),i.jsx("span",{className:"req-step-kicker-note",children:"Double opt-in · Nothing sends yet"})]}):null,i.jsx("div",{className:"mod-title",children:f==="request"?U?`Request an intro to ${d.picked.name}
2097.`:d.anchor?`Request an intro via ${d.anchor.name}.`:"Request an intro.":"Make an intro"}),i.jsx("div",{className:"mod-sub",children:f==="request"?U?"":"Ask someone in your network to introduce you to a person you want to meet.":d.anchor?`Connect ${d.anchor.name} with someone in your network â we draft and track it.`:"Connect two people in your network â we draft and track it."})]}),i.jsx("button",{className:"mod-close",onClick:Ft,"aria-label":"Close",children:"Ã"})]}),f==="request"?i.jsxs(Tj,{children:[i.jsx(ta,{name:(l==null?void 0:l.fullName)||"You",photo:X,role:ne,company:je,badge:"you",badgeLabel:"Asker",avatarTone:"green",compactName:!1}),i.jsx(Dd,{}),i.jsx(ta,{name:((I=d.anchor)==null?void 0:I.name)||"Pick connector",photo:(oe=d.anchor)==null?void 0:oe.photo,role:ti(d.anchor,Ns).title,company:ti(d.anchor,Ns).company,badge:"connector",badgeLabel:"Connector",avatarTone:"green",compactName:!1,placeholder:!d.anchor}),i.jsx(Dd,{}),i.jsx(ta,{name:((ge=d.picked)==null?void 0:ge.name)||"Pick target",photo:(re=d.picked)==null?void 0:re.photo,role:ti(d.picked,Ns).title,company:ti(d.picked,Ns).company,badge:"target",badgeLabel:"Target",avatarTone:"green",compactName:!1,placeholder:!d.picked})]}):i.jsxs(Tj,{children:[i.jsx(ta,{name:(($e=d.anchor)==null?void 0:$e.name)||"Person A",photo:(nt=d.anchor)==null?void 0:nt.photo,role:ti(d.anchor,Ns).title,company:ti(d.anchor,Ns).company,badge:"target",badgeLabel:"Person A",avatarTone:"green",compactName:!1,placeholder:!d.anchor,tier:d.anchor?((Ee=He[d.anchor.key])==null?void 0:Ee.tier)??null:null}),i.jsx(Dd,{}),i.jsx(ta,{name:(l==null?void 0:l.fullName)||"You",photo:X,role:ne,company:je,badge:"you",badgeLabel:"Connector",avatarTone:"green",compactName:!1}),i.jsx(Dd,{}),i.jsx(ta,{name:((qt=d.picked)==null?void 0:qt.name)||"Person B",photo:(mn=d.picked)==null?void 0:mn.photo,role:ti(d.picked,Ns).title,company:ti(d.picked,Ns).company,badge:"target",badgeLabel:"Person B",avatarTone:"green",compactName:!1,placeholder:!d.picked,tier:d.picked?((Zt=He[d.picked.key])==null?void 0:Zt.tier)??null:null})]}),U?i.jsxs("div",{className:"req-body",children:[Ed(d.picked,Te(d.picked))&&i.jsx(Ld,{personEmail:Te(d.picked),value:Fe[d.picked.key]||"",onChange:O=>Le(K=>({...K,[d.picked.key]:O}))}),i.jsxs("div",{className:"req-sec-lbl",children:["What Gem sends",i.jsxs("span",{className:"req-sec-note",children:["Two emails. The second only exists if"," ",ze(d.anchor)," says yes."]})]}),i.jsx(VH,{connectorName:Je(d.anchor),connectorEmail:Te(d.anchor),...Te(d.anchor)?{}:{onConnectorEmailChange:O=>Ce(K=>({...K,[d.anchor.key]:O}))},askerName:(l==null?void 0:l.fullName)||"Me",askerEmail:l==null?void 0:l.email,targetName:Je(d.picked),targetEmail:Te(d.picked),...Te(d.picked)?{}:{onTargetEmailChange:O=>Ce(K=>({...K,[d.picked.key]:O}))},blurb:d.email2Body,meta:`${l!=null&&l.email?" - copy sent to you":""}`,onBlurbChange:O=>w(K=>({...K,email2Body:O})),layout:"split",disabled:J}),Y&&i.jsx("div",{className:"info-banner",style:{background:"#fdecea",borderColor:"#f3c3bb",color:"#9a3a2a",marginBottom:0,marginTop:12},children:Y}),H&&i.jsx("div",{className:"info-banner",style:{background:"#E1F5EE",borderColor:"#9FE1CB",color:"#0F6E56",marginBottom:0,marginTop:12},children:H})]}):i.jsx("div",{className:"modal-body",children:f==="request"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"fld-row",children:[i.jsxs("label",{className:"fld-lbl",children:["Through which connector? ",i.jsx("span",{style:{color:"#aaa",fontWeight:500},children:"· a mutual on Gemphere"})]}),i.jsx("div",{className:"pn-picker",children:d.anchor?yt(d.anchor,"from"):i.jsxs(i.Fragment,{children:[i.jsx($d,{value:d.activeSide==="from"?v:"",onFocus:()=>w(O=>({...O,activeSide:"from"})),onChange:O=>{w(K=>({...K,activeSide:"from"})),x(O)}}),b&&!v.trim()?i.jsx("div",{className:"pn-inline-error",children:b}):null,qe("from")]})})]}),i.jsxs("div",{className:"fld-row",children:[i.jsxs("label",{className:"fld-lbl",children:["Who do you want to meet?"," ",i.jsx("span",{style:{color:"#aaa",fontWeight:500},children:d.anchor?`· someone ${ze(d.anchor)} knows`:"· pick a connector first"})]}),i.jsx("div",{className:"pn-picker",children:d.anchor?d.picked?yt(d.picked,"to"):i.jsxs(i.Fragment,{children:[i.jsx($d,{value:v,onFocus:()=>w(O=>({...O,activeSide:"to"})),onChange:O=>{w(K=>({...K,activeSide:"to"})),x(O)},placeholder:`Search ${ze(d.anchor)}'s network`}),i.jsx(Ej,{open:!0,children:i.jsx("div",{className:"pn-list",children:A?i.jsx("div",{className:"pn-empty",children:"Loading their networkâ¦"}):V?i.jsx("div",{className:"pn-empty",style:{color:"#9a3a2a"},children:V}):xe.length===0?i.jsx("div",{className:"pn-empty",children:v.trim()?"No one in their network matches that search.":`We c
2097ouldn't find anyone in ${ze(d.anchor)}'s network yet.`}):xe.map(O=>i.jsxs("div",{className:"pn-row",onClick:()=>{w(K=>({...K,picked:O,activeSide:"to"})),x("")},children:[O.photo?i.jsx("img",{src:O.photo,alt:"",className:`av sm ${na(O.userId||0)} no-border`,style:{objectFit:"cover"}}):i.jsx("div",{className:`av sm ${na(O.userId||O.contactId||0)} no-border`,children:Hp(O.name)}),i.jsxs("div",{className:"pn-info",children:[i.jsx("div",{className:"pn-name",children:O.name}),(()=>{const{titleLine:K,emailLine:ye}=aj(O);return i.jsxs(i.Fragment,{children:[K?i.jsx("div",{className:"pn-role",children:K}):null,ye?i.jsx("div",{className:"pn-email",children:ye}):null]})})()]})]},O.key))})})]}):i.jsx("div",{className:"pn-inline-error",style:{color:"#9a8f80"},children:"Choose a connector above, then pick who you want them to introduce you to."})})]}),d.picked&&Ed(d.picked,Te(d.picked))&&i.jsx(Ld,{personEmail:Te(d.picked),value:Fe[d.picked.key]||"",onChange:O=>Le(K=>({...K,[d.picked.key]:O}))}),d.picked&&!(d.picked.isGem&&d.picked.userId>0)&&!d.picked.email&&i.jsx(Wp,{personName:d.picked.name,value:_e[d.picked.key]||"",onChange:O=>Ce(K=>({...K,[d.picked.key]:O}))}),Y&&i.jsx("div",{className:"info-banner",style:{background:"#fdecea",borderColor:"#f3c3bb",color:"#9a3a2a",marginBottom:0,marginTop:12},children:Y}),H&&i.jsx("div",{className:"info-banner",style:{background:"#E1F5EE",borderColor:"#9FE1CB",color:"#0F6E56",marginBottom:0,marginTop:12},children:H})]}
2097):i.jsxs(i.Fragment,{children:[d.anchor&&d.picked&&((fr=He[d.anchor.key])==null?void 0:fr.tier)&&((Cr=He[d.picked.key])==null?void 0:Cr.tier)&&(()=>{const O=He[d.anchor.key].tier,K=He[d.picked.key].tier;return(O==="very_strong"||O==="strong")&&(K==="very_strong"||K==="strong")?i.jsxs("div",{style:{marginTop:8,fontSize:11.5,color:"#0F6E56",background:"#E1F5EE",border:"1px solid #9FE1CB",borderRadius:8,padding:"6px 10px"},children:["You're ",qh(O)," with ",ze(d.anchor)," and"," ",qh(K)," with ",ze(d.picked)," â you're a great person to make this intro."]}):null})(),!s&&i.jsxs("div",{className:"fld-row",children:[i.jsxs("label",{className:"fld-lbl",children:["Person A ",i.jsx("span",{style:{color:"#aaa",fontWeight:500},children:"· who you're introducing"})]}),i.jsx("div",{className:"pn-picker",children:d.anchor?yt(d.anchor,"from"):i.jsxs(i.Fragment,{children:[i.jsx($d,{value:d.activeSide==="from"?v:"",onFocus:()=>w(O=>({...O,activeSide:"from"})),onChange:O=>{w(K=>({...K,activeSide:"from"})),x(O)},onAdd:({name:O,email:K})=>ke("from",O,K)}),b&&!v.trim()?i.jsx("div",{className:"pn-inline-error",children:b}):null,qe("from")]})})]}),!o&&i.jsxs("div",{className:"fld-row",children:[i.jsx("label",{className:"fld-lbl",children:d.anchor?i.jsxs(i.Fragment,{children:["Intro ",i.jsx("strong",{children:d.anchor.name})," to"]}):i.jsxs(i.Fragment,{children:["Person B ",i.jsx("span",{style:{color:"#aaa",fontWeight:500},children:"· who they should meet"})]})}),i.jsx("div",{className:"pn-picker",children:d.picked?yt(d.picked,"to"):i.jsxs(i.Fragment,{children:[i.jsx($d,{value:d.activeSide==="to"?v:"",onFocus:()=>w(O=>({...O,activeSide:"to"})),onChange:O=>{w(K=>({...K,activeSide:"to"})),x(O)},onAdd:({name:O,email:K})=>ke("to",O,K)}),b&&!v.trim()?i.jsx("div",{className:"pn-inline-error",children:b}):null,qe("to")]})})]}),d.anchor&&Ed(d.anchor,Te(d.anchor))&&i.jsx(Ld,{personEmail:Te(d.anchor),value:Fe[d.anchor.key]||"",onChange:O=>Le(K=>({...K,[d.anchor.key]:O}))}),d.picked&&Ed(d.picked,Te(d.picked))&&i.jsx(Ld,{personEmail:Te(d.picked),value:Fe[d.picked.key]||"",onChange:O=>Le(K=>({...K,[d.picked.key]:O}))}),d.anchor&&!(d.anchor.isGem&&d.anchor.userId>0)&&!d.anchor.email&&i.jsx(Wp,{personName:d.anchor.name,value:_e[d.anchor.key]||"",onChange:O=>Ce(K=>({...K,[d.anchor.key]:O}))}),d.picked&&!(d.picked.isGem&&d.picked.userId>0)&&!d.picked.email&&i.jsx(Wp,{personName:d.picked.name,value:_e[d.picked.key]||"",onChange:O=>Ce(K=>({...K,[d.picked.key]:O}))}),i.jsxs("div",{className:"fld-row",children:[i.jsxs("label",{className:"fld-lbl",children:["Why this intro? ",i.jsx("span",{style:{color:"#aaa",fontWeight:500},children:"(optional)"})]}),i.jsx("input",{className:"fld-input",type:"text",placeholder:"Context helps Gemphere draft the blurb",value:d.note,onChange:O=>w(K=>({...K,note:O.target.value}))})]}),i.jsx(kH,{mode:_,onChange:k,disabled:J}),d.anchor&&d.picked&&i.jsxs(i.Fragment,{children:[i.jsx(PH,{parties:[{key:"from",name:ze(d.anchor),role:"Person A",isApprover:_==="single"&&N==="to"},{key:"connector",name:(l==null?void 0:l.fullName)||"You",role:"Connector"},{key:"to",name:ze(d.picked),role:"Person B",isApprover:_==="single"&&N==="from"}],singleOptInFirstParty:_==="single"?N:null,onSelectFirstParty:_==="single"?B:void 0,makerName:(l==null?void 0:l.fullName)||"You",fromName:Je(d.anchor),toName:Je(d.picked)}),i.jsx("div",{className:"req-sec-lbl",children:"Preview - what we send"}),_==="single"?(()=>{const O=N==="from"?d.picked:d.anchor,K=N==="from"?d.email2Body:d.email1Body,ye=N==="from"?d.anchor:d.picked;return i.jsx(Gp,{title:`Email to ${Ct(O)}`,meta:"Cc'd to all parties",recipientName:Je(O),recipientEmail:Te(O),otherName:Je(ye),otherEmail:Te(ye),connectorName:(l==null?void 0:l.fullName)||"Me",blurb:K,onBlurbChange:Ue=>w(Ae=>N==="from"?{...Ae,email2Body:Ue}:{...Ae,email1Body:Ue})})})():i.jsxs("div",{className:"req-email--split",children:[i.jsx(Gp,{title:`1 - Email to ${Ct(d.anchor)}`,meta:l!=null&&l.email?"Cc'd to you":void 0,recipientName:Je(d.anchor),recipientEmail:Te(d.anchor),otherName:Je(d.picked),otherEmail:Te(d.picked),connectorName:(l==null?void 0:l.fullName)||"Me",blurb:d.email1Body,onBlurbChange:O=>w(K=>({...K,email1Body:O}))}),i.jsx(Gp,{title:`2 - Email to ${Ct(d.picked)}`,meta:l!=null&&l.email?"Cc'd to you":void 0,recipientName:Je(d.picked),recipientEmail:Te(d.picked),otherName:Je(d.anchor),otherEmail:Te(d.anchor),
2097connectorName:(l==null?void 0:l.fullName)||"Me",blurb:d.email2Body,onBlurbChange:O=>w(K=>({...K,email2Body:O}))})]}),i.jsxs("div",{className:"req-email",style:{background:"#f0f8f3",borderColor:"#c8e4d4"},children:[i.jsxs("div",{className:"req-email-head",children:[i.jsxs("div",{children:[i.jsx("strong",{children:"3 · Connecting email"})," â auto-sends once both opt in"]}),i.jsx("span",{children:"We handle this"})]}),i.jsxs("div",{style:{background:"#fff",padding:"12px 14px",fontSize:12.5,lineHeight:1.6,borderRadius:7,color:"#2a2a2a",margin:12},children:[i.jsxs("div",{style:{fontSize:11.5,color:"#6b6558",marginBottom:8},children:["Subject: ",ze(d.anchor)," â ",ze(d.picked)," (intro from ",Gn((l==null?void 0:l.fullName)||"Me"),")"]}),i.jsxs("div",{style:{marginBottom:8},children:["Hi ",ze(d.anchor)," and ",ze(d.picked),","]}),i.jsx("div",{style:{marginBottom:8},children:"Excited to finally connect you both."}),i.jsx("div",{style:{marginBottom:8},children:"You've both already got the context â I'll let you take it from here."}),i.jsxs("div",{style:{marginBottom:8},children:["Thank you for the intro, ",Gn((l==null?void 0:l.fullName)||"Me"),"."]}),i.jsx("div",{style:{marginBottom:12},children:"Looking forward to hearing how it goes."}),i.jsx("div",{children:"Best,"}),i.jsx("div",{style:{fontWeight:600},children:"Gem"}),i.jsxs("div",{style:{fontSize:11.5,color:"#9a8a70"},children:["Ecosystem analyst to ",(l==null?void 0:l.fullName)||Gn((l==null?void 0:l.fullName)||"Me")]})]})]})]}),Y&&i.jsx("div",{className:"info-banner",style:{background:"#fdecea",borderColor:"#f3c3bb",color:"#9a3a2a",marginBottom:0,marginTop:12},children:Y}),H&&i.jsx("div",{className:"info-banner",style:{background:"#E1F5EE",borderColor:"#9FE1CB",color:"#0F6E56",marginBottom:0,marginTop:12},children:H})]})}),U?i.jsxs("div",{className:"modal-foot req-modal-foot--steps",children:[i.jsx("button",{className:"btn-foot primary",onClick:dn,disabled:J||bt,children:J?"Sendingâ¦":`Send to ${ze(d.anchor)}`}),i.jsx("button",{type:"button",className:"btn-foot req-foot-back",onClick:()=>ct("pick"),disabled:J,children:"â Back"}),i.jsxs("span",{className:"req-foot-note",children:[d.picked.name," hears nothing until"," ",ze(d.anchor)," accepts."]}),i.jsx("button",{className:"btn-foot req-foot-cancel",onClick:Ft,disabled:J,children:"Cancel"})]}):f==="request"?i.jsxs("div",{className:"modal-foot req-modal-foot--steps",children:[i.jsx("button",{type:"button",className:"btn-foot primary",onClick:()=>ct("compose"),disabled:J||bt,children:Zn?"Add their email first":"Draft the emails â"}),i.jsx("span",{className:"req-foot-note",children:"Nothing sends yet â you will see both emails first."}),i.jsx("button",{className:"btn-foot req-foot-cancel",onClick:Ft,disabled:J,children:"Cancel"})]}):i.jsx("div",{className:"modal-foot",children:i.jsxs("div",{style:{display:"flex",gap:8,width:"100%"},children:[i.jsx("button",{className:"btn-foot",onClick:Ft,disabled:J,children:"Cancel"}),i.jsx("button",{className:"btn-foot primary",onClick:dn,disabled:J||!d.picked||!d.anchor||!(d.anchor.isGem&&d.anchor.userId>0)&&!Te(d.anchor)||!(d.picked.isGem&&d.picked.userId>0)&&!Te(d.picked),children:J?"Sendingâ¦":d.anchor&&!(d.anchor.isGem&&d.anchor.userId>0)&&!Te(d.anchor)||d.picked&&!(d.picked.isGem&&d.picked.userId>0)&&!Te(d.picked)?"Add their email first":_==="disabled"?"Connect now â":"Send intro â"})]})})]})})}function qH({open:e,onClose:t,onPick:n}){return m.useEffect(()=>{if(!e)return;const r=o=>{o.key==="Escape"&&t()};window.addEventListener("keydown",r);const s=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",r),document.body.style.overflow=s}},[e,t]),i.jsx("div",{className:`gp-intro-start-scrim${e?" open":""}`,onClick:r=>{r.target===r.currentTarget&&t()},role:"presentation",children:i.jsxs("div",{className:"gp-intro-start-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"gp-intro-start-title",children:[i.jsxs("div",{className:"gp-intro-start-head",children:[i.jsxs("div",{children:[i.jsx("h2",{id:"gp-intro-start-title",children:"Start an intro"}),i.jsx("p",{children:"Two ways to do it. Pick the one that sounds like you."})]}),i.jsx("button",{type:"button",className:"gp-intro-start-x","aria-label":"Close",onClick:t,children:"â"})]}),i.jsxs("button",{type:"button",className:"gp-intro-start-opt",onClick:()=>n("make"),children:[i.jsxs("span",{className:"gp-intro-start-mini",children:[i.jsx("i",{}),i.jsx("s",{children:"â"}),i.jsx("i",{className:"me"}),i.jsx("s",{children:"â"}),i.jsx("i",{})]}),i.jsxs("span",{className:"gp-intro-start-opt-t",children:[i.jsx("span",{className:"gp-intro-start-opt-n",children:"Make an intro"}),i.jsx("span",{className:"gp-intro-start-opt-d",children:"You know two people who should meet, and you're the one in the middle. Pick both sides, and Gem drafts the emails and asks each of them before anything sends."})]}),i.jsx("span",{className:"gp-intro-start-opt-go",children:"â"})]}),i.jsxs("button",{type:"button",className:"gp-intro-start-opt",onClick:()=>n("request"),children:[i.jsxs("span",{className:"gp-intro-start-mini",children:[i.jsx("i",{className:"me"}),i.jsx("s",{children:"â"}),i.jsx("i",{}),i.jsx("s",{children:"â"}),i.jsx("i",{className:"them"})]}),i.jsxs("span",{className:"gp-intro-start-opt-t",children:[i.jsx("span",{className:"gp-intro-start-opt-n",children:"Request an intro"}),i.jsx("span",{className:"gp-intro-start-opt-d",children:"You want to meet someone you don't know yet. Pick a connector from your network, then someone they know â Gem asks them to forward your blurb, and n
2097othing goes out until they say yes."})]}),i.jsx("span",{className:"gp-intro-start-opt-go",children:"â"})]})]})})}const KH=900;function Kp(){return typeof window<"u"&&window.innerWidth<=KH}function YH(e){return e===1?"Founder":e===2?"Investor":e===3?"Scout":""}function Aj(e){const t=(e||"").replace(/\s+/g," ").trim().split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():(e||"?").slice(0,2).toUpperCase()||"?"}const JH={"/home":"Home","/gem-ai":"Gem AI","/warm-intros":"Intros","/accounts":"Target accounts","/my-network":"My network","/team":"Team","/settings":"Manage account","/pricing":"Plans","/search":"Search"};function QH(e,t){if(e.startsWith("/settings")){const n=new URLSearchParams(t).get("tab");return n==="plans"||n==="st-plans"?"Plans":n==="profile"||n==="st-profile"?"Profile":"Manage account"}return e.startsWith("/accounts")?"Target accounts":e.startsWith("/warm-intros")?"Intros":e.startsWith("/my-network")?new URLSearchParams(t).get("tab")==="add"?"Add people":"My network":e.startsWith("/team")?"Team":e.startsWith("/gem-ai")?"Gem AI":JH[e]||"Gemphere"}function XH(e=new Date){return e.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"})}function js({children:e}){const{user:t,logout:n,isAdmin:r}=Ht(),s=KE(),{needsUpgrade:o}=ND(),{openProfile:a}=YI(),l=Nr(),c=un(),[u,h]=m.useState(null),[f,p]=m.useState(null),[d,w]=m.useState(!1),[v,x]=m.useState(!1),[y,g]=m.useState(!1),[b,S]=m.useState("make"),[j,T]=m.useState(!1),[C,E]=m.useState(""),[A,R]=m.useState([]),[V,D]=m.useState(!1),[J,F]=m.useState(!1),Y=m.useRef(null),W=m.useRef(null);m.useCallback(()=>{Kp()&&w(q=>!q)},[]),m.useEffect(()=>{s.tierReady&&(l.pathname.startsWith("/accounts")&&!s.canSeeAccounts?(c0.message("Upgrade to access Accounts."),c("/home",{replace:!0})):l.pathname.startsWith("/team")&&!s.canSeeTeam&&(c0.message("Upgrade to access Team."),c("/home",{replace:!0})))},[l.pathname,s.tierReady,s.canSeeAccounts,s.canSeeTeam,c]),m.useEffect(()=>{if(!(t!=null&&t.accessToken))return;let q=!1;const ie=()=>{q||(async()=>{const he=yH("/api/gemphere/warm-intro/made",t.accessToken).then(async ae=>{if(!ae.ok)return;const Se=await ae.json(),_e=Array.isArray(Se)?Se:(Se==null?void 0:Se.data)??[];q||h(_e.length)}).catch(()=>{}),fe=t.userId?U5(t.accessToken,t.userId).then(ae=>{q||p(ae)}).catch(()=>{}):Promise.resolve();await Promise.all([he,fe])})()},me=window.setTimeout(ie,0);return()=>{q=!0,window.clearTimeout(me)}},[t==null?void 0:t.accessToken,t==null?void 0:t.userId]),m.useEffect(()=>{const q=me=>{Y.current&&!Y.current.contains(me.target)&&T(!1)},ie=me=>{me.key==="Escape"&&T(!1)};return document.addEventListener("click",q),document.addEventListener("keydown",ie),()=>{document.removeEventListener("click",q),document.removeEventListener("keydown",ie)}},[]),m.useEffect(()=>{w(!1),T(!1),F(!1)},[l.pathname,l.search]),m.useEffect(()=>{l.pathname==="/search"&&E(new URLSearchParams(l.search).get("q")??"")},[l.pathname,l.search]),m.useEffect(()=>{const q=C.trim();if(q.length<2||!(t!=null&&t.accessToken)){R([]),D(!1);return}let ie=!1;D(!0);const me=window.setTimeout(()=>{S5(t.accessToken,q).then(he=>{ie||R(he.slice(0,8))}).catch(()=>{ie||R([])}).finally(()=>{ie||D(!1)})},300);return()=>{ie=!0,window.clearTimeout(me)}},[C,t==null?void 0:t.accessToken]),m.useEffect(()=>(d&&Kp()?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[d]),m.useEffect(()=>{var q;if(J)return document.body.style.overflow="hidden",(q=W.current)==null||q.focus(),()=>{document.body.style.overflow=""}},[J]);const H=()=>{n(),c("/")},_=[{label:"Daily",items:[{label:"Home",href:"/home",icon:n0},{label:"Intros",href:"/warm-intros",icon:Gg,count:u}]},{label:"Network",items:[{label:"Network",href:"/my-network",icon:r0,count:f},{label:"Accounts",href:"/accounts",icon:Fh,gate:"accounts",upgradeTag:!0}]},{label:"Account",items:[{label:"Team",href:"/team",icon:OC,gate:"team",upgradeTag:!0},{label:"Manage account",href:"/settings?tab=st-profile",icon:i0}]}].map(q=>({...q,items:q.items.filter(ie=>ie.gate==="accounts"?s.canSeeAccounts:ie.gate==="team"?s.canSeeTeam:ie.gate==="upgrade"?s.isFreeSolo:!0)})).filter(q=>q.items.length>
20970),k=r?[{label:"Weekly digest",href:"/admin/weekly-digest",icon:fO,newTag:!0},{label:"Admin CRM",href:"/admin/crm",icon:yO}]:[],N=(t==null?void 0:t.fullName)||"You",B=s.isProPlan?"Pro":s.isFreePlan?"Free":"Enterprise";s.isInvestorFirm||s.isEnterprise||s.isTeamMember||s.isConnector;const L=l.pathname,z=l.pathname==="/gem-ai",ee=q=>{const[ie,me]=q.href.split("?"),he=l.pathname===ie;let fe=he;if(he&&ie==="/settings")fe=!0;else if(he&&me){const Se=new URLSearchParams(me).get("tab"),_e=new URLSearchParams(l.search).get("tab");fe=Se===_e}const ae=q.icon;return i.jsxs(Fr,{to:q.href,className:`nav-item ${fe?"active":""}`,title:q.label,onClick:()=>{Kp()&&w(!1)},children:[i.jsx("span",{className:"icon","aria-hidden":!0,children:i.jsx(ae,{size:18,strokeWidth:1.5})}),i.jsx("span",{className:"nav-label",children:q.label}),q.count!=null&&i.jsx("span",{className:"count",children:typeof q.count=="number"?q.count.toLocaleString("en-US"):q.count}),q.newTag&&i.jsx("span",{className:"new-tag",children:"NEW"}),o&&q.upgradeTag?i.jsx(gH,{}):null]},q.href)},X=[{label:"Home",href:"/home",icon:n0,isActive:l.pathname==="/home"},{label:"Network",href:"/my-network",icon:r0,isActive:l.pathname==="/my-network"},{label:"Accounts",href:"/accounts",icon:Fh,isActive:l.pathname.startsWith("/accounts")},{label:"Intros",href:"/warm-intros",icon:Gg,isActive:l.pathname.startsWith("/warm-intros"),badge:u!=null&&u>0},{label:"Profile",href:"/settings?tab=st-profile",icon:i0,isActive:l.pathname==="/profile"||l.pathname==="/settings"&&new URLSearchParams(l.search).get("tab")==="st-profile"}],G=l.pathname.startsWith("/accounts")||l.pathname.startsWith("/team"),ne=l.pathname==="/home";QH(l.pathname,l.search);const te=XH(),je=["gp-app","gp-app--topnav","gp-app--sidebar-fixed",G?"gp-theme-target":"","sidebar-pinned",d?"sidebar-mobile-open":"",z?"gp-app--full-page":""].filter(Boolean).join(" ");return i.jsxs("div",{className:je,children:[i.jsx("div",{className:"sidebar-backdrop",onClick:()=>w(!1),"aria-hidden":"true"}),i.jsxs("aside",{className:"sidebar","aria-expanded":!0,children:[i.jsx("div",{className:"sidebar-top",children:i.jsxs("div",{className:"logo-wrap",title:"Gemphere",children:[i.jsx("img",{src:vH,alt:"",className:"logo-img",draggable:!1}),i.jsx("div",{className:"logo-txt",children:"Gemphere"})]})}),i.jsxs("div",{className:"sidebar-main",children:[_.map(q=>i.jsxs("div",{className:"sidebar-group",children:[i.jsx("div",{className:"sidebar-group-label",children:q.label}),i.jsx("nav",{className:"sidebar-nav","aria-label":q.label,children:q.items.map(ee)})]},q.label)),k.length>0&&i.jsxs("div",{className:"sidebar-admin",children:[i.jsx("div",{className:"sidebar-group-label sidebar-admin-label",children:"Admin"}),i.jsx("nav",{className:"sidebar-admin-nav","aria-label":"Admin",children:k.map(ee)})]})]}),i.jsx("div",{className:"sidebar-bottom",children:i.jsxs("div",{className:`user-block${j?" open":""}`,ref:Y,children:[i.jsxs("button",{type:"button",className:"user-block-trigger",title:N,"aria-haspopup":"menu","aria-expanded":j,onClick:q=>{q.stopPropagation(),T(ie=>!ie)},children:[i.jsx("div",{className:"user-block-av",children:Aj(N)}),i.jsxs("div",{className:"user-block-info",children:[i.jsx("div",{className:"user-block-name",children:N}),i.jsx("div",{className:"user-block-role",children:B})]}),i.jsx("span",{className:"user-block-caret",children:i.jsx(uO,{size:14,strokeWidth:2})})]}),j?i.jsxs("div",{className:"user-menu",role:"menu",children:[i.jsxs(Fr,{to:"/settings?tab=st-profile",className:"user-menu-item",role:"menuitem",onClick:()=>T(!1),children:[i.jsx(gO,{size:14,strokeWidth:1.75}),"Manage account"]}),i.jsxs("button",{type:"button",className:"user-menu-item danger",role:"menuitem",onClick:()=>{T(!1),H()},children:[i.jsx(RC,{size:14,strokeWidth:1.75}),"Sign out"]})]}):null]})})]}),i.jsxs("div",{className:"gp-app-content",children:[i.jsxs("header",{className:`mobile-shell-bar${z?" mobile-shell-bar--gem":""}`,children:[i.jsx("div",{className:"mobile-shell-bar-spacer","aria-hidden":!0}),i.jsxs("div",{className:"mobile-shell-brand",children:[i.jsx("img",{src:kn,alt:"",className:"mobile-shell-mark",draggable:!1}),i.jsx("span",{className:"mobile-shell-title",children:"Gemphere"})]}),i.jsx("button",{type:"button",className:"mobile-shell-icon-btn","aria-label":"Search",onClick:()=>F(!0),children:i.jsx(s0,{size:21,strokeWidth:1.75})})]}),J?i.jsxs("div",{className:"mobile-search-overlay",role:"dialog","aria-modal":"true",children:[i.jsxs("div",{className:"mobile-search-overlay-bar",children:[i.jsx(s0,{size:18,strokeWidth:1.75,className:"mobile-search-overlay-ico","aria-hidden":!0}),i.jsx("input",{ref:W,type:"text",value:C,onChange:q=>E(q.target.value),onKeyDown:q=>
2097{if(q.key==="Enter"){const ie=C.trim();c(ie?`/search?q=${encodeURIComponent(ie)}`:"/search"),F(!1)}},placeholder:"Search Gemphere","aria-label":"Search Gemphere",autoComplete:"off"}),i.jsx("button",{type:"button",className:"mobile-search-overlay-cancel",onClick:()=>{F(!1),E("")},children:"Cancel"})]}),i.jsx("div",{className:"mobile-search-overlay-results",children:C.trim().length<2?i.jsx("div",{className:"mobile-search-overlay-empty",children:"Search for founders, investors, and scouts on Gemphere."}):V&&A.length===0?i.jsx("div",{className:"mobile-search-overlay-empty",children:"Searchingâ¦"}):A.length===0?i.jsx("div",{className:"mobile-search-overlay-empty",children:"No results"}):i.jsxs(i.Fragment,{children:[A.map(q=>{const ie=YH(q.role),me=q.title&&q.title.trim().toLowerCase()!==ie.toLowerCase()?q.title:null,he=[ie,me,q.companyName||q.fundName].filter(Boolean).join(" · ");return i.jsxs("button",{type:"button",className:"mobile-search-overlay-row",onClick:()=>{a(q.userId,{name:q.fullname,photo:q.photo,role:q.role}),F(!1),E("")},children:[i.jsx("span",{className:"mobile-search-overlay-av",children:q.photo?i.jsx("img",{src:q.photo,alt:""}):Aj(q.fullname)}),i.jsxs("span",{className:"mobile-search-overlay-info",children:[i.jsx("span",{className:"mobile-search-overlay-name",children:q.fullname}),he?i.jsx("span",{className:"mobile-search-overlay-sub",children:he}):null]})]},q.userId)}),i.jsxs("button",{type:"button",className:"mobile-search-overlay-seeall",onClick:()=>{const q=C.trim();c(q?`/search?q=${encodeURIComponent(q)}`:"/search"),F(!1)},children:["See all results for â",C.trim(),"â"]})]})})]}):null,ne?i.jsx("div",{className:`gp-topchrome${ne?" gp-topchrome--home":""}`,children:i.jsx("div",{className:"gp-topchrome-inner",children:i.jsx("div",{className:"gp-topchrome-row",children:i.jsxs("div",{className:"gp-topchrome-actions",children:[i.jsx("div",{className:"gp-topchrome-date",children:te}),i.jsxs("button",{type:"button",className:"make-intro-btn gp-topchrome-make-intro-btn",onClick:()=>g(!0),title:"Start an intro","aria-haspopup":"dialog",children:[i.jsx(_C,{size:14,strokeWidth:1.75}),"Intro++"]})]})})})}):null,i.jsx("div",{className:`main ${z?"full-width":""}`,children:i.jsx(rH,{routeKey:L,children:e})}),i.jsx("nav",{className:"mobile-bottom-nav","aria-label":"Primary navigation",children:X.map(q=>{const ie=q.icon;return i.jsxs(Fr,{to:q.href,className:`mobile-bottom-nav-item${q.isActive?" active":""}`,"aria-current":q.isActive?"page":void 0,children:[i.jsxs("span",{className:"mobile-bottom-nav-icon",children:[i.jsx(ie,{size:21,strokeWidth:q.isActive?2.25:1.75}),q.badge?i.jsx("span",{className:"mobile-bottom-nav-badge",children:"NEW"}):null]}),i.jsx("span",{className:"mobile-bottom-nav-label",children:q.label})]},q.href)})})]}),i.jsx(qH,{open:y,onClose:()=>g(!1),onPick:q=>{g(!1),S(q),x(!0)}}),i.jsx(HH,{open:v,initialMode:b,onClose:()=>x(!1)})]})}class ZH extends m.Component{constructor(){super(...arguments);st(this,"state",{error:null});st(this,"handleRetry",()=>{this.setState({error:null})});st(this,"handleReload",()=>{window.location.reload()})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){console.error("[ErrorBoundary]",n,r.componentStack)}render(){return this.state.error?i.jsx("div",{className:"gp-page-loading-screen",children:i.jsxs("div",{className:"gp-page-loading gp-page-loading--page",children:[i.jsx("p",{className:"gp-page-loading__msg",children:"Something went wrong loading this page."}),i.jsxs("div",{style:{display:"flex",gap:12,marginTop:16,justifyContent:"center",flexWrap:"wrap"},children:[i.jsx("button",{type:"button",onClick:this.handleRetry,style:{padding:"10px 20px",borderRadius:999,border:"1px solid #221F18",background:"transparent",color:"#221F18",fontWeight:600,cursor:"pointer"},children:"Try again"}),i.jsx("button",{type:"button",onClick:this.handleReload,style:{padding:"10px 20px",borderRadius:999,border:"none",background:"#221F18",color:"#F7F1E5",fontWeight:600,cursor:"pointer"},children:"Reload page"})]})]})}):this.props.children}}function eq({children:e}){const t=Nr();return i.jsx(ZH,{children:e},t.pathname)}const tq={messages:[],warmResults:[],coldResults:[],agentSessionId:null,hasSearched:!1,input:""},jA=m.createContext(null);function nq({children:e}){const t=m.useRef({...tq});return i.jsx(jA.Provider,{value:{cache:t},children:e})}function wJ(){const e=m.useContext(jA);if(!e)throw new Error("useGemAICache must be used within GemAIProvider");return e.cache}const rq=m.lazy(()=>Gt(()=>import("./GemAI-OFlEoiSB.js").then(e=>e.G),__vite__mapDeps([0,1,2,3,4,5,6,7]))),sq=m.lazy(()=>Gt(()=>import("./WarmIntros-BxqUoXaP.js"),__vite__mapDeps([8,9,1,2,3,4,5,0,6,7]))),iq=m.lazy(()=>Gt(()=>import("./MyNetwork-CCiuMloP.js"),__vite__mapDeps([10,11,1,2,3,4,5,12,13,14,15,16,17])
2097)),oq=m.lazy(()=>Gt(()=>import("./Settings-CX0nnhVf.js"),__vite__mapDeps([18,11,7,6,19,20,21,22]))),aq=m.lazy(()=>Gt(()=>import("./HomeDashboard-CCT0M1o7.js"),__vite__mapDeps([23,24,15,9,1,2,3,4,5,0,6,7,12,14,25,22,26,27,28]))),lq=m.lazy(()=>Gt(()=>import("./EnterpriseSearch-DDER1bYJ.js"),__vite__mapDeps([29,30,2,31,3,32,33,34]))),cq=m.lazy(()=>Gt(()=>import("./CRM-fzF1VH0r.js"),__vite__mapDeps([35,30,36,4,2,37,3,34,6]))),uq=m.lazy(()=>Gt(()=>import("./AdminCRM-mHx1PYMV.js"),__vite__mapDeps([38,30,36,4,2,37,3,34,6,31]))),dq=m.lazy(()=>Gt(()=>import("./AdminWeeklyDigest-CTWKcVvO.js"),__vite__mapDeps([39,30,32,36,4,2,40]))),hq=m.lazy(()=>Gt(()=>import("./DigestActionConfirm-DMHpcYTJ.js"),__vite__mapDeps([41,30,32,25]))),fq=m.lazy(()=>Gt(()=>import("./Accounts-DmOkYe9b.js"),__vite__mapDeps([42,43,15,16,9,27,44,1,2,3,4,5,26,0,6,7]))),mq=m.lazy(()=>Gt(()=>import("./Team-BZcC6i_M.js"),__vite__mapDeps([45,43,15,16,9,14,13,0,1,2,3,4,5,6,7,44,46,22,24]))),Rj=m.lazy(()=>Gt(()=>import("./ConnectorInviteAccept-d6x9HSay.js"),__vite__mapDeps([47,48,49,27,21,50]))),pq=m.lazy(()=>Gt(()=>import("./HomeLeagueEvent-BwGnR4By.js"),__vite__mapDeps([51,52]))),gq=m.lazy(()=>Gt(()=>import("./RoomsView-DoG0SJRA.js"),__vite__mapDeps([53,21,49,27,54,5,33,40,55,19,20,37,2,3,34,6,56,9,57,0,1,4,7,44,16,46]))),yq=m.lazy(()=>Gt(()=>import("./InviteLanding-hWclHuvT.js"),__vite__mapDeps([58,48,49,27,21])).then(e=>({default:e.JoinLeague}))),vq=m.lazy(()=>Gt(()=>import("./InviteLanding-hWclHuvT.js"),__vite__mapDeps([58,48,49,27,21])).then(e=>({default:e.JoinEvent}))),xq=m.lazy(()=>Gt(()=>import("./HostLanding-DFVA_S2c.js"),__vite__mapDeps([59,21,56,9,57,60]))),wq=m.lazy(()=>Gt(()=>import("./SFTechWeek-DGI66wYe.js"),__vite__mapDeps([61,54,21,5,33,40,55,49,27,20]))),bq=m.lazy(()=>Gt(()=>import("./SFTW-CdxDbt_f.js"),__vite__mapDeps([62,21,63]))),Sq=new J4;function Bt({children:e}){return i.jsx(m.Suspense,{fallback:i.jsx(hl,{variant:"page"}),children:e})}function jq(){return i.jsx(iG,{})}const kq=()=>i.jsx(X4,{client:Sq,children:i.jsx(e5,{children:i.jsx(fD,{children:i.jsxs(C4,{children:[i.jsx(lM,{}),i.jsx(BM,{}),i.jsx(Y$,{children:i.jsx(kD,{children:i.jsx(CD,{children:i.jsx(g7,{children:i.jsx(b7,{children:i.jsx(nq,{children:i.jsxs(M7,{children:[i.jsx(oH,{}),i.jsx(eq,{children:i.jsxs(U$,{children:[i.jsx(Me,{path:"/",element:i.jsx(jq,{})}),i.jsx(Me,{path:"/landing",element:i.jsx(kG,{})}),i.jsx(Me,{path:"/privacy",element:i.jsx(aG,{})}),i.jsx(Me,{path:"/terms",element:i.jsx(lG,{})}),i.jsx(Me,{path:"/deleteacc",element:i.jsx(hG,{})}),i.jsx(Me,{path:"/happy-bday",element:i.jsx(fG,{})}),i.jsx(Me,{path:"/home",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(aq,{})})})})}),i.jsx(Me,{path:"/gem-ai",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(rq,{})})})})}),i.jsx(Me,{path:"/warm-intros",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(sq,{})})})})}),i.jsx(Me,{path:"/crm",element:i.jsx(Un,{children:i.jsx(Bt,{children:i.jsx(cq,{})})})}),i.jsx(Me,{path:"/admin/crm",element:i.jsx(Un,{children:i.jsx(Bt,{children:i.jsx(uq,{})})})}),i.jsx(Me,{path:"/admin/weekly-digest",element:i.jsx(Un,{children:i.jsx(Bt,{children:i.jsx(dq,{})})})}),i.jsx(Me,{path:"/digest/action/:token",element:i.jsx(Un,{children:i.jsx(Bt,{children:i.jsx(hq,{})})})}),i.jsx(Me,{path:"/my-network",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(iq,{})})})})}),i.jsx(Me,{path:"/accounts",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(fq,{})})})})}),i.jsx(Me,{path:"/expand-map",element:i.jsx(Wn,{to:"/my-network?tab=add",replace:!0})}),i.jsx(Me,{path:"/team",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(mq,{})})})})}),i.jsx(Me,{path:"/profile",element:i.jsx(Wn,{to:"/settings?tab=st-profile",replace:!0})}),i.jsx(Me,{path:"/settings",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(Bt,{children:i.jsx(oq,{})})})})}),i.jsx(Me,{path:"/pricing",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(iH,{})})})}),i.jsx(Me,{path:"/search",element:i.jsx(Un,{children:i.jsx(js,{children:i.jsx(wG,{})})})}),i.jsx(Me,{path:"/enterprise-search",element:i.jsx(Un,{children:i.jsx(lq,{})})}),i.jsx(Me,{path:"/rooms",element:i.jsx(Bt,{children:i.jsx(gq,{standalone:!0})})}),i.jsx(Me,{path:"/join/:code",element:i.jsx(Bt,{children:i.jsx(yq,{})})}),i.jsx(Me,{path:"/event/:id",element:i.jsx(Bt,{children:i.jsx(vq,{})})}),i.jsx(Me,{path:"/host/:code",element:i.jsx(Bt,{children:i.jsx(xq,{})})}),i.jsx(Me,{path:"/home-league-event",element:i.jsx(Wn,{to:"/rooms",replace:!0})}),i.jsx(Me,{path:"/home-leageu-event",element:i.jsx(Wn,{to:"/rooms",replace:!0})}),i.jsx(Me,{path:"/home-league-event-v1",element:i.jsx(Bt,{children:i.jsx(pq,{})})}),i.jsx(Me,{path:"/download-app",element:i.jsx(eH,{})}),i.jsx(Me,{path:"/sf-tech-week",element:i.jsx(Bt,{children:i.jsx(wq,{})})}),i.jsx(Me,{path:"/sftw",element:i.jsx(Bt,{children:i.jsx(bq,{})})}),i.jsx(Me,{path:"/intro/:introId",element:i.jsx(Z9,{})}),i.jsx(Me,{path:"/signup",element:i.jsx(bG,{})}),i.jsx(Me,{path:"/login",element:i.jsx(SG,{})}),i.jsx(Me,{path:"/message-me",element:i.jsx(jG,{})}),i.jsx(Me,{path:"/auth/slack/link",element:i.jsx(gG,{})}),i.jsx(Me,{path:"/oauth/done",element:i.jsx(OG,{})}),i.jsx(Me,{path:"/verify-email",element:i.jsx(X9,{})}),i.jsx(Me,{path:"/onboarding",element:i.jsx(Wn,{to:"/onboarding/enterprise",replace:!0})}),i.jsx(Me,{path:"/onboarding/enterprise",element:i.jsx($9,{})}),i.jsx(Me,{path:"/onboarding/legacy",element:i.jsx(BG,{})}
2097),i.jsx(Me,{path:"/onboarding/individual",element:i.jsx(Wn,{to:"/onboarding/enterprise",replace:!0})}),i.jsx(Me,{path:"/onboarding/connector/:token",element:i.jsx(q9,{})}),i.jsx(Me,{path:"/connectors/invite/:token",element:i.jsx(Bt,{children:i.jsx(Rj,{})})}),i.jsx(Me,{path:"/connectors/join/:token",element:i.jsx(Bt,{children:i.jsx(Rj,{})})}),i.jsx(Me,{path:"/onboarding/team/:token",element:i.jsx(K9,{})}),i.jsx(Me,{path:"/onboarding/portfolio/:token",element:i.jsx(J9,{})}),i.jsx(Me,{path:"*",element:i.jsx(oG,{})})]})})]})})})})})})})]})})})}),Qy="gemphere_chunk_reload_v1";window.addEventListener("vite:preloadError",e=>{e.preventDefault(),sessionStorage.getItem(Qy)||(sessionStorage.setItem(Qy,"1"),window.location.reload())});sessionStorage.removeItem(Qy);nC(document.getElementById("root")).render(i.jsx(kq,{}));export{eJ as $,BK as A,a5 as B,$K as C,DK as D,Oq as E,zY as F,WY as G,qq as H,UH as I,I5 as J,KY as K,g9 as L,HH as M,YY as N,JY as O,hl as P,QY as Q,VK as R,D0 as S,uY as T,F5 as U,mY as V,B5 as W,WK as X,P5 as Y,XY as Z,ZY as _,KE as a,nY as a$,k7 as a0,Mq as a1,GY as a2,HY as a3,qY as a4,g5 as a5,ep as a6,An as a7,Pj as a8,FH as a9,nJ as aA,aj as aB,Bq as aC,p5 as aD,o5 as aE,Yy as aF,Qh as aG,Hq as aH,IY as aI,S7 as aJ,j7 as aK,AY as aL,RY as aM,_Y as aN,OY as aO,jx as aP,Jh as aQ,LY as aR,$Y as aS,T7 as aT,MY as aU,DY as aV,FY as aW,BY as aX,Ej as aY,Nr as aZ,iJ as a_,c5 as aa,OC as ab,uO as ac,tA as ad,ti as ae,$d as af,Tj as ag,ta as ah,Dd as ai,Ed as aj,Ld as ak,Wp as al,PH as am,Gp as an,O7 as ao,VH as ap,i5 as aq,Kh as ar,qh as as,tJ as at,SH as au,jH as av,Gn as aw,Nc as ax,hh as ay,x5 as az,YI as b,Kq as b$,rY as b0,qK as b1,KK as b2,kY as b3,NY as b4,hc as b5,vD as b6,wD as b7,RC as b8,PG as b9,Gt as bA,RK as bB,_K as bC,GK as bD,rn as bE,Qv as bF,$f as bG,Gr as bH,Ln as bI,qv as bJ,Qt as bK,Ui as bL,Vi as bM,sK as bN,rK as bO,bn as bP,r0 as bQ,mO as bR,xO as bS,Ew as bT,bu as bU,s0 as bV,ec as bW,cO as bX,JK as bY,hO as bZ,pO as b_,YK as ba,vj as bb,i7 as bc,Rl as bd,sY as be,iY as bf,aY as bg,XG as bh,QG as bi,C5 as bj,Wq as bk,sJ as bl,ft as bm,O5 as bn,pK as bo,IK as bp,AK as bq,MK as br,Lq as bs,dt as bt,VE as bu,PK as bv,UK as bw,TK as bx,_C as by,lY as bz,sH as c,yY as c$,Yq as c0,yO as c1,Jq as c2,nK as c3,Qq as c4,Xq as c5,Zq as c6,eK as c7,tK as c8,x_ as c9,af as cA,yK as cB,vK as cC,mK as cD,Vq as cE,wK as cF,DE as cG,Uq as cH,OK as cI,vJ as cJ,kH as cK,Dq as cL,gK as cM,cK as cN,fK as cO,U0 as cP,DH as cQ,zq as cR,vY as cS,pD as cT,bY as cU,c0 as cV,dY as cW,hY as cX,fY as cY,pY as cZ,gY as c_,sE as ca,o4 as cb,Hv as cc,a4 as cd,l4 as ce,D_ as cf,M_ as cg,Pq as ch,cC as ci,Dh as cj,Xv as ck,nD as cl,tx as cm,QK as cn,gA as co,XK as cp,ZK as cq,Kf as cr,eY as cs,ex as ct,tY as cu,_q as cv,kw as cw,it as cx,Fr as cy,kn as cz,ur as d,PY as d$,$q as d0,iK as d1,vw as d2,qE as d3,bK as d4,Nu as d5,oK as d6,xK as d7,aK as d8,FK as d9,UY as dA,VY as dB,uK as dC,dK as dD,CY as dE,xJ as dF,vA as dG,Jy as dH,Pw as dI,Wc as dJ,V0 as dK,EK as dL,yJ as dM,wJ as dN,fJ as dO,mJ as dP,pJ as dQ,gO as dR,ce as dS,gJ as dT,hJ as dU,xH as dV,bH as dW,dJ as dX,rC as dY,iC as dZ,LK as d_,HK as da,lK as db,SK as dc,jK as dd,kK as de,NK as df,CK as dg,cY as dh,sD as di,qn as dj,Fq as dk,wY as dl,xY as dm,Wn as dn,xw as dp,jY as dq,SY as dr,ku as ds,Cq as dt,Uj as du,Eq as dv,fO as dw,dO as dx,tc as dy,T5 as dz,Jr as e,zu as e0,vO as e1,Xj as e2,Gu as e3,vH as e4,po as e5,Si as e6,aH as e7,Yh as e8,ju as e9,cH as ea,Vu as eb,rr as ec,nl as ed,$u as ee,Du as ef,gs as eg,Bu as eh,Fu as ei,j5 as ej,FE as ek,BE as el,Gq as em,Wu as en,oY as f,oJ as g,TH as h,uJ as i,i as j,aJ as k,hK as l,J5 as m,lJ as n,cJ as o,EH as p,L5 as q,m as r,yA as s,wl as t,Ht as u,rJ as v,yH as w,zK as x,ND as y,un as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.