@wacht/jsx 1.0.0-beta.50 → 1.0.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +20 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +5369 -5364
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),Xs=require("react-dom"),Dr=require("@wacht/types");function F0(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const r=F0(o),Ur="__dev_session__",T0="__dev_session_updated_at",I0="__dev_session_updated_at";function Qa(){return typeof window<"u"&&typeof document<"u"}function Wr(e){if(!Qa())return null;const a=document.cookie?document.cookie.split(";"):[];for(const s of a){const[n,...i]=s.trim().split("=");if(n===e)return decodeURIComponent(i.join("="))}return null}function Br(e,a){Qa()&&(document.cookie=`${e}=${encodeURIComponent(a)}; Path=/; Secure; SameSite=Lax`)}function Vn(e){if(!Qa())return null;try{return window.localStorage.getItem(e)}catch{return null}}function Gs(e,a){if(Qa())try{window.localStorage.setItem(e,a)}catch{}}function Gr(e){if(!e)return 0;const a=Number(e);return Number.isFinite(a)?a:0}function V0(e){const a=e==null?void 0:e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).host.toLowerCase()}catch{return a.toLowerCase().replace(/\/+$/,"")}}function z0(e){const a=V0(e);if(!a)return"";const s=a.replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,64);return s?`_${s}`:""}function co(e){const a=z0(e);return{cookie:`${Ur}${a}`,updatedAtCookie:`${T0}${a}`,storage:`${Ur}${a}`,updatedAtStorage:`${I0}${a}`}}function D0(e){const a=Wr(e.cookie);if(!a)return null;const s=Gr(Wr(e.updatedAtCookie)),n=Vn(e.storage),i=Gr(Vn(e.updatedAtStorage)),l=s>i||s===0&&a!==n;return(!n||l)&&(Gs(e.storage,a),Gs(e.updatedAtStorage,String(s||Date.now()))),a}function wt(e){if(!Qa())return null;const a=co(e),s=D0(a);return s||Vn(a.storage)}function Fs(e,a){if(!Qa()||!e)return;const s=co(a),n=Date.now();Br(s.cookie,e),Br(s.updatedAtCookie,String(n)),Gs(s.storage,e),Gs(s.updatedAtStorage,String(n))}const hr=o.createContext(void 0);function U0({children:e,publicKey:a,adapter:s,uiOverrides:n}){const[i,l]=o.useState(!0),[m,c]=o.useState(null),d=o.useRef(!1);o.useEffect(()=>{async function u(){if(!d.current)try{d.current=!0,l(!0);const[h,f,g]=a.split("_");if(!g)throw new Error("Invalid public key");let x=atob(g),w=f==="test";const b=x;let _=null;if(new URLSearchParams(window.location.search).has("__dev_session__")){_=new URLSearchParams(window.location.search).get("__dev_session__"),Fs(_,b);const C=new URL(window.location.href);C.searchParams.delete("__dev_session__"),window.history.replaceState({},"",C.toString())}else _=wt(b),_&&Fs(_,b);let v={};const k=new URLSearchParams;w?k.append("__dev_session__",_??""):v={credentials:"include"};const N=await fetch(`${x}/deployment${w?"?":""}${k.toString()}`,v);if(!N.ok){l(!1);return}const j=await N.json();j.data.backend_host=x,n&&(j.data.ui_settings={...j.data.ui_settings,...n}),c(j.data),w&&N.headers.get("x-development-session")&&Fs(N.headers.get("x-development-session"),b),l(!1)}catch{l(!1)}}u()},[a,n]);const p=o.useMemo(()=>({loading:i,deployment:m,adapter:s}),[i,m,s]);return t.jsx(hr.Provider,{value:p,children:e})}async function T(e){if(!e.ok){let s=`HTTP ${e.status}: ${e.statusText}`,n;try{const l=await e.json();l.errors&&l.errors.length>0?(s=l.errors[0].message||s,n=l.errors[0].code):l.message&&(s=l.message)}catch{}const i=new Error(s);throw n&&(i.code=n),i}return{data:(await e.json()).data}}function _e(){const e=o.useContext(hr);if(e===void 0)throw new Error("useDeployment must be used within a DeploymentProvider");if(!e.loading&&!e.deployment)throw new Error("Deployment is not loaded");return e}function ve(){const{deployment:e,loading:a}=_e(),s=o.useCallback(async(n,i)=>{if(a||!e)throw new Error("Deployment is loading");const l=W0(e),m=new Headers(l.headers);i!=null&&i.headers&&new Headers(i.headers).forEach((u,h)=>{m.set(h,u)});const c=new URL(`${e.backend_host??""}${n}`);e.mode==="staging"&&c.searchParams.append("__dev_session__",wt(e.backend_host)??"");const d=await fetch(c,{...l,...i,headers:m});return e.mode==="staging"&&d.headers.get("x-development-session")&&Fs(d.headers.get("x-development-session"),e.backend_host),d},[e,a]);return o.useMemo(()=>({client:s,loading:a}),[s,a])}function W0(e){return e.mode==="staging"?{}:{credentials:"include"}}var uo=(e=>(e.XOauth="x_oauth",e.GithubOauth="github_oauth",e.GitlabOauth="gitlab_oauth",e.GoogleOauth="google_oauth",e.FacebookOauth="facebook_oauth",e.MicrosoftOauth="microsoft_oauth",e.LinkedinOauth="linkedin_oauth",e.DiscordOauth="discord_oauth",e.AppleOauth="apple_oauth",e))(uo||{});function B0(e,a){const s={username:G0(e,a),email:q0(e,a),phone:K0(e,a),email_otp:Y0(e,a),magic_link:Q0(e,a),oauth:J0(e),passkey:X0(e),generic:e1(e,a)};return function(i){return s[i]}}function G0(e,a){return async({username:s,password:n})=>{var c,d;const i=new FormData;i.append("strategy","plain_username"),i.append("username",s),i.append("password",n);const l=await e("/auth/signin",{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function q0(e,a){return async({email:s,password:n})=>{var c,d;const i=new FormData;i.append("strategy","plain_email"),i.append("email",s),i.append("password",n);const l=await e("/auth/signin",{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function K0(e,a){return async({phone:s})=>{var m,c;const n=new FormData;n.append("strategy","phone_otp"),n.append("phone",s);const i=await e("/auth/signin",{method:"POST",body:n}),l=await T(i);return"data"in l&&((c=(m=l.data)==null?void 0:m.signin_attempts)!=null&&c.length)&&a(l.data.signin_attempts.at(-1)||null),l}}function Y0(e,a){return async({email:s})=>{var m,c;const n=new FormData;n.append("strategy","email_otp"),n.append("email",s);const i=await e("/auth/signin",{method:"POST",body:n}),l=await T(i);return"data"in l&&((c=(m=l.data)==null?void 0:m.signin_attempts)!=null&&c.length)&&a(l.data.signin_attempts.at(-1)||null),l}}function Q0(e,a){return async({email:s})=>{var m,c;const n=new FormData;n.append("strategy","magic_link"),n.append("email",s);const i=await e("/auth/signin",{method:"POST",body:n}),l=await T(i);return"data"in l&&((c=(m=l.data)==null?void 0:m.signin_attempts)!=null&&c.length)&&a(l.data.signin_attempts.at(-1)||null),l}}function J0(e){return async({provider:a,redirectUri:s})=>{const n=new URLSearchParams({provider:a});s&&n.append("redirect_uri",s);const i=await e(`/auth/oauth2/init?${n.toString()}`,{method:"POST"}),l=await T(i);return"data"in l&&l.data.oauth_url&&(window.location.href=l.data.oauth_url),l}}function ts(e){const a=new Uint8Array(e);let s="";for(let n=0;n<a.length;n++)s+=String.fromCharCode(a[n]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function qr(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),n=atob(s),i=new Uint8Array(n.length);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);return i.buffer}function X0(e){return async()=>{var p;const a=await e("/auth/passkey/login/begin",{method:"POST"}),s=await T(a);if(!("data"in s))return s;const n=s.data.options.publicKey,i={challenge:qr(n.challenge),timeout:n.timeout,rpId:n.rpId,userVerification:n.userVerification,allowCredentials:(p=n.allowCredentials)==null?void 0:p.map(u=>({type:u.type,id:qr(u.id),transports:u.transports}))};let l;try{const u=await navigator.credentials.get({publicKey:i});if(!u)throw new Error("Failed to get credential");l=u}catch(u){throw u.name==="NotAllowedError"?new Error("No passkey found on this device. Please try a different sign-in method."):u.name==="AbortError"?new Error("Passkey sign-in was cancelled."):u}const m=l.response,c=new FormData;c.append("id",l.id),c.append("rawId",ts(l.rawId)),c.append("type",l.type),c.append("clientDataJSON",ts(m.clientDataJSON)),c.append("authenticatorData",ts(m.authenticatorData)),c.append("signature",ts(m.signature)),m.userHandle&&c.append("userHandle",ts(m.userHandle));const d=await e("/auth/passkey/login/finish",{method:"POST",body:c});return T(d)}}function e1(e,a){return async({email:s,username:n,password:i,phone:l,strategy:m})=>{var u,h;const c=new FormData;m&&c.append("strategy",m),s&&c.append("email",s),n&&c.append("username",n),i&&c.append("password",i),l&&c.append("phone",l);const d=await e("/auth/signin",{method:"POST",body:c}),p=await T(d);return"data"in p&&((h=(u=p.data)==null?void 0:u.signin_attempts)!=null&&h.length)&&a(p.data.signin_attempts.at(-1)||null),p}}function mo(){const{client:e,loading:a}=ve(),[s,n]=o.useState(null);return a?{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:()=>{n(null)},setSignInAttempt:n}:{loading:!1,signinAttempt:s,signIn:{createStrategy:B0(e,n),completeVerification:async i=>{var d,p;const l=new FormData;l.append("verification_code",i);const m=await e(`/auth/attempt-verification?attempt_identifier=${s==null?void 0:s.id}&identifier_type=signin`,{method:"POST",body:l}),c=await T(m);if("data"in c&&((p=(d=c.data)==null?void 0:d.signin_attempts)!=null&&p.length)){const u=c.data.signin_attempts.at(-1);return n(u||null),c.data}else throw new Error("Verification failed")},prepareVerification:async i=>{var c;const l=new URL("/auth/prepare-verification",window.location.origin);l.searchParams.set("attempt_identifier",((c=s==null?void 0:s.id)==null?void 0:c.toString())||""),l.searchParams.set("strategy",i.strategy),l.searchParams.set("identifier_type","signin"),i.strategy==="phone_otp"&&i.lastDigits?l.searchParams.set("last_digits",i.lastDigits):(i.strategy==="email_otp"&&i.redirectUri||i.strategy==="magic_link"&&i.redirectUri)&&l.searchParams.set("redirect_uri",i.redirectUri);const m=await e(l.pathname+l.search,{method:"POST"});return T(m)},completeProfile:async i=>{var d;if(!s)throw new Error("No signin attempt found");const l=new FormData;for(const[p,u]of Object.entries(i))u&&l.append(p,u);const m=await e(`/auth/complete-profile?attempt_id=${s.id}`,{method:"POST",body:l}),c=await T(m);if("data"in c&&c.data){const p=(d=c.data.signin_attempts)==null?void 0:d.find(u=>u.id===s.id);return p&&n(p),c.data}else throw new Error("Profile completion failed")},identify:async i=>{const l=new FormData;l.append("identifier",i);const m=await e("/auth/identify",{method:"POST",body:l});return(await T(m)).data},initEnterpriseSso:async(i,l)=>{const m=new URLSearchParams({connection_id:i});l&&m.append("redirect_uri",l);const c=await e(`/auth/sso/login?${m.toString()}`,{method:"POST"});return(await T(c)).data}},discardSignInAttempt:()=>{n(null)},setSignInAttempt:n}}function os(e){const{loading:a,signIn:s,signinAttempt:n,discardSignInAttempt:i,setSignInAttempt:l}=mo();if(a)return{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:i,setSignInAttempt:l};const m=(()=>{switch(e){case"username":return s.createStrategy("username");case"email":return s.createStrategy("email");case"phone":return s.createStrategy("phone");case"email_otp":return s.createStrategy("email_otp");case"magic_link":return s.createStrategy("magic_link");case"oauth":return s.createStrategy("oauth");case"passkey":return s.createStrategy("passkey");case"generic":return s.createStrategy("generic");default:throw new Error("Invalid sign-in strategy")}})();return{loading:!1,signinAttempt:n,signIn:{create:m,completeVerification:s.completeVerification,prepareVerification:s.prepareVerification,completeProfile:s.completeProfile,identify:s.identify,initEnterpriseSso:s.initEnterpriseSso},discardSignInAttempt:i,setSignInAttempt:l}}function t1(e,a,s){return{create:async n=>{var c,d,p;const i=new FormData;for(const[u,h]of Object.entries(n))i.append(u,h);const l=await e("/auth/signup",{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signup_attempts)!=null&&d.length)&&s(((p=m.data.signup_attempts)==null?void 0:p.at(-1))||null),m},prepareVerification:async n=>{var m;const i=new URL("/auth/prepare-verification",window.location.origin);i.searchParams.set("attempt_identifier",((m=a==null?void 0:a.id)==null?void 0:m.toString())||""),i.searchParams.set("strategy",n.strategy),i.searchParams.set("identifier_type","signup"),n.strategy==="phone_otp"&&n.lastDigits?i.searchParams.set("last_digits",n.lastDigits):n.strategy==="email_otp"&&n.redirectUri&&i.searchParams.set("redirect_uri",n.redirectUri);const l=await e(i.pathname+i.search,{method:"POST"});return T(l)},completeVerification:async n=>{var c,d;const i=new FormData;i.append("verification_code",n);const l=await e(`/auth/attempt-verification?attempt_identifier=${a==null?void 0:a.id}&identifier_type=signup`,{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signup_attempts)!=null&&d.length)&&s(m.data.signup_attempts.at(-1)||null),m},validateDeploymentInvitation:async n=>{try{const i=await e(`/deployment/invitations/validate?token=${encodeURIComponent(n)}`,{method:"GET"}),l=await T(i);return"data"in l&&l.data?l.data:{valid:!1,message:"Failed to validate invitation",error_code:"VALIDATION_ERROR"}}catch(i){return{valid:!1,message:i.message||"Failed to validate invitation",error_code:"NETWORK_ERROR"}}}}}function po(){const{client:e,loading:a}=ve(),[s,n]=o.useState(null);return a?{loading:!0,signUp:null,signupAttempt:null,discardSignupAttempt:()=>{n(null)}}:{loading:!1,signupAttempt:s,discardSignupAttempt:()=>{n(null)},signUp:t1(e,s,n)}}var Ns={exports:{}},hn={};/**
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),en=require("react-dom"),Ur=require("@wacht/types");function T0(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const r=T0(o),Wr="__dev_session__",I0="__dev_session_updated_at",V0="__dev_session_updated_at";function Ja(){return typeof window<"u"&&typeof document<"u"}function Br(e){if(!Ja())return null;const a=document.cookie?document.cookie.split(";"):[];for(const s of a){const[n,...i]=s.trim().split("=");if(n===e)return decodeURIComponent(i.join("="))}return null}function Gr(e,a){Ja()&&(document.cookie=`${e}=${encodeURIComponent(a)}; Path=/; Secure; SameSite=Lax`)}function zn(e){if(!Ja())return null;try{return window.localStorage.getItem(e)}catch{return null}}function qs(e,a){if(Ja())try{window.localStorage.setItem(e,a)}catch{}}function qr(e){if(!e)return 0;const a=Number(e);return Number.isFinite(a)?a:0}function z0(e){const a=e==null?void 0:e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).host.toLowerCase()}catch{return a.toLowerCase().replace(/\/+$/,"")}}function D0(e){const a=z0(e);if(!a)return"";const s=a.replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,64);return s?`_${s}`:""}function uo(e){const a=D0(e);return{cookie:`${Wr}${a}`,updatedAtCookie:`${I0}${a}`,storage:`${Wr}${a}`,updatedAtStorage:`${V0}${a}`}}function U0(e){const a=Br(e.cookie);if(!a)return null;const s=qr(Br(e.updatedAtCookie)),n=zn(e.storage),i=qr(zn(e.updatedAtStorage)),l=s>i||s===0&&a!==n;return(!n||l)&&(qs(e.storage,a),qs(e.updatedAtStorage,String(s||Date.now()))),a}function wt(e){if(!Ja())return null;const a=uo(e),s=U0(a);return s||zn(a.storage)}function Ts(e,a){if(!Ja()||!e)return;const s=uo(a),n=Date.now();Gr(s.cookie,e),Gr(s.updatedAtCookie,String(n)),qs(s.storage,e),qs(s.updatedAtStorage,String(n))}const fr=o.createContext(void 0);function W0({children:e,publicKey:a,adapter:s,uiOverrides:n}){const[i,l]=o.useState(!0),[m,c]=o.useState(null),d=o.useRef(!1);o.useEffect(()=>{async function u(){if(!d.current)try{d.current=!0,l(!0);const[h,f,g]=a.split("_");if(!g)throw new Error("Invalid public key");let x=atob(g),w=f==="test";const b=x;let j=null;if(new URLSearchParams(window.location.search).has("__dev_session__")){j=new URLSearchParams(window.location.search).get("__dev_session__"),Ts(j,b);const C=new URL(window.location.href);C.searchParams.delete("__dev_session__"),window.history.replaceState({},"",C.toString())}else j=wt(b),j&&Ts(j,b);let v={};const _=new URLSearchParams;w?_.append("__dev_session__",j??""):v={credentials:"include"};const N=await fetch(`${x}/deployment${w?"?":""}${_.toString()}`,v);if(!N.ok){l(!1);return}const k=await N.json();k.data.backend_host=x,n&&(k.data.ui_settings={...k.data.ui_settings,...n}),c(k.data),w&&N.headers.get("x-development-session")&&Ts(N.headers.get("x-development-session"),b),l(!1)}catch{l(!1)}}u()},[a,n]);const p=o.useMemo(()=>({loading:i,deployment:m,adapter:s}),[i,m,s]);return t.jsx(fr.Provider,{value:p,children:e})}async function T(e){if(!e.ok){let s=`HTTP ${e.status}: ${e.statusText}`,n;try{const l=await e.json();l.errors&&l.errors.length>0?(s=l.errors[0].message||s,n=l.errors[0].code):l.message&&(s=l.message)}catch{}const i=new Error(s);throw n&&(i.code=n),i}return{data:(await e.json()).data}}function ke(){const e=o.useContext(fr);if(e===void 0)throw new Error("useDeployment must be used within a DeploymentProvider");if(!e.loading&&!e.deployment)throw new Error("Deployment is not loaded");return e}function ye(){const{deployment:e,loading:a}=ke(),s=o.useCallback(async(n,i)=>{if(a||!e)throw new Error("Deployment is loading");const l=B0(e),m=new Headers(l.headers);i!=null&&i.headers&&new Headers(i.headers).forEach((u,h)=>{m.set(h,u)});const c=new URL(`${e.backend_host??""}${n}`);e.mode==="staging"&&c.searchParams.append("__dev_session__",wt(e.backend_host)??"");const d=await fetch(c,{...l,...i,headers:m});return e.mode==="staging"&&d.headers.get("x-development-session")&&Ts(d.headers.get("x-development-session"),e.backend_host),d},[e,a]);return o.useMemo(()=>({client:s,loading:a}),[s,a])}function B0(e){return e.mode==="staging"?{}:{credentials:"include"}}var mo=(e=>(e.XOauth="x_oauth",e.GithubOauth="github_oauth",e.GitlabOauth="gitlab_oauth",e.GoogleOauth="google_oauth",e.FacebookOauth="facebook_oauth",e.MicrosoftOauth="microsoft_oauth",e.LinkedinOauth="linkedin_oauth",e.DiscordOauth="discord_oauth",e.AppleOauth="apple_oauth",e))(mo||{});function G0(e,a){const s={username:q0(e,a),email:K0(e,a),phone:Y0(e,a),email_otp:Q0(e,a),magic_link:J0(e,a),oauth:X0(e),passkey:e1(e),generic:t1(e,a)};return function(i){return s[i]}}function q0(e,a){return async({username:s,password:n})=>{var c,d;const i=new FormData;i.append("strategy","plain_username"),i.append("username",s),i.append("password",n);const l=await e("/auth/signin",{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function K0(e,a){return async({email:s,password:n})=>{var c,d;const i=new FormData;i.append("strategy","plain_email"),i.append("email",s),i.append("password",n);const l=await e("/auth/signin",{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function Y0(e,a){return async({phone:s})=>{var m,c;const n=new FormData;n.append("strategy","phone_otp"),n.append("phone",s);const i=await e("/auth/signin",{method:"POST",body:n}),l=await T(i);return"data"in l&&((c=(m=l.data)==null?void 0:m.signin_attempts)!=null&&c.length)&&a(l.data.signin_attempts.at(-1)||null),l}}function Q0(e,a){return async({email:s})=>{var m,c;const n=new FormData;n.append("strategy","email_otp"),n.append("email",s);const i=await e("/auth/signin",{method:"POST",body:n}),l=await T(i);return"data"in l&&((c=(m=l.data)==null?void 0:m.signin_attempts)!=null&&c.length)&&a(l.data.signin_attempts.at(-1)||null),l}}function J0(e,a){return async({email:s})=>{var m,c;const n=new FormData;n.append("strategy","magic_link"),n.append("email",s);const i=await e("/auth/signin",{method:"POST",body:n}),l=await T(i);return"data"in l&&((c=(m=l.data)==null?void 0:m.signin_attempts)!=null&&c.length)&&a(l.data.signin_attempts.at(-1)||null),l}}function X0(e){return async({provider:a,redirectUri:s})=>{const n=new URLSearchParams({provider:a});s&&n.append("redirect_uri",s);const i=await e(`/auth/oauth2/init?${n.toString()}`,{method:"POST"}),l=await T(i);return"data"in l&&l.data.oauth_url&&(window.location.href=l.data.oauth_url),l}}function as(e){const a=new Uint8Array(e);let s="";for(let n=0;n<a.length;n++)s+=String.fromCharCode(a[n]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kr(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),n=atob(s),i=new Uint8Array(n.length);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);return i.buffer}function e1(e){return async()=>{var p;const a=await e("/auth/passkey/login/begin",{method:"POST"}),s=await T(a);if(!("data"in s))return s;const n=s.data.options.publicKey,i={challenge:Kr(n.challenge),timeout:n.timeout,rpId:n.rpId,userVerification:n.userVerification,allowCredentials:(p=n.allowCredentials)==null?void 0:p.map(u=>({type:u.type,id:Kr(u.id),transports:u.transports}))};let l;try{const u=await navigator.credentials.get({publicKey:i});if(!u)throw new Error("Failed to get credential");l=u}catch(u){throw u.name==="NotAllowedError"?new Error("No passkey found on this device. Please try a different sign-in method."):u.name==="AbortError"?new Error("Passkey sign-in was cancelled."):u}const m=l.response,c=new FormData;c.append("id",l.id),c.append("rawId",as(l.rawId)),c.append("type",l.type),c.append("clientDataJSON",as(m.clientDataJSON)),c.append("authenticatorData",as(m.authenticatorData)),c.append("signature",as(m.signature)),m.userHandle&&c.append("userHandle",as(m.userHandle));const d=await e("/auth/passkey/login/finish",{method:"POST",body:c});return T(d)}}function t1(e,a){return async({email:s,username:n,password:i,phone:l,strategy:m})=>{var u,h;const c=new FormData;m&&c.append("strategy",m),s&&c.append("email",s),n&&c.append("username",n),i&&c.append("password",i),l&&c.append("phone",l);const d=await e("/auth/signin",{method:"POST",body:c}),p=await T(d);return"data"in p&&((h=(u=p.data)==null?void 0:u.signin_attempts)!=null&&h.length)&&a(p.data.signin_attempts.at(-1)||null),p}}function po(){const{client:e,loading:a}=ye(),[s,n]=o.useState(null);return a?{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:()=>{n(null)},setSignInAttempt:n}:{loading:!1,signinAttempt:s,signIn:{createStrategy:G0(e,n),completeVerification:async i=>{var d,p;const l=new FormData;l.append("verification_code",i);const m=await e(`/auth/attempt-verification?attempt_identifier=${s==null?void 0:s.id}&identifier_type=signin`,{method:"POST",body:l}),c=await T(m);if("data"in c&&((p=(d=c.data)==null?void 0:d.signin_attempts)!=null&&p.length)){const u=c.data.signin_attempts.at(-1);return n(u||null),c.data}else throw new Error("Verification failed")},prepareVerification:async i=>{var c;const l=new URL("/auth/prepare-verification",window.location.origin);l.searchParams.set("attempt_identifier",((c=s==null?void 0:s.id)==null?void 0:c.toString())||""),l.searchParams.set("strategy",i.strategy),l.searchParams.set("identifier_type","signin"),i.strategy==="phone_otp"&&i.lastDigits?l.searchParams.set("last_digits",i.lastDigits):(i.strategy==="email_otp"&&i.redirectUri||i.strategy==="magic_link"&&i.redirectUri)&&l.searchParams.set("redirect_uri",i.redirectUri);const m=await e(l.pathname+l.search,{method:"POST"});return T(m)},completeProfile:async i=>{var d;if(!s)throw new Error("No signin attempt found");const l=new FormData;for(const[p,u]of Object.entries(i))u&&l.append(p,u);const m=await e(`/auth/complete-profile?attempt_id=${s.id}`,{method:"POST",body:l}),c=await T(m);if("data"in c&&c.data){const p=(d=c.data.signin_attempts)==null?void 0:d.find(u=>u.id===s.id);return p&&n(p),c.data}else throw new Error("Profile completion failed")},identify:async i=>{const l=new FormData;l.append("identifier",i);const m=await e("/auth/identify",{method:"POST",body:l});return(await T(m)).data},initEnterpriseSso:async(i,l)=>{const m=new URLSearchParams({connection_id:i});l&&m.append("redirect_uri",l);const c=await e(`/auth/sso/login?${m.toString()}`,{method:"POST"});return(await T(c)).data}},discardSignInAttempt:()=>{n(null)},setSignInAttempt:n}}function ls(e){const{loading:a,signIn:s,signinAttempt:n,discardSignInAttempt:i,setSignInAttempt:l}=po();if(a)return{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:i,setSignInAttempt:l};const m=(()=>{switch(e){case"username":return s.createStrategy("username");case"email":return s.createStrategy("email");case"phone":return s.createStrategy("phone");case"email_otp":return s.createStrategy("email_otp");case"magic_link":return s.createStrategy("magic_link");case"oauth":return s.createStrategy("oauth");case"passkey":return s.createStrategy("passkey");case"generic":return s.createStrategy("generic");default:throw new Error("Invalid sign-in strategy")}})();return{loading:!1,signinAttempt:n,signIn:{create:m,completeVerification:s.completeVerification,prepareVerification:s.prepareVerification,completeProfile:s.completeProfile,identify:s.identify,initEnterpriseSso:s.initEnterpriseSso},discardSignInAttempt:i,setSignInAttempt:l}}function a1(e,a,s){return{create:async n=>{var c,d,p;const i=new FormData;for(const[u,h]of Object.entries(n))i.append(u,h);const l=await e("/auth/signup",{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signup_attempts)!=null&&d.length)&&s(((p=m.data.signup_attempts)==null?void 0:p.at(-1))||null),m},prepareVerification:async n=>{var m;const i=new URL("/auth/prepare-verification",window.location.origin);i.searchParams.set("attempt_identifier",((m=a==null?void 0:a.id)==null?void 0:m.toString())||""),i.searchParams.set("strategy",n.strategy),i.searchParams.set("identifier_type","signup"),n.strategy==="phone_otp"&&n.lastDigits?i.searchParams.set("last_digits",n.lastDigits):n.strategy==="email_otp"&&n.redirectUri&&i.searchParams.set("redirect_uri",n.redirectUri);const l=await e(i.pathname+i.search,{method:"POST"});return T(l)},completeVerification:async n=>{var c,d;const i=new FormData;i.append("verification_code",n);const l=await e(`/auth/attempt-verification?attempt_identifier=${a==null?void 0:a.id}&identifier_type=signup`,{method:"POST",body:i}),m=await T(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signup_attempts)!=null&&d.length)&&s(m.data.signup_attempts.at(-1)||null),m},validateDeploymentInvitation:async n=>{try{const i=await e(`/deployment/invitations/validate?token=${encodeURIComponent(n)}`,{method:"GET"}),l=await T(i);return"data"in l&&l.data?l.data:{valid:!1,message:"Failed to validate invitation",error_code:"VALIDATION_ERROR"}}catch(i){return{valid:!1,message:i.message||"Failed to validate invitation",error_code:"NETWORK_ERROR"}}}}}function ho(){const{client:e,loading:a}=ye(),[s,n]=o.useState(null);return a?{loading:!0,signUp:null,signupAttempt:null,discardSignupAttempt:()=>{n(null)}}:{loading:!1,signupAttempt:s,discardSignupAttempt:()=>{n(null)},signUp:a1(e,s,n)}}var Ss={exports:{}},fn={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-shim.production.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
10
|
+
*/var Yr;function s1(){if(Yr)return fn;Yr=1;var e=o;function a(h,f){return h===f&&(h!==0||1/h===1/f)||h!==h&&f!==f}var s=typeof Object.is=="function"?Object.is:a,n=e.useState,i=e.useEffect,l=e.useLayoutEffect,m=e.useDebugValue;function c(h,f){var g=f(),x=n({inst:{value:g,getSnapshot:f}}),w=x[0].inst,b=x[1];return l(function(){w.value=g,w.getSnapshot=f,d(w)&&b({inst:w})},[h,g,f]),i(function(){return d(w)&&b({inst:w}),h(function(){d(w)&&b({inst:w})})},[h]),m(g),g}function d(h){var f=h.getSnapshot;h=h.value;try{var g=f();return!s(h,g)}catch{return!0}}function p(h,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return fn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,fn}var wn={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* use-sync-external-store-shim.development.js
|
|
13
13
|
*
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Yr;function s1(){return Yr||(Yr=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}function a(g,x){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=x();if(!h){var b=x();l(w,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}b=m({inst:{value:w,getSnapshot:x}});var _=b[0].inst,v=b[1];return d(function(){_.value=w,_.getSnapshot=x,s(_)&&v({inst:_})},[g,w,x]),c(function(){return s(_)&&v({inst:_}),g(function(){s(_)&&v({inst:_})})},[g]),p(w),w}function s(g){var x=g.getSnapshot;g=g.value;try{var w=x();return!l(g,w)}catch{return!0}}function n(g,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=o,l=typeof Object.is=="function"?Object.is:e,m=i.useState,c=i.useEffect,d=i.useLayoutEffect,p=i.useDebugValue,u=!1,h=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:a;fn.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),fn}var Qr;function n1(){return Qr||(Qr=1,process.env.NODE_ENV==="production"?Ns.exports=a1():Ns.exports=s1()),Ns.exports}var zn=n1();const ho=0,fo=1,wo=2,Jr=3;var Xr=Object.prototype.hasOwnProperty;function Dn(e,a){var s,n;if(e===a)return!0;if(e&&a&&(s=e.constructor)===a.constructor){if(s===Date)return e.getTime()===a.getTime();if(s===RegExp)return e.toString()===a.toString();if(s===Array){if((n=e.length)===a.length)for(;n--&&Dn(e[n],a[n]););return n===-1}if(!s||typeof e=="object"){n=0;for(s in e)if(Xr.call(e,s)&&++n&&!Xr.call(a,s)||!(s in a)||!Dn(e[s],a[s]))return!1;return Object.keys(a).length===n}}return e!==e&&a!==a}const It=new WeakMap,Yt=()=>{},ut=Yt(),Un=Object,je=e=>e===ut,Rt=e=>typeof e=="function",pa=(e,a)=>({...e,...a}),go=e=>Rt(e.then),wn={},Ss={},fr="undefined",fs=typeof window!=fr,Wn=typeof document!=fr,r1=fs&&"Deno"in window,i1=()=>fs&&typeof window.requestAnimationFrame!=fr,ca=(e,a)=>{const s=It.get(e);return[()=>!je(a)&&e.get(a)||wn,n=>{if(!je(a)){const i=e.get(a);a in Ss||(Ss[a]=i),s[5](a,pa(i,n),i||wn)}},s[6],()=>!je(a)&&a in Ss?Ss[a]:!je(a)&&e.get(a)||wn]};let Bn=!0;const o1=()=>Bn,[Gn,qn]=fs&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Yt,Yt],l1=()=>{const e=Wn&&document.visibilityState;return je(e)||e!=="hidden"},c1=e=>(Wn&&document.addEventListener("visibilitychange",e),Gn("focus",e),()=>{Wn&&document.removeEventListener("visibilitychange",e),qn("focus",e)}),d1=e=>{const a=()=>{Bn=!0,e()},s=()=>{Bn=!1};return Gn("online",a),Gn("offline",s),()=>{qn("online",a),qn("offline",s)}},u1={isOnline:o1,isVisible:l1},m1={initFocus:c1,initReconnect:d1},ei=!o.useId,Wa=!fs||r1,p1=e=>i1()?window.requestAnimationFrame(e):setTimeout(e,1),Ts=Wa?o.useEffect:o.useLayoutEffect,gn=typeof navigator<"u"&&navigator.connection,ti=!Wa&&gn&&(["slow-2g","2g"].includes(gn.effectiveType)||gn.saveData),Es=new WeakMap,h1=e=>Un.prototype.toString.call(e),xn=(e,a)=>e===`[object ${a}]`;let f1=0;const Kn=e=>{const a=typeof e,s=h1(e),n=xn(s,"Date"),i=xn(s,"RegExp"),l=xn(s,"Object");let m,c;if(Un(e)===e&&!n&&!i){if(m=Es.get(e),m)return m;if(m=++f1+"~",Es.set(e,m),Array.isArray(e)){for(m="@",c=0;c<e.length;c++)m+=Kn(e[c])+",";Es.set(e,m)}if(l){m="#";const d=Un.keys(e).sort();for(;!je(c=d.pop());)je(e[c])||(m+=c+":"+Kn(e[c])+",");Es.set(e,m)}}else m=n?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},us=e=>{if(Rt(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Kn(e):"",[e,a]};let w1=0;const Yn=()=>++w1;async function xo(...e){const[a,s,n,i]=e,l=pa({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let m=l.populateCache;const c=l.rollbackOnError;let d=l.optimisticData;const p=f=>typeof c=="function"?c(f):c!==!1,u=l.throwOnError;if(Rt(s)){const f=s,g=[],x=a.keys();for(const w of x)!/^\$(inf|sub)\$/.test(w)&&f(a.get(w)._k)&&g.push(w);return Promise.all(g.map(h))}return h(s);async function h(f){const[g]=us(f);if(!g)return;const[x,w]=ca(a,g),[b,_,v,k]=It.get(a),N=()=>{const S=b[g];return(Rt(l.revalidate)?l.revalidate(x().data,f):l.revalidate!==!1)&&(delete v[g],delete k[g],S&&S[0])?S[0](wo).then(()=>x().data):x().data};if(e.length<3)return N();let j=n,C,y=!1;const E=Yn();_[g]=[E,0];const R=!je(d),F=x(),A=F.data,I=F._c,L=je(I)?A:I;if(R&&(d=Rt(d)?d(L,A):d,w({data:d,_c:L})),Rt(j))try{j=j(L)}catch(S){C=S,y=!0}if(j&&go(j))if(j=await j.catch(S=>{C=S,y=!0}),E!==_[g][0]){if(y)throw C;return j}else y&&R&&p(C)&&(m=!0,w({data:L,_c:ut}));if(m&&!y)if(Rt(m)){const S=m(j,L);w({data:S,error:ut,_c:ut})}else w({data:j,error:ut,_c:ut});if(_[g][1]=Yn(),Promise.resolve(N()).then(()=>{w({_c:ut})}),y){if(u)throw C;return}return j}}const ai=(e,a)=>{for(const s in e)e[s][0]&&e[s][0](a)},g1=(e,a)=>{if(!It.has(e)){const s=pa(m1,a),n=Object.create(null),i=xo.bind(ut,e);let l=Yt;const m=Object.create(null),c=(u,h)=>{const f=m[u]||[];return m[u]=f,f.push(h),()=>f.splice(f.indexOf(h),1)},d=(u,h,f)=>{e.set(u,h);const g=m[u];if(g)for(const x of g)x(h,f)},p=()=>{if(!It.has(e)&&(It.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,d,c]),!Wa)){const u=s.initFocus(setTimeout.bind(ut,ai.bind(ut,n,ho))),h=s.initReconnect(setTimeout.bind(ut,ai.bind(ut,n,fo)));l=()=>{u&&u(),h&&h(),It.delete(e)}}};return p(),[e,i,p,l]}return[e,It.get(e)[4]]},x1=(e,a,s,n,i)=>{const l=s.errorRetryCount,m=i.retryCount,c=~~((Math.random()+.5)*(1<<(m<8?m:8)))*s.errorRetryInterval;!je(l)&&m>l||setTimeout(n,c,i)},v1=Dn,[wr,Da]=g1(new Map),b1=pa({onLoadingSlow:Yt,onSuccess:Yt,onError:Yt,onErrorRetry:x1,onDiscarded:Yt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ti?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ti?5e3:3e3,compare:v1,isPaused:()=>!1,cache:wr,mutate:Da,fallback:{}},u1),y1=(e,a)=>{const s=pa(e,a);if(a){const{use:n,fallback:i}=e,{use:l,fallback:m}=a;n&&l&&(s.use=n.concat(l)),i&&m&&(s.fallback=pa(i,m))}return s},j1=o.createContext({}),vo="$inf$",bo=fs&&window.__SWR_DEVTOOLS_USE__,_1=bo?window.__SWR_DEVTOOLS_USE__:[],k1=()=>{bo&&(window.__SWR_DEVTOOLS_REACT__=o)},yo=e=>Rt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],jo=()=>{const e=o.useContext(j1);return o.useMemo(()=>pa(b1,e),[e])},C1=e=>(a,s,n)=>e(a,s&&((...l)=>{const[m]=us(a),[,,,c]=It.get(wr);if(m.startsWith(vo))return s(...l);const d=c[m];return je(d)?s(...l):(delete c[m],d)}),n),N1=_1.concat(C1),S1=e=>function(...s){const n=jo(),[i,l,m]=yo(s),c=y1(n,m);let d=e;const{use:p}=c,u=(p||[]).concat(N1);for(let h=u.length;h--;)d=u[h](d);return d(i,l||c.fetcher||null,c)},E1=(e,a,s)=>{const n=a[e]||(a[e]=[]);return n.push(s),()=>{const i=n.indexOf(s);i>=0&&(n[i]=n[n.length-1],n.pop())}},A1=(e,a)=>(...s)=>{const[n,i,l]=yo(s),m=(l.use||[]).concat(a);return e(n,i,{...l,use:m})};k1();const vn=o.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(a=>{e.status="fulfilled",e.value=a},a=>{e.status="rejected",e.reason=a}),e}}),bn={dedupe:!0},si=Promise.resolve(ut),M1=()=>Yt,R1=(e,a,s)=>{const{cache:n,compare:i,suspense:l,fallbackData:m,revalidateOnMount:c,revalidateIfStale:d,refreshInterval:p,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:f,strictServerPrefetchWarning:g}=s,[x,w,b,_]=It.get(n),[v,k]=us(e),N=o.useRef(!1),j=o.useRef(!1),C=o.useRef(v),y=o.useRef(a),E=o.useRef(s),R=()=>E.current,F=()=>R().isVisible()&&R().isOnline(),[A,I,L,S]=ca(n,v),O=o.useRef({}).current,P=je(m)?je(s.fallback)?ut:s.fallback[v]:m,$=(le,V)=>{for(const Y in O){const q=Y;if(q==="data"){if(!i(le[q],V[q])&&(!je(le[q])||!i(ce,V[q])))return!1}else if(V[q]!==le[q])return!1}return!0},Z=!N.current,H=o.useMemo(()=>{const le=A(),V=S(),Y=z=>{const me=pa(z);return delete me._k,(()=>{if(!v||!a||R().isPaused())return!1;if(Z&&!je(c))return c;const Oe=je(P)?me.data:P;return je(Oe)||d})()?{isValidating:!0,isLoading:!0,...me}:me},q=Y(le),G=le===V?q:Y(V);let de=q;return[()=>{const z=Y(A());return $(z,de)?(de.data=z.data,de.isLoading=z.isLoading,de.isValidating=z.isValidating,de.error=z.error,de):(de=z,z)},()=>G]},[n,v]),M=zn.useSyncExternalStore(o.useCallback(le=>L(v,(V,Y)=>{$(Y,V)||le()}),[n,v]),H[0],H[1]),B=x[v]&&x[v].length>0,D=M.data,W=je(D)?P&&go(P)?vn(P):P:D,K=M.error,ee=o.useRef(W),ce=f?je(D)?je(ee.current)?W:ee.current:D:W,be=v&&je(W),Q=o.useRef(null);!Wa&&zn.useSyncExternalStore(M1,()=>(Q.current=!1,Q),()=>(Q.current=!0,Q));const ie=Q.current;g&&ie&&!l&&be&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const ne=!v||!a||R().isPaused()||B&&!je(K)?!1:Z&&!je(c)?c:l?je(W)?!1:d:je(W)||d,U=Z&&ne,Qe=je(M.isValidating)?U:M.isValidating,Je=je(M.isLoading)?U:M.isLoading,Te=o.useCallback(async le=>{const V=y.current;if(!v||!V||j.current||R().isPaused())return!1;let Y,q,G=!0;const de=le||{},z=!b[v]||!de.dedupe,me=()=>ei?!j.current&&v===C.current&&N.current:v===C.current,st={isValidating:!1,isLoading:!1},Oe=()=>{I(st)},Ze=()=>{const J=b[v];J&&J[1]===q&&delete b[v]},mt={isValidating:!0};je(A().data)&&(mt.isLoading=!0);try{if(z&&(I(mt),s.loadingTimeout&&je(A().data)&&setTimeout(()=>{G&&me()&&R().onLoadingSlow(v,s)},s.loadingTimeout),b[v]=[V(k),Yn()]),[Y,q]=b[v],Y=await Y,z&&setTimeout(Ze,s.dedupingInterval),!b[v]||b[v][1]!==q)return z&&me()&&R().onDiscarded(v),!1;st.error=ut;const J=w[v];if(!je(J)&&(q<=J[0]||q<=J[1]||J[1]===0))return Oe(),z&&me()&&R().onDiscarded(v),!1;const re=A().data;st.data=i(re,Y)?re:Y,z&&me()&&R().onSuccess(Y,v,s)}catch(J){Ze();const re=R(),{shouldRetryOnError:ue}=re;re.isPaused()||(st.error=J,z&&me()&&(re.onError(J,v,re),(ue===!0||Rt(ue)&&ue(J))&&(!R().revalidateOnFocus||!R().revalidateOnReconnect||F())&&re.onErrorRetry(J,v,re,He=>{const Ee=x[v];Ee&&Ee[0]&&Ee[0](Jr,He)},{retryCount:(de.retryCount||0)+1,dedupe:!0})))}return G=!1,Oe(),!0},[v,n]),Se=o.useCallback((...le)=>xo(n,C.current,...le),[]);if(Ts(()=>{y.current=a,E.current=s,je(D)||(ee.current=D)}),Ts(()=>{if(!v)return;const le=Te.bind(ut,bn);let V=0;R().revalidateOnFocus&&(V=Date.now()+R().focusThrottleInterval);const q=E1(v,x,(G,de={})=>{if(G==ho){const z=Date.now();R().revalidateOnFocus&&z>V&&F()&&(V=z+R().focusThrottleInterval,le())}else if(G==fo)R().revalidateOnReconnect&&F()&&le();else{if(G==wo)return Te();if(G==Jr)return Te(de)}});return j.current=!1,C.current=v,N.current=!0,I({_k:k}),ne&&(b[v]||(je(W)||Wa?le():p1(le))),()=>{j.current=!0,q()}},[v]),Ts(()=>{let le;function V(){const q=Rt(p)?p(A().data):p;q&&le!==-1&&(le=setTimeout(Y,q))}function Y(){!A().error&&(u||R().isVisible())&&(h||R().isOnline())?Te(bn).then(V):V()}return V(),()=>{le&&(clearTimeout(le),le=-1)}},[p,u,h,v]),o.useDebugValue(ce),l){if(!ei&&Wa&&be)throw new Error("Fallback data is required when using Suspense in SSR.");be&&(y.current=a,E.current=s,j.current=!1);const le=_[v],V=!je(le)&&be?Se(le):si;if(vn(V),!je(K)&&be)throw K;const Y=be?Te(bn):si;!je(ce)&&be&&(Y.status="fulfilled",Y.value=!0),vn(Y)}return{mutate:Se,get data(){return O.data=!0,ce},get error(){return O.error=!0,K},get isValidating(){return O.isValidating=!0,Qe},get isLoading(){return O.isLoading=!0,Je}}},ke=S1(R1),jt=()=>{const{adapter:e,deployment:a}=_e(),s=e.useNavigate(),n=(d,p)=>{s?s(d,p):window.location.href=d},i=d=>{if(d)return d;const u=new URLSearchParams(window.location.search).get("redirect_uri");return u||window.location.href};return{navigate:n,navigateToSignIn:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",wt(a.backend_host)??""),n(`${a.ui_settings.sign_in_page_url}?${u.toString()}`,{replace:!0})},navigateToAccountSelection:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",wt(a.backend_host)??""),n(`https://${a.frontend_host}?${u.toString()}`,{replace:!0})},navigateToSignUp:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",wt(a.backend_host)??""),n(`${a.ui_settings.sign_up_page_url}?${u.toString()}`,{replace:!0})}}};async function L1(e){const a=await e("/session",{method:"GET"});return(await T(a)).data}async function P1(e,a){const s=await e(`/session/switch-sign-in?sign_in_id=${a}`,{method:"POST"});return T(s)}async function $1(e,a){const s=a?`/session/sign-out?sign_in_id=${a}`:"/session/sign-out",n=await e(s,{method:"POST"});return T(n)}async function O1(e,a){const s=await e(`/session/switch-organization${a?`?organization_id=${a}`:""}`,{method:"POST"});return T(s)}async function Z1(e,a){const s=await e(`/session/switch-workspace?workspace_id=${a}`,{method:"POST"});return T(s)}async function H1(e,a){const s=await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"});return T(s)}const Qn=new Map,ns=new Map;function Lt(){Qn.clear(),ns.clear()}async function F1(e,a){const s=await e(`/session/token${a?`?template=${a}`:""}`);return T(s)}function ot(){const{client:e,loading:a}=ve(),{deployment:s}=_e(),{navigate:n}=jt(),{cache:i}=jo(),{data:l,error:m,mutate:c,isLoading:d}=ke(a?null:"/session",()=>L1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),p=o.useCallback(async()=>{await c(void 0,{revalidate:!0})},[c]),u=o.useCallback(async(h="default")=>{if(!l)throw new Error("no session");const f=Qn.get(h);if(f&&f.expires>Date.now())return(f==null?void 0:f.token)||"";ns.get(h)||ns.set(h,F1(e,h));const g=await ns.get(h);return ns.delete(h),Qn.set(h,g.data),g.data.token},[e,l==null?void 0:l.active_signin]);return a||!l||d?{loading:!0,error:m,session:null,switchSignIn:null,switchOrganization:null,switchWorkspace:null,exchangeTicket:null,signOut:null,getToken:null,refetch:p}:{loading:d,error:m,session:l,switchSignIn:async h=>{await P1(e,h),Lt(),await Da("/me/organization-memberships",void 0,{revalidate:!1}),await Da("/me/workspace-memberships",void 0,{revalidate:!1}),await c(void 0,{revalidate:!0}),await Da("/me/organization-memberships"),await Da("/me/workspace-memberships")},signOut:async h=>{await $1(e,h);const f=["/session","/user","/me/signins","/me/organization-memberships","/me/workspace-memberships","wacht-notifications:scope-unread"],g=["wacht-notifications:","wacht-agent-sessions:","wacht-agent-contexts:","wacht-org-domains:","wacht-api-workspaces:","wacht-api-organizations:"];if(i instanceof Map){const x=Array.from(i.keys());for(const w of x){let b=!1;(f.includes(w)||typeof w=="string"&&g.some(_=>w.startsWith(_)))&&(b=!0),b&&i.delete(w)}}Lt(),await c(void 0,{revalidate:!0}),s!=null&&s.ui_settings&&(h&&s.ui_settings.after_sign_out_one_page_url?n(s.ui_settings.after_sign_out_one_page_url):!h&&s.ui_settings.after_sign_out_all_page_url&&n(s.ui_settings.after_sign_out_all_page_url))},switchOrganization:async h=>{await O1(e,h),Lt(),await c(void 0,{revalidate:!0})},switchWorkspace:async h=>{await Z1(e,h),Lt(),await c(void 0,{revalidate:!0})},exchangeTicket:async h=>{await H1(e,h),Lt(),await c(void 0,{revalidate:!0})},getToken:u,refetch:p}}const Vt=()=>{const{organizationMemberships:e,refetch:a,loading:s}=fa(),{client:n}=ve(),{refetch:i}=ot(),l=o.useCallback(async Z=>(await T(await n(`/organizations/${Z.id}/roles`,{method:"GET"}))).data,[n]),m=o.useCallback(async(Z,H)=>{const M=new URLSearchParams;return H&&(M.set("page",H.page.toString()),M.set("limit",H.limit.toString()),H.search&&M.set("search",H.search)),(await T(await n(`/organizations/${Z.id}/members?${M.toString()}`,{method:"GET"}))).data},[n]),c=o.useCallback(async Z=>(await T(await n(`/organizations/${Z.id}/invitations`,{method:"GET"}))).data,[n]),d=o.useCallback(async Z=>(await T(await n(`/organizations/${Z.id}/domains`,{method:"GET"}))).data,[n]),p=o.useCallback(async(Z,H)=>{await n(`/organizations/${Z.id}/members/${H.id}/remove`,{method:"POST"})},[n]),u=o.useCallback(async Z=>{const H=new FormData;H.append("name",Z.name),Z.image&&H.append("image",Z.image),Z.description&&H.append("description",Z.description);const M=await T(await n("/organizations",{method:"POST",body:H}));return Lt(),await a(),await i(),M},[i,a,n]),h=o.useCallback(async(Z,H)=>{const M=Object.entries(H).reduce((D,[W,K])=>(K!=null&&(Array.isArray(K)?K.forEach(ee=>D.append(W,ee)):D.append(W,K)),D),new FormData),B=await T(await n(`/organizations/${Z.id}/update`,{method:"POST",body:M}));return await a(),B},[a,n]),f=o.useCallback(async(Z,H)=>{await n(`/organizations/${Z.id}/roles/${H.id}/remove`,{method:"POST"})},[n]),g=o.useCallback(async(Z,H)=>{const M=new FormData;return M.append("domain",H.fqdn),await T(await n(`/organizations/${Z.id}/domains`,{method:"POST",body:M}))},[n]),x=o.useCallback(async(Z,H)=>await T(await n(`/organizations/${Z.id}/domains/${H.id}/verify`,{method:"POST"})),[n]),w=o.useCallback(async(Z,H)=>await T(await n(`/organizations/${Z.id}/domains/${H.id}/delete`,{method:"POST"})),[n]),b=o.useCallback(async Z=>(await T(await n(`/organizations/${Z.id}/enterprise-connections`,{method:"GET"}))).data,[n]),_=o.useCallback(async(Z,H)=>{const M=new FormData;return M.append("protocol",H.protocol),H.domain_id&&M.append("domain_id",H.domain_id),H.idp_entity_id&&M.append("idp_entity_id",H.idp_entity_id),H.idp_sso_url&&M.append("idp_sso_url",H.idp_sso_url),H.idp_certificate&&M.append("idp_certificate",H.idp_certificate),H.oidc_client_id&&M.append("oidc_client_id",H.oidc_client_id),H.oidc_client_secret&&M.append("oidc_client_secret",H.oidc_client_secret),H.oidc_issuer_url&&M.append("oidc_issuer_url",H.oidc_issuer_url),H.oidc_scopes&&M.append("oidc_scopes",H.oidc_scopes),H.jit_enabled!==void 0&&M.append("jit_enabled",String(H.jit_enabled)),H.attribute_mapping&&M.append("attribute_mapping",JSON.stringify(H.attribute_mapping)),(await T(await n(`/organizations/${Z.id}/enterprise-connections`,{method:"POST",body:M}))).data},[n]),v=o.useCallback(async(Z,H,M)=>{const B=new FormData;return M.domain_id&&B.append("domain_id",M.domain_id),M.idp_entity_id&&B.append("idp_entity_id",M.idp_entity_id),M.idp_sso_url&&B.append("idp_sso_url",M.idp_sso_url),M.idp_certificate&&B.append("idp_certificate",M.idp_certificate),M.oidc_client_id&&B.append("oidc_client_id",M.oidc_client_id),M.oidc_client_secret&&B.append("oidc_client_secret",M.oidc_client_secret),M.oidc_issuer_url&&B.append("oidc_issuer_url",M.oidc_issuer_url),M.oidc_scopes&&B.append("oidc_scopes",M.oidc_scopes),M.attribute_mapping&&B.append("attribute_mapping",JSON.stringify(M.attribute_mapping)),(await T(await n(`/organizations/${Z.id}/enterprise-connections/${H}/update`,{method:"POST",body:B}))).data},[n]),k=o.useCallback(async(Z,H)=>{await n(`/organizations/${Z.id}/enterprise-connections/${H}/delete`,{method:"POST"})},[n]),N=o.useCallback(async(Z,H)=>{const M=new FormData;return M.append("protocol",H.protocol),H.idp_entity_id&&M.append("idp_entity_id",H.idp_entity_id),H.idp_sso_url&&M.append("idp_sso_url",H.idp_sso_url),H.idp_certificate&&M.append("idp_certificate",H.idp_certificate),H.oidc_issuer_url&&M.append("oidc_issuer_url",H.oidc_issuer_url),H.oidc_client_id&&M.append("oidc_client_id",H.oidc_client_id),H.oidc_client_secret&&M.append("oidc_client_secret",H.oidc_client_secret),(await T(await n(`/organizations/${Z.id}/enterprise-connections/test`,{method:"POST",body:M}))).data},[n]),j=o.useCallback(async(Z,H)=>(await T(await n(`/organizations/${Z.id}/enterprise-connections/${H}/test`,{method:"POST"}))).data,[n]),C=o.useCallback(async(Z,H)=>(await T(await n(`/organizations/${Z.id}/enterprise-connections/${H}/scim/token`,{method:"POST"}))).data,[n]),y=o.useCallback(async(Z,H)=>(await T(await n(`/organizations/${Z.id}/enterprise-connections/${H}/scim/token`,{method:"GET"}))).data,[n]),E=o.useCallback(async(Z,H)=>{await n(`/organizations/${Z.id}/enterprise-connections/${H}/scim/token/revoke`,{method:"POST"})},[n]),R=o.useCallback(async(Z,H)=>{const M=new FormData;return M.append("name",H.name),H.permissions&&H.permissions.forEach((D,W)=>{M.append(`permissions[${W}]`,D)}),await T(await n(`/organizations/${Z.id}/roles`,{method:"POST",body:M}))},[n]),F=o.useCallback(async Z=>(await T(await n(`/organizations/${Z.id}/leave`,{method:"POST"}))).data,[n]),A=o.useCallback(async Z=>{const H=await T(await n(`/organizations/${Z.id}/delete`,{method:"POST"}));return Lt(),await a(),await i(),H.data},[n,a,i]),I=o.useCallback(async(Z,H,M)=>(await T(await n(`/organizations/${Z.id}/members/${H.id}/roles/${M.id}/add`,{method:"POST"}))).data,[n]),L=o.useCallback(async(Z,H,M)=>(await T(await n(`/organizations/${Z.id}/members/${H.id}/roles/${M.id}/remove`,{method:"POST"}))).data,[n]),S=o.useCallback(async(Z,H)=>{var D,W;const M=new FormData;return M.append("email",H.email),M.append("role_id",H.organizationRole.id),(D=H.workspace)!=null&&D.id&&M.append("workspace_id",H.workspace.id),(W=H.workspaceRole)!=null&&W.id&&M.append("workspace_role_id",H.workspaceRole.id),(await T(await n(`/organizations/${Z.id}/invitations`,{method:"POST",body:M}))).data},[n]),O=o.useCallback(async(Z,H)=>(await T(await n(`/organizations/${Z.id}/invitations/${H.id}/discard`,{method:"POST"}))).data,[n]),P=o.useCallback(async(Z,H)=>(await T(await n(`/organizations/${Z.id}/invitations/${H.id}/resend`,{method:"POST"}))).data,[n]);return{organizations:o.useMemo(()=>e==null?void 0:e.map(Z=>Z.organization),[e]),loading:s,error:null,refetch:a,leaveOrganization:F,getOrganizationRoles:l,getOrganizationMembers:m,removeOrganizationMember:p,createOrganization:u,getOrganizationInvitations:c,getOrganizationDomains:d,addOrganizationDomain:g,verifyOrganizationDomain:x,removeOrganizationDomain:w,addRoleToOrganizationMember:I,removeRoleFromOrganizationMember:L,inviteOrganizationMember:S,discardOrganizationInvitation:O,resendOrganizationInvitation:P,updateOrganization:h,addRole:R,removeOrganizationRoles:f,deleteOrganization:A,getEnterpriseConnections:b,createEnterpriseConnection:_,updateEnterpriseConnection:v,deleteEnterpriseConnection:k,testEnterpriseConnectionConfig:N,testEnterpriseConnection:j,generateSCIMToken:C,getSCIMToken:y,revokeSCIMToken:E}},ha=()=>{const{loading:e,error:a,refetch:s,getOrganizationMembers:n,getOrganizationRoles:i,leaveOrganization:l,removeOrganizationMember:m,getOrganizationInvitations:c,getOrganizationDomains:d,removeOrganizationDomain:p,addOrganizationDomain:u,verifyOrganizationDomain:h,addRoleToOrganizationMember:f,removeRoleFromOrganizationMember:g,inviteOrganizationMember:x,discardOrganizationInvitation:w,resendOrganizationInvitation:b,updateOrganization:_,removeOrganizationRoles:v,getEnterpriseConnections:k,createEnterpriseConnection:N,updateEnterpriseConnection:j,deleteEnterpriseConnection:C,testEnterpriseConnectionConfig:y,testEnterpriseConnection:E,generateSCIMToken:R,getSCIMToken:F,revokeSCIMToken:A}=Vt(),{session:I,error:L,loading:S}=ot(),{organizationMemberships:O}=fa(),P=o.useMemo(()=>(O==null?void 0:O.find(z=>{var me;return z.id===((me=I==null?void 0:I.active_signin)==null?void 0:me.active_organization_membership_id)}))||null,[O,I]),$=o.useMemo(()=>(P==null?void 0:P.organization)||null,[P]),Z=o.useCallback(async z=>$?await _($,z):[],[$,_]),H=o.useCallback(async()=>$?await n($):[],[$,n]),M=o.useCallback(async()=>$?await i($):[],[$,i]),B=o.useCallback(async z=>$?await m($,z):[],[$,m]),D=o.useCallback(async z=>$?await v($,z):void 0,[$,v]),W=o.useCallback(async()=>$?await d($):[],[$,d]),K=o.useCallback(async z=>$?await u($,z):void 0,[$,u]),ee=o.useCallback(async z=>$?await h($,z):void 0,[$,h]),ce=o.useCallback(async z=>$?await p($,z):void 0,[$,p]),be=o.useCallback(async(z,me)=>$?await f($,z,me):void 0,[$,f]),Q=o.useCallback(async(z,me)=>$?await g($,z,me):void 0,[$,g]),ie=o.useCallback(async z=>$?await x($,z):void 0,[$,x]),ne=o.useCallback(async z=>$?await w($,z):void 0,[$,w]),U=o.useCallback(async z=>$?await b($,z):void 0,[$,b]),Qe=o.useCallback(async()=>{$&&await l($)},[$,l]),Je=o.useCallback(async()=>$?await c($):[],[$,c]),Te=o.useCallback(async()=>$?await k($):[],[$,k]),Se=o.useCallback(async z=>{if($)return await N($,z)},[$,N]),qe=o.useCallback(async(z,me)=>{if($)return await j($,z,me)},[$,j]),le=o.useCallback(async z=>{$&&await C($,z)},[$,C]),V=o.useCallback(async z=>$?await y($,z):null,[$,y]),Y=o.useCallback(async z=>$?await E($,z):null,[$,E]),q=o.useCallback(async z=>{if($)return await R($,z)},[$,R]),G=o.useCallback(async z=>{if($)return await F($,z)},[$,F]),de=o.useCallback(async z=>{$&&await A($,z)},[$,A]);return S||e?{activeOrganization:null,activeMembership:null,loading:!0,error:L||a,updateOrganization:null,getRoles:null,getMembers:null,getDomains:null,addDomain:null,verifyDomain:null,removeDomain:null,removeRole:null,getInvitations:null,removeMember:null,addMemberRole:null,removeMemberRole:null,inviteMember:null,discardInvitation:null,resendInvitation:null,leave:null,getEnterpriseConnections:null,createEnterpriseConnection:null,updateEnterpriseConnection:null,deleteEnterpriseConnection:null,generateSCIMToken:null,getSCIMToken:null,revokeSCIMToken:null}:{activeOrganization:$,activeMembership:P,loading:!1,refetch:s,getRoles:M,updateOrganization:Z,getMembers:H,getDomains:W,addDomain:K,verifyDomain:ee,removeDomain:ce,getInvitations:Je,removeMember:B,leave:Qe,removeRole:D,addMemberRole:be,removeMemberRole:Q,inviteMember:ie,discardInvitation:ne,resendInvitation:U,getEnterpriseConnections:Te,createEnterpriseConnection:Se,updateEnterpriseConnection:qe,deleteEnterpriseConnection:le,testEnterpriseConnectionConfig:V,testEnterpriseConnection:Y,generateSCIMToken:q,getSCIMToken:G,revokeSCIMToken:de,error:null}};async function T1(e){return(await T(await e("/me/organization-memberships"))).data}const fa=()=>{const{client:e,loading:a}=ve(),{data:s,isLoading:n,error:i,mutate:l}=ke(a?null:"/me/organization-memberships",()=>T1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),m=o.useCallback(async()=>{await l()},[l]);return{organizationMemberships:s,loading:a||n,error:i,refetch:m}};async function I1(e){return(await T(await e("/me/workspace-memberships"))).data}async function V1(e,a){return(await T(await e(`/workspaces/${a}/leave`,{method:"POST"}))).data}const en=()=>{const{client:e,loading:a}=ve(),{deployment:s}=_e(),{data:n,isLoading:i,error:l,mutate:m}=ke(!a&&(s!=null&&s.b2b_settings.workspaces_enabled)?"/me/workspace-memberships":null,()=>I1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),c=o.useCallback(async()=>{await m(void 0,{revalidate:!0})},[m]);return{workspaceMemberships:n,loading:a||i,error:l,refetch:c}},wa=()=>{const{workspaceMemberships:e,refetch:a,loading:s,error:n}=en(),{client:i}=ve(),{refetch:l}=ot(),m=o.useMemo(()=>e==null?void 0:e.map(C=>({...C.workspace,organization:C.organization,eligibility_restriction:C.eligibility_restriction})),[e]),c=o.useCallback(async(C,y,E,R)=>{const F=new FormData;F.append("name",y),E&&F.append("image",E),R&&F.append("description",R),F.append("organization_id",C);const A=await T(await i("/workspaces",{method:"POST",body:F}));return Lt(),await a(),A.data},[i,a]),d=o.useCallback(async C=>{const y=await V1(i,C);return Lt(),await a(),await l(),y},[i,a,l]),p=o.useCallback(async(C,y)=>{const E=new FormData;y.name&&E.append("name",y.name),y.description&&E.append("description",y.description),y.image&&E.append("image",y.image),y.enforce_2fa!==void 0&&E.append("enforce_2fa",String(y.enforce_2fa)),y.enable_ip_restriction!==void 0&&E.append("enable_ip_restriction",String(y.enable_ip_restriction)),y.whitelisted_ips&&y.whitelisted_ips.forEach(F=>E.append("whitelisted_ips",F));const R=await T(await i(`/workspaces/${C.id}/update`,{method:"POST",body:E}));return await a(),R.data},[i,a]),u=o.useCallback(async C=>{const y=await T(await i(`/workspaces/${C.id}/delete`,{method:"POST"}));return Lt(),await a(),y.data},[i,a]),h=o.useCallback(async(C,y)=>{const E=new URLSearchParams;return y&&(E.set("page",y.page.toString()),E.set("limit",y.limit.toString()),y.search&&E.set("search",y.search)),(await T(await i(`/workspaces/${C.id}/members?${E.toString()}`,{method:"GET"}))).data},[i]),f=o.useCallback(async C=>(await T(await i(`/workspaces/${C.id}/roles`,{method:"GET"}))).data,[i]),g=o.useCallback(async(C,y,E)=>{const R=new FormData;return R.append("name",y),E.forEach(A=>R.append("permissions",A)),(await T(await i(`/workspaces/${C.id}/roles`,{method:"POST",body:R}))).data},[i]),x=o.useCallback(async(C,y)=>(await T(await i(`/workspaces/${C.id}/roles/${y.id}/delete`,{method:"POST"}))).data,[i]),w=o.useCallback(async(C,y)=>{const E=await T(await i(`/workspaces/${C.id}/members/${y}/remove`,{method:"POST"}));return await a(),E.data},[i,a]),b=o.useCallback(async(C,y,E)=>(await T(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/add`,{method:"POST"}))).data,[i]),_=o.useCallback(async(C,y,E)=>(await T(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/remove`,{method:"POST"}))).data,[i]),v=o.useCallback(async C=>(await T(await i(`/organizations/${C.organization.id}/invitations?workspace_id=${C.id}`,{method:"GET"}))).data,[i]),k=o.useCallback(async(C,y,E)=>{const R=new FormData;return R.append("email",y),R.append("workspace_id",C.id),E&&R.append("workspace_role_id",E),(await T(await i(`/organizations/${C.organization.id}/invitations`,{method:"POST",body:R}))).data},[i]),N=o.useCallback(async(C,y)=>(await T(await i(`/organizations/${C.organization.id}/invitations/${y}/discard`,{method:"POST"}))).data,[i]),j=o.useCallback(async(C,y)=>(await T(await i(`/organizations/${C.organization.id}/invitations/${y}/resend`,{method:"POST"}))).data,[i]);return{workspaces:m||[],loading:s,error:n,refetch:a,leaveWorkspace:d,createWorkspace:c,updateWorkspace:p,deleteWorkspace:u,getWorkspaceMembers:h,getWorkspaceRoles:f,createWorkspaceRole:g,deleteWorkspaceRole:x,removeWorkspaceMember:w,addWorkspaceMemberRole:b,removeWorkspaceMemberRole:_,getWorkspaceInvitations:v,createWorkspaceInvitation:k,discardWorkspaceInvitation:N,resendWorkspaceInvitation:j}},zt=()=>{const{refetch:e,loading:a,error:s,workspaces:n,leaveWorkspace:i,updateWorkspace:l,deleteWorkspace:m,getWorkspaceMembers:c,getWorkspaceRoles:d,createWorkspaceRole:p,deleteWorkspaceRole:u,removeWorkspaceMember:h,addWorkspaceMemberRole:f,removeWorkspaceMemberRole:g,getWorkspaceInvitations:x,createWorkspaceInvitation:w,discardWorkspaceInvitation:b,resendWorkspaceInvitation:_}=wa(),{workspaceMemberships:v}=en(),{session:k,loading:N,error:j}=ot(),C=o.useMemo(()=>(v==null?void 0:v.find(ee=>{var ce;return ee.id===((ce=k==null?void 0:k.active_signin)==null?void 0:ce.active_workspace_membership_id)}))||null,[v,k]),y=o.useMemo(()=>(C==null?void 0:C.workspace)||null,[C]),E=o.useCallback(async()=>{if(y)return await i(y.id)},[y,i]),R=o.useCallback(async ee=>{if(y)return await l(y,ee)},[y,l]),F=o.useCallback(async()=>{if(y)return await m(y)},[y,m]),A=o.useCallback(async ee=>y?await c(y,ee):{data:[],meta:{total:0,page:1,limit:10}},[y,c]),I=o.useCallback(async()=>y?await d(y):[],[y,d]),L=o.useCallback(async(ee,ce)=>{if(y)return await p(y,ee,ce)},[y,p]),S=o.useCallback(async ee=>{if(y)return await u(y,ee)},[y,u]),O=o.useCallback(async ee=>{if(y)return await h(y,ee)},[y,h]),P=o.useCallback(async(ee,ce)=>{if(y)return await f(y,ee,ce)},[y,f]),$=o.useCallback(async(ee,ce)=>{if(y)return await g(y,ee,ce)},[y,g]),Z=o.useMemo(()=>(n==null?void 0:n.find(ee=>ee.id===(y==null?void 0:y.id)))||null,[n,y]),H=o.useCallback(async()=>Z?await x(Z):[],[Z,x]),M=o.useCallback(async ee=>{if(Z)return await w(Z,ee.email,ee.workspaceRoleId)},[Z,w]),B=o.useCallback(async ee=>{if(Z)return await b(Z,ee)},[Z,b]),D=o.useCallback(async ee=>{if(Z)return await _(Z,ee)},[Z,_]),W=a||N,K=s||j;return W?{activeWorkspace:null,activeMembership:null,loading:!0,error:K,refetch:e,leave:null,updateWorkspace:null,deleteWorkspace:null,getMembers:null,getRoles:null,createRole:null,deleteRole:null,inviteMember:null,removeMember:null,addMemberRole:null,removeMemberRole:null,getInvitations:null,discardInvitation:null,resendInvitation:null}:{activeWorkspace:y,activeMembership:C,loading:!1,error:K,refetch:e,leave:E,updateWorkspace:R,deleteWorkspace:F,getMembers:A,getRoles:I,createRole:L,deleteRole:S,inviteMember:M,removeMember:O,addMemberRole:P,removeMemberRole:$,getInvitations:H,discardInvitation:B,resendInvitation:D}};function yn(e){const a=new Uint8Array(e);let s="";for(let n=0;n<a.length;n++)s+=String.fromCharCode(a[n]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function jn(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),n=atob(s),i=new Uint8Array(n.length);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);return i.buffer}const z1=async e=>(await T(await e("/me"))).data,D1=async e=>(await T(await e("/me/signins"))).data;function ga(){const{client:e,loading:a}=ve(),{data:s,error:n,isLoading:i,mutate:l}=ke(a?null:"/user",()=>z1(e)),m=async Z=>{const H=new FormData;for(const[B,D]of Object.entries(Z))D!=null&&D!==""&&H.append(B,String(D));const M=await T(await e("/me",{method:"POST",body:H}));return l(),M},c=async()=>await T(await e("/me/email-addresses",{method:"GET"})),d=async Z=>await T(await e(`/me/email-addresses/${Z}`,{method:"GET"})),p=async Z=>{const H=new FormData;return H.append("email",Z),await T(await e("/me/email-addresses",{method:"POST",body:H}))},u=async Z=>await T(await e(`/me/email-addresses/${Z}/delete`,{method:"POST"})),h=async Z=>await T(await e(`/me/email-addresses/${Z}/prepare-verification`,{method:"POST"})),f=async(Z,H)=>await T(await e(`/me/email-addresses/${Z}/attempt-verification?code=${H}`,{method:"POST"})),g=async(Z,H)=>{const M=new FormData;return M.append("phone_number",Z),M.append("country_code",H),await T(await e("/me/phone-numbers",{method:"POST",body:M}))},x=async Z=>await T(await e(`/me/phone-numbers/${Z}/delete`,{method:"POST"})),w=async Z=>await T(await e(`/me/phone-numbers/${Z}/prepare-verification`,{method:"POST"})),b=async(Z,H)=>{const M=new FormData;return M.append("code",H),await T(await e(`/me/phone-numbers/${Z}/attempt-verification`,{method:"POST",body:M}))},_=async Z=>{const H=await T(await e(`/me/phone-numbers/${Z}/make-primary`,{method:"POST"}));return l(),H},v=async Z=>await T(await e(`/me/email-addresses/${Z}/make-primary`,{method:"POST"})),k=async()=>(await T(await e("/me/authenticator",{method:"POST"}))).data,N=async(Z,H)=>{const M=new FormData;return M.append("authenticator_id",Z),H.forEach(D=>{M.append("codes",D)}),await T(await e("/me/authenticator/attempt-verification",{method:"POST",body:M}))},j=async Z=>await T(await e(`/me/authenticator/${Z}/delete`,{method:"POST"})),C=async()=>(await T(await e("/me/backup-codes",{method:"POST"}))).data,y=async Z=>{const H=new FormData;return H.append("file",Z),await T(await e("/me/profile-picture",{method:"POST",body:H}))},E=async()=>(await T(await e("/me/backup-codes/regenerate",{method:"POST"}))).data,R=async(Z,H)=>{const M=new FormData;return M.append("current_password",Z),M.append("new_password",H),await T(await e("/me/update-password",{method:"POST",body:M}))},F=async Z=>{const H=new FormData;H.append("current_password",Z);const M=await T(await e("/me/remove-password",{method:"POST",body:H}));return l(),M},A=async Z=>{const H=new FormData;return H.append("password",Z),await T(await e("/me/account/delete",{method:"POST",body:H}))},I=async Z=>await T(await e(`/me/social-connections/${Z}/disconnect`,{method:"POST"})),L=async({provider:Z,redirectUri:H})=>{var D;const M=new URLSearchParams({provider:Z});H&&M.append("redirect_uri",H);const B=await T(await e(`/me/init-sso-connection?${M.toString()}`,{method:"POST"}));return"data"in B&&((D=B.data)!=null&&D.oauth_url)&&window.open(B.data.oauth_url,"_blank"),B},S=async()=>await T(await e("/me/passkeys",{method:"GET"})),O=async Z=>{var ce,be;const H=await T(await e("/me/passkeys/register/begin",{method:"POST"}));if(!("data"in H))return H;const M=H.data.options.publicKey,B={challenge:jn(M.challenge),rp:M.rp,user:{id:jn(M.user.id),name:M.user.name,displayName:M.user.displayName},pubKeyCredParams:M.pubKeyCredParams,timeout:M.timeout,attestation:M.attestation,authenticatorSelection:M.authenticatorSelection,excludeCredentials:(ce=M.excludeCredentials)==null?void 0:ce.map(Q=>({type:Q.type,id:jn(Q.id),transports:Q.transports}))},D=await navigator.credentials.create({publicKey:B});if(!D)throw new Error("Failed to create credential");const W=D.response,K={id:D.id,rawId:yn(D.rawId),type:D.type,response:{clientDataJSON:yn(W.clientDataJSON),attestationObject:yn(W.attestationObject),transports:((be=W.getTransports)==null?void 0:be.call(W))||[]}};return await T(await e(`/me/passkeys/register/finish?name=${encodeURIComponent(Z||"")}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)}))},P=async Z=>await T(await e(`/me/passkeys/${Z}/delete`,{method:"POST"})),$=async(Z,H)=>await T(await e(`/me/passkeys/${Z}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:H})}));return{user:{...s,refetch:l},loading:a||i,error:n||null,updateProfile:m,getEmailAddresses:c,getEmailAddress:d,createEmailAddress:p,deleteEmailAddress:u,prepareEmailVerification:h,attemptEmailVerification:f,makeEmailPrimary:v,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:_,setupAuthenticator:k,verifyAuthenticator:N,deleteAuthenticator:j,generateBackupCodes:C,regenerateBackupCodes:E,updateProfilePicture:y,disconnectSocialConnection:I,connectSocialAccount:L,updatePassword:R,removePassword:F,deleteAccount:A,getPasskeys:S,registerPasskey:O,deletePasskey:P,renamePasskey:$}}function _o(){const{client:e,loading:a}=ve(),{data:s,error:n,isLoading:i,mutate:l}=ke(a?null:"/me/signins",()=>D1(e));return{signins:s,error:n||null,removeSignin:async c=>await T(await e(`/me/signins/${c}/signout`,{method:"POST"})),refetch:l,loading:i||a}}function ko(){const{session:e,loading:a}=ot(),{loading:s,organizationMemberships:n}=fa(),{loading:i,workspaceMemberships:l}=en(),m=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(n==null?void 0:n.find(d=>{var p;return d.id===((p=e.active_signin)==null?void 0:p.active_organization_membership_id)}))||null,[n,e]),c=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(l==null?void 0:l.find(d=>{var p;return d.id===((p=e.active_signin)==null?void 0:p.active_workspace_membership_id)}))||null,[l,e]);return{loading:a||s||i,orgMembership:m,workspaceMembership:c}}function Co(){const{client:e,loading:a}=ve(),[s,n]=o.useState(!1),i=async l=>{n(!0);try{const m=new FormData;for(const[p,u]of Object.entries(l))u&&m.append(p,u);const c=await e("/waitlist/join",{method:"POST",body:m});return await T(c)}finally{n(!1)}};return a?{loading:!0,joinWaitlist:null}:{loading:s,joinWaitlist:i}}function No(){const{client:e,loading:a}=ve(),[s,n]=o.useState(!1),[i,l]=o.useState(null),[m,c]=o.useState(null),[d,p]=o.useState(null),[u,h]=o.useState(!1),[f,g]=o.useState(null);o.useEffect(()=>{if(u||a)return;const w=new URLSearchParams(window.location.search),b=w.get("code"),_=w.get("state"),v=w.get("error"),k=w.get("error_description");if(!b&&!v){h(!0);const N=new Error("No OAuth callback data found.");l(N);return}if(h(!0),n(!0),v){const N=k||v,j=new Error(`OAuth Error: ${N}`);l(j),n(!1);return}if(b&&_)x(b,_);else{const N=new Error("Missing required OAuth parameters");l(N),n(!1)}},[u,a]);const x=async(w,b)=>{try{let _,v;try{const j=b.split(".");if(j.length!==3)throw new Error("Invalid OAuth state format - missing signature");const C=j[0].replace(/-/g,"+").replace(/_/g,"/"),y=C.length%4?"=".repeat(4-C.length%4):"",R=atob(C+y).split("|")[0];if(R==="sign_in")_="/auth/oauth2/callback",v="GET";else if(R==="connect_social")_="/me/sso-connection-callback",v="POST";else throw new Error(`Unknown OAuth action: ${R}`)}catch(j){const C=j instanceof Error?j:new Error("Failed to parse OAuth state");l(new Error(`Invalid OAuth callback: ${C.message}. The authorization link may be expired or malformed. Please try signing in again.`)),n(!1);return}const k=await e(`${_}?code=${encodeURIComponent(w)}&state=${encodeURIComponent(b)}`,{method:v}),N=await T(k);if("data"in N){const j=N.data.session,C=N.data.redirect_uri||null;if(c(j),p(C),j.signin_attempts&&j.signin_attempts.length>0){const y=j.signin_attempts.at(-1);y&&g(y)}}else{const j=new Error("SSO callback failed");l(j)}}catch(_){const v=_ instanceof Error?_:new Error("Unknown error occurred");l(v)}finally{n(!1)}};return{loading:s,error:i,session:m,redirectUri:d,processed:u,signinAttempt:f}}function So(){const{client:e,loading:a}=ve(),[s,n]=o.useState(!1),[i,l]=o.useState(null);return{loading:a||s,verifyMagicLink:async c=>{if(!c.token||!c.attempt)throw new Error("Invalid magic link parameters");n(!0),l(null);try{const d=new URL("/auth/verify-magic-link",window.location.origin);d.searchParams.set("token",c.token),d.searchParams.set("attempt",c.attempt),c.redirectUri&&d.searchParams.set("redirect_uri",c.redirectUri);const p=await e(d.pathname+d.search,{method:"GET"}),u=await T(p);return n(!1),l(!0),u}catch(d){throw n(!1),l(!1),d}},success:i}}function U1(){const[e,a]=o.useState({});return o.useEffect(()=>{const s=new URLSearchParams(window.location.search);a({token:s.get("token")||void 0,attempt:s.get("attempt")||void 0,redirectUri:s.get("redirect_uri")||void 0})},[]),e}function Eo(){const{client:e,loading:a}=ve();return{loading:a,forgotPassword:async l=>{const m=new FormData;m.append("email",l);const c=await e("/auth/forgot-password",{method:"POST",body:m});return await T(c)},verifyOtp:async(l,m)=>{const c=new FormData;c.append("email",l),c.append("otp",m);const d=await e("/auth/forgot-password",{method:"POST",body:c});return await T(d)},resetPassword:async(l,m)=>{const c=new FormData;c.append("token",l),c.append("password",m);const d=await e("/auth/reset-password",{method:"POST",body:c});return await T(d)}}}const W1=()=>{},B1=W1(),Jn=Object,ni=e=>e===B1,G1=e=>typeof e=="function",As=new WeakMap,q1=e=>Jn.prototype.toString.call(e),_n=(e,a)=>e===`[object ${a}]`;let K1=0;const Xn=e=>{const a=typeof e,s=q1(e),n=_n(s,"Date"),i=_n(s,"RegExp"),l=_n(s,"Object");let m,c;if(Jn(e)===e&&!n&&!i){if(m=As.get(e),m)return m;if(m=++K1+"~",As.set(e,m),Array.isArray(e)){for(m="@",c=0;c<e.length;c++)m+=Xn(e[c])+",";As.set(e,m)}if(l){m="#";const d=Jn.keys(e).sort();for(;!ni(c=d.pop());)ni(e[c])||(m+=c+":"+Xn(e[c])+",");As.set(e,m)}}else m=n?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},Y1=e=>{if(G1(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Xn(e):"",[e,a]},Q1=e=>Y1(e?e(0,null):null)[0],kn=Promise.resolve(),J1=e=>(a,s,n)=>{const i=o.useRef(!1),{cache:l,initialSize:m=1,revalidateAll:c=!1,persistSize:d=!1,revalidateFirstPage:p=!0,revalidateOnMount:u=!1,parallel:h=!1}=n,[,,,f]=It.get(wr);let g;try{g=Q1(a),g&&(g=vo+g)}catch{}const[x,w,b]=ca(l,g),_=o.useCallback(()=>je(x()._l)?m:x()._l,[l,g,m]);zn.useSyncExternalStore(o.useCallback(E=>g?b(g,()=>{E()}):()=>{},[l,g]),_,_);const v=o.useCallback(()=>{const E=x()._l;return je(E)?m:E},[g,m]),k=o.useRef(v());Ts(()=>{if(!i.current){i.current=!0;return}g&&w({_l:d?k.current:v()})},[g,l]);const N=u&&!i.current,j=e(g,async E=>{const R=x()._i,F=x()._r;w({_r:ut});const A=[],I=v(),[L]=ca(l,E),S=L().data,O=[];let P=null;for(let $=0;$<I;++$){const[Z,H]=us(a($,h?null:P));if(!Z)break;const[M,B]=ca(l,Z);let D=M().data;const W=c||R||je(D)||p&&!$&&!je(S)||N||S&&!je(S[$])&&!n.compare(S[$],D);if(s&&(typeof F=="function"?F(D,H):W)){const K=async()=>{if(!(Z in f))D=await s(H);else{const ce=f[Z];delete f[Z],D=await ce}B({data:D,_k:H}),A[$]=D};h?O.push(K):await K()}else A[$]=D;h||(P=D)}return h&&await Promise.all(O.map($=>$())),w({_i:ut}),A},n),C=o.useCallback(function(E,R){const F=typeof R=="boolean"?{revalidate:R}:R||{},A=F.revalidate!==!1;return g?(A&&(je(E)?w({_i:!0,_r:F.revalidate}):w({_i:!1,_r:F.revalidate})),arguments.length?j.mutate(E,{...F,revalidate:A}):j.mutate()):kn},[g,l]),y=o.useCallback(E=>{if(!g)return kn;const[,R]=ca(l,g);let F;if(Rt(E)?F=E(v()):typeof E=="number"&&(F=E),typeof F!="number")return kn;R({_l:F}),k.current=F;const A=[],[I]=ca(l,g);let L=null;for(let S=0;S<F;++S){const[O]=us(a(S,L)),[P]=ca(l,O),$=O?P().data:ut;if(je($))return C(I().data);A.push($),L=$}return C(A)},[g,l,C,v]);return{size:v(),setSize:y,mutate:C,get data(){return j.data},get error(){return j.error},get isValidating(){return j.isValidating},get isLoading(){return j.isLoading}}},Ja=A1(ke,J1);function Ao({enabled:e=!0,channels:a,organizationIds:s,workspaceIds:n,onNotification:i,onError:l,reconnectDelay:m=1e3,maxReconnectAttempts:c=5}={}){const{session:d,loading:p}=ot(),{deployment:u,loading:h}=_e(),[f,g]=o.useState(!1),[x,w]=o.useState(null),b=o.useRef(null),_=o.useRef(null),v=o.useRef(0),k=o.useRef(null),N=o.useRef(i),j=o.useRef(l),C=o.useRef(a),y=o.useRef(s),E=o.useRef(n),R=o.useRef(m),F=o.useRef(c);N.current=i,j.current=l,C.current=a,y.current=s,E.current=n,R.current=m,F.current=c;const A=o.useCallback(()=>{_.current&&(clearTimeout(_.current),_.current=null),k.current&&(clearInterval(k.current),k.current=null),b.current&&(b.current.close(),b.current=null)},[]),I=o.useCallback(async()=>{var Z;if(!e||p||h||!d||!u)return;A();const O=new URL(u.backend_host),P=O.protocol==="https:"?"wss:":"ws:",$=new URL("/notifications/stream",`${P}//${O.host}`);if(u.mode==="staging"){const H=wt(u.backend_host);H&&$.searchParams.set("__dev_session__",H)}C.current&&C.current.length>0&&$.searchParams.set("channels",C.current.join(",")),y.current&&y.current.length>0&&$.searchParams.set("organization_ids",y.current.join(",")),E.current&&E.current.length>0&&$.searchParams.set("workspace_ids",E.current.join(","));try{const H=new WebSocket($.toString());b.current=H,H.onopen=()=>{g(!0),w(null),v.current=0,k.current=setInterval(()=>{H.readyState===WebSocket.OPEN&&H.send("ping")},3e4)},H.onmessage=M=>{var B,D;try{const W=JSON.parse(M.data);if(W.type==="notification"&&W.data)(B=N.current)==null||B.call(N,W.data);else if(W.type==="error"){const K=W.error||"Unknown error occurred";w(K),(D=j.current)==null||D.call(j,K)}else W.type}catch{}},H.onerror=()=>{var M;w("Connection error occurred"),(M=j.current)==null||M.call(j,"Connection error occurred")},H.onclose=M=>{var B;if(g(!1),k.current&&(clearInterval(k.current),k.current=null),e&&M.code!==1e3&&v.current<F.current){v.current++;const D=R.current*Math.pow(2,v.current-1);_.current=setTimeout(()=>{I()},D)}else v.current>=F.current&&(w("Max reconnection attempts reached"),(B=j.current)==null||B.call(j,"Max reconnection attempts reached"))}}catch{w("Failed to connect"),(Z=j.current)==null||Z.call(j,"Failed to connect")}},[e,p,h,d,u,A]);o.useEffect(()=>(I(),()=>{A()}),[I,A]),o.useEffect(()=>{b.current&&b.current.readyState===WebSocket.OPEN&&I()},[a,s,n,I]);const L=o.useCallback(()=>{A(),g(!1)},[A]),S=o.useCallback(()=>{v.current=0,I()},[I]);return{isConnected:f,connectionError:x,disconnect:L,reconnect:S}}function tn(e){if(!e)return"";const a=new URLSearchParams;e.limit&&a.append("limit",e.limit.toString()),e.cursor&&a.append("cursor",e.cursor),e.scope&&a.append("scope",e.scope),e.channels&&e.channels.length>0&&e.channels.forEach(n=>a.append("channels",n)),e.organization_ids&&e.organization_ids.length>0&&e.organization_ids.forEach(n=>a.append("organization_ids",n)),e.workspace_ids&&e.workspace_ids.length>0&&e.workspace_ids.forEach(n=>a.append("workspace_ids",n)),e.is_read!==void 0&&a.append("is_read",e.is_read.toString()),e.is_archived!==void 0&&a.append("is_archived",e.is_archived.toString()),e.is_starred!==void 0&&a.append("is_starred",e.is_starred.toString()),e.severity&&a.append("severity",e.severity);const s=a.toString();return s?"?"+s:""}async function X1(e,a){const s=`/notifications${tn(a)}`,n=await e(s,{method:"GET"});return(await T(n)).data}async function ed(e,a){const s=await e(`/notifications/${a}/read`,{method:"POST"});return T(s)}async function td(e,a){const s=await e(`/notifications/${a}/unread`,{method:"POST"});return T(s)}async function ad(e,a){const s=await e(`/notifications/mark-all-read${tn(a)}`,{method:"POST"});return T(s)}async function sd(e,a){const s=await e(`/notifications/archive-all-read${tn(a)}`,{method:"POST"});return T(s)}async function nd(e,a){const s=await e(`/notifications/${a}/archive`,{method:"POST"});return T(s)}async function rd(e,a){const s=await e(`/notifications/${a}/star`,{method:"POST"});return T(s)}function Mo(e){var E;const{client:a,loading:s}=ve(),{data:n,error:i,mutate:l,isLoading:m,size:c,setSize:d,isValidating:p}=Ja((R,F)=>{var S;if(s||R>0&&(!F||!F.has_more))return null;const A=R===0||(S=F==null?void 0:F.notifications[F.notifications.length-1])==null?void 0:S.id,{onNotification:I,...L}=e||{};return["wacht-notifications",{...L,cursor:A}]},([,R])=>X1(a,R),{refreshInterval:6e4,revalidateOnFocus:!0,revalidateFirstPage:!0}),u=o.useMemo(()=>n?n.flatMap(R=>R.notifications):[],[n]),h=n?(E=n[n.length-1])==null?void 0:E.has_more:!1,f=o.useMemo(()=>{if(e!=null&&e.channels&&e.channels.length>0)return e.channels;switch(e==null?void 0:e.scope){case"organization":return["organization"];case"workspace":return["workspace"];case"current":return["current"];case"all":return["user","organization","workspace"];case"user":return["user"];default:return}},[e==null?void 0:e.channels,e==null?void 0:e.scope]),g=o.useMemo(()=>e==null?void 0:e.organization_ids,[e==null?void 0:e.organization_ids]),x=o.useMemo(()=>e==null?void 0:e.workspace_ids,[e==null?void 0:e.workspace_ids]);Ao({enabled:!s&&!!n,channels:f,organizationIds:g,workspaceIds:x,onNotification:o.useCallback(R=>{l(async F=>{var S;if(!F||F.length===0||F.some(O=>O.notifications.some(P=>P.id===R.id.toString())))return F;(S=e==null?void 0:e.onNotification)==null||S.call(e,R);const I=F[0];return[{...I,notifications:[{id:R.id.toString(),user_id:R.user_id.toString(),deployment_id:R.deployment_id.toString(),title:R.title,body:R.body,severity:R.severity,ctas:R.ctas,is_read:!1,is_archived:!1,created_at:R.created_at,updated_at:R.created_at},...I.notifications]},...F.slice(1)]},!1)},[l,e]),onError:o.useCallback(()=>{},[])});const w=o.useCallback(async R=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:A.notifications.map(I=>I.id===R?{...I,is_read:!0}:I)})),!1),await ed(a,R),await l())},[a,s,l]),b=o.useCallback(async R=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:A.notifications.map(I=>I.id===R?{...I,is_read:!1}:I)})),!1),await td(a,R),await l())},[a,s,l]),_=o.useCallback(async()=>{s||(await l(async R=>R&&R.map(F=>({...F,notifications:F.notifications.map(A=>({...A,is_read:!0}))})),!1),await ad(a,e),await l())},[a,e,l,s]),v=o.useCallback(async()=>{s||(await l(async R=>R&&R.map(F=>({...F,notifications:F.notifications.filter(A=>!A.is_read)})),!1),await sd(a,e),await l())},[a,e,s,l]),k=o.useCallback(async R=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:(e==null?void 0:e.is_archived)!==void 0?A.notifications.filter(I=>I.id!==R):A.notifications.map(I=>I.id===R?{...I,is_archived:!I.is_archived}:I)})),!1),await nd(a,R),await l())},[a,s,l,e==null?void 0:e.is_archived]),N=o.useCallback(async R=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:A.notifications.map(I=>I.id===R?{...I,is_starred:!I.is_starred}:I)})),!1),await rd(a,R),await l())},[a,s,l]),j=o.useCallback(async()=>{p||!h||await d(c+1)},[p,h,d,c]),C=o.useCallback(async()=>{await l()},[l]),y=s||m||c>0&&n&&typeof n[c-1]>"u";return!n||y?{loading:!0,notifications:u,hasMore:h,markAsRead:void 0,markAllAsRead:void 0,archiveAllRead:void 0,archiveNotification:void 0,starNotification:void 0,markAsUnread:void 0,error:i,refetch:C,loadMore:j}:{loading:!1,error:i,notifications:u,hasMore:h,markAsRead:w,markAllAsRead:_,archiveAllRead:v,archiveNotification:k,starNotification:N,markAsUnread:b,refetch:C,loadMore:j}}async function id(e,a){const s=`/notifications/scope-unread${tn(a)}`,n=await e(s,{method:"GET"});return(await T(n)).data}function Ro(e){const{client:a,loading:s}=ve(),{data:n,error:i,mutate:l}=ke(s?null:["wacht-notifications-unread",e],([,c])=>id(a,c),{refreshInterval:3e4,revalidateOnFocus:!0}),m=async()=>{await l()};return!n||s?{loading:!0,count:0,error:i,refetch:m}:{loading:!1,count:n.count,error:i,refetch:m}}const Fa={DISCONNECTED:"disconnected",CONNECTED:"connected",ERROR:"error"},Ie={IDLE:"idle",STARTING:"starting",RUNNING:"running",WAITING_FOR_INPUT:"waiting_for_input",COMPLETED:"completed",FAILED:"failed"},ya={IDLE:"Idle",STARTING:"Starting",RUNNING:"Running",WAITING_FOR_INPUT:"WaitingForInput",COMPLETED:"Completed",FAILED:"Failed",CANCELLED:"Cancelled"};function od(e){switch(e.trim()){case ya.IDLE:return Ie.IDLE;case ya.STARTING:case"starting":return Ie.STARTING;case ya.RUNNING:case"running":return Ie.RUNNING;case ya.WAITING_FOR_INPUT:case"waiting_for_input":return Ie.WAITING_FOR_INPUT;case ya.COMPLETED:case"completed":return Ie.COMPLETED;case ya.FAILED:case ya.CANCELLED:case"failed":case"cancelled":return Ie.FAILED;default:return Ie.IDLE}}function Ta(e){return e===Ie.STARTING||e===Ie.RUNNING||e===Ie.WAITING_FOR_INPUT}function Jt(e){return e&&typeof e=="object"?e:null}function Na(e){return typeof e=="string"?e:null}function ld(e){const a=Jt(e);return(a==null?void 0:a.ConversationMessage)??e}function cd(e){const a=Jt(e);if(!a)return null;const s=Jt(a.content),n=Jt(a.metadata),i=Na(a.message_type)||Na(n==null?void 0:n.message_type)||Na(s==null?void 0:s.type);return{...a,metadata:{...n||{},message_type:i}}}function dd(e){const a=Jt(e.metadata),s=Jt(e.content);return Na(a==null?void 0:a.message_type)||Na(s==null?void 0:s.type)}function ud(e){const a=Jt(e.content);return Na(a==null?void 0:a.status)}function md(e){const a=Jt(e.content),s=Na(a==null?void 0:a.step);return s==="execution_cancelled"||s==="abort"}function pd(e){const a=Jt(e.content);return(a==null?void 0:a.further_actions_required)===!1}function ri(e){return[...e].sort((a,s)=>new Date(a.timestamp).getTime()-new Date(s.timestamp).getTime())}function hd(e,a){return{id:e,timestamp:new Date().toISOString(),content:{type:"user_message",message:a},metadata:{message_type:"user_message"}}}function fd(e,a){const s=new FormData;s.append("message",e);for(const n of a??[])s.append("files",n);return s}function wd(e,a){const s=new FormData;s.append("request_message_id",e);for(const n of a)s.append("approval_tool_name",n.tool_name),s.append("approval_mode",n.mode);return s}function gd(){const e=new FormData;return e.append("cancel","true"),e}function xd({deployment:e,threadId:a,file:s}){const n=s.url||s.filename;if(!n)return null;if(/^https?:\/\//i.test(n))return n;const i=e.backend_host.replace(/\/$/,"");let l;if(n.startsWith("/ai/threads/"))l=new URL(n,`${i}/`);else{const m=n.includes("/")?n.split("/").pop()??"":n;if(!m)return null;l=new URL(`/ai/threads/${encodeURIComponent(a)}/filesystem/file`,`${i}/`),l.searchParams.set("path",`uploads/${m}`)}if(e.mode==="staging"){const m=wt(e.backend_host);m&&l.searchParams.set("__dev_session__",m)}return l.toString()}const vd=5e3,bd=5e3;function yd({threadId:e,initialThread:a=null,platformAdapter:s}){var Ze,mt;const{deployment:n}=_e(),{client:i}=ve(),[l,m]=o.useState([]),[c,d]=o.useState(null),[p,u]=o.useState(null),[h,f]=o.useState(a),[g,x]=o.useState(Ie.IDLE),[w,b]=o.useState({status:Fa.DISCONNECTED}),[_,v]=o.useState(!0),[k,N]=o.useState(!1),[j,C]=o.useState(!1),[y,E]=o.useState(null),R=o.useRef(null),F=o.useRef(e),A=o.useRef(0),I=o.useRef(Ie.IDLE),L=o.useRef(null),S=o.useCallback(J=>{m(re=>{const ue=[...re],He=ue.findIndex(Ee=>String(Ee.id)===String(J.id));return He>=0?ue[He]=J:ue.push(J),ri(ue)})},[]),O=o.useCallback(({messages:J,prepend:re,hasMore:ue})=>{const He=ri(J);He.length>0&&(R.current=He[0].id),m(Ee=>re?[...He,...Ee]:He),ue!==void 0&&v(ue)},[]),P=o.useCallback(J=>{I.current=J,x(J)},[]),$=o.useCallback(J=>{A.current=Date.now()+vd,P(J)},[P]),Z=o.useCallback(()=>{var J;A.current>Date.now()&&Ta(I.current)||(P(Ie.IDLE),(J=L.current)==null||J.call(L))},[P]),H=o.useCallback(J=>{const re=od(J),ue=Ta(re);!ue&&A.current>Date.now()&&Ta(I.current)||(ue&&(A.current=0),P(re))},[P]),M=o.useCallback(()=>{d(null),u(null)},[]),B=o.useCallback(J=>{f(re=>re&&{...re,...J?{status:J}:{},last_activity_at:new Date().toISOString()})},[]),D=o.useCallback((J,re)=>{S(hd(J,re)),M()},[M,S]),W=o.useCallback(J=>{const re=cd(J);if(!re)return;switch(dd(re)){case"system_decision":S(re),md(re)&&Z();return;case"execution_summary":case"tool_result":case"user_message":S(re);return;case"steer":S(re),pd(re)&&Z();return;case"approval_request":A.current=0,P(Ie.WAITING_FOR_INPUT),S(re);return;case"approval_response":S(re),$(Ie.RUNNING);return;case"execution_status":{const He=ud(re);if(!He)return;H(He),f(Ee=>Ee&&{...Ee,status:He});return}default:S(re)}},[H,Z,P,$,S]),K=o.useCallback((J,re)=>{var ue;(ue=s==null?void 0:s.onPlatformEvent)==null||ue.call(s,J,re)},[s]),ee=o.useRef(W),ce=o.useRef(K),be=o.useRef(i),Q=o.useRef(n);o.useEffect(()=>{ee.current=W,ce.current=K,be.current=i,Q.current=n}),o.useEffect(()=>{F.current=e},[e]);const ie=o.useRef(null),ne=o.useRef(null),U=o.useRef(0),Qe=10,Je=o.useCallback(async J=>{if(!e)return;const re=e;J?N(!0):C(!0),E(null);try{const ue=new URLSearchParams({limit:"100"});J&&ue.append("before_id",J);const He=await i(`/ai/threads/${e}/messages?${ue}`,{method:"GET"}),Ee=await T(He);Ee.data&&F.current===re&&O({messages:Ee.data.data,prepend:!!J,hasMore:Ee.data.has_more||!1})}catch(ue){F.current===re&&E(ue instanceof Error?ue:new Error("Failed to fetch messages"))}finally{F.current===re&&(J?N(!1):C(!1))}},[e,i,O]);o.useEffect(()=>{const J=Q.current;if(!J||!e)return;const re=()=>{ie.current&&(ie.current.close(),ie.current=null);const ue=new URL(`${J.backend_host}/ai/threads/${encodeURIComponent(e)}/stream`);if(J.mode==="staging"){const Ee=wt(J.backend_host);Ee&&ue.searchParams.append("__dev_session__",Ee)}const He=new EventSource(ue.toString(),{withCredentials:J.mode!=="staging"});ie.current=He,He.onopen=()=>{if(b({status:Fa.CONNECTED}),U.current>0){const Ee=e;setTimeout(()=>{i(`/ai/threads/${Ee}/messages?limit=100`,{method:"GET"}).then(async Ye=>{const vt=await T(Ye);vt.data&&F.current===Ee&&O({messages:vt.data.data,hasMore:vt.data.has_more||!1})}).catch(()=>{})},100)}U.current=0},He.onerror=()=>{if(b({status:Fa.ERROR}),He.close(),ie.current=null,U.current<Qe){const Ee=Math.min(1e3*Math.pow(2,U.current),3e4);ne.current=setTimeout(()=>{U.current++,re()},Ee)}else b({status:Fa.DISCONNECTED})},He.addEventListener("conversation_message",Ee=>{try{const Ye=ld(JSON.parse(Ee.data));Ye&&ee.current(Ye)}catch{}}),He.addEventListener("platform_event",Ee=>{try{const Ye=JSON.parse(Ee.data);Ye!=null&&Ye.PlatformEvent?ce.current(Ye.PlatformEvent[0],Ye.PlatformEvent[1]):Ye!=null&&Ye.event_label&&ce.current(Ye.event_label,Ye.event_data)}catch{}})};return re(),()=>{ne.current&&(clearTimeout(ne.current),ne.current=null),ie.current&&(ie.current.close(),ie.current=null)}},[e,i,O]);const Te=o.useCallback(async()=>{if(!e)return;const J=e;try{const re=await i(`/ai/threads/${J}`,{method:"GET"});if(!re.ok)return;const ue=await T(re);ue.data&&F.current===J&&(f(ue.data),H(ue.data.status),Da(`wacht-ai-thread:${J}`,ue.data,{revalidate:!1}))}catch{}},[e,i,H]);o.useEffect(()=>{L.current=Te},[Te]),o.useEffect(()=>{if(!e)return;Te();const J=window.setInterval(()=>{!Ta(I.current)&&A.current<=Date.now()||Te()},bd);return()=>{window.clearInterval(J)}},[e,Te]),o.useEffect(()=>{m([]),f(null),v(!0),N(!1),E(null),C(!!e),b({status:Fa.DISCONNECTED}),R.current=null,A.current=0,I.current=Ie.IDLE,x(Ie.IDLE),M()},[e,M]),o.useEffect(()=>{!a||a.id!==e||f(a)},[a,e]);const Se=o.useCallback(async(J,re)=>{var ue,He;if(!(!e||!n)){d(J),re&&re.length>0&&u(re),$(Ie.STARTING);try{const Ee=await i(`/ai/threads/${e}/run`,{method:"POST",body:fd(J,re)});if(Ee.ok){const Ye=await T(Ee),vt=((ue=Ye.data)==null?void 0:ue.conversation_id)??null;B(typeof((He=Ye.data)==null?void 0:He.status)=="string"?Ye.data.status:void 0),vt?D(vt,J):M(),$(Ie.RUNNING)}else A.current=0,P(Ie.IDLE),M()}catch{A.current=0,P(Ie.IDLE),M()}}},[e,n,i,$,P,B,M,D]);o.useEffect(()=>{e&&Je()},[e,Je]);const qe=o.useCallback(async()=>{await Je()},[Je]),le=o.useCallback(async()=>{if(!(k||!_||!R.current)){N(!0);try{await Je(R.current)}finally{N(!1)}}},[k,_,Je]),V=o.useCallback(()=>{m([]),M()},[M]),Y=o.useCallback(async(J,re)=>{if(!e)return!1;$(Ie.STARTING);try{return(await i(`/ai/threads/${e}/run`,{method:"POST",body:wd(J,re)})).ok?(B(),$(Ie.RUNNING),!0):(A.current=0,P(Ie.IDLE),!1)}catch{return A.current=0,P(Ie.IDLE),!1}},[e,i,$,P,B]),q=o.useCallback(async J=>{if(!e)return!1;$(Ie.STARTING);try{return(await i(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)})).ok?(B(),$(Ie.RUNNING),!0):(A.current=0,P(Ie.IDLE),!1)}catch{return A.current=0,P(Ie.IDLE),!1}},[e,i,$,P,B]),G=o.useCallback(async()=>{if(!(!e||!Ta(g)))try{await i(`/ai/threads/${e}/run`,{method:"POST",body:gd()}),A.current=0,B(),P(Ie.IDLE)}catch{}},[e,g,i,P,B]),de=o.useCallback(J=>!n||!e||!J?null:xd({deployment:n,threadId:e,file:J}),[e,n]),z=o.useCallback(J=>{const re=de(J);if(!re)return;const ue=document.createElement("a");ue.href=re,ue.download=(J==null?void 0:J.filename)||"attachment",ue.rel="noreferrer",document.body.appendChild(ue),ue.click(),document.body.removeChild(ue)},[de]),me=((Ze=h==null?void 0:h.execution_state)==null?void 0:Ze.pending_approval_request)??null,st=((mt=h==null?void 0:h.execution_state)==null?void 0:mt.pending_question)??null,Oe=h==null?void 0:h.status;return{thread:h,threadState:h,threadStatus:Oe,messages:l,pendingMessage:c,pendingFiles:p,connectionState:w,isConnected:w.status===Fa.CONNECTED,hasActiveRun:Ta(g),isRunning:g===Ie.STARTING||g===Ie.RUNNING,executionStatus:g,isWaitingForInput:g===Ie.WAITING_FOR_INPUT,pendingApprovalRequest:me,pendingClarificationRequest:st,hasMoreMessages:_,isLoadingMore:k,messagesLoading:j,messagesError:y,refreshThread:Te,refreshMessages:qe,sendMessage:Se,submitApprovalResponse:Y,submitAnswer:q,clearMessages:V,loadMoreMessages:le,cancelExecution:G,resolveMessageFileUrl:de,downloadMessageFile:z}}function jd(e){const{client:a}=ve(),[s,n]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>{const N=await a("/ai/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch session");return(await T(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=ke(h?"wacht-agent-session":null,f,{revalidateOnFocus:!1});o.useEffect(()=>{if(!e||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(d.current=!0,n(!0)):c(new Error("Failed to exchange ticket"))}catch(j){c(j instanceof Error?j:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const _=!m&&(e?s:!0)&&(!x||x.message!=="NO_SESSION"),v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:_,sessionLoading:i||h&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,actor:(g==null?void 0:g.actor)||null,agents:(g==null?void 0:g.agents)||[],ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}const ii={exists:!1,files:[]};function Ms(e,a,s){const i=(e||[]).filter(l=>l.id!==a.id);return!s&&a.archived_at?i:[a,...i]}function _d(e,a){return a===void 0?"":`?${new URLSearchParams({[e]:String(a)}).toString()}`}function er(e,a){const s=new URLSearchParams({path:e});return a&&s.set("include_archived","true"),`?${s.toString()}`}function Lo(e,a){const s=new URLSearchParams;e&&s.set("path",e),a&&s.set("include_archived","true");const n=s.toString();return n?`?${n}`:""}function kd(e){const a=e.split("/").pop()||e,s=a.lastIndexOf(".");return s<0||s===a.length-1?"":a.slice(s+1).toLowerCase()}function Cd(e,a){const s=kd(a),n=new Set(["doc","docx","ppt","pptx","xls","xlsx","pdf","zip","gz","tar","7z","rar","jar","war","bin"]),i=new Set(["txt","md","mdx","markdown","json","jsonc","js","jsx","ts","tsx","mts","cts","mjs","cjs","py","rb","php","java","kt","kts","go","rs","c","cc","cpp","cxx","h","hpp","swift","sh","bash","zsh","fish","ps1","sql","html","htm","css","scss","less","xml","svg","yaml","yml","toml","ini","cfg","conf","env","log"]);return n.has(s)?!1:i.has(s)?!0:e.startsWith("text/")||e.includes("json")||e.includes("javascript")||e.includes("typescript")||e.includes("python")||e.includes("xml")||e.includes("yaml")}function nt(e,a,s){if(s!=null){if(typeof s=="string"){e.set(a,s);return}if(typeof s=="boolean"||typeof s=="number"){e.set(a,String(s));return}}}function Nd(e,a,s){s&&e.set(a,JSON.stringify(s))}function oi(e){const a=new FormData;return nt(a,"name",e.name),nt(a,"agent_id","agent_id"in e?e.agent_id:void 0),nt(a,"description",e.description),nt(a,"status",e.status),a}function Sd(e){const a=new FormData;if(nt(a,"title",e.title),nt(a,"agent_id",e.agent_id),nt(a,"system_instructions",e.system_instructions),nt(a,"thread_purpose",e.thread_purpose),nt(a,"responsibility",e.responsibility),nt(a,"reusable",e.reusable),nt(a,"accepts_assignments",e.accepts_assignments),Nd(a,"metadata",e.metadata),Array.isArray(e.capability_tags))for(const s of e.capability_tags)a.append("capability_tags",s);return a}function Po(e){const a=new FormData;return nt(a,"title",e.title),nt(a,"agent_id",e.agent_id),nt(a,"system_instructions",e.system_instructions),a}function $o(e,a=[]){const s=new FormData;nt(s,"title",e.title),nt(s,"description",e.description),nt(s,"status",e.status),nt(s,"schedule_kind",e.schedule_kind),nt(s,"next_run_at",e.next_run_at),nt(s,"interval_seconds",e.interval_seconds),"clear_schedule"in e&&nt(s,"clear_schedule",e.clear_schedule);for(const n of a)s.append("files",n);return s}function Ed(e={}){const{client:a}=ve(),{includeArchived:s=!1,enabled:n=!0}=e,i=n?`wacht-ai-actor-projects:${s}`:null,l=o.useCallback(async()=>{const g=await a(`/ai/projects${_d("include_archived",s)}`);return(await T(g)).data},[a,s]),{data:m,error:c,mutate:d}=ke(i,l,{revalidateOnFocus:!1,refreshInterval:15e3}),p=o.useCallback(async g=>{const x=await a("/ai/projects",{method:"POST",body:oi(g)}),w=await T(x);return await d(b=>Ms(b,w.data,s),{revalidate:!0}),w},[a,s,d]),u=o.useCallback(async(g,x)=>{const w=await a(`/ai/projects/${g}/update`,{method:"POST",body:oi(x)}),b=await T(w);return await d(_=>Ms(_,b.data,s),{revalidate:!0}),b},[a,s,d]),h=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/archive`,{method:"POST",body:new URLSearchParams}),w=await T(x);return await d(b=>Ms(b,w.data,s),{revalidate:!0}),w},[a,s,d]),f=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/unarchive`,{method:"POST",body:new URLSearchParams}),w=await T(x);return await d(b=>Ms(b,w.data,s),{revalidate:!0}),w},[a,s,d]);return{projects:m||[],loading:!m&&!c,error:c,createProject:p,updateProject:u,archiveProject:h,unarchiveProject:f,refetch:async()=>{await d()}}}function Ad(e={}){const{client:a}=ve(),{enabled:s=!0,query:n="",limit:i=12}=e,l=n.trim(),m=s?`wacht-ai-actor-project-search:${l}:${i}`:null,c=o.useCallback(async()=>{const h=new URLSearchParams({limit:String(i)});l&&h.set("q",l);const f=await a(`/ai/projects/search?${h.toString()}`);return(await T(f)).data},[a,i,l]),{data:d,error:p,mutate:u}=ke(m,c,{revalidateOnFocus:!1});return{projects:(d==null?void 0:d.data)||[],loading:!d&&!p,error:p,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:d==null?void 0:d.next_cursor,refetch:async()=>{await u()}}}function Md(e,a={}){const{client:s}=ve(),{includeArchived:n=!1,enabled:i=!0}=a,l=i&&e?`wacht-ai-threads:${e}:${n}`:null,m=o.useCallback(async()=>{if(!e)return{data:[],has_more:!1,next_cursor:""};const w=new URLSearchParams({limit:"100"});n&&w.set("include_archived","true");const b=await s(`/ai/projects/${e}/threads?${w.toString()}`);return(await T(b)).data},[e,s,n]),{data:c,error:d,mutate:p}=ke(l,m,{revalidateOnFocus:!1,refreshInterval:15e3}),u=o.useCallback(async(w,b)=>{const _=await s(`/ai/projects/${w}/threads`,{method:"POST",body:Sd(b)}),v=await T(_);return w===e&&await p(),v},[e,s,p]),h=o.useCallback(async w=>{if(!e)throw new Error("projectId is required");return u(e,w)},[e,u]),f=o.useCallback(async(w,b)=>{const _=await s(`/ai/threads/${w}/update`,{method:"POST",body:Po(b)}),v=await T(_);return await p(),v},[s,p]),g=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/archive`,{method:"POST",body:new URLSearchParams}),_=await T(b);return await p(),_},[s,p]),x=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/unarchive`,{method:"POST",body:new URLSearchParams}),_=await T(b);return await p(),_},[s,p]);return{threads:(c==null?void 0:c.data)||[],loading:!c&&!d,error:d,hasMore:(c==null?void 0:c.has_more)||!1,nextCursor:(c==null?void 0:c.next_cursor)||"",createThread:h,createThreadForProject:u,updateThread:f,archiveThread:g,unarchiveThread:x,refetch:async()=>{await p()}}}function Rd(e,a={}){var g,x;const{client:s}=ve(),{includeArchived:n=!1,archivedOnly:i=!1,enabled:l=!0,query:m="",limit:c=10}=a,d=m.trim(),p=Ja((w,b)=>{if(!l||!e||w>0&&b&&!b.has_more)return null;const _=w===0||b==null?void 0:b.next_cursor;return["wacht-ai-project-thread-feed",e,i?"archived-only":n?"with-archived":"active-only",d,c,_||""]},async([,w,b,_,v,k])=>{const N=new URLSearchParams({limit:String(v)});b==="with-archived"?N.set("include_archived","true"):b==="archived-only"&&(N.set("include_archived","true"),N.set("archived_only","true")),_&&N.set("q",String(_)),k&&N.set("cursor",String(k));const j=await s(`/ai/projects/${w}/threads?${N.toString()}`);return(await T(j)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),u=o.useMemo(()=>{var w;return((w=p.data)==null?void 0:w.flatMap(b=>b.data||[]))||[]},[p.data]),h=p.data&&((g=p.data[p.data.length-1])==null?void 0:g.has_more)||!1,f=p.isValidating&&!!p.data&&p.size>(((x=p.data)==null?void 0:x.length)||0);return{threads:u,loading:!p.data&&!p.error,error:p.error||null,hasMore:h,loadingMore:f,loadMore:async()=>{!h||f||await p.setSize(w=>w+1)},refetch:async()=>{await p.mutate()}}}function Ld(e={}){const{client:a}=ve(),{enabled:s=!0,query:n="",limit:i=16}=e,l=n.trim(),m=s?`wacht-ai-actor-thread-search:${l}:${i}`:null,c=o.useCallback(async()=>{const h=new URLSearchParams({limit:String(i)});l&&h.set("q",l);const f=await a(`/ai/threads/search?${h.toString()}`);return(await T(f)).data},[a,i,l]),{data:d,error:p,mutate:u}=ke(m,c,{revalidateOnFocus:!1});return{threads:(d==null?void 0:d.data)||[],loading:!d&&!p,error:p,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:d==null?void 0:d.next_cursor,refetch:async()=>{await u()}}}function Pd(e,a=!0){const{client:s}=ve(),n=a&&e?`wacht-ai-thread:${e}`:null,i=o.useCallback(async()=>{if(!e)return null;const u=await s(`/ai/threads/${e}`);return(await T(u)).data},[e,s]),l=ke(n,i,{revalidateOnFocus:!1}),m=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");const h=await s(`/ai/threads/${e}/update`,{method:"POST",body:Po(u)}),f=await T(h);return await l.mutate(),f},[e,s,l]),c=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/archive`,{method:"POST",body:new URLSearchParams}),h=await T(u);return await l.mutate(),h},[e,s,l]),d=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/unarchive`,{method:"POST",body:new URLSearchParams}),h=await T(u);return await l.mutate(),h},[e,s,l]),p=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");await s(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)})},[e,s]);return{thread:l.data||null,loading:!l.data&&!l.error,error:l.error||null,updateThread:m,archiveThread:c,unarchiveThread:d,submitAnswer:p,refetch:async()=>{await l.mutate()}}}function $d(e,a=!0){const{client:s}=ve(),n=a&&e?`wacht-ai-thread-filesystem:${e}`:null,i=o.useCallback(async c=>{if(!e)throw new Error("threadId is required");const d=await s(`/ai/threads/${e}/filesystem/file${er(c)}`);if(!d.ok)throw new Error("Failed to load file");const p=await d.blob(),u=(d.headers.get("content-type")||"application/octet-stream").split(";")[0].trim().toLowerCase(),h=Cd(u,c);let f;return h&&(f=await p.text()),{path:c,name:c.split("/").pop()||"file",mime_type:u,is_text:h,size_bytes:p.size,truncated:!1,content:f,blob:p}},[e,s]),l=o.useCallback(async c=>{if(!e)return ii;const d=await s(`/ai/threads/${e}/filesystem${Lo(c)}`);return(await T(d)).data},[e,s]),m=ke(n,()=>l(),{revalidateOnFocus:!1});return{filesystem:m.data||ii,filesystemLoading:!m.data&&!m.error,filesystemError:m.error||null,getFile:i,listDirectory:l,refetch:async()=>{await m.mutate()}}}function Od(e,a={}){var h,f;const{client:s}=ve(),{enabled:n=!0,limit:i=40,order:l="asc"}=a,m=Math.min(Math.max(i,1),200),c=Ja((g,x)=>{if(!n||!e||g>0&&x&&!x.has_more)return null;const w=g===0||x==null?void 0:x.next_cursor;return["wacht-ai-thread-assignments",e,m,l,w||""]},async([,g,x,w,b])=>{const _=new URLSearchParams({limit:String(x)});w==="desc"&&_.set("order","desc"),b&&_.set("cursor",String(b));const v=await s(`/ai/threads/${g}/assignments?${_.toString()}`);return(await T(v)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useMemo(()=>{var g;return((g=c.data)==null?void 0:g.flatMap(x=>x.data||[]))||[]},[c.data]),p=c.data&&((h=c.data[c.data.length-1])==null?void 0:h.has_more)||!1,u=c.isValidating&&!!c.data&&c.size>(((f=c.data)==null?void 0:f.length)||0);return{assignments:d,loading:!c.data&&!c.error,error:c.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await c.setSize(g=>g+1)},refetch:async()=>{await c.mutate()}}}function Zd(e={},a){const s=new URLSearchParams;e.statuses&&e.statuses.length>0&&s.set("status",e.statuses.join(",")),e.includeArchived&&s.set("include_archived","true"),e.archivedOnly&&s.set("archived_only","true"),e.limit&&s.set("limit",String(e.limit)),a&&s.set("cursor",a);const n=s.toString();return n?`?${n}`:""}function Hd(e,a=!0,s={}){var x,w,b;const{client:n}=ve(),i=((x=s.statuses)==null?void 0:x.join(","))||"all",l=s.archivedOnly?"archived-only":s.includeArchived?"with-archived":"active-only",m=s.limit||60,c=Ja((_,v)=>{if(!a||!e||_>0&&v&&!v.has_more)return null;const k=_===0||v==null?void 0:v.next_cursor;return["wacht-ai-project-tasks",e,i,l,m,k||""]},async([,_,,,,v])=>{const k=await n(`/ai/projects/${_}/board/items${Zd(s,v||void 0)}`);return(await T(k)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useMemo(()=>{var _;return((_=c.data)==null?void 0:_.flatMap(v=>v.data||[]))||[]},[c.data]),p=c.data&&((w=c.data[c.data.length-1])==null?void 0:w.has_more)||!1,u=c.isValidating&&!!c.data&&c.size>(((b=c.data)==null?void 0:b.length)||0),h=o.useCallback(async(_,v=[])=>{if(!e)throw new Error("projectId is required");const k=await n(`/ai/projects/${e}/board/items`,{method:"POST",body:$o(_,v)}),N=await T(k);return await c.mutate(),N},[e,n,c]),f=o.useCallback(async _=>{if(!e)throw new Error("projectId is required");const v=await n(`/ai/projects/${e}/board/items/${_}/archive`,{method:"POST",body:new URLSearchParams}),k=await T(v);return await c.mutate(),k},[e,n,c]),g=o.useCallback(async _=>{if(!e)throw new Error("projectId is required");const v=await n(`/ai/projects/${e}/board/items/${_}/unarchive`,{method:"POST",body:new URLSearchParams}),k=await T(v);return await c.mutate(),k},[e,n,c]);return{tasks:d,loading:!c.data&&!c.error,error:c.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await c.setSize(_=>_+1)},createTask:h,archiveTask:f,unarchiveTask:g,refetch:async()=>{await c.mutate()}}}function Fd(e,a,s=!0,n={}){var I,L;const{client:i}=ve(),l=n.includeArchived?"with-archived":"active-only",m=n.includeArchived?"?include_archived=true":"",c=n.assignmentsOrder??"asc",d=Math.min(Math.max(n.assignmentsLimit??40,1),200),p=s&&e&&a?`wacht-ai-board-item:${e}:${a}:${l}`:null,u=s&&e&&a?`wacht-ai-board-item-workspace:${e}:${a}:${l}`:null,h=o.useCallback(async()=>{if(!e||!a)return null;const S=await i(`/ai/projects/${e}/board/items/${a}${m}`);return(await T(S)).data},[e,a,i,m]),f=ke(p,h,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),g=Ja((S,O)=>{if(!s||!e||!a||S>0&&O&&!O.has_more)return null;const P=S===0||O==null?void 0:O.next_cursor;return["wacht-ai-board-item-assignments",e,a,l,c,d,P||""]},async([,S,O,,P,$,Z])=>{const H=new URLSearchParams({limit:String($)});n.includeArchived&&H.set("include_archived","true"),P==="desc"&&H.set("order","desc"),Z&&H.set("cursor",String(Z));const M=await i(`/ai/projects/${S}/board/items/${O}/assignments?${H.toString()}`);return(await T(M)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),x=o.useCallback(async()=>{if(!e||!a)return{exists:!1,files:[]};const S=await i(`/ai/projects/${e}/board/items/${a}/filesystem${m}`);return(await T(S)).data},[e,a,i,m]),w=ke(u,x,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),b=o.useCallback(async(S,O=[])=>{if(!e||!a)throw new Error("projectId and itemId are required");const P=await i(`/ai/projects/${e}/board/items/${a}/update`,{method:"POST",body:$o(S,O)}),$=await T(P);return await f.mutate(),await w.mutate(),$},[e,a,i,f,w]),_=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/archive`,{method:"POST",body:new URLSearchParams}),O=await T(S);return await f.mutate(),O},[e,a,i,f]),v=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/unarchive`,{method:"POST",body:new URLSearchParams}),O=await T(S);return await f.mutate(),O},[e,a,i,f]),k=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/cancel`,{method:"POST",body:new URLSearchParams}),O=await T(S);return await f.mutate(),await g.mutate(),O},[e,a,i,f,g]),N=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const O=new FormData;if(S.freeform_text&&S.freeform_text.trim()!=="")O.append("freeform_text",S.freeform_text);else for(const Z of S.answers??[])O.append("answer_question_id",Z.question_id),O.append("answer_value",JSON.stringify(Z.value));const P=await i(`/ai/projects/${e}/board/items/${a}/answer`,{method:"POST",body:O}),$=await T(P);return await f.mutate(),$},[e,a,i,f]),j=o.useCallback(async S=>{var H;if(!e||!a)throw new Error("projectId and itemId are required");const O=f.data,P=(H=O==null?void 0:O.pending_approval)==null?void 0:H.request_message_id;if(!P)throw new Error("Task has no pending approval");const $=new FormData;$.set("request_message_id",P);for(const M of S)$.append("approval_tool_name",M.tool_name),$.append("approval_mode",M.mode);const Z=await i(`/ai/projects/${e}/board/items/${a}/approval`,{method:"POST",body:$});return await f.mutate(),Z.ok},[e,a,i,f]),C=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const O=await i(`/ai/projects/${e}/board/items/${a}/filesystem/file${er(S,n.includeArchived)}`);return await T(O)},[e,a,i,n.includeArchived]),y=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const O=await i(`/ai/projects/${e}/board/items/${a}/filesystem/download${er(S,n.includeArchived)}`);if(!O.ok)throw new Error("Failed to download file");const P=await O.blob(),$=S.split("/").pop()||"file",Z=URL.createObjectURL(P),H=document.createElement("a");H.href=Z,H.download=$,document.body.appendChild(H),H.click(),H.remove(),URL.revokeObjectURL(Z)},[e,a,i,n.includeArchived]),E=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const O=await i(`/ai/projects/${e}/board/items/${a}/filesystem${Lo(S,n.includeArchived)}`);return await T(O)},[e,a,i,n.includeArchived]),R=o.useMemo(()=>{var S;return((S=g.data)==null?void 0:S.flatMap(O=>O.data||[]))||[]},[g.data]),F=g.data&&((I=g.data[g.data.length-1])==null?void 0:I.has_more)||!1,A=g.isValidating&&!!g.data&&g.size>(((L=g.data)==null?void 0:L.length)||0);return{item:f.data||null,assignments:R,assignmentsHasMore:F,assignmentsLoadingMore:A,loadMoreAssignments:async()=>{!F||A||await g.setSize(S=>S+1)},taskWorkspace:w.data||{exists:!1,files:[]},taskWorkspaceLoading:!w.data&&!w.error,taskWorkspaceError:w.error||null,loading:!f.data&&!f.error||!g.data&&!g.error,error:f.error||g.error||null,updateItem:b,archiveItem:_,unarchiveItem:v,cancelItem:k,submitAnswer:N,submitApproval:j,getTaskWorkspaceFile:C,downloadTaskWorkspaceFile:y,listTaskWorkspaceDirectory:E,refetch:async()=>{await f.mutate(),await g.mutate(),await w.mutate()},refetchAssignments:async()=>{await g.mutate()},refetchTaskWorkspace:async()=>{await w.mutate()}}}function Td(e,a=!0){var g;const{client:s}=ve(),{data:n,error:i,mutate:l,isLoading:m,size:c,setSize:d,isValidating:p}=Ja((x,w)=>{if(!a||!e||x>0&&(!w||!w.has_more))return null;const b=x===0||w==null?void 0:w.next_cursor;return["wacht-ai-thread-graphs",e,b]},async([,x,w])=>{const b=new URLSearchParams;b.set("limit","10"),w&&b.set("cursor",String(w));const _=await s(`/ai/threads/${x}/task-graphs?${b.toString()}`),k=(await T(_)).data||{data:[],limit:10,has_more:!1};return{...k,data:(k.data||[]).map(N=>({...N,nodes:Array.isArray(N.nodes)?N.nodes:[],edges:Array.isArray(N.edges)?N.edges:[],summary:N.summary||null}))}},{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3,revalidateFirstPage:!0,revalidateAll:!1,persistSize:!0}),u=o.useMemo(()=>n?n.flatMap(x=>x.data||[]):[],[n]),h=n&&((g=n[n.length-1])==null?void 0:g.has_more)||!1,f=p&&!!n&&c>((n==null?void 0:n.length)||0);return{graphs:u,latestGraph:u[0]||null,has_more:h,loadingMore:f,loading:m,error:i,loadMore:async()=>{!h||f||await d(c+1)},refetch:async()=>{await l()}}}function Id(e,a,s=!0){const{client:n}=ve(),i=s&&e&&a?`wacht-ai-board-item-comments:${e}:${a}`:null,l=o.useCallback(async()=>{if(!e||!a)return[];const d=await n(`/ai/projects/${e}/board/items/${a}/comments`);return(await T(d)).data},[e,a,n]),m=ke(i,l,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),c=o.useCallback(async(d,p)=>{if(!e||!a)throw new Error("projectId and itemId are required");const u=new FormData;if(u.set("body",d),p)for(const g of p)u.append("attachments",g,g.name);const h=await n(`/ai/projects/${e}/board/items/${a}/comments`,{method:"POST",body:u}),f=await T(h);return await m.mutate(),f},[e,a,n,m]);return{comments:m.data||[],loading:!m.data&&!m.error,error:m.error||null,createComment:c,refetch:async()=>{await m.mutate()}}}function Vd(e=!0){const{client:a}=ve(),s=e?"wacht-ai-actor-mcp-servers":null,n=o.useCallback(async()=>{const u=await a("/ai/mcp-servers");return(await T(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:c}=ke(s,n,{revalidateOnFocus:!1}),d=o.useCallback(async u=>{const h=await a(`/ai/mcp-servers/${u}/connect`,{method:"POST",body:new URLSearchParams});return T(h)},[a]),p=o.useCallback(async u=>{const h=await a(`/ai/mcp-servers/${u}/disconnect`,{method:"POST",body:new URLSearchParams}),f=await T(h);return await m(),f},[a,m]);return{servers:i??[],loading:c,error:l,connect:d,disconnect:p,refetch:async()=>{await m()}}}function zd(e=!0){const{client:a}=ve(),s=e?"wacht-ai-external-agent-connections":null,n=o.useCallback(async()=>{const u=await a("/ai/external-connections");return(await T(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:c}=ke(s,n,{revalidateOnFocus:!1}),d=o.useCallback(async(u,h,f)=>{const g=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(h)}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({return_url:(f==null?void 0:f.returnUrl)??""})}),x=await T(g);return await m(),x.data},[a,m]),p=o.useCallback(async(u,h)=>{const f=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(h)}`,{method:"DELETE"}),g=await T(f);return await m(),g.data},[a,m]);return{connections:i??[],loading:c,error:l,connect:d,disconnect:p,refetch:async()=>{await m()}}}function Oo(e){const a=new URLSearchParams;return a.append("url",e.url),e.description&&a.append("description",e.description),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,n])=>{a.append(`headers[${s}]`,n)}),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function Dd(e){const a=new URLSearchParams;return e.url&&a.append("url",e.url),e.description!==void 0&&a.append("description",e.description||""),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,n])=>{a.append(`headers[${s}]`,n)}),e.is_active!==void 0&&a.append("is_active",e.is_active.toString()),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function Ud(e){const a=new URLSearchParams;return a.append("event_name",e.event_name),a.append("payload",JSON.stringify(e.payload||{})),a}function Wd(e){const a=new URLSearchParams;return(e.delivery_ids||[]).forEach(n=>a.append("delivery_ids",n)),e.start_date&&a.append("start_date",e.start_date),e.end_date&&a.append("end_date",e.end_date),e.status&&a.append("status",e.status),e.event_name&&a.append("event_name",e.event_name),e.endpoint_id&&a.append("endpoint_id",e.endpoint_id),e.idempotency_key&&a.append("idempotency_key",e.idempotency_key),a}const ws={"Content-Type":"application/x-www-form-urlencoded"};async function At(e,a){const s=await T(e);if(!s||!("data"in s))throw new Error(a);return s}async function Bd(e){const a=await e("/webhook/session",{method:"GET"});if(!a.ok)throw a.status===401||a.status===403?new Error("NO_SESSION"):new Error("Failed to fetch webhook app session");return(await At(a,"Failed to fetch webhook app session")).data}async function Gd(e,a){if(!(await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"})).ok)throw new Error("Failed to exchange ticket")}async function qd(e,a){const s=Oo(a),n=await e("/webhook/endpoints",{method:"POST",headers:ws,body:s.toString()});return At(n,"Failed to create webhook endpoint")}async function Kd(e,a,s){const n=Dd(s),i=await e(`/webhook/endpoints/${a}`,{method:"PUT",headers:ws,body:n.toString()});return At(i,"Failed to update webhook endpoint")}async function Yd(e,a){const s=await e(`/webhook/endpoints/${a}`,{method:"DELETE"});return At(s,"Failed to delete webhook endpoint")}async function Qd(e,a,s){const n=Ud(s),i=await e(`/webhook/endpoints/${a}/test`,{method:"POST",headers:ws,body:n.toString()});return At(i,"Failed to test webhook endpoint")}async function Jd(e){const a=await e("/webhook/rotate-secret",{method:"POST"});return At(a,"Failed to rotate signing secret")}async function Xd(e,a){const s=new URLSearchParams;for(const i of a.failure_notification_emails)s.append("failure_notification_emails",i);const n=await e("/webhook/settings",{method:"PUT",headers:ws,body:s.toString()});return At(n,"Failed to update webhook settings")}async function e2(e,a){const s=Wd(a),n=await e("/webhook/deliveries/replay",{method:"POST",headers:ws,body:s.toString()});return At(n,"Failed to replay webhook delivery")}async function t2(e,a){const s=await e(`/webhook/deliveries/${a}`,{method:"GET"});return At(s,"Failed to fetch delivery details")}async function a2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}`,{method:"GET"});return At(s,"Failed to fetch replay task status")}async function s2(e,a){const s=(a==null?void 0:a.limit)??50,n=(a==null?void 0:a.offset)??0,i=await e(`/webhook/deliveries/replay?limit=${s}&offset=${n}`,{method:"GET"});return At(i,"Failed to fetch replay tasks")}async function n2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}/cancel`,{method:"POST"});return At(s,"Failed to cancel replay task")}function r2(e){const{client:a}=ve(),[s,n]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>Bd(a),[a]),{data:g,error:x,isLoading:w,mutate:b}=ke(h?"wacht-webhook-app-session":null,f,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||d.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{await Gd(a,e),d.current=!0,n(!0)}catch(P){c(P instanceof Error?P:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const _=o.useCallback(async O=>qd(a,O),[a]),v=o.useCallback(async(O,P)=>Kd(a,O,P),[a]),k=o.useCallback(async O=>Yd(a,O),[a]),N=o.useCallback(async(O,P)=>Qd(a,O,P),[a]),j=o.useCallback(async()=>Jd(a),[a]),C=o.useCallback(async O=>e2(a,O),[a]),y=o.useCallback(async O=>Xd(a,O),[a]),E=o.useCallback(async O=>t2(a,O),[a]),R=o.useCallback(async O=>a2(a,O),[a]),F=o.useCallback(async O=>s2(a,O),[a]),A=o.useCallback(async O=>n2(a,O),[a]),I=!x||x.message!=="NO_SESSION",L=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:I,sessionLoading:i||h&&w,sessionError:L,sessionId:(g==null?void 0:g.session_id)||null,webhookApp:(g==null?void 0:g.webhook_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()},createEndpoint:_,updateEndpoint:v,deleteEndpoint:k,testEndpoint:N,rotateSecret:j,updateSettings:y,replayDelivery:C,fetchReplayTaskStatus:R,fetchReplayTasks:F,cancelReplayTask:A,fetchDeliveryDetail:E}}function i2(){const{client:e}=ve(),a=o.useCallback(async()=>{const m=await e("/webhook/stats",{method:"GET"});return(await T(m)).data},[e]),{data:s,error:n,isLoading:i,mutate:l}=ke("wacht-webhook-stats",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{stats:s||null,loading:i,error:n,refetch:()=>l()}}function o2(){const{client:e}=ve(),a=o.useCallback(async()=>{const m=await e("/webhook/endpoints",{method:"GET"});return(await T(m)).data},[e]),{data:s,error:n,isLoading:i,mutate:l}=ke("wacht-webhook-endpoints",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{endpoints:s||[],loading:i,error:n,refetch:()=>l()}}function l2(){const{client:e}=ve();return{createEndpoint:o.useCallback(async s=>{const n=Oo(s),i=await e("/webhook/endpoints",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});return await T(i)},[e]),loading:!1,error:null}}function c2(){const{client:e}=ve(),a=o.useCallback(async()=>{const m=await e("/webhook/events",{method:"GET"});return(await T(m)).data},[e]),{data:s,error:n,isLoading:i,mutate:l}=ke("wacht-webhook-events",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{events:s||[],loading:i,error:n,refetch:()=>l()}}function d2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.status&&c.set("status",e.status),e.event_name&&c.set("event_name",e.event_name),e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor);const d=await a(`/webhook/deliveries?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.endpoint_id,e.status,e.event_name,e.limit,e.cursor]),{data:n,error:i,isLoading:l,mutate:m}=ke(()=>{const c=new URLSearchParams;return e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.status&&c.set("status",e.status),e.event_name&&c.set("event_name",e.event_name),e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),`wacht-webhook-deliveries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{deliveries:(n==null?void 0:n.data)||[],has_more:(n==null?void 0:n.has_more)||!1,next_cursor:n==null?void 0:n.next_cursor,loading:l,error:i,refetch:()=>m()}}function u2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&c.set("fields",e.fields.join(","));const d=await a(`/webhook/analytics?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.endpoint_id,e.fields]),{data:n,error:i,isLoading:l,mutate:m}=ke(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&c.set("fields",e.fields.join(",")),`wacht-webhook-analytics?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:n||null,loading:l,error:i,refetch:()=>m()}}function m2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id);const d=await a(`/webhook/analytics/timeseries?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.interval,e.endpoint_id]),{data:n,error:i,isLoading:l,mutate:m}=ke(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),`wacht-webhook-timeseries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(n==null?void 0:n.data)||[],interval:(n==null?void 0:n.interval)||"hour",loading:l,error:i,refetch:()=>m()}}function p2(e){const{client:a}=ve(),[s,n]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>{const N=await a("/api-auth/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch API auth app session");return(await T(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=ke(h?"wacht-api-auth-app-session":null,f,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||d.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(d.current=!0,n(!0)):c(new Error("Failed to exchange ticket"))}catch(j){c(j instanceof Error?j:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const _=!x||x.message!=="NO_SESSION",v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:_,sessionLoading:i||h&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,apiAuthApp:(g==null?void 0:g.api_auth_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}function h2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const u=new URLSearchParams;e.status&&u.set("status",e.status);const h=await a(`/api-auth/keys${u.toString()?`?${u.toString()}`:""}`,{method:"GET"});return(await T(h)).data},[a,e.status]),{data:n,error:i,isLoading:l,mutate:m}=ke(`wacht-api-auth-keys:${e.status||"all"}`,s,{revalidateOnFocus:!1,shouldRetryOnError:!1}),c=o.useCallback(async u=>{const h=new URLSearchParams;h.set("name",u.name),u.expires_at&&h.set("expires_at",u.expires_at);const f=await a("/api-auth/keys",{method:"POST",body:h}),g=await T(f);return await m(),g},[a,m]),d=o.useCallback(async u=>{const h=await a(`/api-auth/keys/${u.key_id}/rotate`,{method:"POST"}),f=await T(h);return await m(),f},[a,m]),p=o.useCallback(async u=>{const h=new URLSearchParams;u.reason&&h.set("reason",u.reason);const f=await a(`/api-auth/keys/${u.key_id}/revoke`,{method:"POST",body:h}),g=await T(f);return await m(),g},[a,m]);return{keys:n||[],createKey:c,rotateKey:d,revokeKey:p,loading:l,error:i,refetch:()=>m()}}function f2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),e.outcome&&c.set("outcome",e.outcome),e.key_id&&c.set("key_id",e.key_id),e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date);const d=await a(`/api-auth/audit/logs?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.limit,e.cursor,e.outcome,e.key_id,e.start_date,e.end_date]),{data:n,error:i,isLoading:l,mutate:m}=ke(()=>{const c=new URLSearchParams;return e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),e.outcome&&c.set("outcome",e.outcome),e.key_id&&c.set("key_id",e.key_id),e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),`wacht-api-auth-audit-logs?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{logs:(n==null?void 0:n.data)||[],limit:(n==null?void 0:n.limit)||e.limit||0,has_more:(n==null?void 0:n.has_more)||!1,next_cursor:n==null?void 0:n.next_cursor,loading:l,error:i,refetch:()=>m()}}function w2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.key_id&&c.set("key_id",e.key_id),e.include_top_keys&&c.set("include_top_keys","true"),e.include_top_paths&&c.set("include_top_paths","true"),e.include_blocked_reasons&&c.set("include_blocked_reasons","true"),e.include_rate_limits&&c.set("include_rate_limits","true"),e.top_limit&&c.set("top_limit",e.top_limit.toString());const d=await a(`/api-auth/audit/analytics?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.key_id,e.include_top_keys,e.include_top_paths,e.include_blocked_reasons,e.include_rate_limits,e.top_limit]),{data:n,error:i,isLoading:l,mutate:m}=ke(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.key_id&&c.set("key_id",e.key_id),e.include_top_keys&&c.set("include_top_keys","true"),e.include_top_paths&&c.set("include_top_paths","true"),e.include_blocked_reasons&&c.set("include_blocked_reasons","true"),e.include_rate_limits&&c.set("include_rate_limits","true"),e.top_limit&&c.set("top_limit",e.top_limit.toString()),`wacht-api-auth-audit-analytics?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:n||null,loading:l,error:i,refetch:()=>m()}}function g2(e={}){const{client:a}=ve(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.key_id&&c.set("key_id",e.key_id);const d=await a(`/api-auth/audit/timeseries?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.interval,e.key_id]),{data:n,error:i,isLoading:l,mutate:m}=ke(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.key_id&&c.set("key_id",e.key_id),`wacht-api-auth-audit-timeseries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(n==null?void 0:n.data)||[],interval:(n==null?void 0:n.interval)||e.interval||"hour",loading:l,error:i,refetch:()=>m()}}const Zo=()=>{const{client:e}=ve(),[a,s]=o.useState(!1),[n,i]=o.useState(null),[l,m]=o.useState(null),c=o.useCallback(async p=>{s(!0),i(null),m(null);try{const u=new FormData;u.append("token",p);const h=await e("/organizations/invitations/accept",{method:"POST",body:u}),g=(await T(h)).data;return m(g),g.error_code&&i(g.message||"Failed to accept invitation"),g}catch(u){const h=u.message||"Failed to accept invitation";i(h);const f={error_code:"NETWORK_ERROR",message:h};return m(f),f}finally{s(!1)}},[e]),d=o.useCallback(()=>{i(null),m(null)},[]);return{acceptInvitation:c,invitationData:l,loading:a,error:n,reset:d}},x2=({children:e})=>{const{loading:a}=_e();return a?null:t.jsx(t.Fragment,{children:e})},v2=({children:e})=>{const{loading:a}=_e();return a?t.jsx(t.Fragment,{children:e}):null},b2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,44H32A20,20,0,0,0,12,64V88a20,20,0,0,0,16,19.6V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V107.6A20,20,0,0,0,244,88V64A20,20,0,0,0,224,44ZM36,68H220V84H36ZM52,188V108H204v80Zm112-52a12,12,0,0,1-12,12H104a12,12,0,0,1,0-24h48A12,12,0,0,1,164,136Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm-72,96H104a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm72-56H32V64H224V88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,50H32A14,14,0,0,0,18,64V88a14,14,0,0,0,14,14h2v90a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V102h2a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50ZM210,192a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V102H210ZM226,88a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2ZM98,136a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,52H32A12,12,0,0,0,20,64V88a12,12,0,0,0,12,12h4v92a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V100h4a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52ZM212,192a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V100H212ZM228,88a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4ZM100,136a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,136Z"}))]]),y2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),j2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),_2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),k2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),C2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.88,207.93l-160-176A12,12,0,1,0,39.12,48.07l14.8,16.29A83.58,83.58,0,0,0,44,104c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.68,186,19.75,19.75,0,0,0,48,196H84.19a44,44,0,0,0,87.62,0h1.79l25.52,28.07a12,12,0,0,0,17.76-16.14ZM68,104a59.84,59.84,0,0,1,3.52-20.29L151.78,172H54.68C63.52,154,68,131.14,68,104Zm60,108a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM88.89,42.35a12,12,0,0,1,6.37-15.73A84,84,0,0,1,212,104c0,18.68,2.38,34.93,7.07,48.28a12,12,0,1,1-22.64,8C190.83,144.32,188,125.4,188,104a60,60,0,0,0-83.38-55.28A12,12,0,0,1,88.89,42.35Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.84,192v0a1.85,1.85,0,0,1-3,.28L83.27,43.19a4,4,0,0,1,.8-6A79.55,79.55,0,0,1,129.17,24C173,24.66,207.8,61.1,208,104.92c.14,34.88,8.31,61.54,13.82,71A15.89,15.89,0,0,1,221.84,192Zm-7.92,18.62a8,8,0,0,1-11.85,10.76L182.62,200H167.16a40,40,0,0,1-78.41,0H47.91a15.78,15.78,0,0,1-13.59-7.59,16.42,16.42,0,0,1-.09-16.68c5.55-9.73,13.7-36.64,13.7-71.73A79.42,79.42,0,0,1,58.79,63.85L42,45.38A8,8,0,1,1,53.84,34.62ZM150.59,200H105.32a24,24,0,0,0,45.27,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L61.31,63.56A77.45,77.45,0,0,0,50,104c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198h42.5a38,38,0,0,0,75,0h18l20,22a6,6,0,0,0,8.88-8.08ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218ZM48,186a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.86,170,62,139.69,62,104a65.63,65.63,0,0,1,7.78-31.12L172.62,186Zm165.29-8.62a5.88,5.88,0,0,1-2.2.42,6,6,0,0,1-5.58-3.81c-7.2-18.31-11.49-44.48-11.49-70A66,66,0,0,0,95.45,46.57a6,6,0,1,1-5.93-10.43A78,78,0,0,1,206,104c0,35.7,8.16,59.24,10.66,65.61A6,6,0,0,1,213.27,177.38Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L63.8,63.32A75.52,75.52,0,0,0,52,104c0,36.13-8.58,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0h20.64L205,218.69a4,4,0,1,0,5.92-5.38ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220ZM48,188a3.89,3.89,0,0,1-3.43-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a67.58,67.58,0,0,1,9.4-34.51L177.14,188Zm164.55-12.48a3.94,3.94,0,0,1-1.46.28,4,4,0,0,1-3.72-2.54C200.24,155.17,196,129.28,196,104A68,68,0,0,0,94.46,44.83a4,4,0,1,1-4-6.95A76,76,0,0,1,204,104c0,36.05,8.26,59.89,10.79,66.34A4,4,0,0,1,212.53,175.52Z"}))]]),N2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,204H228V96a20,20,0,0,0-20-20H172V32a20,20,0,0,0-28.45-18.12l-104,48.54A20.06,20.06,0,0,0,28,80.55V204H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM204,100V204H172V100ZM52,83.09,148,38.3V204H52ZM132,112v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm-40,0v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm0,52v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Zm40,0v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,32V216H40V85.35a8,8,0,0,1,3.56-6.66l80-53.33A8,8,0,0,1,136,32Z",opacity:"0.2"}),r.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M239.73,208H224V96a16,16,0,0,0-16-16H164a4,4,0,0,0-4,4V208H144V32.41a16.43,16.43,0,0,0-6.16-13,16,16,0,0,0-18.72-.69L39.12,72A16,16,0,0,0,32,85.34V208H16.27A8.18,8.18,0,0,0,8,215.47,8,8,0,0,0,16,224H240a8,8,0,0,0,8-8.53A8.18,8.18,0,0,0,239.73,208ZM76,184a8,8,0,0,1-8.53,8A8.18,8.18,0,0,1,60,183.72V168.27A8.19,8.19,0,0,1,67.47,160,8,8,0,0,1,76,168Zm0-56a8,8,0,0,1-8.53,8A8.19,8.19,0,0,1,60,127.72V112.27A8.19,8.19,0,0,1,67.47,104,8,8,0,0,1,76,112Zm40,56a8,8,0,0,1-8.53,8,8.18,8.18,0,0,1-7.47-8.26V168.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Zm0-56a8,8,0,0,1-8.53,8,8.19,8.19,0,0,1-7.47-8.26V112.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,210H222V96a14,14,0,0,0-14-14H142V32a14,14,0,0,0-21.77-11.64l-80,53.33A14,14,0,0,0,34,85.34V210H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM208,94a2,2,0,0,1,2,2V210H142V94ZM46,85.34a2,2,0,0,1,.89-1.66l80-53.34A2,2,0,0,1,130,32V210H46ZM110,112v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm-32,0v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm0,56v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Zm32,0v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,212H220V96a12,12,0,0,0-12-12H140V32a12,12,0,0,0-18.66-10l-80,53.33a12,12,0,0,0-5.34,10V212H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM208,92a4,4,0,0,1,4,4V212H140V92ZM44,85.34A4,4,0,0,1,45.78,82l80-53.33A4,4,0,0,1,132,32V212H44ZM108,112v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm-32,0v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm0,56v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Zm32,0v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Z"}))]]),S2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),E2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),r.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),A2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),r.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),M2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),r.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),R2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),r.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),L2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M80,176h96l-48,48ZM128,32,80,80h96Z",opacity:"0.2"}),r.createElement("path",{d:"M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"}))]]),P2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),$2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M152.41,88.56l-89.6,88a12,12,0,0,1-16.82,0L7.59,138.85a12,12,0,0,1,16.82-17.13l30,29.46,81.19-79.74a12,12,0,0,1,16.82,17.12Zm96.15-17a12,12,0,0,0-17-.15L150.4,151.18l-7.88-7.74a12,12,0,0,0-16.82,17.12l16.29,16a12,12,0,0,0,16.82,0l89.6-88A12,12,0,0,0,248.56,71.59Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,64V192a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V64A16,16,0,0,1,32,48H224A16,16,0,0,1,240,64Z",opacity:"0.2"}),r.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM72,168a8,8,0,0,1-5.66-2.34l-24-24a8,8,0,0,1,11.32-11.32L72,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32l-64,64A8,8,0,0,1,72,168Zm141.66-66.34-64,64a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L144,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M148.2,84.28l-89.6,88a6,6,0,0,1-8.4,0L11.8,134.57A6,6,0,1,1,20.2,126l34.2,33.58,85.4-83.87a6,6,0,1,1,8.4,8.56Zm96.08-8.48a6,6,0,0,0-8.48-.08l-85.4,83.87-20.23-19.87a6,6,0,1,0-8.41,8.56l24.44,24a6,6,0,0,0,8.4,0l89.6-88A6,6,0,0,0,244.28,75.8Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M146.8,82.85l-89.6,88a4,4,0,0,1-5.6,0L13.2,133.14a4,4,0,0,1,5.6-5.71l35.6,35,86.8-85.24a4,4,0,0,1,5.6,5.7Zm96-5.65a4,4,0,0,0-5.65,0l-86.8,85.24-21.63-21.24a4,4,0,1,0-5.61,5.7l24.44,24a4,4,0,0,0,5.6,0l89.6-88A4,4,0,0,0,242.85,77.2Z"}))]]),O2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]),Z2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),H2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),F2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,12H80A28,28,0,0,0,52,40V216a28,28,0,0,0,28,28h96a28,28,0,0,0,28-28V40A28,28,0,0,0,176,12ZM76,76H180V180H76Zm4-40h96a4,4,0,0,1,4,4V52H76V40A4,4,0,0,1,80,36Zm96,184H80a4,4,0,0,1-4-4V204H180v12A4,4,0,0,1,176,220Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,56V200H64V56Z",opacity:"0.2"}),r.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM80,32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,18H80A22,22,0,0,0,58,40V216a22,22,0,0,0,22,22h96a22,22,0,0,0,22-22V40A22,22,0,0,0,176,18ZM70,62H186V194H70ZM80,30h96a10,10,0,0,1,10,10V50H70V40A10,10,0,0,1,80,30Zm96,196H80a10,10,0,0,1-10-10V206H186v10A10,10,0,0,1,176,226Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,20H80A20,20,0,0,0,60,40V216a20,20,0,0,0,20,20h96a20,20,0,0,0,20-20V40A20,20,0,0,0,176,20ZM68,60H188V196H68ZM80,28h96a12,12,0,0,1,12,12V52H68V40A12,12,0,0,1,80,28Zm96,200H80a12,12,0,0,1-12-12V204H188v12A12,12,0,0,1,176,228Z"}))]]),T2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",opacity:"0.2"}),r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z"}))]]),I2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),V2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56l-96,88L32,56Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z"}))]]),z2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),D2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),U2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,128a224.48,224.48,0,0,1-26.37,105.54,12,12,0,1,1-21.16-11.32A200.33,200.33,0,0,0,136,128a8,8,0,0,0-16,0,12,12,0,0,1-24,0,32,32,0,0,1,64,0ZM128,56a12,12,0,1,0,0,24,48.05,48.05,0,0,1,48,48c0,7.62-.36,15.32-1.07,22.87A12,12,0,0,0,185.74,164c.38,0,.76,0,1.14,0a12,12,0,0,0,11.93-10.87c.79-8.3,1.18-16.76,1.18-25.13A72.08,72.08,0,0,0,128,56ZM96,92.23A12,12,0,0,0,80,74.35,72.1,72.1,0,0,0,56,128a120.11,120.11,0,0,1-15.12,58.37,12,12,0,0,0,21,11.69A144.14,144.14,0,0,0,80,128,48.08,48.08,0,0,1,96,92.23Zm10.1,64.1a12,12,0,0,0-14.46,8.9,158.61,158.61,0,0,1-18.88,45.86,12,12,0,0,0,20.5,12.48A182.86,182.86,0,0,0,115,170.79,12,12,0,0,0,106.1,156.33Zm76.73,24.07A12,12,0,0,0,168.19,189a241.5,241.5,0,0,1-8,24.87,12,12,0,0,0,6.91,15.49,11.76,11.76,0,0,0,4.29.8,12,12,0,0,0,11.21-7.71,260.2,260.2,0,0,0,8.79-27.37A12,12,0,0,0,182.83,180.4ZM128,16A112.12,112.12,0,0,0,16,127.44c0,.19,0,.38,0,.57a79.81,79.81,0,0,1-5,27.82,12,12,0,1,0,22.5,8.35A103.59,103.59,0,0,0,40,128.58c0-.19,0-.38,0-.57a88,88,0,0,1,176-.5c0,.16,0,.33,0,.5a282.12,282.12,0,0,1-6.74,61.38,12,12,0,0,0,9.09,14.33A11.84,11.84,0,0,0,221,204a12,12,0,0,0,11.7-9.38A305.87,305.87,0,0,0,240,128.55c0-.18,0-.36,0-.54A112.13,112.13,0,0,0,128,16Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M126.42,24C70.73,24.85,25.21,70.09,24,125.81a103.53,103.53,0,0,0,13.52,53.54,4,4,0,0,0,7.1-.3,119.35,119.35,0,0,0,11.37-51A71.77,71.77,0,0,1,83,71.83a8,8,0,1,1,9.86,12.61A55.82,55.82,0,0,0,72,128.07a135.28,135.28,0,0,1-18.45,68.35,4,4,0,0,0,.61,4.85c2,2,4.09,4,6.25,5.82a4,4,0,0,0,6-1A151.18,151.18,0,0,0,85,158.49a8,8,0,1,1,15.68,3.19,167.33,167.33,0,0,1-21.07,53.64,4,4,0,0,0,1.6,5.63c2.47,1.25,5,2.41,7.57,3.47a4,4,0,0,0,5-1.61A183,183,0,0,0,120,128.28a8.16,8.16,0,0,1,7.44-8.21,8,8,0,0,1,8.56,8,198.94,198.94,0,0,1-25.21,97.16,4,4,0,0,0,2.95,5.92q4.55.63,9.21.86a4,4,0,0,0,3.67-2.1A214.88,214.88,0,0,0,152,128.8c.05-13.25-10.3-24.49-23.54-24.74A24,24,0,0,0,104,128a8.1,8.1,0,0,1-7.29,8,8,8,0,0,1-8.71-8,40,40,0,0,1,40.42-40c22,.23,39.68,19.17,39.57,41.16a231.37,231.37,0,0,1-20.52,94.57,4,4,0,0,0,4.62,5.51,103.49,103.49,0,0,0,10.26-3,4,4,0,0,0,2.35-2.22,243.76,243.76,0,0,0,11.48-34,8,8,0,1,1,15.5,4q-1.12,4.37-2.4,8.7a4,4,0,0,0,6.46,4.17A104,104,0,0,0,126.42,24ZM198,161.08a8,8,0,0,1-7.92,7,8.39,8.39,0,0,1-1-.06,8,8,0,0,1-6.95-8.93,252.57,252.57,0,0,0,1.92-31,56.08,56.08,0,0,0-56-56,56.78,56.78,0,0,0-7,.43,8,8,0,0,1-2-15.89,72.1,72.1,0,0,1,81,71.49A266.93,266.93,0,0,1,198,161.08Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M70,128a132.68,132.68,0,0,1-14,59.58,6,6,0,0,1-5.38,3.33,6,6,0,0,1-5.36-8.67A120.74,120.74,0,0,0,58,128,69.72,69.72,0,0,1,84.25,73.36a6,6,0,0,1,7.51,9.37A57.73,57.73,0,0,0,70,128Zm58-6a6,6,0,0,0-6,6,186.07,186.07,0,0,1-23.23,90.07,6,6,0,0,0,10.5,5.82A198.14,198.14,0,0,0,134,128,6,6,0,0,0,128,122Zm0-32a38,38,0,0,0-38,38,6,6,0,0,0,12,0,26,26,0,0,1,52,0,216.06,216.06,0,0,1-20.71,92.85A6,6,0,1,0,144.16,226,227.94,227.94,0,0,0,166,128,38,38,0,0,0,128,90Zm0-64A102.11,102.11,0,0,0,26,128a90,90,0,0,1-5.12,30,6,6,0,1,0,11.31,4A101.83,101.83,0,0,0,38,128a90,90,0,0,1,180,0,284.7,284.7,0,0,1-5.33,54.84,6,6,0,0,0,4.72,7.05,6.8,6.8,0,0,0,1.17.11,6,6,0,0,0,5.88-4.84A295.92,295.92,0,0,0,230,128,102.12,102.12,0,0,0,128,26ZM94,154.13a6,6,0,0,0-7.07,4.69,152.82,152.82,0,0,1-17.44,46,6,6,0,0,0,10.4,6,164.77,164.77,0,0,0,18.8-49.65A6,6,0,0,0,94,154.13ZM128,58a70.76,70.76,0,0,0-8.75.54,6,6,0,1,0,1.49,11.91A58,58,0,0,1,186,128a252.27,252.27,0,0,1-1.94,31.26,6,6,0,0,0,5.21,6.69,6.59,6.59,0,0,0,.75,0,6,6,0,0,0,5.95-5.26A266.46,266.46,0,0,0,198,128,70.08,70.08,0,0,0,128,58ZM185.44,186.2a6,6,0,0,0-7.31,4.31c-1.47,5.74-3.18,11.49-5.06,17.09a6,6,0,0,0,11.38,3.82c2-5.88,3.75-11.9,5.3-17.92A6,6,0,0,0,185.44,186.2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M68,128A130.71,130.71,0,0,1,54.27,186.7a4,4,0,0,1-3.58,2.22,3.91,3.91,0,0,1-1.78-.42,4,4,0,0,1-1.8-5.36A122.71,122.71,0,0,0,60,128,67.74,67.74,0,0,1,85.5,74.92a4,4,0,0,1,5,6.25A59.74,59.74,0,0,0,68,128Zm60-4a4,4,0,0,0-4,4,188.1,188.1,0,0,1-23.48,91,4,4,0,0,0,7,3.88A196.22,196.22,0,0,0,132,128,4,4,0,0,0,128,124Zm0-32a36,36,0,0,0-36,36,4,4,0,0,0,8,0,28,28,0,0,1,56,0,218,218,0,0,1-20.9,93.7,4,4,0,1,0,7.24,3.41A226,226,0,0,0,164,128,36,36,0,0,0,128,92Zm0-64A100.11,100.11,0,0,0,28,128a91.66,91.66,0,0,1-5.24,30.67,4,4,0,1,0,7.54,2.66A99.66,99.66,0,0,0,36,128a92,92,0,0,1,184,0,286.37,286.37,0,0,1-5.37,55.23,4,4,0,0,0,3.15,4.69,4.13,4.13,0,0,0,.78.08,4,4,0,0,0,3.92-3.23A294.25,294.25,0,0,0,228,128,100.11,100.11,0,0,0,128,28ZM93.6,156.09a4,4,0,0,0-4.71,3.12,155,155,0,0,1-17.66,46.64,4,4,0,0,0,6.93,4,163.13,163.13,0,0,0,18.57-49A4,4,0,0,0,93.6,156.09ZM128,60a68.79,68.79,0,0,0-8.5.53,4,4,0,0,0,1,7.93A62.57,62.57,0,0,1,128,68a60.07,60.07,0,0,1,60,60,256.15,256.15,0,0,1-1.95,31.5,4,4,0,0,0,3.47,4.47l.5,0a4,4,0,0,0,4-3.51A264.37,264.37,0,0,0,196,128,68.08,68.08,0,0,0,128,60Zm56.93,128.12a4,4,0,0,0-4.87,2.88c-1.49,5.78-3.21,11.58-5.1,17.23a4,4,0,1,0,7.58,2.54c2-5.83,3.73-11.81,5.27-17.77A4,4,0,0,0,184.94,188.13Z"}))]]),W2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),B2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z"}))]]),G2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),q2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,84H180.2l7.61-41.85a12,12,0,0,0-23.62-4.3L155.8,84H116.2l7.61-41.85a12,12,0,1,0-23.62-4.3L91.8,84H48a12,12,0,0,0,0,24H87.44l-7.27,40H32a12,12,0,0,0,0,24H75.8l-7.61,41.85a12,12,0,0,0,9.66,14A11.43,11.43,0,0,0,80,228a12,12,0,0,0,11.8-9.86L100.2,172h39.6l-7.61,41.85a12,12,0,0,0,9.66,14,11.43,11.43,0,0,0,2.16.2,12,12,0,0,0,11.8-9.86L164.2,172H208a12,12,0,0,0,0-24H168.56l7.27-40H224a12,12,0,0,0,0-24Zm-79.83,64H104.56l7.27-40h39.61Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.82,96l-11.64,64h-64l11.64-64Z",opacity:"0.2"}),r.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116.25,112h31.5l-8,32h-31.5ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Zm-16,56a8,8,0,0,0-8-8H168.25l7.51-30.06a8,8,0,0,0-15.52-3.88L151.75,96h-31.5l7.51-30.06a8,8,0,0,0-15.52-3.88L103.75,96H64a8,8,0,0,0,0,16H99.75l-8,32H56a8,8,0,0,0,0,16H87.75l-7.51,30.06a8,8,0,0,0,5.82,9.7,8.13,8.13,0,0,0,2,.24,8,8,0,0,0,7.75-6.06L104.25,160h31.5l-7.51,30.06a8,8,0,0,0,5.82,9.7A8.13,8.13,0,0,0,136,200a8,8,0,0,0,7.75-6.06L152.25,160H192a8,8,0,0,0,0-16H156.25l8-32H200A8,8,0,0,0,208,104Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,90H173l8.89-48.93a6,6,0,1,0-11.8-2.14L160.81,90H109l8.89-48.93a6,6,0,0,0-11.8-2.14L96.81,90H48a6,6,0,0,0,0,12H94.63l-9.46,52H32a6,6,0,0,0,0,12H83L74.1,214.93a6,6,0,0,0,4.83,7A5.64,5.64,0,0,0,80,222a6,6,0,0,0,5.89-4.93L95.19,166H147l-8.89,48.93a6,6,0,0,0,4.83,7,5.64,5.64,0,0,0,1.08.1,6,6,0,0,0,5.89-4.93L159.19,166H208a6,6,0,0,0,0-12H161.37l9.46-52H224a6,6,0,0,0,0-12Zm-74.83,64H97.37l9.46-52h51.8Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,92H170.61l9.33-51.28a4,4,0,1,0-7.88-1.44L162.48,92H106.61l9.33-51.28a4,4,0,1,0-7.88-1.44L98.48,92H48a4,4,0,0,0,0,8H97L86.84,156H32a4,4,0,0,0,0,8H85.39l-9.33,51.28a4,4,0,0,0,3.22,4.65A3.65,3.65,0,0,0,80,220a4,4,0,0,0,3.94-3.29L93.52,164h55.87l-9.33,51.28a4,4,0,0,0,3.22,4.65,3.65,3.65,0,0,0,.72.07,4,4,0,0,0,3.94-3.29L157.52,164H208a4,4,0,0,0,0-8H159l10.19-56H224a4,4,0,0,0,0-8Zm-73.16,64H95l10.19-56H161Z"}))]]),K2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),Y2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),Q2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),J2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),r.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),X2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]),eu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),r.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),tu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),r.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),au=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),r.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),su=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,154.8l-47.09-21.11-.18-.08a19.94,19.94,0,0,0-19,1.75,13.08,13.08,0,0,0-1.12.84l-22.31,19c-13-7.05-26.43-20.37-33.49-33.21l19.06-22.66a11.76,11.76,0,0,0,.85-1.15,20,20,0,0,0,1.66-18.83,1.42,1.42,0,0,1-.08-.18L101.2,32A20.06,20.06,0,0,0,80.42,20.15,60.27,60.27,0,0,0,28,80c0,81.61,66.39,148,148,148a60.27,60.27,0,0,0,59.85-52.42A20.06,20.06,0,0,0,224,154.8ZM176,204A124.15,124.15,0,0,1,52,80,36.29,36.29,0,0,1,80.48,44.46l18.82,42L80.14,109.28a12,12,0,0,0-.86,1.16A20,20,0,0,0,78,130.08c9.42,19.28,28.83,38.56,48.31,48A20,20,0,0,0,146,176.63a11.63,11.63,0,0,0,1.11-.85l22.43-19.07,42,18.81A36.29,36.29,0,0,1,176,204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.94,174.08A48.33,48.33,0,0,1,176,216,136,136,0,0,1,40,80,48.33,48.33,0,0,1,81.92,32.06a8,8,0,0,1,8.3,4.8l21.13,47.2a8,8,0,0,1-.66,7.53L89.32,117a7.93,7.93,0,0,0-.54,7.81c8.27,16.93,25.77,34.22,42.75,42.41a7.92,7.92,0,0,0,7.83-.59l25-21.3a8,8,0,0,1,7.59-.69l47.16,21.13A8,8,0,0,1,223.94,174.08Z",opacity:"0.2"}),r.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.59,160.3l-47.24-21.17a14,14,0,0,0-13.28,1.22,4.81,4.81,0,0,0-.56.42l-24.69,21a1.88,1.88,0,0,1-1.68.06c-15.87-7.66-32.31-24-40-39.65a1.91,1.91,0,0,1,0-1.68l21.07-25a6.13,6.13,0,0,0,.42-.58,14,14,0,0,0,1.12-13.27L95.73,34.49a14,14,0,0,0-14.56-8.38A54.24,54.24,0,0,0,34,80c0,78.3,63.7,142,142,142a54.25,54.25,0,0,0,53.89-47.17A14,14,0,0,0,221.59,160.3ZM176,210C104.32,210,46,151.68,46,80A42.23,42.23,0,0,1,82.67,38h.23a2,2,0,0,1,1.84,1.31l21.1,47.11a2,2,0,0,1,0,1.67L84.73,113.15a4.73,4.73,0,0,0-.43.57,14,14,0,0,0-.91,13.73c8.87,18.16,27.17,36.32,45.53,45.19a14,14,0,0,0,13.77-1c.19-.13.38-.27.56-.42l24.68-21a1.92,1.92,0,0,1,1.6-.1l47.25,21.17a2,2,0,0,1,1.21,2A42.24,42.24,0,0,1,176,210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.78,162.13,173.56,141A12,12,0,0,0,162.18,142a3.37,3.37,0,0,0-.38.28L137,163.42a3.93,3.93,0,0,1-3.7.21c-16.24-7.84-33.05-24.52-40.89-40.57a3.9,3.9,0,0,1,.18-3.69l21.2-25.21c.1-.12.19-.25.28-.38a12,12,0,0,0,1-11.36L93.9,35.28a12,12,0,0,0-12.48-7.19A52.25,52.25,0,0,0,36,80c0,77.2,62.8,140,140,140a52.25,52.25,0,0,0,51.91-45.42A12,12,0,0,0,220.78,162.13ZM220,173.58A44.23,44.23,0,0,1,176,212C103.22,212,44,152.78,44,80A44.23,44.23,0,0,1,82.42,36a3.87,3.87,0,0,1,.48,0,4,4,0,0,1,3.67,2.49l21.11,47.14a4,4,0,0,1-.23,3.6l-21.19,25.2c-.1.13-.2.25-.29.39a12,12,0,0,0-.78,11.75c8.69,17.79,26.61,35.58,44.6,44.27a12,12,0,0,0,11.79-.87l.37-.28,24.83-21.12a3.93,3.93,0,0,1,3.57-.27l47.21,21.16A4,4,0,0,1,220,173.58Z"}))]]),nu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),ru=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96,40l33.52,88H56Zm104,88H129.52L160,208Z",opacity:"0.2"}),r.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"}))]]),iu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),ou=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",opacity:"0.2"}),r.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"}))]]),lu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),cu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),du=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"}))]]),uu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),mu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,56a12,12,0,0,1,12-12h12V32a12,12,0,0,1,24,0V44h12a12,12,0,0,1,0,24H212V80a12,12,0,0,1-24,0V68H176A12,12,0,0,1,164,56Zm70.51,54A107.88,107.88,0,1,1,146,21.49a12,12,0,0,1-4,23.67A85,85,0,0,0,128,44,83.94,83.94,0,0,0,62.05,179.94a83.48,83.48,0,0,1,29-23.42,52,52,0,1,1,74,0,83.36,83.36,0,0,1,29,23.42A83.52,83.52,0,0,0,212,128a85.2,85.2,0,0,0-1.16-14,12,12,0,0,1,23.67-4ZM128,148a28,28,0,1,0-28-28A28,28,0,0,0,128,148Zm0,64a83.53,83.53,0,0,0,48.43-15.43,60,60,0,0,0-96.86,0A83.53,83.53,0,0,0,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a95.76,95.76,0,0,1-31.8,71.37A72,72,0,0,0,128,160a40,40,0,1,0-40-40,40,40,0,0,0,40,40,72,72,0,0,0-64.2,39.37h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,76a44,44,0,1,1-44,44A44,44,0,0,1,128,76Zm48-12h16V80a8,8,0,0,0,16,0V64h16a8,8,0,0,0,0-16H208V32a8,8,0,0,0-16,0V48H176a8,8,0,0,0,0,16Zm45.35,40.11a8,8,0,0,0-6.57,9.21A88.85,88.85,0,0,1,216,128a87.62,87.62,0,0,1-22.24,58.41A79.86,79.86,0,0,0,172,165.1a4,4,0,0,0-4.84.32,59.81,59.81,0,0,1-78.27,0A4,4,0,0,0,84,165.1a79.71,79.71,0,0,0-21.79,21.31A88,88,0,0,1,128,40a88.76,88.76,0,0,1,14.68,1.22,8,8,0,0,0,2.64-15.78,103.92,103.92,0,1,0,85.24,85.24A8,8,0,0,0,221.35,104.11Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M170,56a6,6,0,0,1,6-6h18V32a6,6,0,0,1,12,0V50h18a6,6,0,0,1,0,12H206V80a6,6,0,0,1-12,0V62H176A6,6,0,0,1,170,56Zm58.59,55A101.9,101.9,0,1,1,145,27.41a6,6,0,1,1-2,11.83A91.66,91.66,0,0,0,128,38,89.95,89.95,0,0,0,62.49,189.64a77.53,77.53,0,0,1,40-31.38,46,46,0,1,1,51,0,77.53,77.53,0,0,1,40,31.38A89.65,89.65,0,0,0,218,128a91.76,91.76,0,0,0-1.24-15,6,6,0,1,1,11.83-2ZM128,154a34,34,0,1,0-34-34A34,34,0,0,0,128,154Zm0,64A89.58,89.58,0,0,0,184.56,198a66,66,0,0,0-113.12,0A89.58,89.58,0,0,0,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M172,56a4,4,0,0,1,4-4h20V32a4,4,0,0,1,8,0V52h20a4,4,0,0,1,0,8H204V80a4,4,0,0,1-8,0V60H176A4,4,0,0,1,172,56Zm54.62,55.34a99.89,99.89,0,1,1-82-82,4,4,0,0,1-1.32,7.89A93.4,93.4,0,0,0,128,36,92,92,0,0,0,62.83,192.87a75.61,75.61,0,0,1,44.51-34,44,44,0,1,1,41.32,0,75.61,75.61,0,0,1,44.51,34A91.69,91.69,0,0,0,220,128a93.58,93.58,0,0,0-1.27-15.34,4,4,0,0,1,7.89-1.32ZM128,156a36,36,0,1,0-36-36A36,36,0,0,0,128,156Zm0,64a91.61,91.61,0,0,0,59.14-21.58,68,68,0,0,0-118.27,0A91.56,91.56,0,0,0,128,220Z"}))]]),pu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z",opacity:"0.2"}),r.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z"}))]]),hu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),fu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]),wu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),gu=o.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),fe=r.forwardRef((e,a)=>{const{alt:s,color:n,size:i,weight:l,mirrored:m,children:c,weights:d,...p}=e,{color:u="currentColor",size:h,weight:f="regular",mirrored:g=!1,...x}=r.useContext(gu);return r.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:i??h,height:i??h,fill:n??u,viewBox:"0 0 256 256",transform:m||g?"scale(-1, 1)":void 0,...x,...p},!!s&&r.createElement("title",null,s),c,d.get(l??f))});fe.displayName="IconBase";const Ho=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:b2}));Ho.displayName="ArchiveIcon";const Fo=Ho,To=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:y2}));To.displayName="ArrowCounterClockwiseIcon";const Io=To,Vo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:j2}));Vo.displayName="ArrowSquareOutIcon";const xu=Vo,zo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:_2}));zo.displayName="ArrowsLeftRightIcon";const vu=zo,Do=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:k2}));Do.displayName="BellIcon";const bu=Do,Uo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:C2}));Uo.displayName="BellSlashIcon";const li=Uo,Wo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:N2}));Wo.displayName="BuildingsIcon";const ms=Wo,Bo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:S2}));Bo.displayName="CameraIcon";const an=Bo,Go=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:E2}));Go.displayName="CaretDownIcon";const Dt=Go,qo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:A2}));qo.displayName="CaretLeftIcon";const sn=qo,Ko=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:M2}));Ko.displayName="CaretRightIcon";const Qt=Ko,Yo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:R2}));Yo.displayName="CaretUpIcon";const Qo=Yo,Jo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:L2}));Jo.displayName="CaretUpDownIcon";const yu=Jo,Xo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:P2}));Xo.displayName="CheckIcon";const Ge=Xo,el=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:$2}));el.displayName="ChecksIcon";const ju=el,tl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:O2}));tl.displayName="CircleIcon";const _u=tl,al=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:Z2}));al.displayName="ClockIcon";const ku=al,sl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:H2}));sl.displayName="CopyIcon";const Ba=sl,nl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:F2}));nl.displayName="DeviceMobileIcon";const Cu=nl,rl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:T2}));rl.displayName="DotsThreeIcon";const Nu=rl,il=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:I2}));il.displayName="DownloadSimpleIcon";const ol=il,ll=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:V2}));ll.displayName="EnvelopeSimpleIcon";const cl=ll,dl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:z2}));dl.displayName="EyeIcon";const Cn=dl,ul=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:D2}));ul.displayName="EyeSlashIcon";const Nn=ul,ml=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:U2}));ml.displayName="FingerprintIcon";const tr=ml,pl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:W2}));pl.displayName="FolderSimpleIcon";const ci=pl,hl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:B2}));hl.displayName="GearSixIcon";const Sa=hl,fl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:G2}));fl.displayName="GlobeIcon";const Su=fl,wl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:q2}));wl.displayName="HashIcon";const gl=wl,xl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:K2}));xl.displayName="InfoIcon";const Eu=xl,vl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:Y2}));vl.displayName="KeyIcon";const Au=vl,bl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:Q2}));bl.displayName="LightningIcon";const Mu=bl,yl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:J2}));yl.displayName="LinkIcon";const Ru=yl,jl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:X2}));jl.displayName="LockIcon";const di=jl,_l=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:eu}));_l.displayName="MagnifyingGlassIcon";const kl=_l,Cl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:tu}));Cl.displayName="PaperPlaneTiltIcon";const Nl=Cl,Sl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:au}));Sl.displayName="PencilSimpleIcon";const El=Sl,Al=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:su}));Al.displayName="PhoneIcon";const Lu=Al,Ml=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:nu}));Ml.displayName="PlusIcon";const Nt=Ml,Rl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:ru}));Rl.displayName="PulseIcon";const Pu=Rl,Ll=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:iu}));Ll.displayName="ShieldIcon";const Xt=Ll,Pl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:ou}));Pl.displayName="SignOutIcon";const Ea=Pl,$l=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:lu}));$l.displayName="StarIcon";const $u=$l,Ol=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:cu}));Ol.displayName="TrashIcon";const gr=Ol,Zl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:du}));Zl.displayName="TrayIcon";const Ou=Zl,Hl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:uu}));Hl.displayName="UserIcon";const ps=Hl,Fl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:mu}));Fl.displayName="UserCirclePlusIcon";const Zu=Fl,Tl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:pu}));Tl.displayName="UsersIcon";const ls=Tl,Il=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:hu}));Il.displayName="WarningIcon";const Ha=Il,Vl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:fu}));Vl.displayName="WarningCircleIcon";const Aa=Vl,zl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:wu}));zl.displayName="XIcon";const Ra=zl;function Hu(e){var a=Object.create(null);return function(s){return a[s]===void 0&&(a[s]=e(s)),a[s]}}var Fu=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Tu=Hu(function(e){return Fu.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Xe="-ms-",cs="-moz-",Ue="-webkit-",Dl="comm",nn="rule",xr="decl",Iu="@import",Vu="@namespace",Ul="@keyframes",zu="@layer",Wl=Math.abs,vr=String.fromCharCode,ar=Object.assign;function Du(e,a){return dt(e,0)^45?(((a<<2^dt(e,0))<<2^dt(e,1))<<2^dt(e,2))<<2^dt(e,3):0}function Bl(e){return e.trim()}function Gt(e,a){return(e=a.exec(e))?e[0]:e}function Ne(e,a,s){return e.replace(a,s)}function Is(e,a,s){return e.indexOf(a,s)}function dt(e,a){return e.charCodeAt(a)|0}function La(e,a,s){return e.slice(a,s)}function Mt(e){return e.length}function Gl(e){return e.length}function rs(e,a){return a.push(e),e}function Uu(e,a){return e.map(a).join("")}function ui(e,a){return e.filter(function(s){return!Gt(s,a)})}var rn=1,qa=1,ql=0,Et=0,lt=0,Xa="";function on(e,a,s,n,i,l,m,c){return{value:e,root:a,parent:s,type:n,props:i,children:l,line:rn,column:qa,length:m,return:"",siblings:c}}function la(e,a){return ar(on("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},a)}function Ia(e){for(;e.root;)e=la(e.root,{children:[e]});rs(e,e.siblings)}function Wu(){return lt}function Bu(){return lt=Et>0?dt(Xa,--Et):0,qa--,lt===10&&(qa=1,rn--),lt}function Pt(){return lt=Et<ql?dt(Xa,Et++):0,qa++,lt===10&&(qa=1,rn++),lt}function da(){return dt(Xa,Et)}function Vs(){return Et}function ln(e,a){return La(Xa,e,a)}function hs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Gu(e){return rn=qa=1,ql=Mt(Xa=e),Et=0,[]}function qu(e){return Xa="",e}function Sn(e){return Bl(ln(Et-1,sr(e===91?e+2:e===40?e+1:e)))}function Ku(e){for(;(lt=da())&<<33;)Pt();return hs(e)>2||hs(lt)>3?"":" "}function Yu(e,a){for(;--a&&Pt()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return ln(e,Vs()+(a<6&&da()==32&&Pt()==32))}function sr(e){for(;Pt();)switch(lt){case e:return Et;case 34:case 39:e!==34&&e!==39&&sr(lt);break;case 40:e===41&&sr(e);break;case 92:Pt();break}return Et}function Qu(e,a){for(;Pt()&&e+lt!==57;)if(e+lt===84&&da()===47)break;return"/*"+ln(a,Et-1)+"*"+vr(e===47?e:Pt())}function Ju(e){for(;!hs(da());)Pt();return ln(e,Et)}function Xu(e){return qu(zs("",null,null,null,[""],e=Gu(e),0,[0],e))}function zs(e,a,s,n,i,l,m,c,d){for(var p=0,u=0,h=m,f=0,g=0,x=0,w=1,b=1,_=1,v=0,k="",N=i,j=l,C=n,y=k;b;)switch(x=v,v=Pt()){case 40:if(x!=108&&dt(y,h-1)==58){Is(y+=Ne(Sn(v),"&","&\f"),"&\f",Wl(p?c[p-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:y+=Sn(v);break;case 9:case 10:case 13:case 32:y+=Ku(x);break;case 92:y+=Yu(Vs()-1,7);continue;case 47:switch(da()){case 42:case 47:rs(e8(Qu(Pt(),Vs()),a,s,d),d),(hs(x||1)==5||hs(da()||1)==5)&&Mt(y)&&La(y,-1,void 0)!==" "&&(y+=" ");break;default:y+="/"}break;case 123*w:c[p++]=Mt(y)*_;case 125*w:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+u:_==-1&&(y=Ne(y,/\f/g,"")),g>0&&(Mt(y)-h||w===0&&x===47)&&rs(g>32?pi(y+";",n,s,h-1,d):pi(Ne(y," ","")+";",n,s,h-2,d),d);break;case 59:y+=";";default:if(rs(C=mi(y,a,s,p,u,i,c,k,N=[],j=[],h,l),l),v===123)if(u===0)zs(y,a,C,C,N,l,h,c,j);else{switch(f){case 99:if(dt(y,3)===110)break;case 108:if(dt(y,2)===97)break;default:u=0;case 100:case 109:case 115:}u?zs(e,C,C,n&&rs(mi(e,C,C,0,0,i,c,k,i,N=[],h,j),j),i,j,h,c,n?N:j):zs(y,C,C,C,[""],j,0,c,j)}}p=u=g=0,w=_=1,k=y="",h=m;break;case 58:h=1+Mt(y),g=x;default:if(w<1){if(v==123)--w;else if(v==125&&w++==0&&Bu()==125)continue}switch(y+=vr(v),v*w){case 38:_=u>0?1:(y+="\f",-1);break;case 44:c[p++]=(Mt(y)-1)*_,_=1;break;case 64:da()===45&&(y+=Sn(Pt())),f=da(),u=h=Mt(k=y+=Ju(Vs())),v++;break;case 45:x===45&&Mt(y)==2&&(w=0)}}return l}function mi(e,a,s,n,i,l,m,c,d,p,u,h){for(var f=i-1,g=i===0?l:[""],x=Gl(g),w=0,b=0,_=0;w<n;++w)for(var v=0,k=La(e,f+1,f=Wl(b=m[w])),N=e;v<x;++v)(N=Bl(b>0?g[v]+" "+k:Ne(k,/&\f/g,g[v])))&&(d[_++]=N);return on(e,a,s,i===0?nn:c,d,p,u,h)}function e8(e,a,s,n){return on(e,a,s,Dl,vr(Wu()),La(e,2,-2),0,n)}function pi(e,a,s,n,i){return on(e,a,s,xr,La(e,0,n),La(e,n+1,-1),n,i)}function Kl(e,a,s){switch(Du(e,a)){case 5103:return Ue+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Ue+e+e;case 4855:return Ue+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return cs+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ue+e+cs+e+Xe+e+e;case 5936:switch(dt(e,a+11)){case 114:return Ue+e+Xe+Ne(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ue+e+Xe+Ne(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ue+e+Xe+Ne(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ue+e+Xe+e+e;case 6165:return Ue+e+Xe+"flex-"+e+e;case 5187:return Ue+e+Ne(e,/(\w+).+(:[^]+)/,Ue+"box-$1$2"+Xe+"flex-$1$2")+e;case 5443:return Ue+e+Xe+"flex-item-"+Ne(e,/flex-|-self/g,"")+(Gt(e,/flex-|baseline/)?"":Xe+"grid-row-"+Ne(e,/flex-|-self/g,""))+e;case 4675:return Ue+e+Xe+"flex-line-pack"+Ne(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ue+e+Xe+Ne(e,"shrink","negative")+e;case 5292:return Ue+e+Xe+Ne(e,"basis","preferred-size")+e;case 6060:return Ue+"box-"+Ne(e,"-grow","")+Ue+e+Xe+Ne(e,"grow","positive")+e;case 4554:return Ue+Ne(e,/([^-])(transform)/g,"$1"+Ue+"$2")+e;case 6187:return Ne(Ne(Ne(e,/(zoom-|grab)/,Ue+"$1"),/(image-set)/,Ue+"$1"),e,"")+e;case 5495:case 3959:return Ne(e,/(image-set\([^]*)/,Ue+"$1$`$1");case 4968:return Ne(Ne(e,/(.+:)(flex-)?(.*)/,Ue+"box-pack:$3"+Xe+"flex-pack:$3"),/space-between/,"justify")+Ue+e+e;case 4200:if(!Gt(e,/flex-|baseline/))return Xe+"grid-column-align"+La(e,a)+e;break;case 2592:case 3360:return Xe+Ne(e,"template-","")+e;case 4384:case 3616:return s&&s.some(function(n,i){return a=i,Gt(n.props,/grid-\w+-end/)})?~Is(e+(s=s[a].value),"span",0)?e:Xe+Ne(e,"-start","")+e+Xe+"grid-row-span:"+(~Is(s,"span",0)?Gt(s,/\d+/):+Gt(s,/\d+/)-+Gt(e,/\d+/))+";":Xe+Ne(e,"-start","")+e;case 4896:case 4128:return s&&s.some(function(n){return Gt(n.props,/grid-\w+-start/)})?e:Xe+Ne(Ne(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ne(e,/(.+)-inline(.+)/,Ue+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Mt(e)-1-a>6)switch(dt(e,a+1)){case 109:if(dt(e,a+4)!==45)break;case 102:return Ne(e,/(.+:)(.+)-([^]+)/,"$1"+Ue+"$2-$3$1"+cs+(dt(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~Is(e,"stretch",0)?Kl(Ne(e,"stretch","fill-available"),a,s)+e:e}break;case 5152:case 5920:return Ne(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,i,l,m,c,d,p){return Xe+i+":"+l+p+(m?Xe+i+"-span:"+(c?d:+d-+l)+p:"")+e});case 4949:if(dt(e,a+6)===121)return Ne(e,":",":"+Ue)+e;break;case 6444:switch(dt(e,dt(e,14)===45?18:11)){case 120:return Ne(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ue+(dt(e,14)===45?"inline-":"")+"box$3$1"+Ue+"$2$3$1"+Xe+"$2box$3")+e;case 100:return Ne(e,":",":"+Xe)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ne(e,"scroll-","scroll-snap-")+e}return e}function qs(e,a){for(var s="",n=0;n<e.length;n++)s+=a(e[n],n,e,a)||"";return s}function t8(e,a,s,n){switch(e.type){case zu:if(e.children.length)break;case Iu:case Vu:case xr:return e.return=e.return||e.value;case Dl:return"";case Ul:return e.return=e.value+"{"+qs(e.children,n)+"}";case nn:if(!Mt(e.value=e.props.join(",")))return""}return Mt(s=qs(e.children,n))?e.return=e.value+"{"+s+"}":""}function a8(e){var a=Gl(e);return function(s,n,i,l){for(var m="",c=0;c<a;c++)m+=e[c](s,n,i,l)||"";return m}}function s8(e){return function(a){a.root||(a=a.return)&&e(a)}}function n8(e,a,s,n){if(e.length>-1&&!e.return)switch(e.type){case xr:e.return=Kl(e.value,e.length,s);return;case Ul:return qs([la(e,{value:Ne(e.value,"@","@"+Ue)})],n);case nn:if(e.length)return Uu(s=e.props,function(i){switch(Gt(i,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ia(la(e,{props:[Ne(i,/:(read-\w+)/,":"+cs+"$1")]})),Ia(la(e,{props:[i]})),ar(e,{props:ui(s,n)});break;case"::placeholder":Ia(la(e,{props:[Ne(i,/:(plac\w+)/,":"+Ue+"input-$1")]})),Ia(la(e,{props:[Ne(i,/:(plac\w+)/,":"+cs+"$1")]})),Ia(la(e,{props:[Ne(i,/:(plac\w+)/,Xe+"input-$1")]})),Ia(la(e,{props:[i]})),ar(e,{props:ui(s,n)});break}return""})}}var En,An;const Pa=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Yl="active",Ql="data-styled-version",cn="6.4.1",br=`/*!sc*/
|
|
19
|
-
`,
|
|
18
|
+
*/var Qr;function n1(){return Qr||(Qr=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}function a(g,x){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=x();if(!h){var b=x();l(w,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}b=m({inst:{value:w,getSnapshot:x}});var j=b[0].inst,v=b[1];return d(function(){j.value=w,j.getSnapshot=x,s(j)&&v({inst:j})},[g,w,x]),c(function(){return s(j)&&v({inst:j}),g(function(){s(j)&&v({inst:j})})},[g]),p(w),w}function s(g){var x=g.getSnapshot;g=g.value;try{var w=x();return!l(g,w)}catch{return!0}}function n(g,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=o,l=typeof Object.is=="function"?Object.is:e,m=i.useState,c=i.useEffect,d=i.useLayoutEffect,p=i.useDebugValue,u=!1,h=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:a;wn.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),wn}var Jr;function r1(){return Jr||(Jr=1,process.env.NODE_ENV==="production"?Ss.exports=s1():Ss.exports=n1()),Ss.exports}var Dn=r1();const fo=0,wo=1,go=2,Xr=3;var ei=Object.prototype.hasOwnProperty;function Un(e,a){var s,n;if(e===a)return!0;if(e&&a&&(s=e.constructor)===a.constructor){if(s===Date)return e.getTime()===a.getTime();if(s===RegExp)return e.toString()===a.toString();if(s===Array){if((n=e.length)===a.length)for(;n--&&Un(e[n],a[n]););return n===-1}if(!s||typeof e=="object"){n=0;for(s in e)if(ei.call(e,s)&&++n&&!ei.call(a,s)||!(s in a)||!Un(e[s],a[s]))return!1;return Object.keys(a).length===n}}return e!==e&&a!==a}const It=new WeakMap,Yt=()=>{},ut=Yt(),Wn=Object,_e=e=>e===ut,Rt=e=>typeof e=="function",ha=(e,a)=>({...e,...a}),xo=e=>Rt(e.then),gn={},Es={},wr="undefined",ws=typeof window!=wr,Bn=typeof document!=wr,i1=ws&&"Deno"in window,o1=()=>ws&&typeof window.requestAnimationFrame!=wr,da=(e,a)=>{const s=It.get(e);return[()=>!_e(a)&&e.get(a)||gn,n=>{if(!_e(a)){const i=e.get(a);a in Es||(Es[a]=i),s[5](a,ha(i,n),i||gn)}},s[6],()=>!_e(a)&&a in Es?Es[a]:!_e(a)&&e.get(a)||gn]};let Gn=!0;const l1=()=>Gn,[qn,Kn]=ws&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Yt,Yt],c1=()=>{const e=Bn&&document.visibilityState;return _e(e)||e!=="hidden"},d1=e=>(Bn&&document.addEventListener("visibilitychange",e),qn("focus",e),()=>{Bn&&document.removeEventListener("visibilitychange",e),Kn("focus",e)}),u1=e=>{const a=()=>{Gn=!0,e()},s=()=>{Gn=!1};return qn("online",a),qn("offline",s),()=>{Kn("online",a),Kn("offline",s)}},m1={isOnline:l1,isVisible:c1},p1={initFocus:d1,initReconnect:u1},ti=!o.useId,Ba=!ws||i1,h1=e=>o1()?window.requestAnimationFrame(e):setTimeout(e,1),Is=Ba?o.useEffect:o.useLayoutEffect,xn=typeof navigator<"u"&&navigator.connection,ai=!Ba&&xn&&(["slow-2g","2g"].includes(xn.effectiveType)||xn.saveData),As=new WeakMap,f1=e=>Wn.prototype.toString.call(e),vn=(e,a)=>e===`[object ${a}]`;let w1=0;const Yn=e=>{const a=typeof e,s=f1(e),n=vn(s,"Date"),i=vn(s,"RegExp"),l=vn(s,"Object");let m,c;if(Wn(e)===e&&!n&&!i){if(m=As.get(e),m)return m;if(m=++w1+"~",As.set(e,m),Array.isArray(e)){for(m="@",c=0;c<e.length;c++)m+=Yn(e[c])+",";As.set(e,m)}if(l){m="#";const d=Wn.keys(e).sort();for(;!_e(c=d.pop());)_e(e[c])||(m+=c+":"+Yn(e[c])+",");As.set(e,m)}}else m=n?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},ms=e=>{if(Rt(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Yn(e):"",[e,a]};let g1=0;const Qn=()=>++g1;async function vo(...e){const[a,s,n,i]=e,l=ha({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let m=l.populateCache;const c=l.rollbackOnError;let d=l.optimisticData;const p=f=>typeof c=="function"?c(f):c!==!1,u=l.throwOnError;if(Rt(s)){const f=s,g=[],x=a.keys();for(const w of x)!/^\$(inf|sub)\$/.test(w)&&f(a.get(w)._k)&&g.push(w);return Promise.all(g.map(h))}return h(s);async function h(f){const[g]=ms(f);if(!g)return;const[x,w]=da(a,g),[b,j,v,_]=It.get(a),N=()=>{const S=b[g];return(Rt(l.revalidate)?l.revalidate(x().data,f):l.revalidate!==!1)&&(delete v[g],delete _[g],S&&S[0])?S[0](go).then(()=>x().data):x().data};if(e.length<3)return N();let k=n,C,y=!1;const E=Qn();j[g]=[E,0];const M=!_e(d),F=x(),A=F.data,I=F._c,$=_e(I)?A:I;if(M&&(d=Rt(d)?d($,A):d,w({data:d,_c:$})),Rt(k))try{k=k($)}catch(S){C=S,y=!0}if(k&&xo(k))if(k=await k.catch(S=>{C=S,y=!0}),E!==j[g][0]){if(y)throw C;return k}else y&&M&&p(C)&&(m=!0,w({data:$,_c:ut}));if(m&&!y)if(Rt(m)){const S=m(k,$);w({data:S,error:ut,_c:ut})}else w({data:k,error:ut,_c:ut});if(j[g][1]=Qn(),Promise.resolve(N()).then(()=>{w({_c:ut})}),y){if(u)throw C;return}return k}}const si=(e,a)=>{for(const s in e)e[s][0]&&e[s][0](a)},x1=(e,a)=>{if(!It.has(e)){const s=ha(p1,a),n=Object.create(null),i=vo.bind(ut,e);let l=Yt;const m=Object.create(null),c=(u,h)=>{const f=m[u]||[];return m[u]=f,f.push(h),()=>f.splice(f.indexOf(h),1)},d=(u,h,f)=>{e.set(u,h);const g=m[u];if(g)for(const x of g)x(h,f)},p=()=>{if(!It.has(e)&&(It.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,d,c]),!Ba)){const u=s.initFocus(setTimeout.bind(ut,si.bind(ut,n,fo))),h=s.initReconnect(setTimeout.bind(ut,si.bind(ut,n,wo)));l=()=>{u&&u(),h&&h(),It.delete(e)}}};return p(),[e,i,p,l]}return[e,It.get(e)[4]]},v1=(e,a,s,n,i)=>{const l=s.errorRetryCount,m=i.retryCount,c=~~((Math.random()+.5)*(1<<(m<8?m:8)))*s.errorRetryInterval;!_e(l)&&m>l||setTimeout(n,c,i)},b1=Un,[gr,Ua]=x1(new Map),y1=ha({onLoadingSlow:Yt,onSuccess:Yt,onError:Yt,onErrorRetry:v1,onDiscarded:Yt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ai?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ai?5e3:3e3,compare:b1,isPaused:()=>!1,cache:gr,mutate:Ua,fallback:{}},m1),j1=(e,a)=>{const s=ha(e,a);if(a){const{use:n,fallback:i}=e,{use:l,fallback:m}=a;n&&l&&(s.use=n.concat(l)),i&&m&&(s.fallback=ha(i,m))}return s},_1=o.createContext({}),bo="$inf$",yo=ws&&window.__SWR_DEVTOOLS_USE__,k1=yo?window.__SWR_DEVTOOLS_USE__:[],C1=()=>{yo&&(window.__SWR_DEVTOOLS_REACT__=o)},jo=e=>Rt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],_o=()=>{const e=o.useContext(_1);return o.useMemo(()=>ha(y1,e),[e])},N1=e=>(a,s,n)=>e(a,s&&((...l)=>{const[m]=ms(a),[,,,c]=It.get(gr);if(m.startsWith(bo))return s(...l);const d=c[m];return _e(d)?s(...l):(delete c[m],d)}),n),S1=k1.concat(N1),E1=e=>function(...s){const n=_o(),[i,l,m]=jo(s),c=j1(n,m);let d=e;const{use:p}=c,u=(p||[]).concat(S1);for(let h=u.length;h--;)d=u[h](d);return d(i,l||c.fetcher||null,c)},A1=(e,a,s)=>{const n=a[e]||(a[e]=[]);return n.push(s),()=>{const i=n.indexOf(s);i>=0&&(n[i]=n[n.length-1],n.pop())}},M1=(e,a)=>(...s)=>{const[n,i,l]=jo(s),m=(l.use||[]).concat(a);return e(n,i,{...l,use:m})};C1();const bn=o.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(a=>{e.status="fulfilled",e.value=a},a=>{e.status="rejected",e.reason=a}),e}}),yn={dedupe:!0},ni=Promise.resolve(ut),R1=()=>Yt,L1=(e,a,s)=>{const{cache:n,compare:i,suspense:l,fallbackData:m,revalidateOnMount:c,revalidateIfStale:d,refreshInterval:p,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:f,strictServerPrefetchWarning:g}=s,[x,w,b,j]=It.get(n),[v,_]=ms(e),N=o.useRef(!1),k=o.useRef(!1),C=o.useRef(v),y=o.useRef(a),E=o.useRef(s),M=()=>E.current,F=()=>M().isVisible()&&M().isOnline(),[A,I,$,S]=da(n,v),Z=o.useRef({}).current,P=_e(m)?_e(s.fallback)?ut:s.fallback[v]:m,L=(ce,D)=>{for(const G in Z){const q=G;if(q==="data"){if(!i(ce[q],D[q])&&(!_e(ce[q])||!i(ue,D[q])))return!1}else if(D[q]!==ce[q])return!1}return!0},H=!N.current,O=o.useMemo(()=>{const ce=A(),D=S(),G=z=>{const le=ha(z);return delete le._k,(()=>{if(!v||!a||M().isPaused())return!1;if(H&&!_e(c))return c;const it=_e(P)?le.data:P;return _e(it)||d})()?{isValidating:!0,isLoading:!0,...le}:le},q=G(ce),V=ce===D?q:G(D);let de=q;return[()=>{const z=G(A());return L(z,de)?(de.data=z.data,de.isLoading=z.isLoading,de.isValidating=z.isValidating,de.error=z.error,de):(de=z,z)},()=>V]},[n,v]),R=Dn.useSyncExternalStore(o.useCallback(ce=>$(v,(D,G)=>{L(G,D)||ce()}),[n,v]),O[0],O[1]),U=x[v]&&x[v].length>0,W=R.data,Y=_e(W)?P&&xo(P)?bn(P):P:W,B=R.error,Q=o.useRef(Y),ue=f?_e(W)?_e(Q.current)?Y:Q.current:W:Y,we=v&&_e(Y),se=o.useRef(null);!Ba&&Dn.useSyncExternalStore(R1,()=>(se.current=!1,se),()=>(se.current=!0,se));const te=se.current;g&&te&&!l&&we&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const oe=!v||!a||M().isPaused()||U&&!_e(B)?!1:H&&!_e(c)?c:l?_e(Y)?!1:d:_e(Y)||d,Ee=H&&oe,K=_e(R.isValidating)?Ee:R.isValidating,Ge=_e(R.isLoading)?Ee:R.isLoading,Ie=o.useCallback(async ce=>{const D=y.current;if(!v||!D||k.current||M().isPaused())return!1;let G,q,V=!0;const de=ce||{},z=!b[v]||!de.dedupe,le=()=>ti?!k.current&&v===C.current&&N.current:v===C.current,Je={isValidating:!1,isLoading:!1},it=()=>{I(Je)},ge=()=>{const X=b[v];X&&X[1]===q&&delete b[v]},ot={isValidating:!0};_e(A().data)&&(ot.isLoading=!0);try{if(z&&(I(ot),s.loadingTimeout&&_e(A().data)&&setTimeout(()=>{V&&le()&&M().onLoadingSlow(v,s)},s.loadingTimeout),b[v]=[D(_),Qn()]),[G,q]=b[v],G=await G,z&&setTimeout(ge,s.dedupingInterval),!b[v]||b[v][1]!==q)return z&&le()&&M().onDiscarded(v),!1;Je.error=ut;const X=w[v];if(!_e(X)&&(q<=X[0]||q<=X[1]||X[1]===0))return it(),z&&le()&&M().onDiscarded(v),!1;const re=A().data;Je.data=i(re,G)?re:G,z&&le()&&M().onSuccess(G,v,s)}catch(X){ge();const re=M(),{shouldRetryOnError:me}=re;re.isPaused()||(Je.error=X,z&&le()&&(re.onError(X,v,re),(me===!0||Rt(me)&&me(X))&&(!M().revalidateOnFocus||!M().revalidateOnReconnect||F())&&re.onErrorRetry(X,v,re,Le=>{const Me=x[v];Me&&Me[0]&&Me[0](Xr,Le)},{retryCount:(de.retryCount||0)+1,dedupe:!0})))}return V=!1,it(),!0},[v,n]),Ye=o.useCallback((...ce)=>vo(n,C.current,...ce),[]);if(Is(()=>{y.current=a,E.current=s,_e(W)||(Q.current=W)}),Is(()=>{if(!v)return;const ce=Ie.bind(ut,yn);let D=0;M().revalidateOnFocus&&(D=Date.now()+M().focusThrottleInterval);const q=A1(v,x,(V,de={})=>{if(V==fo){const z=Date.now();M().revalidateOnFocus&&z>D&&F()&&(D=z+M().focusThrottleInterval,ce())}else if(V==wo)M().revalidateOnReconnect&&F()&&ce();else{if(V==go)return Ie();if(V==Xr)return Ie(de)}});return k.current=!1,C.current=v,N.current=!0,I({_k:_}),oe&&(b[v]||(_e(Y)||Ba?ce():h1(ce))),()=>{k.current=!0,q()}},[v]),Is(()=>{let ce;function D(){const q=Rt(p)?p(A().data):p;q&&ce!==-1&&(ce=setTimeout(G,q))}function G(){!A().error&&(u||M().isVisible())&&(h||M().isOnline())?Ie(yn).then(D):D()}return D(),()=>{ce&&(clearTimeout(ce),ce=-1)}},[p,u,h,v]),o.useDebugValue(ue),l){if(!ti&&Ba&&we)throw new Error("Fallback data is required when using Suspense in SSR.");we&&(y.current=a,E.current=s,k.current=!1);const ce=j[v],D=!_e(ce)&&we?Ye(ce):ni;if(bn(D),!_e(B)&&we)throw B;const G=we?Ie(yn):ni;!_e(ue)&&we&&(G.status="fulfilled",G.value=!0),bn(G)}return{mutate:Ye,get data(){return Z.data=!0,ue},get error(){return Z.error=!0,B},get isValidating(){return Z.isValidating=!0,K},get isLoading(){return Z.isLoading=!0,Ge}}},Ce=E1(L1),_t=()=>{const{adapter:e,deployment:a}=ke(),s=e.useNavigate(),n=(d,p)=>{s?s(d,p):window.location.href=d},i=d=>{if(d)return d;const u=new URLSearchParams(window.location.search).get("redirect_uri");return u||window.location.href};return{navigate:n,navigateToSignIn:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",wt(a.backend_host)??""),n(`${a.ui_settings.sign_in_page_url}?${u.toString()}`,{replace:!0})},navigateToAccountSelection:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",wt(a.backend_host)??""),n(`https://${a.frontend_host}?${u.toString()}`,{replace:!0})},navigateToSignUp:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",wt(a.backend_host)??""),n(`${a.ui_settings.sign_up_page_url}?${u.toString()}`,{replace:!0})}}};async function P1(e){const a=await e("/session",{method:"GET"});return(await T(a)).data}async function $1(e,a){const s=await e(`/session/switch-sign-in?sign_in_id=${a}`,{method:"POST"});return T(s)}async function O1(e,a){const s=a?`/session/sign-out?sign_in_id=${a}`:"/session/sign-out",n=await e(s,{method:"POST"});return T(n)}async function Z1(e,a){const s=await e(`/session/switch-organization${a?`?organization_id=${a}`:""}`,{method:"POST"});return T(s)}async function H1(e,a){const s=await e(`/session/switch-workspace?workspace_id=${a}`,{method:"POST"});return T(s)}async function F1(e,a){const s=await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"});return T(s)}const Jn=new Map,rs=new Map;function Lt(){Jn.clear(),rs.clear()}async function T1(e,a){const s=await e(`/session/token${a?`?template=${a}`:""}`);return T(s)}function rt(){const{client:e,loading:a}=ye(),{deployment:s}=ke(),{navigate:n}=_t(),{cache:i}=_o(),{data:l,error:m,mutate:c,isLoading:d}=Ce(a?null:"/session",()=>P1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),p=o.useCallback(async()=>{await c(void 0,{revalidate:!0})},[c]),u=o.useCallback(async(h="default")=>{if(!l)throw new Error("no session");const f=Jn.get(h);if(f&&f.expires>Date.now())return(f==null?void 0:f.token)||"";rs.get(h)||rs.set(h,T1(e,h));const g=await rs.get(h);return rs.delete(h),Jn.set(h,g.data),g.data.token},[e,l==null?void 0:l.active_signin]);return a||!l||d?{loading:!0,error:m,session:null,switchSignIn:null,switchOrganization:null,switchWorkspace:null,exchangeTicket:null,signOut:null,getToken:null,refetch:p}:{loading:d,error:m,session:l,switchSignIn:async h=>{await $1(e,h),Lt(),await Ua("/me/organization-memberships",void 0,{revalidate:!1}),await Ua("/me/workspace-memberships",void 0,{revalidate:!1}),await c(void 0,{revalidate:!0}),await Ua("/me/organization-memberships"),await Ua("/me/workspace-memberships")},signOut:async h=>{await O1(e,h);const f=["/session","/user","/me/signins","/me/organization-memberships","/me/workspace-memberships","wacht-notifications:scope-unread"],g=["wacht-notifications:","wacht-agent-sessions:","wacht-agent-contexts:","wacht-org-domains:","wacht-api-workspaces:","wacht-api-organizations:"];if(i instanceof Map){const x=Array.from(i.keys());for(const w of x){let b=!1;(f.includes(w)||typeof w=="string"&&g.some(j=>w.startsWith(j)))&&(b=!0),b&&i.delete(w)}}Lt(),await c(void 0,{revalidate:!0}),s!=null&&s.ui_settings&&(h&&s.ui_settings.after_sign_out_one_page_url?n(s.ui_settings.after_sign_out_one_page_url):!h&&s.ui_settings.after_sign_out_all_page_url&&n(s.ui_settings.after_sign_out_all_page_url))},switchOrganization:async h=>{await Z1(e,h),Lt(),await c(void 0,{revalidate:!0})},switchWorkspace:async h=>{await H1(e,h),Lt(),await c(void 0,{revalidate:!0})},exchangeTicket:async h=>{await F1(e,h),Lt(),await c(void 0,{revalidate:!0})},getToken:u,refetch:p}}const Vt=()=>{const{organizationMemberships:e,refetch:a,loading:s}=wa(),{client:n}=ye(),{refetch:i}=rt(),l=o.useCallback(async H=>(await T(await n(`/organizations/${H.id}/roles`,{method:"GET"}))).data,[n]),m=o.useCallback(async(H,O)=>{const R=new URLSearchParams;return O&&(R.set("page",O.page.toString()),R.set("limit",O.limit.toString()),O.search&&R.set("search",O.search)),(await T(await n(`/organizations/${H.id}/members?${R.toString()}`,{method:"GET"}))).data},[n]),c=o.useCallback(async H=>(await T(await n(`/organizations/${H.id}/invitations`,{method:"GET"}))).data,[n]),d=o.useCallback(async H=>(await T(await n(`/organizations/${H.id}/domains`,{method:"GET"}))).data,[n]),p=o.useCallback(async(H,O)=>{await n(`/organizations/${H.id}/members/${O.id}/remove`,{method:"POST"})},[n]),u=o.useCallback(async H=>{const O=new FormData;O.append("name",H.name),H.image&&O.append("image",H.image),H.description&&O.append("description",H.description);const R=await T(await n("/organizations",{method:"POST",body:O}));return Lt(),await a(),await i(),R},[i,a,n]),h=o.useCallback(async(H,O)=>{const R=Object.entries(O).reduce((W,[Y,B])=>(B!=null&&(Array.isArray(B)?B.forEach(Q=>W.append(Y,Q)):W.append(Y,B)),W),new FormData),U=await T(await n(`/organizations/${H.id}/update`,{method:"POST",body:R}));return await a(),U},[a,n]),f=o.useCallback(async(H,O)=>{await n(`/organizations/${H.id}/roles/${O.id}/remove`,{method:"POST"})},[n]),g=o.useCallback(async(H,O)=>{const R=new FormData;return R.append("domain",O.fqdn),await T(await n(`/organizations/${H.id}/domains`,{method:"POST",body:R}))},[n]),x=o.useCallback(async(H,O)=>await T(await n(`/organizations/${H.id}/domains/${O.id}/verify`,{method:"POST"})),[n]),w=o.useCallback(async(H,O)=>await T(await n(`/organizations/${H.id}/domains/${O.id}/delete`,{method:"POST"})),[n]),b=o.useCallback(async H=>(await T(await n(`/organizations/${H.id}/enterprise-connections`,{method:"GET"}))).data,[n]),j=o.useCallback(async(H,O)=>{const R=new FormData;return R.append("protocol",O.protocol),O.domain_id&&R.append("domain_id",O.domain_id),O.idp_entity_id&&R.append("idp_entity_id",O.idp_entity_id),O.idp_sso_url&&R.append("idp_sso_url",O.idp_sso_url),O.idp_certificate&&R.append("idp_certificate",O.idp_certificate),O.oidc_client_id&&R.append("oidc_client_id",O.oidc_client_id),O.oidc_client_secret&&R.append("oidc_client_secret",O.oidc_client_secret),O.oidc_issuer_url&&R.append("oidc_issuer_url",O.oidc_issuer_url),O.oidc_scopes&&R.append("oidc_scopes",O.oidc_scopes),O.jit_enabled!==void 0&&R.append("jit_enabled",String(O.jit_enabled)),O.attribute_mapping&&R.append("attribute_mapping",JSON.stringify(O.attribute_mapping)),(await T(await n(`/organizations/${H.id}/enterprise-connections`,{method:"POST",body:R}))).data},[n]),v=o.useCallback(async(H,O,R)=>{const U=new FormData;return R.domain_id&&U.append("domain_id",R.domain_id),R.idp_entity_id&&U.append("idp_entity_id",R.idp_entity_id),R.idp_sso_url&&U.append("idp_sso_url",R.idp_sso_url),R.idp_certificate&&U.append("idp_certificate",R.idp_certificate),R.oidc_client_id&&U.append("oidc_client_id",R.oidc_client_id),R.oidc_client_secret&&U.append("oidc_client_secret",R.oidc_client_secret),R.oidc_issuer_url&&U.append("oidc_issuer_url",R.oidc_issuer_url),R.oidc_scopes&&U.append("oidc_scopes",R.oidc_scopes),R.attribute_mapping&&U.append("attribute_mapping",JSON.stringify(R.attribute_mapping)),(await T(await n(`/organizations/${H.id}/enterprise-connections/${O}/update`,{method:"POST",body:U}))).data},[n]),_=o.useCallback(async(H,O)=>{await n(`/organizations/${H.id}/enterprise-connections/${O}/delete`,{method:"POST"})},[n]),N=o.useCallback(async(H,O)=>{const R=new FormData;return R.append("protocol",O.protocol),O.idp_entity_id&&R.append("idp_entity_id",O.idp_entity_id),O.idp_sso_url&&R.append("idp_sso_url",O.idp_sso_url),O.idp_certificate&&R.append("idp_certificate",O.idp_certificate),O.oidc_issuer_url&&R.append("oidc_issuer_url",O.oidc_issuer_url),O.oidc_client_id&&R.append("oidc_client_id",O.oidc_client_id),O.oidc_client_secret&&R.append("oidc_client_secret",O.oidc_client_secret),(await T(await n(`/organizations/${H.id}/enterprise-connections/test`,{method:"POST",body:R}))).data},[n]),k=o.useCallback(async(H,O)=>(await T(await n(`/organizations/${H.id}/enterprise-connections/${O}/test`,{method:"POST"}))).data,[n]),C=o.useCallback(async(H,O)=>(await T(await n(`/organizations/${H.id}/enterprise-connections/${O}/scim/token`,{method:"POST"}))).data,[n]),y=o.useCallback(async(H,O)=>(await T(await n(`/organizations/${H.id}/enterprise-connections/${O}/scim/token`,{method:"GET"}))).data,[n]),E=o.useCallback(async(H,O)=>{await n(`/organizations/${H.id}/enterprise-connections/${O}/scim/token/revoke`,{method:"POST"})},[n]),M=o.useCallback(async(H,O)=>{const R=new FormData;return R.append("name",O.name),O.permissions&&O.permissions.forEach((W,Y)=>{R.append(`permissions[${Y}]`,W)}),await T(await n(`/organizations/${H.id}/roles`,{method:"POST",body:R}))},[n]),F=o.useCallback(async H=>(await T(await n(`/organizations/${H.id}/leave`,{method:"POST"}))).data,[n]),A=o.useCallback(async H=>{const O=await T(await n(`/organizations/${H.id}/delete`,{method:"POST"}));return Lt(),await a(),await i(),O.data},[n,a,i]),I=o.useCallback(async(H,O,R)=>(await T(await n(`/organizations/${H.id}/members/${O.id}/roles/${R.id}/add`,{method:"POST"}))).data,[n]),$=o.useCallback(async(H,O,R)=>(await T(await n(`/organizations/${H.id}/members/${O.id}/roles/${R.id}/remove`,{method:"POST"}))).data,[n]),S=o.useCallback(async(H,O)=>{var W,Y;const R=new FormData;return R.append("email",O.email),R.append("role_id",O.organizationRole.id),(W=O.workspace)!=null&&W.id&&R.append("workspace_id",O.workspace.id),(Y=O.workspaceRole)!=null&&Y.id&&R.append("workspace_role_id",O.workspaceRole.id),(await T(await n(`/organizations/${H.id}/invitations`,{method:"POST",body:R}))).data},[n]),Z=o.useCallback(async(H,O)=>(await T(await n(`/organizations/${H.id}/invitations/${O.id}/discard`,{method:"POST"}))).data,[n]),P=o.useCallback(async(H,O)=>(await T(await n(`/organizations/${H.id}/invitations/${O.id}/resend`,{method:"POST"}))).data,[n]);return{organizations:o.useMemo(()=>e==null?void 0:e.map(H=>H.organization),[e]),loading:s,error:null,refetch:a,leaveOrganization:F,getOrganizationRoles:l,getOrganizationMembers:m,removeOrganizationMember:p,createOrganization:u,getOrganizationInvitations:c,getOrganizationDomains:d,addOrganizationDomain:g,verifyOrganizationDomain:x,removeOrganizationDomain:w,addRoleToOrganizationMember:I,removeRoleFromOrganizationMember:$,inviteOrganizationMember:S,discardOrganizationInvitation:Z,resendOrganizationInvitation:P,updateOrganization:h,addRole:M,removeOrganizationRoles:f,deleteOrganization:A,getEnterpriseConnections:b,createEnterpriseConnection:j,updateEnterpriseConnection:v,deleteEnterpriseConnection:_,testEnterpriseConnectionConfig:N,testEnterpriseConnection:k,generateSCIMToken:C,getSCIMToken:y,revokeSCIMToken:E}},fa=()=>{const{loading:e,error:a,refetch:s,getOrganizationMembers:n,getOrganizationRoles:i,leaveOrganization:l,removeOrganizationMember:m,getOrganizationInvitations:c,getOrganizationDomains:d,removeOrganizationDomain:p,addOrganizationDomain:u,verifyOrganizationDomain:h,addRoleToOrganizationMember:f,removeRoleFromOrganizationMember:g,inviteOrganizationMember:x,discardOrganizationInvitation:w,resendOrganizationInvitation:b,updateOrganization:j,removeOrganizationRoles:v,getEnterpriseConnections:_,createEnterpriseConnection:N,updateEnterpriseConnection:k,deleteEnterpriseConnection:C,testEnterpriseConnectionConfig:y,testEnterpriseConnection:E,generateSCIMToken:M,getSCIMToken:F,revokeSCIMToken:A}=Vt(),{session:I,error:$,loading:S}=rt(),{organizationMemberships:Z}=wa(),P=o.useMemo(()=>(Z==null?void 0:Z.find(z=>{var le;return z.id===((le=I==null?void 0:I.active_signin)==null?void 0:le.active_organization_membership_id)}))||null,[Z,I]),L=o.useMemo(()=>(P==null?void 0:P.organization)||null,[P]),H=o.useCallback(async z=>L?await j(L,z):[],[L,j]),O=o.useCallback(async()=>L?await n(L):[],[L,n]),R=o.useCallback(async()=>L?await i(L):[],[L,i]),U=o.useCallback(async z=>L?await m(L,z):[],[L,m]),W=o.useCallback(async z=>L?await v(L,z):void 0,[L,v]),Y=o.useCallback(async()=>L?await d(L):[],[L,d]),B=o.useCallback(async z=>L?await u(L,z):void 0,[L,u]),Q=o.useCallback(async z=>L?await h(L,z):void 0,[L,h]),ue=o.useCallback(async z=>L?await p(L,z):void 0,[L,p]),we=o.useCallback(async(z,le)=>L?await f(L,z,le):void 0,[L,f]),se=o.useCallback(async(z,le)=>L?await g(L,z,le):void 0,[L,g]),te=o.useCallback(async z=>L?await x(L,z):void 0,[L,x]),oe=o.useCallback(async z=>L?await w(L,z):void 0,[L,w]),Ee=o.useCallback(async z=>L?await b(L,z):void 0,[L,b]),K=o.useCallback(async()=>{L&&await l(L)},[L,l]),Ge=o.useCallback(async()=>L?await c(L):[],[L,c]),Ie=o.useCallback(async()=>L?await _(L):[],[L,_]),Ye=o.useCallback(async z=>{if(L)return await N(L,z)},[L,N]),Ae=o.useCallback(async(z,le)=>{if(L)return await k(L,z,le)},[L,k]),ce=o.useCallback(async z=>{L&&await C(L,z)},[L,C]),D=o.useCallback(async z=>L?await y(L,z):null,[L,y]),G=o.useCallback(async z=>L?await E(L,z):null,[L,E]),q=o.useCallback(async z=>{if(L)return await M(L,z)},[L,M]),V=o.useCallback(async z=>{if(L)return await F(L,z)},[L,F]),de=o.useCallback(async z=>{L&&await A(L,z)},[L,A]);return S||e?{activeOrganization:null,activeMembership:null,loading:!0,error:$||a,updateOrganization:null,getRoles:null,getMembers:null,getDomains:null,addDomain:null,verifyDomain:null,removeDomain:null,removeRole:null,getInvitations:null,removeMember:null,addMemberRole:null,removeMemberRole:null,inviteMember:null,discardInvitation:null,resendInvitation:null,leave:null,getEnterpriseConnections:null,createEnterpriseConnection:null,updateEnterpriseConnection:null,deleteEnterpriseConnection:null,generateSCIMToken:null,getSCIMToken:null,revokeSCIMToken:null}:{activeOrganization:L,activeMembership:P,loading:!1,refetch:s,getRoles:R,updateOrganization:H,getMembers:O,getDomains:Y,addDomain:B,verifyDomain:Q,removeDomain:ue,getInvitations:Ge,removeMember:U,leave:K,removeRole:W,addMemberRole:we,removeMemberRole:se,inviteMember:te,discardInvitation:oe,resendInvitation:Ee,getEnterpriseConnections:Ie,createEnterpriseConnection:Ye,updateEnterpriseConnection:Ae,deleteEnterpriseConnection:ce,testEnterpriseConnectionConfig:D,testEnterpriseConnection:G,generateSCIMToken:q,getSCIMToken:V,revokeSCIMToken:de,error:null}};async function I1(e){return(await T(await e("/me/organization-memberships"))).data}const wa=()=>{const{client:e,loading:a}=ye(),{data:s,isLoading:n,error:i,mutate:l}=Ce(a?null:"/me/organization-memberships",()=>I1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),m=o.useCallback(async()=>{await l()},[l]);return{organizationMemberships:s,loading:a||n,error:i,refetch:m}};async function V1(e){return(await T(await e("/me/workspace-memberships"))).data}async function z1(e,a){return(await T(await e(`/workspaces/${a}/leave`,{method:"POST"}))).data}const tn=()=>{const{client:e,loading:a}=ye(),{deployment:s}=ke(),{data:n,isLoading:i,error:l,mutate:m}=Ce(!a&&(s!=null&&s.b2b_settings.workspaces_enabled)?"/me/workspace-memberships":null,()=>V1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),c=o.useCallback(async()=>{await m(void 0,{revalidate:!0})},[m]);return{workspaceMemberships:n,loading:a||i,error:l,refetch:c}},ga=()=>{const{workspaceMemberships:e,refetch:a,loading:s,error:n}=tn(),{client:i}=ye(),{refetch:l}=rt(),m=o.useMemo(()=>e==null?void 0:e.map(C=>({...C.workspace,organization:C.organization,eligibility_restriction:C.eligibility_restriction})),[e]),c=o.useCallback(async(C,y,E,M)=>{const F=new FormData;F.append("name",y),E&&F.append("image",E),M&&F.append("description",M),F.append("organization_id",C);const A=await T(await i("/workspaces",{method:"POST",body:F}));return Lt(),await a(),A.data},[i,a]),d=o.useCallback(async C=>{const y=await z1(i,C);return Lt(),await a(),await l(),y},[i,a,l]),p=o.useCallback(async(C,y)=>{const E=new FormData;y.name&&E.append("name",y.name),y.description&&E.append("description",y.description),y.image&&E.append("image",y.image),y.enforce_2fa!==void 0&&E.append("enforce_2fa",String(y.enforce_2fa)),y.enable_ip_restriction!==void 0&&E.append("enable_ip_restriction",String(y.enable_ip_restriction)),y.whitelisted_ips&&y.whitelisted_ips.forEach(F=>E.append("whitelisted_ips",F));const M=await T(await i(`/workspaces/${C.id}/update`,{method:"POST",body:E}));return await a(),M.data},[i,a]),u=o.useCallback(async C=>{const y=await T(await i(`/workspaces/${C.id}/delete`,{method:"POST"}));return Lt(),await a(),y.data},[i,a]),h=o.useCallback(async(C,y)=>{const E=new URLSearchParams;return y&&(E.set("page",y.page.toString()),E.set("limit",y.limit.toString()),y.search&&E.set("search",y.search)),(await T(await i(`/workspaces/${C.id}/members?${E.toString()}`,{method:"GET"}))).data},[i]),f=o.useCallback(async C=>(await T(await i(`/workspaces/${C.id}/roles`,{method:"GET"}))).data,[i]),g=o.useCallback(async(C,y,E)=>{const M=new FormData;return M.append("name",y),E.forEach(A=>M.append("permissions",A)),(await T(await i(`/workspaces/${C.id}/roles`,{method:"POST",body:M}))).data},[i]),x=o.useCallback(async(C,y)=>(await T(await i(`/workspaces/${C.id}/roles/${y.id}/delete`,{method:"POST"}))).data,[i]),w=o.useCallback(async(C,y)=>{const E=await T(await i(`/workspaces/${C.id}/members/${y}/remove`,{method:"POST"}));return await a(),E.data},[i,a]),b=o.useCallback(async(C,y,E)=>(await T(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/add`,{method:"POST"}))).data,[i]),j=o.useCallback(async(C,y,E)=>(await T(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/remove`,{method:"POST"}))).data,[i]),v=o.useCallback(async C=>(await T(await i(`/organizations/${C.organization.id}/invitations?workspace_id=${C.id}`,{method:"GET"}))).data,[i]),_=o.useCallback(async(C,y,E)=>{const M=new FormData;return M.append("email",y),M.append("workspace_id",C.id),E&&M.append("workspace_role_id",E),(await T(await i(`/organizations/${C.organization.id}/invitations`,{method:"POST",body:M}))).data},[i]),N=o.useCallback(async(C,y)=>(await T(await i(`/organizations/${C.organization.id}/invitations/${y}/discard`,{method:"POST"}))).data,[i]),k=o.useCallback(async(C,y)=>(await T(await i(`/organizations/${C.organization.id}/invitations/${y}/resend`,{method:"POST"}))).data,[i]);return{workspaces:m||[],loading:s,error:n,refetch:a,leaveWorkspace:d,createWorkspace:c,updateWorkspace:p,deleteWorkspace:u,getWorkspaceMembers:h,getWorkspaceRoles:f,createWorkspaceRole:g,deleteWorkspaceRole:x,removeWorkspaceMember:w,addWorkspaceMemberRole:b,removeWorkspaceMemberRole:j,getWorkspaceInvitations:v,createWorkspaceInvitation:_,discardWorkspaceInvitation:N,resendWorkspaceInvitation:k}},zt=()=>{const{refetch:e,loading:a,error:s,workspaces:n,leaveWorkspace:i,updateWorkspace:l,deleteWorkspace:m,getWorkspaceMembers:c,getWorkspaceRoles:d,createWorkspaceRole:p,deleteWorkspaceRole:u,removeWorkspaceMember:h,addWorkspaceMemberRole:f,removeWorkspaceMemberRole:g,getWorkspaceInvitations:x,createWorkspaceInvitation:w,discardWorkspaceInvitation:b,resendWorkspaceInvitation:j}=ga(),{workspaceMemberships:v}=tn(),{session:_,loading:N,error:k}=rt(),C=o.useMemo(()=>(v==null?void 0:v.find(Q=>{var ue;return Q.id===((ue=_==null?void 0:_.active_signin)==null?void 0:ue.active_workspace_membership_id)}))||null,[v,_]),y=o.useMemo(()=>(C==null?void 0:C.workspace)||null,[C]),E=o.useCallback(async()=>{if(y)return await i(y.id)},[y,i]),M=o.useCallback(async Q=>{if(y)return await l(y,Q)},[y,l]),F=o.useCallback(async()=>{if(y)return await m(y)},[y,m]),A=o.useCallback(async Q=>y?await c(y,Q):{data:[],meta:{total:0,page:1,limit:10}},[y,c]),I=o.useCallback(async()=>y?await d(y):[],[y,d]),$=o.useCallback(async(Q,ue)=>{if(y)return await p(y,Q,ue)},[y,p]),S=o.useCallback(async Q=>{if(y)return await u(y,Q)},[y,u]),Z=o.useCallback(async Q=>{if(y)return await h(y,Q)},[y,h]),P=o.useCallback(async(Q,ue)=>{if(y)return await f(y,Q,ue)},[y,f]),L=o.useCallback(async(Q,ue)=>{if(y)return await g(y,Q,ue)},[y,g]),H=o.useMemo(()=>(n==null?void 0:n.find(Q=>Q.id===(y==null?void 0:y.id)))||null,[n,y]),O=o.useCallback(async()=>H?await x(H):[],[H,x]),R=o.useCallback(async Q=>{if(H)return await w(H,Q.email,Q.workspaceRoleId)},[H,w]),U=o.useCallback(async Q=>{if(H)return await b(H,Q)},[H,b]),W=o.useCallback(async Q=>{if(H)return await j(H,Q)},[H,j]),Y=a||N,B=s||k;return Y?{activeWorkspace:null,activeMembership:null,loading:!0,error:B,refetch:e,leave:null,updateWorkspace:null,deleteWorkspace:null,getMembers:null,getRoles:null,createRole:null,deleteRole:null,inviteMember:null,removeMember:null,addMemberRole:null,removeMemberRole:null,getInvitations:null,discardInvitation:null,resendInvitation:null}:{activeWorkspace:y,activeMembership:C,loading:!1,error:B,refetch:e,leave:E,updateWorkspace:M,deleteWorkspace:F,getMembers:A,getRoles:I,createRole:$,deleteRole:S,inviteMember:R,removeMember:Z,addMemberRole:P,removeMemberRole:L,getInvitations:O,discardInvitation:U,resendInvitation:W}};function jn(e){const a=new Uint8Array(e);let s="";for(let n=0;n<a.length;n++)s+=String.fromCharCode(a[n]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _n(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),n=atob(s),i=new Uint8Array(n.length);for(let l=0;l<n.length;l++)i[l]=n.charCodeAt(l);return i.buffer}const D1=async e=>(await T(await e("/me"))).data,U1=async e=>(await T(await e("/me/signins"))).data;function xa(){const{client:e,loading:a}=ye(),{data:s,error:n,isLoading:i,mutate:l}=Ce(a?null:"/user",()=>D1(e)),m=async H=>{const O=new FormData;for(const[U,W]of Object.entries(H))W!=null&&W!==""&&O.append(U,String(W));const R=await T(await e("/me",{method:"POST",body:O}));return l(),R},c=async()=>await T(await e("/me/email-addresses",{method:"GET"})),d=async H=>await T(await e(`/me/email-addresses/${H}`,{method:"GET"})),p=async H=>{const O=new FormData;return O.append("email",H),await T(await e("/me/email-addresses",{method:"POST",body:O}))},u=async H=>await T(await e(`/me/email-addresses/${H}/delete`,{method:"POST"})),h=async H=>await T(await e(`/me/email-addresses/${H}/prepare-verification`,{method:"POST"})),f=async(H,O)=>await T(await e(`/me/email-addresses/${H}/attempt-verification?code=${O}`,{method:"POST"})),g=async(H,O)=>{const R=new FormData;return R.append("phone_number",H),R.append("country_code",O),await T(await e("/me/phone-numbers",{method:"POST",body:R}))},x=async H=>await T(await e(`/me/phone-numbers/${H}/delete`,{method:"POST"})),w=async H=>await T(await e(`/me/phone-numbers/${H}/prepare-verification`,{method:"POST"})),b=async(H,O)=>{const R=new FormData;return R.append("code",O),await T(await e(`/me/phone-numbers/${H}/attempt-verification`,{method:"POST",body:R}))},j=async H=>{const O=await T(await e(`/me/phone-numbers/${H}/make-primary`,{method:"POST"}));return l(),O},v=async H=>await T(await e(`/me/email-addresses/${H}/make-primary`,{method:"POST"})),_=async()=>(await T(await e("/me/authenticator",{method:"POST"}))).data,N=async(H,O)=>{const R=new FormData;return R.append("authenticator_id",H),O.forEach(W=>{R.append("codes",W)}),await T(await e("/me/authenticator/attempt-verification",{method:"POST",body:R}))},k=async H=>await T(await e(`/me/authenticator/${H}/delete`,{method:"POST"})),C=async()=>(await T(await e("/me/backup-codes",{method:"POST"}))).data,y=async H=>{const O=new FormData;return O.append("file",H),await T(await e("/me/profile-picture",{method:"POST",body:O}))},E=async()=>(await T(await e("/me/backup-codes/regenerate",{method:"POST"}))).data,M=async(H,O)=>{const R=new FormData;return R.append("current_password",H),R.append("new_password",O),await T(await e("/me/update-password",{method:"POST",body:R}))},F=async H=>{const O=new FormData;O.append("current_password",H);const R=await T(await e("/me/remove-password",{method:"POST",body:O}));return l(),R},A=async H=>{const O=new FormData;return O.append("password",H),await T(await e("/me/account/delete",{method:"POST",body:O}))},I=async H=>await T(await e(`/me/social-connections/${H}/disconnect`,{method:"POST"})),$=async({provider:H,redirectUri:O})=>{var W;const R=new URLSearchParams({provider:H});O&&R.append("redirect_uri",O);const U=await T(await e(`/me/init-sso-connection?${R.toString()}`,{method:"POST"}));return"data"in U&&((W=U.data)!=null&&W.oauth_url)&&window.open(U.data.oauth_url,"_blank"),U},S=async()=>await T(await e("/me/passkeys",{method:"GET"})),Z=async H=>{var ue,we;const O=await T(await e("/me/passkeys/register/begin",{method:"POST"}));if(!("data"in O))return O;const R=O.data.options.publicKey,U={challenge:_n(R.challenge),rp:R.rp,user:{id:_n(R.user.id),name:R.user.name,displayName:R.user.displayName},pubKeyCredParams:R.pubKeyCredParams,timeout:R.timeout,attestation:R.attestation,authenticatorSelection:R.authenticatorSelection,excludeCredentials:(ue=R.excludeCredentials)==null?void 0:ue.map(se=>({type:se.type,id:_n(se.id),transports:se.transports}))},W=await navigator.credentials.create({publicKey:U});if(!W)throw new Error("Failed to create credential");const Y=W.response,B={id:W.id,rawId:jn(W.rawId),type:W.type,response:{clientDataJSON:jn(Y.clientDataJSON),attestationObject:jn(Y.attestationObject),transports:((we=Y.getTransports)==null?void 0:we.call(Y))||[]}};return await T(await e(`/me/passkeys/register/finish?name=${encodeURIComponent(H||"")}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)}))},P=async H=>await T(await e(`/me/passkeys/${H}/delete`,{method:"POST"})),L=async(H,O)=>await T(await e(`/me/passkeys/${H}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})}));return{user:{...s,refetch:l},loading:a||i,error:n||null,updateProfile:m,getEmailAddresses:c,getEmailAddress:d,createEmailAddress:p,deleteEmailAddress:u,prepareEmailVerification:h,attemptEmailVerification:f,makeEmailPrimary:v,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:j,setupAuthenticator:_,verifyAuthenticator:N,deleteAuthenticator:k,generateBackupCodes:C,regenerateBackupCodes:E,updateProfilePicture:y,disconnectSocialConnection:I,connectSocialAccount:$,updatePassword:M,removePassword:F,deleteAccount:A,getPasskeys:S,registerPasskey:Z,deletePasskey:P,renamePasskey:L}}function ko(){const{client:e,loading:a}=ye(),{data:s,error:n,isLoading:i,mutate:l}=Ce(a?null:"/me/signins",()=>U1(e));return{signins:s,error:n||null,removeSignin:async c=>await T(await e(`/me/signins/${c}/signout`,{method:"POST"})),refetch:l,loading:i||a}}function Co(){const{session:e,loading:a}=rt(),{loading:s,organizationMemberships:n}=wa(),{loading:i,workspaceMemberships:l}=tn(),m=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(n==null?void 0:n.find(d=>{var p;return d.id===((p=e.active_signin)==null?void 0:p.active_organization_membership_id)}))||null,[n,e]),c=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(l==null?void 0:l.find(d=>{var p;return d.id===((p=e.active_signin)==null?void 0:p.active_workspace_membership_id)}))||null,[l,e]);return{loading:a||s||i,orgMembership:m,workspaceMembership:c}}function No(){const{client:e,loading:a}=ye(),[s,n]=o.useState(!1),i=async l=>{n(!0);try{const m=new FormData;for(const[p,u]of Object.entries(l))u&&m.append(p,u);const c=await e("/waitlist/join",{method:"POST",body:m});return await T(c)}finally{n(!1)}};return a?{loading:!0,joinWaitlist:null}:{loading:s,joinWaitlist:i}}function So(){const{client:e,loading:a}=ye(),[s,n]=o.useState(!1),[i,l]=o.useState(null),[m,c]=o.useState(null),[d,p]=o.useState(null),[u,h]=o.useState(!1),[f,g]=o.useState(null);o.useEffect(()=>{if(u||a)return;const w=new URLSearchParams(window.location.search),b=w.get("code"),j=w.get("state"),v=w.get("error"),_=w.get("error_description");if(!b&&!v){h(!0);const N=new Error("No OAuth callback data found.");l(N);return}if(h(!0),n(!0),v){const N=_||v,k=new Error(`OAuth Error: ${N}`);l(k),n(!1);return}if(b&&j)x(b,j);else{const N=new Error("Missing required OAuth parameters");l(N),n(!1)}},[u,a]);const x=async(w,b)=>{try{let j,v;try{const k=b.split(".");if(k.length!==3)throw new Error("Invalid OAuth state format - missing signature");const C=k[0].replace(/-/g,"+").replace(/_/g,"/"),y=C.length%4?"=".repeat(4-C.length%4):"",M=atob(C+y).split("|")[0];if(M==="sign_in")j="/auth/oauth2/callback",v="GET";else if(M==="connect_social")j="/me/sso-connection-callback",v="POST";else throw new Error(`Unknown OAuth action: ${M}`)}catch(k){const C=k instanceof Error?k:new Error("Failed to parse OAuth state");l(new Error(`Invalid OAuth callback: ${C.message}. The authorization link may be expired or malformed. Please try signing in again.`)),n(!1);return}const _=await e(`${j}?code=${encodeURIComponent(w)}&state=${encodeURIComponent(b)}`,{method:v}),N=await T(_);if("data"in N){const k=N.data.session,C=N.data.redirect_uri||null;if(c(k),p(C),k.signin_attempts&&k.signin_attempts.length>0){const y=k.signin_attempts.at(-1);y&&g(y)}}else{const k=new Error("SSO callback failed");l(k)}}catch(j){const v=j instanceof Error?j:new Error("Unknown error occurred");l(v)}finally{n(!1)}};return{loading:s,error:i,session:m,redirectUri:d,processed:u,signinAttempt:f}}function Eo(){const{client:e,loading:a}=ye(),[s,n]=o.useState(!1),[i,l]=o.useState(null);return{loading:a||s,verifyMagicLink:async c=>{if(!c.token||!c.attempt)throw new Error("Invalid magic link parameters");n(!0),l(null);try{const d=new URL("/auth/verify-magic-link",window.location.origin);d.searchParams.set("token",c.token),d.searchParams.set("attempt",c.attempt),c.redirectUri&&d.searchParams.set("redirect_uri",c.redirectUri);const p=await e(d.pathname+d.search,{method:"GET"}),u=await T(p);return n(!1),l(!0),u}catch(d){throw n(!1),l(!1),d}},success:i}}function W1(){const[e,a]=o.useState({});return o.useEffect(()=>{const s=new URLSearchParams(window.location.search);a({token:s.get("token")||void 0,attempt:s.get("attempt")||void 0,redirectUri:s.get("redirect_uri")||void 0})},[]),e}function Ao(){const{client:e,loading:a}=ye();return{loading:a,forgotPassword:async l=>{const m=new FormData;m.append("email",l);const c=await e("/auth/forgot-password",{method:"POST",body:m});return await T(c)},verifyOtp:async(l,m)=>{const c=new FormData;c.append("email",l),c.append("otp",m);const d=await e("/auth/forgot-password",{method:"POST",body:c});return await T(d)},resetPassword:async(l,m)=>{const c=new FormData;c.append("token",l),c.append("password",m);const d=await e("/auth/reset-password",{method:"POST",body:c});return await T(d)}}}const B1=()=>{},G1=B1(),Xn=Object,ri=e=>e===G1,q1=e=>typeof e=="function",Ms=new WeakMap,K1=e=>Xn.prototype.toString.call(e),kn=(e,a)=>e===`[object ${a}]`;let Y1=0;const er=e=>{const a=typeof e,s=K1(e),n=kn(s,"Date"),i=kn(s,"RegExp"),l=kn(s,"Object");let m,c;if(Xn(e)===e&&!n&&!i){if(m=Ms.get(e),m)return m;if(m=++Y1+"~",Ms.set(e,m),Array.isArray(e)){for(m="@",c=0;c<e.length;c++)m+=er(e[c])+",";Ms.set(e,m)}if(l){m="#";const d=Xn.keys(e).sort();for(;!ri(c=d.pop());)ri(e[c])||(m+=c+":"+er(e[c])+",");Ms.set(e,m)}}else m=n?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},Q1=e=>{if(q1(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?er(e):"",[e,a]},J1=e=>Q1(e?e(0,null):null)[0],Cn=Promise.resolve(),X1=e=>(a,s,n)=>{const i=o.useRef(!1),{cache:l,initialSize:m=1,revalidateAll:c=!1,persistSize:d=!1,revalidateFirstPage:p=!0,revalidateOnMount:u=!1,parallel:h=!1}=n,[,,,f]=It.get(gr);let g;try{g=J1(a),g&&(g=bo+g)}catch{}const[x,w,b]=da(l,g),j=o.useCallback(()=>_e(x()._l)?m:x()._l,[l,g,m]);Dn.useSyncExternalStore(o.useCallback(E=>g?b(g,()=>{E()}):()=>{},[l,g]),j,j);const v=o.useCallback(()=>{const E=x()._l;return _e(E)?m:E},[g,m]),_=o.useRef(v());Is(()=>{if(!i.current){i.current=!0;return}g&&w({_l:d?_.current:v()})},[g,l]);const N=u&&!i.current,k=e(g,async E=>{const M=x()._i,F=x()._r;w({_r:ut});const A=[],I=v(),[$]=da(l,E),S=$().data,Z=[];let P=null;for(let L=0;L<I;++L){const[H,O]=ms(a(L,h?null:P));if(!H)break;const[R,U]=da(l,H);let W=R().data;const Y=c||M||_e(W)||p&&!L&&!_e(S)||N||S&&!_e(S[L])&&!n.compare(S[L],W);if(s&&(typeof F=="function"?F(W,O):Y)){const B=async()=>{if(!(H in f))W=await s(O);else{const ue=f[H];delete f[H],W=await ue}U({data:W,_k:O}),A[L]=W};h?Z.push(B):await B()}else A[L]=W;h||(P=W)}return h&&await Promise.all(Z.map(L=>L())),w({_i:ut}),A},n),C=o.useCallback(function(E,M){const F=typeof M=="boolean"?{revalidate:M}:M||{},A=F.revalidate!==!1;return g?(A&&(_e(E)?w({_i:!0,_r:F.revalidate}):w({_i:!1,_r:F.revalidate})),arguments.length?k.mutate(E,{...F,revalidate:A}):k.mutate()):Cn},[g,l]),y=o.useCallback(E=>{if(!g)return Cn;const[,M]=da(l,g);let F;if(Rt(E)?F=E(v()):typeof E=="number"&&(F=E),typeof F!="number")return Cn;M({_l:F}),_.current=F;const A=[],[I]=da(l,g);let $=null;for(let S=0;S<F;++S){const[Z]=ms(a(S,$)),[P]=da(l,Z),L=Z?P().data:ut;if(_e(L))return C(I().data);A.push(L),$=L}return C(A)},[g,l,C,v]);return{size:v(),setSize:y,mutate:C,get data(){return k.data},get error(){return k.error},get isValidating(){return k.isValidating},get isLoading(){return k.isLoading}}},Xa=M1(Ce,X1);function Mo({enabled:e=!0,channels:a,organizationIds:s,workspaceIds:n,onNotification:i,onError:l,reconnectDelay:m=1e3,maxReconnectAttempts:c=5}={}){const{session:d,loading:p}=rt(),{deployment:u,loading:h}=ke(),[f,g]=o.useState(!1),[x,w]=o.useState(null),b=o.useRef(null),j=o.useRef(null),v=o.useRef(0),_=o.useRef(null),N=o.useRef(i),k=o.useRef(l),C=o.useRef(a),y=o.useRef(s),E=o.useRef(n),M=o.useRef(m),F=o.useRef(c);N.current=i,k.current=l,C.current=a,y.current=s,E.current=n,M.current=m,F.current=c;const A=o.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=null),_.current&&(clearInterval(_.current),_.current=null),b.current&&(b.current.close(),b.current=null)},[]),I=o.useCallback(async()=>{var H;if(!e||p||h||!d||!u)return;A();const Z=new URL(u.backend_host),P=Z.protocol==="https:"?"wss:":"ws:",L=new URL("/notifications/stream",`${P}//${Z.host}`);if(u.mode==="staging"){const O=wt(u.backend_host);O&&L.searchParams.set("__dev_session__",O)}C.current&&C.current.length>0&&L.searchParams.set("channels",C.current.join(",")),y.current&&y.current.length>0&&L.searchParams.set("organization_ids",y.current.join(",")),E.current&&E.current.length>0&&L.searchParams.set("workspace_ids",E.current.join(","));try{const O=new WebSocket(L.toString());b.current=O,O.onopen=()=>{g(!0),w(null),v.current=0,_.current=setInterval(()=>{O.readyState===WebSocket.OPEN&&O.send("ping")},3e4)},O.onmessage=R=>{var U,W;try{const Y=JSON.parse(R.data);if(Y.type==="notification"&&Y.data)(U=N.current)==null||U.call(N,Y.data);else if(Y.type==="error"){const B=Y.error||"Unknown error occurred";w(B),(W=k.current)==null||W.call(k,B)}else Y.type}catch{}},O.onerror=()=>{var R;w("Connection error occurred"),(R=k.current)==null||R.call(k,"Connection error occurred")},O.onclose=R=>{var U;if(g(!1),_.current&&(clearInterval(_.current),_.current=null),e&&R.code!==1e3&&v.current<F.current){v.current++;const W=M.current*Math.pow(2,v.current-1);j.current=setTimeout(()=>{I()},W)}else v.current>=F.current&&(w("Max reconnection attempts reached"),(U=k.current)==null||U.call(k,"Max reconnection attempts reached"))}}catch{w("Failed to connect"),(H=k.current)==null||H.call(k,"Failed to connect")}},[e,p,h,d,u,A]);o.useEffect(()=>(I(),()=>{A()}),[I,A]),o.useEffect(()=>{b.current&&b.current.readyState===WebSocket.OPEN&&I()},[a,s,n,I]);const $=o.useCallback(()=>{A(),g(!1)},[A]),S=o.useCallback(()=>{v.current=0,I()},[I]);return{isConnected:f,connectionError:x,disconnect:$,reconnect:S}}function an(e){if(!e)return"";const a=new URLSearchParams;e.limit&&a.append("limit",e.limit.toString()),e.cursor&&a.append("cursor",e.cursor),e.scope&&a.append("scope",e.scope),e.channels&&e.channels.length>0&&e.channels.forEach(n=>a.append("channels",n)),e.organization_ids&&e.organization_ids.length>0&&e.organization_ids.forEach(n=>a.append("organization_ids",n)),e.workspace_ids&&e.workspace_ids.length>0&&e.workspace_ids.forEach(n=>a.append("workspace_ids",n)),e.is_read!==void 0&&a.append("is_read",e.is_read.toString()),e.is_archived!==void 0&&a.append("is_archived",e.is_archived.toString()),e.is_starred!==void 0&&a.append("is_starred",e.is_starred.toString()),e.severity&&a.append("severity",e.severity);const s=a.toString();return s?"?"+s:""}async function ed(e,a){const s=`/notifications${an(a)}`,n=await e(s,{method:"GET"});return(await T(n)).data}async function td(e,a){const s=await e(`/notifications/${a}/read`,{method:"POST"});return T(s)}async function ad(e,a){const s=await e(`/notifications/${a}/unread`,{method:"POST"});return T(s)}async function sd(e,a){const s=await e(`/notifications/mark-all-read${an(a)}`,{method:"POST"});return T(s)}async function nd(e,a){const s=await e(`/notifications/archive-all-read${an(a)}`,{method:"POST"});return T(s)}async function rd(e,a){const s=await e(`/notifications/${a}/archive`,{method:"POST"});return T(s)}async function id(e,a){const s=await e(`/notifications/${a}/star`,{method:"POST"});return T(s)}function Ro(e){var E;const{client:a,loading:s}=ye(),{data:n,error:i,mutate:l,isLoading:m,size:c,setSize:d,isValidating:p}=Xa((M,F)=>{var S;if(s||M>0&&(!F||!F.has_more))return null;const A=M===0||(S=F==null?void 0:F.notifications[F.notifications.length-1])==null?void 0:S.id,{onNotification:I,...$}=e||{};return["wacht-notifications",{...$,cursor:A}]},([,M])=>ed(a,M),{refreshInterval:6e4,revalidateOnFocus:!0,revalidateFirstPage:!0}),u=o.useMemo(()=>n?n.flatMap(M=>M.notifications):[],[n]),h=n?(E=n[n.length-1])==null?void 0:E.has_more:!1,f=o.useMemo(()=>{if(e!=null&&e.channels&&e.channels.length>0)return e.channels;switch(e==null?void 0:e.scope){case"organization":return["organization"];case"workspace":return["workspace"];case"current":return["current"];case"all":return["user","organization","workspace"];case"user":return["user"];default:return}},[e==null?void 0:e.channels,e==null?void 0:e.scope]),g=o.useMemo(()=>e==null?void 0:e.organization_ids,[e==null?void 0:e.organization_ids]),x=o.useMemo(()=>e==null?void 0:e.workspace_ids,[e==null?void 0:e.workspace_ids]);Mo({enabled:!s&&!!n,channels:f,organizationIds:g,workspaceIds:x,onNotification:o.useCallback(M=>{l(async F=>{var S;if(!F||F.length===0||F.some(Z=>Z.notifications.some(P=>P.id===M.id.toString())))return F;(S=e==null?void 0:e.onNotification)==null||S.call(e,M);const I=F[0];return[{...I,notifications:[{id:M.id.toString(),user_id:M.user_id.toString(),deployment_id:M.deployment_id.toString(),title:M.title,body:M.body,severity:M.severity,ctas:M.ctas,is_read:!1,is_archived:!1,created_at:M.created_at,updated_at:M.created_at},...I.notifications]},...F.slice(1)]},!1)},[l,e]),onError:o.useCallback(()=>{},[])});const w=o.useCallback(async M=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:A.notifications.map(I=>I.id===M?{...I,is_read:!0}:I)})),!1),await td(a,M),await l())},[a,s,l]),b=o.useCallback(async M=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:A.notifications.map(I=>I.id===M?{...I,is_read:!1}:I)})),!1),await ad(a,M),await l())},[a,s,l]),j=o.useCallback(async()=>{s||(await l(async M=>M&&M.map(F=>({...F,notifications:F.notifications.map(A=>({...A,is_read:!0}))})),!1),await sd(a,e),await l())},[a,e,l,s]),v=o.useCallback(async()=>{s||(await l(async M=>M&&M.map(F=>({...F,notifications:F.notifications.filter(A=>!A.is_read)})),!1),await nd(a,e),await l())},[a,e,s,l]),_=o.useCallback(async M=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:(e==null?void 0:e.is_archived)!==void 0?A.notifications.filter(I=>I.id!==M):A.notifications.map(I=>I.id===M?{...I,is_archived:!I.is_archived}:I)})),!1),await rd(a,M),await l())},[a,s,l,e==null?void 0:e.is_archived]),N=o.useCallback(async M=>{s||(await l(async F=>F&&F.map(A=>({...A,notifications:A.notifications.map(I=>I.id===M?{...I,is_starred:!I.is_starred}:I)})),!1),await id(a,M),await l())},[a,s,l]),k=o.useCallback(async()=>{p||!h||await d(c+1)},[p,h,d,c]),C=o.useCallback(async()=>{await l()},[l]),y=s||m||c>0&&n&&typeof n[c-1]>"u";return!n||y?{loading:!0,notifications:u,hasMore:h,markAsRead:void 0,markAllAsRead:void 0,archiveAllRead:void 0,archiveNotification:void 0,starNotification:void 0,markAsUnread:void 0,error:i,refetch:C,loadMore:k}:{loading:!1,error:i,notifications:u,hasMore:h,markAsRead:w,markAllAsRead:j,archiveAllRead:v,archiveNotification:_,starNotification:N,markAsUnread:b,refetch:C,loadMore:k}}async function od(e,a){const s=`/notifications/scope-unread${an(a)}`,n=await e(s,{method:"GET"});return(await T(n)).data}function Lo(e){const{client:a,loading:s}=ye(),{data:n,error:i,mutate:l}=Ce(s?null:["wacht-notifications-unread",e],([,c])=>od(a,c),{refreshInterval:3e4,revalidateOnFocus:!0}),m=async()=>{await l()};return!n||s?{loading:!0,count:0,error:i,refetch:m}:{loading:!1,count:n.count,error:i,refetch:m}}const Ta={DISCONNECTED:"disconnected",CONNECTED:"connected",ERROR:"error"},Fe={IDLE:"idle",STARTING:"starting",RUNNING:"running",WAITING_FOR_INPUT:"waiting_for_input",COMPLETED:"completed",FAILED:"failed"},ja={IDLE:"Idle",STARTING:"Starting",RUNNING:"Running",WAITING_FOR_INPUT:"WaitingForInput",COMPLETED:"Completed",FAILED:"Failed",CANCELLED:"Cancelled"};function ld(e){switch(e.trim()){case ja.IDLE:return Fe.IDLE;case ja.STARTING:case"starting":return Fe.STARTING;case ja.RUNNING:case"running":return Fe.RUNNING;case ja.WAITING_FOR_INPUT:case"waiting_for_input":return Fe.WAITING_FOR_INPUT;case ja.COMPLETED:case"completed":return Fe.COMPLETED;case ja.FAILED:case ja.CANCELLED:case"failed":case"cancelled":return Fe.FAILED;default:return Fe.IDLE}}function Ia(e){return e===Fe.STARTING||e===Fe.RUNNING||e===Fe.WAITING_FOR_INPUT}function Jt(e){return e&&typeof e=="object"?e:null}function Sa(e){return typeof e=="string"?e:null}function cd(e){const a=Jt(e);return(a==null?void 0:a.ConversationMessage)??e}function dd(e){const a=Jt(e);if(!a)return null;const s=Jt(a.content),n=Jt(a.metadata),i=Sa(a.message_type)||Sa(n==null?void 0:n.message_type)||Sa(s==null?void 0:s.type);return{...a,metadata:{...n||{},message_type:i}}}function ud(e){const a=Jt(e.metadata),s=Jt(e.content);return Sa(a==null?void 0:a.message_type)||Sa(s==null?void 0:s.type)}function md(e){const a=Jt(e.content);return Sa(a==null?void 0:a.status)}function pd(e){const a=Jt(e.content),s=Sa(a==null?void 0:a.step);return s==="execution_cancelled"||s==="abort"}function hd(e){const a=Jt(e.content);return(a==null?void 0:a.further_actions_required)===!1}function ii(e){return[...e].sort((a,s)=>new Date(a.timestamp).getTime()-new Date(s.timestamp).getTime())}function fd(e,a){return{id:e,timestamp:new Date().toISOString(),content:{type:"user_message",message:a},metadata:{message_type:"user_message"}}}function wd(e,a){const s=new FormData;s.append("message",e);for(const n of a??[])s.append("files",n);return s}function gd(e,a){const s=new FormData;s.append("request_message_id",e);for(const n of a)s.append("approval_tool_name",n.tool_name),s.append("approval_mode",n.mode);return s}function xd(){const e=new FormData;return e.append("cancel","true"),e}function vd({deployment:e,threadId:a,file:s}){const n=s.url||s.filename;if(!n)return null;if(/^https?:\/\//i.test(n))return n;const i=e.backend_host.replace(/\/$/,"");let l;if(n.startsWith("/ai/threads/"))l=new URL(n,`${i}/`);else{const m=n.includes("/")?n.split("/").pop()??"":n;if(!m)return null;l=new URL(`/ai/threads/${encodeURIComponent(a)}/filesystem/file`,`${i}/`),l.searchParams.set("path",`uploads/${m}`)}if(e.mode==="staging"){const m=wt(e.backend_host);m&&l.searchParams.set("__dev_session__",m)}return l.toString()}const bd=5e3,yd=5e3;function jd({threadId:e,initialThread:a=null,platformAdapter:s}){var ge,ot;const{deployment:n}=ke(),{client:i}=ye(),[l,m]=o.useState([]),[c,d]=o.useState(null),[p,u]=o.useState(null),[h,f]=o.useState(a),[g,x]=o.useState(Fe.IDLE),[w,b]=o.useState({status:Ta.DISCONNECTED}),[j,v]=o.useState(!0),[_,N]=o.useState(!1),[k,C]=o.useState(!1),[y,E]=o.useState(null),M=o.useRef(null),F=o.useRef(e),A=o.useRef(0),I=o.useRef(Fe.IDLE),$=o.useRef(null),S=o.useCallback(X=>{m(re=>{const me=[...re],Le=me.findIndex(Me=>String(Me.id)===String(X.id));return Le>=0?me[Le]=X:me.push(X),ii(me)})},[]),Z=o.useCallback(({messages:X,prepend:re,hasMore:me})=>{const Le=ii(X);Le.length>0&&(M.current=Le[0].id),m(Me=>re?[...Le,...Me]:Le),me!==void 0&&v(me)},[]),P=o.useCallback(X=>{I.current=X,x(X)},[]),L=o.useCallback(X=>{A.current=Date.now()+bd,P(X)},[P]),H=o.useCallback(()=>{var X;A.current>Date.now()&&Ia(I.current)||(P(Fe.IDLE),(X=$.current)==null||X.call($))},[P]),O=o.useCallback(X=>{const re=ld(X),me=Ia(re);!me&&A.current>Date.now()&&Ia(I.current)||(me&&(A.current=0),P(re))},[P]),R=o.useCallback(()=>{d(null),u(null)},[]),U=o.useCallback(X=>{f(re=>re&&{...re,...X?{status:X}:{},last_activity_at:new Date().toISOString()})},[]),W=o.useCallback((X,re)=>{S(fd(X,re)),R()},[R,S]),Y=o.useCallback(X=>{const re=dd(X);if(!re)return;switch(ud(re)){case"system_decision":S(re),pd(re)&&H();return;case"execution_summary":case"tool_result":case"user_message":S(re);return;case"steer":S(re),hd(re)&&H();return;case"approval_request":A.current=0,P(Fe.WAITING_FOR_INPUT),S(re);return;case"approval_response":S(re),L(Fe.RUNNING);return;case"execution_status":{const Le=md(re);if(!Le)return;O(Le),f(Me=>Me&&{...Me,status:Le});return}default:S(re)}},[O,H,P,L,S]),B=o.useCallback((X,re)=>{var me;(me=s==null?void 0:s.onPlatformEvent)==null||me.call(s,X,re)},[s]),Q=o.useRef(Y),ue=o.useRef(B),we=o.useRef(i),se=o.useRef(n);o.useEffect(()=>{Q.current=Y,ue.current=B,we.current=i,se.current=n}),o.useEffect(()=>{F.current=e},[e]);const te=o.useRef(null),oe=o.useRef(null),Ee=o.useRef(0),K=10,Ge=o.useCallback(async X=>{if(!e)return;const re=e;X?N(!0):C(!0),E(null);try{const me=new URLSearchParams({limit:"100"});X&&me.append("before_id",X);const Le=await i(`/ai/threads/${e}/messages?${me}`,{method:"GET"}),Me=await T(Le);Me.data&&F.current===re&&Z({messages:Me.data.data,prepend:!!X,hasMore:Me.data.has_more||!1})}catch(me){F.current===re&&E(me instanceof Error?me:new Error("Failed to fetch messages"))}finally{F.current===re&&(X?N(!1):C(!1))}},[e,i,Z]);o.useEffect(()=>{const X=se.current;if(!X||!e)return;const re=()=>{te.current&&(te.current.close(),te.current=null);const me=new URL(`${X.backend_host}/ai/threads/${encodeURIComponent(e)}/stream`);if(X.mode==="staging"){const Me=wt(X.backend_host);Me&&me.searchParams.append("__dev_session__",Me)}const Le=new EventSource(me.toString(),{withCredentials:X.mode!=="staging"});te.current=Le,Le.onopen=()=>{if(b({status:Ta.CONNECTED}),Ee.current>0){const Me=e;setTimeout(()=>{i(`/ai/threads/${Me}/messages?limit=100`,{method:"GET"}).then(async Qe=>{const vt=await T(Qe);vt.data&&F.current===Me&&Z({messages:vt.data.data,hasMore:vt.data.has_more||!1})}).catch(()=>{})},100)}Ee.current=0},Le.onerror=()=>{if(b({status:Ta.ERROR}),Le.close(),te.current=null,Ee.current<K){const Me=Math.min(1e3*Math.pow(2,Ee.current),3e4);oe.current=setTimeout(()=>{Ee.current++,re()},Me)}else b({status:Ta.DISCONNECTED})},Le.addEventListener("conversation_message",Me=>{try{const Qe=cd(JSON.parse(Me.data));Qe&&Q.current(Qe)}catch{}}),Le.addEventListener("platform_event",Me=>{try{const Qe=JSON.parse(Me.data);Qe!=null&&Qe.PlatformEvent?ue.current(Qe.PlatformEvent[0],Qe.PlatformEvent[1]):Qe!=null&&Qe.event_label&&ue.current(Qe.event_label,Qe.event_data)}catch{}})};return re(),()=>{oe.current&&(clearTimeout(oe.current),oe.current=null),te.current&&(te.current.close(),te.current=null)}},[e,i,Z]);const Ie=o.useCallback(async()=>{if(!e)return;const X=e;try{const re=await i(`/ai/threads/${X}`,{method:"GET"});if(!re.ok)return;const me=await T(re);me.data&&F.current===X&&(f(me.data),O(me.data.status),Ua(`wacht-ai-thread:${X}`,me.data,{revalidate:!1}))}catch{}},[e,i,O]);o.useEffect(()=>{$.current=Ie},[Ie]),o.useEffect(()=>{if(!e)return;Ie();const X=window.setInterval(()=>{!Ia(I.current)&&A.current<=Date.now()||Ie()},yd);return()=>{window.clearInterval(X)}},[e,Ie]),o.useEffect(()=>{m([]),f(null),v(!0),N(!1),E(null),C(!!e),b({status:Ta.DISCONNECTED}),M.current=null,A.current=0,I.current=Fe.IDLE,x(Fe.IDLE),R()},[e,R]),o.useEffect(()=>{!a||a.id!==e||f(a)},[a,e]);const Ye=o.useCallback(async(X,re)=>{var me,Le;if(!(!e||!n)){d(X),re&&re.length>0&&u(re),L(Fe.STARTING);try{const Me=await i(`/ai/threads/${e}/run`,{method:"POST",body:wd(X,re)});if(Me.ok){const Qe=await T(Me),vt=((me=Qe.data)==null?void 0:me.conversation_id)??null;U(typeof((Le=Qe.data)==null?void 0:Le.status)=="string"?Qe.data.status:void 0),vt?W(vt,X):R(),L(Fe.RUNNING)}else A.current=0,P(Fe.IDLE),R()}catch{A.current=0,P(Fe.IDLE),R()}}},[e,n,i,L,P,U,R,W]);o.useEffect(()=>{e&&Ge()},[e,Ge]);const Ae=o.useCallback(async()=>{await Ge()},[Ge]),ce=o.useCallback(async()=>{if(!(_||!j||!M.current)){N(!0);try{await Ge(M.current)}finally{N(!1)}}},[_,j,Ge]),D=o.useCallback(()=>{m([]),R()},[R]),G=o.useCallback(async(X,re)=>{if(!e)return!1;L(Fe.STARTING);try{return(await i(`/ai/threads/${e}/run`,{method:"POST",body:gd(X,re)})).ok?(U(),L(Fe.RUNNING),!0):(A.current=0,P(Fe.IDLE),!1)}catch{return A.current=0,P(Fe.IDLE),!1}},[e,i,L,P,U]),q=o.useCallback(async X=>{if(!e)return!1;L(Fe.STARTING);try{return(await i(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})).ok?(U(),L(Fe.RUNNING),!0):(A.current=0,P(Fe.IDLE),!1)}catch{return A.current=0,P(Fe.IDLE),!1}},[e,i,L,P,U]),V=o.useCallback(async()=>{if(!(!e||!Ia(g)))try{await i(`/ai/threads/${e}/run`,{method:"POST",body:xd()}),A.current=0,U(),P(Fe.IDLE)}catch{}},[e,g,i,P,U]),de=o.useCallback(X=>!n||!e||!X?null:vd({deployment:n,threadId:e,file:X}),[e,n]),z=o.useCallback(X=>{const re=de(X);if(!re)return;const me=document.createElement("a");me.href=re,me.download=(X==null?void 0:X.filename)||"attachment",me.rel="noreferrer",document.body.appendChild(me),me.click(),document.body.removeChild(me)},[de]),le=((ge=h==null?void 0:h.execution_state)==null?void 0:ge.pending_approval_request)??null,Je=((ot=h==null?void 0:h.execution_state)==null?void 0:ot.pending_question)??null,it=h==null?void 0:h.status;return{thread:h,threadState:h,threadStatus:it,messages:l,pendingMessage:c,pendingFiles:p,connectionState:w,isConnected:w.status===Ta.CONNECTED,hasActiveRun:Ia(g),isRunning:g===Fe.STARTING||g===Fe.RUNNING,executionStatus:g,isWaitingForInput:g===Fe.WAITING_FOR_INPUT,pendingApprovalRequest:le,pendingClarificationRequest:Je,hasMoreMessages:j,isLoadingMore:_,messagesLoading:k,messagesError:y,refreshThread:Ie,refreshMessages:Ae,sendMessage:Ye,submitApprovalResponse:G,submitAnswer:q,clearMessages:D,loadMoreMessages:ce,cancelExecution:V,resolveMessageFileUrl:de,downloadMessageFile:z}}function _d(e){const{client:a}=ye(),[s,n]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>{const N=await a("/ai/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch session");return(await T(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=Ce(h?"wacht-agent-session":null,f,{revalidateOnFocus:!1});o.useEffect(()=>{if(!e||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(d.current=!0,n(!0)):c(new Error("Failed to exchange ticket"))}catch(k){c(k instanceof Error?k:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=!m&&(e?s:!0)&&(!x||x.message!=="NO_SESSION"),v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:j,sessionLoading:i||h&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,actor:(g==null?void 0:g.actor)||null,agents:(g==null?void 0:g.agents)||[],ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}const oi={exists:!1,files:[]};function Rs(e,a,s){const i=(e||[]).filter(l=>l.id!==a.id);return!s&&a.archived_at?i:[a,...i]}function kd(e,a){return a===void 0?"":`?${new URLSearchParams({[e]:String(a)}).toString()}`}function tr(e,a){const s=new URLSearchParams({path:e});return a&&s.set("include_archived","true"),`?${s.toString()}`}function Po(e,a){const s=new URLSearchParams;e&&s.set("path",e),a&&s.set("include_archived","true");const n=s.toString();return n?`?${n}`:""}function Cd(e){const a=e.split("/").pop()||e,s=a.lastIndexOf(".");return s<0||s===a.length-1?"":a.slice(s+1).toLowerCase()}function Nd(e,a){const s=Cd(a),n=new Set(["doc","docx","ppt","pptx","xls","xlsx","pdf","zip","gz","tar","7z","rar","jar","war","bin"]),i=new Set(["txt","md","mdx","markdown","json","jsonc","js","jsx","ts","tsx","mts","cts","mjs","cjs","py","rb","php","java","kt","kts","go","rs","c","cc","cpp","cxx","h","hpp","swift","sh","bash","zsh","fish","ps1","sql","html","htm","css","scss","less","xml","svg","yaml","yml","toml","ini","cfg","conf","env","log"]);return n.has(s)?!1:i.has(s)?!0:e.startsWith("text/")||e.includes("json")||e.includes("javascript")||e.includes("typescript")||e.includes("python")||e.includes("xml")||e.includes("yaml")}function at(e,a,s){if(s!=null){if(typeof s=="string"){e.set(a,s);return}if(typeof s=="boolean"||typeof s=="number"){e.set(a,String(s));return}}}function Sd(e,a,s){s&&e.set(a,JSON.stringify(s))}function li(e){const a=new FormData;return at(a,"name",e.name),at(a,"agent_id","agent_id"in e?e.agent_id:void 0),at(a,"description",e.description),at(a,"status",e.status),a}function Ed(e){const a=new FormData;if(at(a,"title",e.title),at(a,"agent_id",e.agent_id),at(a,"system_instructions",e.system_instructions),at(a,"thread_purpose",e.thread_purpose),at(a,"responsibility",e.responsibility),at(a,"reusable",e.reusable),at(a,"accepts_assignments",e.accepts_assignments),Sd(a,"metadata",e.metadata),Array.isArray(e.capability_tags))for(const s of e.capability_tags)a.append("capability_tags",s);return a}function $o(e){const a=new FormData;return at(a,"title",e.title),at(a,"agent_id",e.agent_id),at(a,"system_instructions",e.system_instructions),a}function Oo(e,a=[]){const s=new FormData;at(s,"title",e.title),at(s,"description",e.description),at(s,"status",e.status),at(s,"schedule_kind",e.schedule_kind),at(s,"next_run_at",e.next_run_at),at(s,"interval_seconds",e.interval_seconds),"clear_schedule"in e&&at(s,"clear_schedule",e.clear_schedule);for(const n of a)s.append("files",n);return s}function Ad(e={}){const{client:a}=ye(),{includeArchived:s=!1,enabled:n=!0}=e,i=n?`wacht-ai-actor-projects:${s}`:null,l=o.useCallback(async()=>{const g=await a(`/ai/projects${kd("include_archived",s)}`);return(await T(g)).data},[a,s]),{data:m,error:c,mutate:d}=Ce(i,l,{revalidateOnFocus:!1,refreshInterval:15e3}),p=o.useCallback(async g=>{const x=await a("/ai/projects",{method:"POST",body:li(g)}),w=await T(x);return await d(b=>Rs(b,w.data,s),{revalidate:!0}),w},[a,s,d]),u=o.useCallback(async(g,x)=>{const w=await a(`/ai/projects/${g}/update`,{method:"POST",body:li(x)}),b=await T(w);return await d(j=>Rs(j,b.data,s),{revalidate:!0}),b},[a,s,d]),h=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/archive`,{method:"POST",body:new URLSearchParams}),w=await T(x);return await d(b=>Rs(b,w.data,s),{revalidate:!0}),w},[a,s,d]),f=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/unarchive`,{method:"POST",body:new URLSearchParams}),w=await T(x);return await d(b=>Rs(b,w.data,s),{revalidate:!0}),w},[a,s,d]);return{projects:m||[],loading:!m&&!c,error:c,createProject:p,updateProject:u,archiveProject:h,unarchiveProject:f,refetch:async()=>{await d()}}}function Md(e={}){const{client:a}=ye(),{enabled:s=!0,query:n="",limit:i=12}=e,l=n.trim(),m=s?`wacht-ai-actor-project-search:${l}:${i}`:null,c=o.useCallback(async()=>{const h=new URLSearchParams({limit:String(i)});l&&h.set("q",l);const f=await a(`/ai/projects/search?${h.toString()}`);return(await T(f)).data},[a,i,l]),{data:d,error:p,mutate:u}=Ce(m,c,{revalidateOnFocus:!1});return{projects:(d==null?void 0:d.data)||[],loading:!d&&!p,error:p,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:d==null?void 0:d.next_cursor,refetch:async()=>{await u()}}}function Rd(e,a={}){const{client:s}=ye(),{includeArchived:n=!1,enabled:i=!0}=a,l=i&&e?`wacht-ai-threads:${e}:${n}`:null,m=o.useCallback(async()=>{if(!e)return{data:[],has_more:!1,next_cursor:""};const w=new URLSearchParams({limit:"100"});n&&w.set("include_archived","true");const b=await s(`/ai/projects/${e}/threads?${w.toString()}`);return(await T(b)).data},[e,s,n]),{data:c,error:d,mutate:p}=Ce(l,m,{revalidateOnFocus:!1,refreshInterval:15e3}),u=o.useCallback(async(w,b)=>{const j=await s(`/ai/projects/${w}/threads`,{method:"POST",body:Ed(b)}),v=await T(j);return w===e&&await p(),v},[e,s,p]),h=o.useCallback(async w=>{if(!e)throw new Error("projectId is required");return u(e,w)},[e,u]),f=o.useCallback(async(w,b)=>{const j=await s(`/ai/threads/${w}/update`,{method:"POST",body:$o(b)}),v=await T(j);return await p(),v},[s,p]),g=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/archive`,{method:"POST",body:new URLSearchParams}),j=await T(b);return await p(),j},[s,p]),x=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/unarchive`,{method:"POST",body:new URLSearchParams}),j=await T(b);return await p(),j},[s,p]);return{threads:(c==null?void 0:c.data)||[],loading:!c&&!d,error:d,hasMore:(c==null?void 0:c.has_more)||!1,nextCursor:(c==null?void 0:c.next_cursor)||"",createThread:h,createThreadForProject:u,updateThread:f,archiveThread:g,unarchiveThread:x,refetch:async()=>{await p()}}}function Ld(e,a={}){var g,x;const{client:s}=ye(),{includeArchived:n=!1,archivedOnly:i=!1,enabled:l=!0,query:m="",limit:c=10}=a,d=m.trim(),p=Xa((w,b)=>{if(!l||!e||w>0&&b&&!b.has_more)return null;const j=w===0||b==null?void 0:b.next_cursor;return["wacht-ai-project-thread-feed",e,i?"archived-only":n?"with-archived":"active-only",d,c,j||""]},async([,w,b,j,v,_])=>{const N=new URLSearchParams({limit:String(v)});b==="with-archived"?N.set("include_archived","true"):b==="archived-only"&&(N.set("include_archived","true"),N.set("archived_only","true")),j&&N.set("q",String(j)),_&&N.set("cursor",String(_));const k=await s(`/ai/projects/${w}/threads?${N.toString()}`);return(await T(k)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),u=o.useMemo(()=>{var w;return((w=p.data)==null?void 0:w.flatMap(b=>b.data||[]))||[]},[p.data]),h=p.data&&((g=p.data[p.data.length-1])==null?void 0:g.has_more)||!1,f=p.isValidating&&!!p.data&&p.size>(((x=p.data)==null?void 0:x.length)||0);return{threads:u,loading:!p.data&&!p.error,error:p.error||null,hasMore:h,loadingMore:f,loadMore:async()=>{!h||f||await p.setSize(w=>w+1)},refetch:async()=>{await p.mutate()}}}function Pd(e={}){const{client:a}=ye(),{enabled:s=!0,query:n="",limit:i=16}=e,l=n.trim(),m=s?`wacht-ai-actor-thread-search:${l}:${i}`:null,c=o.useCallback(async()=>{const h=new URLSearchParams({limit:String(i)});l&&h.set("q",l);const f=await a(`/ai/threads/search?${h.toString()}`);return(await T(f)).data},[a,i,l]),{data:d,error:p,mutate:u}=Ce(m,c,{revalidateOnFocus:!1});return{threads:(d==null?void 0:d.data)||[],loading:!d&&!p,error:p,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:d==null?void 0:d.next_cursor,refetch:async()=>{await u()}}}function $d(e,a=!0){const{client:s}=ye(),n=a&&e?`wacht-ai-thread:${e}`:null,i=o.useCallback(async()=>{if(!e)return null;const u=await s(`/ai/threads/${e}`);return(await T(u)).data},[e,s]),l=Ce(n,i,{revalidateOnFocus:!1}),m=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");const h=await s(`/ai/threads/${e}/update`,{method:"POST",body:$o(u)}),f=await T(h);return await l.mutate(),f},[e,s,l]),c=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/archive`,{method:"POST",body:new URLSearchParams}),h=await T(u);return await l.mutate(),h},[e,s,l]),d=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/unarchive`,{method:"POST",body:new URLSearchParams}),h=await T(u);return await l.mutate(),h},[e,s,l]),p=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");await s(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)})},[e,s]);return{thread:l.data||null,loading:!l.data&&!l.error,error:l.error||null,updateThread:m,archiveThread:c,unarchiveThread:d,submitAnswer:p,refetch:async()=>{await l.mutate()}}}function Od(e,a=!0){const{client:s}=ye(),n=a&&e?`wacht-ai-thread-filesystem:${e}`:null,i=o.useCallback(async c=>{if(!e)throw new Error("threadId is required");const d=await s(`/ai/threads/${e}/filesystem/file${tr(c)}`);if(!d.ok)throw new Error("Failed to load file");const p=await d.blob(),u=(d.headers.get("content-type")||"application/octet-stream").split(";")[0].trim().toLowerCase(),h=Nd(u,c);let f;return h&&(f=await p.text()),{path:c,name:c.split("/").pop()||"file",mime_type:u,is_text:h,size_bytes:p.size,truncated:!1,content:f,blob:p}},[e,s]),l=o.useCallback(async c=>{if(!e)return oi;const d=await s(`/ai/threads/${e}/filesystem${Po(c)}`);return(await T(d)).data},[e,s]),m=Ce(n,()=>l(),{revalidateOnFocus:!1});return{filesystem:m.data||oi,filesystemLoading:!m.data&&!m.error,filesystemError:m.error||null,getFile:i,listDirectory:l,refetch:async()=>{await m.mutate()}}}function Zd(e,a={}){var h,f;const{client:s}=ye(),{enabled:n=!0,limit:i=40,order:l="asc"}=a,m=Math.min(Math.max(i,1),200),c=Xa((g,x)=>{if(!n||!e||g>0&&x&&!x.has_more)return null;const w=g===0||x==null?void 0:x.next_cursor;return["wacht-ai-thread-assignments",e,m,l,w||""]},async([,g,x,w,b])=>{const j=new URLSearchParams({limit:String(x)});w==="desc"&&j.set("order","desc"),b&&j.set("cursor",String(b));const v=await s(`/ai/threads/${g}/assignments?${j.toString()}`);return(await T(v)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useMemo(()=>{var g;return((g=c.data)==null?void 0:g.flatMap(x=>x.data||[]))||[]},[c.data]),p=c.data&&((h=c.data[c.data.length-1])==null?void 0:h.has_more)||!1,u=c.isValidating&&!!c.data&&c.size>(((f=c.data)==null?void 0:f.length)||0);return{assignments:d,loading:!c.data&&!c.error,error:c.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await c.setSize(g=>g+1)},refetch:async()=>{await c.mutate()}}}function Hd(e={},a){const s=new URLSearchParams;e.statuses&&e.statuses.length>0&&s.set("status",e.statuses.join(",")),e.includeArchived&&s.set("include_archived","true"),e.archivedOnly&&s.set("archived_only","true"),e.limit&&s.set("limit",String(e.limit)),a&&s.set("cursor",a);const n=s.toString();return n?`?${n}`:""}function Fd(e,a=!0,s={}){var x,w,b;const{client:n}=ye(),i=((x=s.statuses)==null?void 0:x.join(","))||"all",l=s.archivedOnly?"archived-only":s.includeArchived?"with-archived":"active-only",m=s.limit||60,c=Xa((j,v)=>{if(!a||!e||j>0&&v&&!v.has_more)return null;const _=j===0||v==null?void 0:v.next_cursor;return["wacht-ai-project-tasks",e,i,l,m,_||""]},async([,j,,,,v])=>{const _=await n(`/ai/projects/${j}/board/items${Hd(s,v||void 0)}`);return(await T(_)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useMemo(()=>{var j;return((j=c.data)==null?void 0:j.flatMap(v=>v.data||[]))||[]},[c.data]),p=c.data&&((w=c.data[c.data.length-1])==null?void 0:w.has_more)||!1,u=c.isValidating&&!!c.data&&c.size>(((b=c.data)==null?void 0:b.length)||0),h=o.useCallback(async(j,v=[])=>{if(!e)throw new Error("projectId is required");const _=await n(`/ai/projects/${e}/board/items`,{method:"POST",body:Oo(j,v)}),N=await T(_);return await c.mutate(),N},[e,n,c]),f=o.useCallback(async j=>{if(!e)throw new Error("projectId is required");const v=await n(`/ai/projects/${e}/board/items/${j}/archive`,{method:"POST",body:new URLSearchParams}),_=await T(v);return await c.mutate(),_},[e,n,c]),g=o.useCallback(async j=>{if(!e)throw new Error("projectId is required");const v=await n(`/ai/projects/${e}/board/items/${j}/unarchive`,{method:"POST",body:new URLSearchParams}),_=await T(v);return await c.mutate(),_},[e,n,c]);return{tasks:d,loading:!c.data&&!c.error,error:c.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await c.setSize(j=>j+1)},createTask:h,archiveTask:f,unarchiveTask:g,refetch:async()=>{await c.mutate()}}}function Td(e,a,s=!0,n={}){var I,$;const{client:i}=ye(),l=n.includeArchived?"with-archived":"active-only",m=n.includeArchived?"?include_archived=true":"",c=n.assignmentsOrder??"asc",d=Math.min(Math.max(n.assignmentsLimit??40,1),200),p=s&&e&&a?`wacht-ai-board-item:${e}:${a}:${l}`:null,u=s&&e&&a?`wacht-ai-board-item-workspace:${e}:${a}:${l}`:null,h=o.useCallback(async()=>{if(!e||!a)return null;const S=await i(`/ai/projects/${e}/board/items/${a}${m}`);return(await T(S)).data},[e,a,i,m]),f=Ce(p,h,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),g=Xa((S,Z)=>{if(!s||!e||!a||S>0&&Z&&!Z.has_more)return null;const P=S===0||Z==null?void 0:Z.next_cursor;return["wacht-ai-board-item-assignments",e,a,l,c,d,P||""]},async([,S,Z,,P,L,H])=>{const O=new URLSearchParams({limit:String(L)});n.includeArchived&&O.set("include_archived","true"),P==="desc"&&O.set("order","desc"),H&&O.set("cursor",String(H));const R=await i(`/ai/projects/${S}/board/items/${Z}/assignments?${O.toString()}`);return(await T(R)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),x=o.useCallback(async()=>{if(!e||!a)return{exists:!1,files:[]};const S=await i(`/ai/projects/${e}/board/items/${a}/filesystem${m}`);return(await T(S)).data},[e,a,i,m]),w=Ce(u,x,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),b=o.useCallback(async(S,Z=[])=>{if(!e||!a)throw new Error("projectId and itemId are required");const P=await i(`/ai/projects/${e}/board/items/${a}/update`,{method:"POST",body:Oo(S,Z)}),L=await T(P);return await f.mutate(),await w.mutate(),L},[e,a,i,f,w]),j=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/archive`,{method:"POST",body:new URLSearchParams}),Z=await T(S);return await f.mutate(),Z},[e,a,i,f]),v=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/unarchive`,{method:"POST",body:new URLSearchParams}),Z=await T(S);return await f.mutate(),Z},[e,a,i,f]),_=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/cancel`,{method:"POST",body:new URLSearchParams}),Z=await T(S);return await f.mutate(),await g.mutate(),Z},[e,a,i,f,g]),N=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const Z=new FormData;if(S.freeform_text&&S.freeform_text.trim()!=="")Z.append("freeform_text",S.freeform_text);else for(const H of S.answers??[])Z.append("answer_question_id",H.question_id),Z.append("answer_value",JSON.stringify(H.value));const P=await i(`/ai/projects/${e}/board/items/${a}/answer`,{method:"POST",body:Z}),L=await T(P);return await f.mutate(),L},[e,a,i,f]),k=o.useCallback(async S=>{var O;if(!e||!a)throw new Error("projectId and itemId are required");const Z=f.data,P=(O=Z==null?void 0:Z.pending_approval)==null?void 0:O.request_message_id;if(!P)throw new Error("Task has no pending approval");const L=new FormData;L.set("request_message_id",P);for(const R of S)L.append("approval_tool_name",R.tool_name),L.append("approval_mode",R.mode);const H=await i(`/ai/projects/${e}/board/items/${a}/approval`,{method:"POST",body:L});return await f.mutate(),H.ok},[e,a,i,f]),C=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const Z=await i(`/ai/projects/${e}/board/items/${a}/filesystem/file${tr(S,n.includeArchived)}`);return await T(Z)},[e,a,i,n.includeArchived]),y=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const Z=await i(`/ai/projects/${e}/board/items/${a}/filesystem/download${tr(S,n.includeArchived)}`);if(!Z.ok)throw new Error("Failed to download file");const P=await Z.blob(),L=S.split("/").pop()||"file",H=URL.createObjectURL(P),O=document.createElement("a");O.href=H,O.download=L,document.body.appendChild(O),O.click(),O.remove(),URL.revokeObjectURL(H)},[e,a,i,n.includeArchived]),E=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const Z=await i(`/ai/projects/${e}/board/items/${a}/filesystem${Po(S,n.includeArchived)}`);return await T(Z)},[e,a,i,n.includeArchived]),M=o.useMemo(()=>{var S;return((S=g.data)==null?void 0:S.flatMap(Z=>Z.data||[]))||[]},[g.data]),F=g.data&&((I=g.data[g.data.length-1])==null?void 0:I.has_more)||!1,A=g.isValidating&&!!g.data&&g.size>((($=g.data)==null?void 0:$.length)||0);return{item:f.data||null,assignments:M,assignmentsHasMore:F,assignmentsLoadingMore:A,loadMoreAssignments:async()=>{!F||A||await g.setSize(S=>S+1)},taskWorkspace:w.data||{exists:!1,files:[]},taskWorkspaceLoading:!w.data&&!w.error,taskWorkspaceError:w.error||null,loading:!f.data&&!f.error||!g.data&&!g.error,error:f.error||g.error||null,updateItem:b,archiveItem:j,unarchiveItem:v,cancelItem:_,submitAnswer:N,submitApproval:k,getTaskWorkspaceFile:C,downloadTaskWorkspaceFile:y,listTaskWorkspaceDirectory:E,refetch:async()=>{await f.mutate(),await g.mutate(),await w.mutate()},refetchAssignments:async()=>{await g.mutate()},refetchTaskWorkspace:async()=>{await w.mutate()}}}function Id(e,a=!0){var g;const{client:s}=ye(),{data:n,error:i,mutate:l,isLoading:m,size:c,setSize:d,isValidating:p}=Xa((x,w)=>{if(!a||!e||x>0&&(!w||!w.has_more))return null;const b=x===0||w==null?void 0:w.next_cursor;return["wacht-ai-thread-graphs",e,b]},async([,x,w])=>{const b=new URLSearchParams;b.set("limit","10"),w&&b.set("cursor",String(w));const j=await s(`/ai/threads/${x}/task-graphs?${b.toString()}`),_=(await T(j)).data||{data:[],limit:10,has_more:!1};return{..._,data:(_.data||[]).map(N=>({...N,nodes:Array.isArray(N.nodes)?N.nodes:[],edges:Array.isArray(N.edges)?N.edges:[],summary:N.summary||null}))}},{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3,revalidateFirstPage:!0,revalidateAll:!1,persistSize:!0}),u=o.useMemo(()=>n?n.flatMap(x=>x.data||[]):[],[n]),h=n&&((g=n[n.length-1])==null?void 0:g.has_more)||!1,f=p&&!!n&&c>((n==null?void 0:n.length)||0);return{graphs:u,latestGraph:u[0]||null,has_more:h,loadingMore:f,loading:m,error:i,loadMore:async()=>{!h||f||await d(c+1)},refetch:async()=>{await l()}}}function Vd(e,a,s=!0){const{client:n}=ye(),i=s&&e&&a?`wacht-ai-board-item-comments:${e}:${a}`:null,l=o.useCallback(async()=>{if(!e||!a)return[];const d=await n(`/ai/projects/${e}/board/items/${a}/comments`);return(await T(d)).data},[e,a,n]),m=Ce(i,l,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),c=o.useCallback(async(d,p)=>{if(!e||!a)throw new Error("projectId and itemId are required");const u=new FormData;if(u.set("body",d),p)for(const g of p)u.append("attachments",g,g.name);const h=await n(`/ai/projects/${e}/board/items/${a}/comments`,{method:"POST",body:u}),f=await T(h);return await m.mutate(),f},[e,a,n,m]);return{comments:m.data||[],loading:!m.data&&!m.error,error:m.error||null,createComment:c,refetch:async()=>{await m.mutate()}}}function zd(e=!0){const{client:a}=ye(),s=e?"wacht-ai-actor-mcp-servers":null,n=o.useCallback(async()=>{const u=await a("/ai/mcp-servers");return(await T(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:c}=Ce(s,n,{revalidateOnFocus:!1}),d=o.useCallback(async u=>{const h=await a(`/ai/mcp-servers/${u}/connect`,{method:"POST",body:new URLSearchParams});return T(h)},[a]),p=o.useCallback(async u=>{const h=await a(`/ai/mcp-servers/${u}/disconnect`,{method:"POST",body:new URLSearchParams}),f=await T(h);return await m(),f},[a,m]);return{servers:i??[],loading:c,error:l,connect:d,disconnect:p,refetch:async()=>{await m()}}}function Dd(e=!0){const{client:a}=ye(),s=e?"wacht-ai-external-agent-connections":null,n=o.useCallback(async()=>{const u=await a("/ai/external-connections");return(await T(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:c}=Ce(s,n,{revalidateOnFocus:!1}),d=o.useCallback(async(u,h,f)=>{const g=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(h)}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({return_url:(f==null?void 0:f.returnUrl)??""})}),x=await T(g);return await m(),x.data},[a,m]),p=o.useCallback(async(u,h)=>{const f=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(h)}`,{method:"DELETE"}),g=await T(f);return await m(),g.data},[a,m]);return{connections:i??[],loading:c,error:l,connect:d,disconnect:p,refetch:async()=>{await m()}}}function Zo(e){const a=new URLSearchParams;return a.append("url",e.url),e.description&&a.append("description",e.description),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,n])=>{a.append(`headers[${s}]`,n)}),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function Ud(e){const a=new URLSearchParams;return e.url&&a.append("url",e.url),e.description!==void 0&&a.append("description",e.description||""),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,n])=>{a.append(`headers[${s}]`,n)}),e.is_active!==void 0&&a.append("is_active",e.is_active.toString()),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function Wd(e){const a=new URLSearchParams;return a.append("event_name",e.event_name),a.append("payload",JSON.stringify(e.payload||{})),a}function Bd(e){const a=new URLSearchParams;return(e.delivery_ids||[]).forEach(n=>a.append("delivery_ids",n)),e.start_date&&a.append("start_date",e.start_date),e.end_date&&a.append("end_date",e.end_date),e.status&&a.append("status",e.status),e.event_name&&a.append("event_name",e.event_name),e.endpoint_id&&a.append("endpoint_id",e.endpoint_id),e.idempotency_key&&a.append("idempotency_key",e.idempotency_key),a}const gs={"Content-Type":"application/x-www-form-urlencoded"};async function At(e,a){const s=await T(e);if(!s||!("data"in s))throw new Error(a);return s}async function Gd(e){const a=await e("/webhook/session",{method:"GET"});if(!a.ok)throw a.status===401||a.status===403?new Error("NO_SESSION"):new Error("Failed to fetch webhook app session");return(await At(a,"Failed to fetch webhook app session")).data}async function qd(e,a){if(!(await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"})).ok)throw new Error("Failed to exchange ticket")}async function Kd(e,a){const s=Zo(a),n=await e("/webhook/endpoints",{method:"POST",headers:gs,body:s.toString()});return At(n,"Failed to create webhook endpoint")}async function Yd(e,a,s){const n=Ud(s),i=await e(`/webhook/endpoints/${a}`,{method:"PUT",headers:gs,body:n.toString()});return At(i,"Failed to update webhook endpoint")}async function Qd(e,a){const s=await e(`/webhook/endpoints/${a}`,{method:"DELETE"});return At(s,"Failed to delete webhook endpoint")}async function Jd(e,a,s){const n=Wd(s),i=await e(`/webhook/endpoints/${a}/test`,{method:"POST",headers:gs,body:n.toString()});return At(i,"Failed to test webhook endpoint")}async function Xd(e){const a=await e("/webhook/rotate-secret",{method:"POST"});return At(a,"Failed to rotate signing secret")}async function e2(e,a){const s=new URLSearchParams;for(const i of a.failure_notification_emails)s.append("failure_notification_emails",i);const n=await e("/webhook/settings",{method:"PUT",headers:gs,body:s.toString()});return At(n,"Failed to update webhook settings")}async function t2(e,a){const s=Bd(a),n=await e("/webhook/deliveries/replay",{method:"POST",headers:gs,body:s.toString()});return At(n,"Failed to replay webhook delivery")}async function a2(e,a){const s=await e(`/webhook/deliveries/${a}`,{method:"GET"});return At(s,"Failed to fetch delivery details")}async function s2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}`,{method:"GET"});return At(s,"Failed to fetch replay task status")}async function n2(e,a){const s=(a==null?void 0:a.limit)??50,n=(a==null?void 0:a.offset)??0,i=await e(`/webhook/deliveries/replay?limit=${s}&offset=${n}`,{method:"GET"});return At(i,"Failed to fetch replay tasks")}async function r2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}/cancel`,{method:"POST"});return At(s,"Failed to cancel replay task")}function i2(e){const{client:a}=ye(),[s,n]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>Gd(a),[a]),{data:g,error:x,isLoading:w,mutate:b}=Ce(h?"wacht-webhook-app-session":null,f,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||d.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{await qd(a,e),d.current=!0,n(!0)}catch(P){c(P instanceof Error?P:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=o.useCallback(async Z=>Kd(a,Z),[a]),v=o.useCallback(async(Z,P)=>Yd(a,Z,P),[a]),_=o.useCallback(async Z=>Qd(a,Z),[a]),N=o.useCallback(async(Z,P)=>Jd(a,Z,P),[a]),k=o.useCallback(async()=>Xd(a),[a]),C=o.useCallback(async Z=>t2(a,Z),[a]),y=o.useCallback(async Z=>e2(a,Z),[a]),E=o.useCallback(async Z=>a2(a,Z),[a]),M=o.useCallback(async Z=>s2(a,Z),[a]),F=o.useCallback(async Z=>n2(a,Z),[a]),A=o.useCallback(async Z=>r2(a,Z),[a]),I=!x||x.message!=="NO_SESSION",$=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:I,sessionLoading:i||h&&w,sessionError:$,sessionId:(g==null?void 0:g.session_id)||null,webhookApp:(g==null?void 0:g.webhook_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()},createEndpoint:j,updateEndpoint:v,deleteEndpoint:_,testEndpoint:N,rotateSecret:k,updateSettings:y,replayDelivery:C,fetchReplayTaskStatus:M,fetchReplayTasks:F,cancelReplayTask:A,fetchDeliveryDetail:E}}function o2(){const{client:e}=ye(),a=o.useCallback(async()=>{const m=await e("/webhook/stats",{method:"GET"});return(await T(m)).data},[e]),{data:s,error:n,isLoading:i,mutate:l}=Ce("wacht-webhook-stats",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{stats:s||null,loading:i,error:n,refetch:()=>l()}}function l2(){const{client:e}=ye(),a=o.useCallback(async()=>{const m=await e("/webhook/endpoints",{method:"GET"});return(await T(m)).data},[e]),{data:s,error:n,isLoading:i,mutate:l}=Ce("wacht-webhook-endpoints",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{endpoints:s||[],loading:i,error:n,refetch:()=>l()}}function c2(){const{client:e}=ye();return{createEndpoint:o.useCallback(async s=>{const n=Zo(s),i=await e("/webhook/endpoints",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});return await T(i)},[e]),loading:!1,error:null}}function d2(){const{client:e}=ye(),a=o.useCallback(async()=>{const m=await e("/webhook/events",{method:"GET"});return(await T(m)).data},[e]),{data:s,error:n,isLoading:i,mutate:l}=Ce("wacht-webhook-events",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{events:s||[],loading:i,error:n,refetch:()=>l()}}function u2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.status&&c.set("status",e.status),e.event_name&&c.set("event_name",e.event_name),e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor);const d=await a(`/webhook/deliveries?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.endpoint_id,e.status,e.event_name,e.limit,e.cursor]),{data:n,error:i,isLoading:l,mutate:m}=Ce(()=>{const c=new URLSearchParams;return e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.status&&c.set("status",e.status),e.event_name&&c.set("event_name",e.event_name),e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),`wacht-webhook-deliveries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{deliveries:(n==null?void 0:n.data)||[],has_more:(n==null?void 0:n.has_more)||!1,next_cursor:n==null?void 0:n.next_cursor,loading:l,error:i,refetch:()=>m()}}function m2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&c.set("fields",e.fields.join(","));const d=await a(`/webhook/analytics?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.endpoint_id,e.fields]),{data:n,error:i,isLoading:l,mutate:m}=Ce(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&c.set("fields",e.fields.join(",")),`wacht-webhook-analytics?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:n||null,loading:l,error:i,refetch:()=>m()}}function p2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id);const d=await a(`/webhook/analytics/timeseries?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.interval,e.endpoint_id]),{data:n,error:i,isLoading:l,mutate:m}=Ce(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),`wacht-webhook-timeseries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(n==null?void 0:n.data)||[],interval:(n==null?void 0:n.interval)||"hour",loading:l,error:i,refetch:()=>m()}}function h2(e){const{client:a}=ye(),[s,n]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>{const N=await a("/api-auth/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch API auth app session");return(await T(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=Ce(h?"wacht-api-auth-app-session":null,f,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||d.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(d.current=!0,n(!0)):c(new Error("Failed to exchange ticket"))}catch(k){c(k instanceof Error?k:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=!x||x.message!=="NO_SESSION",v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:j,sessionLoading:i||h&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,apiAuthApp:(g==null?void 0:g.api_auth_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}function f2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const u=new URLSearchParams;e.status&&u.set("status",e.status);const h=await a(`/api-auth/keys${u.toString()?`?${u.toString()}`:""}`,{method:"GET"});return(await T(h)).data},[a,e.status]),{data:n,error:i,isLoading:l,mutate:m}=Ce(`wacht-api-auth-keys:${e.status||"all"}`,s,{revalidateOnFocus:!1,shouldRetryOnError:!1}),c=o.useCallback(async u=>{const h=new URLSearchParams;h.set("name",u.name),u.expires_at&&h.set("expires_at",u.expires_at);const f=await a("/api-auth/keys",{method:"POST",body:h}),g=await T(f);return await m(),g},[a,m]),d=o.useCallback(async u=>{const h=await a(`/api-auth/keys/${u.key_id}/rotate`,{method:"POST"}),f=await T(h);return await m(),f},[a,m]),p=o.useCallback(async u=>{const h=new URLSearchParams;u.reason&&h.set("reason",u.reason);const f=await a(`/api-auth/keys/${u.key_id}/revoke`,{method:"POST",body:h}),g=await T(f);return await m(),g},[a,m]);return{keys:n||[],createKey:c,rotateKey:d,revokeKey:p,loading:l,error:i,refetch:()=>m()}}function w2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),e.outcome&&c.set("outcome",e.outcome),e.key_id&&c.set("key_id",e.key_id),e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date);const d=await a(`/api-auth/audit/logs?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.limit,e.cursor,e.outcome,e.key_id,e.start_date,e.end_date]),{data:n,error:i,isLoading:l,mutate:m}=Ce(()=>{const c=new URLSearchParams;return e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),e.outcome&&c.set("outcome",e.outcome),e.key_id&&c.set("key_id",e.key_id),e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),`wacht-api-auth-audit-logs?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{logs:(n==null?void 0:n.data)||[],limit:(n==null?void 0:n.limit)||e.limit||0,has_more:(n==null?void 0:n.has_more)||!1,next_cursor:n==null?void 0:n.next_cursor,loading:l,error:i,refetch:()=>m()}}function g2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.key_id&&c.set("key_id",e.key_id),e.include_top_keys&&c.set("include_top_keys","true"),e.include_top_paths&&c.set("include_top_paths","true"),e.include_blocked_reasons&&c.set("include_blocked_reasons","true"),e.include_rate_limits&&c.set("include_rate_limits","true"),e.top_limit&&c.set("top_limit",e.top_limit.toString());const d=await a(`/api-auth/audit/analytics?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.key_id,e.include_top_keys,e.include_top_paths,e.include_blocked_reasons,e.include_rate_limits,e.top_limit]),{data:n,error:i,isLoading:l,mutate:m}=Ce(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.key_id&&c.set("key_id",e.key_id),e.include_top_keys&&c.set("include_top_keys","true"),e.include_top_paths&&c.set("include_top_paths","true"),e.include_blocked_reasons&&c.set("include_blocked_reasons","true"),e.include_rate_limits&&c.set("include_rate_limits","true"),e.top_limit&&c.set("top_limit",e.top_limit.toString()),`wacht-api-auth-audit-analytics?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:n||null,loading:l,error:i,refetch:()=>m()}}function x2(e={}){const{client:a}=ye(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.key_id&&c.set("key_id",e.key_id);const d=await a(`/api-auth/audit/timeseries?${c.toString()}`,{method:"GET"});return(await T(d)).data},[a,e.start_date,e.end_date,e.interval,e.key_id]),{data:n,error:i,isLoading:l,mutate:m}=Ce(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.key_id&&c.set("key_id",e.key_id),`wacht-api-auth-audit-timeseries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(n==null?void 0:n.data)||[],interval:(n==null?void 0:n.interval)||e.interval||"hour",loading:l,error:i,refetch:()=>m()}}const Ho=()=>{const{client:e}=ye(),[a,s]=o.useState(!1),[n,i]=o.useState(null),[l,m]=o.useState(null),c=o.useCallback(async p=>{s(!0),i(null),m(null);try{const u=new FormData;u.append("token",p);const h=await e("/organizations/invitations/accept",{method:"POST",body:u}),g=(await T(h)).data;return m(g),g.error_code&&i(g.message||"Failed to accept invitation"),g}catch(u){const h=u.message||"Failed to accept invitation";i(h);const f={error_code:"NETWORK_ERROR",message:h};return m(f),f}finally{s(!1)}},[e]),d=o.useCallback(()=>{i(null),m(null)},[]);return{acceptInvitation:c,invitationData:l,loading:a,error:n,reset:d}},v2=({children:e})=>{const{loading:a}=ke();return a?null:t.jsx(t.Fragment,{children:e})},b2=({children:e})=>{const{loading:a}=ke();return a?t.jsx(t.Fragment,{children:e}):null},y2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,44H32A20,20,0,0,0,12,64V88a20,20,0,0,0,16,19.6V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V107.6A20,20,0,0,0,244,88V64A20,20,0,0,0,224,44ZM36,68H220V84H36ZM52,188V108H204v80Zm112-52a12,12,0,0,1-12,12H104a12,12,0,0,1,0-24h48A12,12,0,0,1,164,136Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm-72,96H104a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm72-56H32V64H224V88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,50H32A14,14,0,0,0,18,64V88a14,14,0,0,0,14,14h2v90a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V102h2a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50ZM210,192a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V102H210ZM226,88a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2ZM98,136a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,52H32A12,12,0,0,0,20,64V88a12,12,0,0,0,12,12h4v92a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V100h4a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52ZM212,192a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V100H212ZM228,88a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4ZM100,136a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,136Z"}))]]),j2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),_2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),k2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),C2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),N2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.88,207.93l-160-176A12,12,0,1,0,39.12,48.07l14.8,16.29A83.58,83.58,0,0,0,44,104c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.68,186,19.75,19.75,0,0,0,48,196H84.19a44,44,0,0,0,87.62,0h1.79l25.52,28.07a12,12,0,0,0,17.76-16.14ZM68,104a59.84,59.84,0,0,1,3.52-20.29L151.78,172H54.68C63.52,154,68,131.14,68,104Zm60,108a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM88.89,42.35a12,12,0,0,1,6.37-15.73A84,84,0,0,1,212,104c0,18.68,2.38,34.93,7.07,48.28a12,12,0,1,1-22.64,8C190.83,144.32,188,125.4,188,104a60,60,0,0,0-83.38-55.28A12,12,0,0,1,88.89,42.35Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.84,192v0a1.85,1.85,0,0,1-3,.28L83.27,43.19a4,4,0,0,1,.8-6A79.55,79.55,0,0,1,129.17,24C173,24.66,207.8,61.1,208,104.92c.14,34.88,8.31,61.54,13.82,71A15.89,15.89,0,0,1,221.84,192Zm-7.92,18.62a8,8,0,0,1-11.85,10.76L182.62,200H167.16a40,40,0,0,1-78.41,0H47.91a15.78,15.78,0,0,1-13.59-7.59,16.42,16.42,0,0,1-.09-16.68c5.55-9.73,13.7-36.64,13.7-71.73A79.42,79.42,0,0,1,58.79,63.85L42,45.38A8,8,0,1,1,53.84,34.62ZM150.59,200H105.32a24,24,0,0,0,45.27,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L61.31,63.56A77.45,77.45,0,0,0,50,104c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198h42.5a38,38,0,0,0,75,0h18l20,22a6,6,0,0,0,8.88-8.08ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218ZM48,186a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.86,170,62,139.69,62,104a65.63,65.63,0,0,1,7.78-31.12L172.62,186Zm165.29-8.62a5.88,5.88,0,0,1-2.2.42,6,6,0,0,1-5.58-3.81c-7.2-18.31-11.49-44.48-11.49-70A66,66,0,0,0,95.45,46.57a6,6,0,1,1-5.93-10.43A78,78,0,0,1,206,104c0,35.7,8.16,59.24,10.66,65.61A6,6,0,0,1,213.27,177.38Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L63.8,63.32A75.52,75.52,0,0,0,52,104c0,36.13-8.58,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0h20.64L205,218.69a4,4,0,1,0,5.92-5.38ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220ZM48,188a3.89,3.89,0,0,1-3.43-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a67.58,67.58,0,0,1,9.4-34.51L177.14,188Zm164.55-12.48a3.94,3.94,0,0,1-1.46.28,4,4,0,0,1-3.72-2.54C200.24,155.17,196,129.28,196,104A68,68,0,0,0,94.46,44.83a4,4,0,1,1-4-6.95A76,76,0,0,1,204,104c0,36.05,8.26,59.89,10.79,66.34A4,4,0,0,1,212.53,175.52Z"}))]]),S2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,204H228V96a20,20,0,0,0-20-20H172V32a20,20,0,0,0-28.45-18.12l-104,48.54A20.06,20.06,0,0,0,28,80.55V204H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM204,100V204H172V100ZM52,83.09,148,38.3V204H52ZM132,112v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm-40,0v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm0,52v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Zm40,0v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,32V216H40V85.35a8,8,0,0,1,3.56-6.66l80-53.33A8,8,0,0,1,136,32Z",opacity:"0.2"}),r.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M239.73,208H224V96a16,16,0,0,0-16-16H164a4,4,0,0,0-4,4V208H144V32.41a16.43,16.43,0,0,0-6.16-13,16,16,0,0,0-18.72-.69L39.12,72A16,16,0,0,0,32,85.34V208H16.27A8.18,8.18,0,0,0,8,215.47,8,8,0,0,0,16,224H240a8,8,0,0,0,8-8.53A8.18,8.18,0,0,0,239.73,208ZM76,184a8,8,0,0,1-8.53,8A8.18,8.18,0,0,1,60,183.72V168.27A8.19,8.19,0,0,1,67.47,160,8,8,0,0,1,76,168Zm0-56a8,8,0,0,1-8.53,8A8.19,8.19,0,0,1,60,127.72V112.27A8.19,8.19,0,0,1,67.47,104,8,8,0,0,1,76,112Zm40,56a8,8,0,0,1-8.53,8,8.18,8.18,0,0,1-7.47-8.26V168.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Zm0-56a8,8,0,0,1-8.53,8,8.19,8.19,0,0,1-7.47-8.26V112.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,210H222V96a14,14,0,0,0-14-14H142V32a14,14,0,0,0-21.77-11.64l-80,53.33A14,14,0,0,0,34,85.34V210H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM208,94a2,2,0,0,1,2,2V210H142V94ZM46,85.34a2,2,0,0,1,.89-1.66l80-53.34A2,2,0,0,1,130,32V210H46ZM110,112v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm-32,0v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm0,56v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Zm32,0v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,212H220V96a12,12,0,0,0-12-12H140V32a12,12,0,0,0-18.66-10l-80,53.33a12,12,0,0,0-5.34,10V212H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM208,92a4,4,0,0,1,4,4V212H140V92ZM44,85.34A4,4,0,0,1,45.78,82l80-53.33A4,4,0,0,1,132,32V212H44ZM108,112v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm-32,0v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm0,56v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Zm32,0v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Z"}))]]),E2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),A2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),r.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),M2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),r.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),R2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),r.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),L2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),r.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),P2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M80,176h96l-48,48ZM128,32,80,80h96Z",opacity:"0.2"}),r.createElement("path",{d:"M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"}))]]),$2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),O2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M152.41,88.56l-89.6,88a12,12,0,0,1-16.82,0L7.59,138.85a12,12,0,0,1,16.82-17.13l30,29.46,81.19-79.74a12,12,0,0,1,16.82,17.12Zm96.15-17a12,12,0,0,0-17-.15L150.4,151.18l-7.88-7.74a12,12,0,0,0-16.82,17.12l16.29,16a12,12,0,0,0,16.82,0l89.6-88A12,12,0,0,0,248.56,71.59Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,64V192a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V64A16,16,0,0,1,32,48H224A16,16,0,0,1,240,64Z",opacity:"0.2"}),r.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM72,168a8,8,0,0,1-5.66-2.34l-24-24a8,8,0,0,1,11.32-11.32L72,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32l-64,64A8,8,0,0,1,72,168Zm141.66-66.34-64,64a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L144,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M148.2,84.28l-89.6,88a6,6,0,0,1-8.4,0L11.8,134.57A6,6,0,1,1,20.2,126l34.2,33.58,85.4-83.87a6,6,0,1,1,8.4,8.56Zm96.08-8.48a6,6,0,0,0-8.48-.08l-85.4,83.87-20.23-19.87a6,6,0,1,0-8.41,8.56l24.44,24a6,6,0,0,0,8.4,0l89.6-88A6,6,0,0,0,244.28,75.8Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M146.8,82.85l-89.6,88a4,4,0,0,1-5.6,0L13.2,133.14a4,4,0,0,1,5.6-5.71l35.6,35,86.8-85.24a4,4,0,0,1,5.6,5.7Zm96-5.65a4,4,0,0,0-5.65,0l-86.8,85.24-21.63-21.24a4,4,0,1,0-5.61,5.7l24.44,24a4,4,0,0,0,5.6,0l89.6-88A4,4,0,0,0,242.85,77.2Z"}))]]),Z2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]),H2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),F2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),T2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,12H80A28,28,0,0,0,52,40V216a28,28,0,0,0,28,28h96a28,28,0,0,0,28-28V40A28,28,0,0,0,176,12ZM76,76H180V180H76Zm4-40h96a4,4,0,0,1,4,4V52H76V40A4,4,0,0,1,80,36Zm96,184H80a4,4,0,0,1-4-4V204H180v12A4,4,0,0,1,176,220Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,56V200H64V56Z",opacity:"0.2"}),r.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM80,32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,18H80A22,22,0,0,0,58,40V216a22,22,0,0,0,22,22h96a22,22,0,0,0,22-22V40A22,22,0,0,0,176,18ZM70,62H186V194H70ZM80,30h96a10,10,0,0,1,10,10V50H70V40A10,10,0,0,1,80,30Zm96,196H80a10,10,0,0,1-10-10V206H186v10A10,10,0,0,1,176,226Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M176,20H80A20,20,0,0,0,60,40V216a20,20,0,0,0,20,20h96a20,20,0,0,0,20-20V40A20,20,0,0,0,176,20ZM68,60H188V196H68ZM80,28h96a12,12,0,0,1,12,12V52H68V40A12,12,0,0,1,80,28Zm96,200H80a12,12,0,0,1-12-12V204H188v12A12,12,0,0,1,176,228Z"}))]]),I2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",opacity:"0.2"}),r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z"}))]]),V2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),z2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56l-96,88L32,56Z",opacity:"0.2"}),r.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z"}))]]),D2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),U2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),W2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,128a224.48,224.48,0,0,1-26.37,105.54,12,12,0,1,1-21.16-11.32A200.33,200.33,0,0,0,136,128a8,8,0,0,0-16,0,12,12,0,0,1-24,0,32,32,0,0,1,64,0ZM128,56a12,12,0,1,0,0,24,48.05,48.05,0,0,1,48,48c0,7.62-.36,15.32-1.07,22.87A12,12,0,0,0,185.74,164c.38,0,.76,0,1.14,0a12,12,0,0,0,11.93-10.87c.79-8.3,1.18-16.76,1.18-25.13A72.08,72.08,0,0,0,128,56ZM96,92.23A12,12,0,0,0,80,74.35,72.1,72.1,0,0,0,56,128a120.11,120.11,0,0,1-15.12,58.37,12,12,0,0,0,21,11.69A144.14,144.14,0,0,0,80,128,48.08,48.08,0,0,1,96,92.23Zm10.1,64.1a12,12,0,0,0-14.46,8.9,158.61,158.61,0,0,1-18.88,45.86,12,12,0,0,0,20.5,12.48A182.86,182.86,0,0,0,115,170.79,12,12,0,0,0,106.1,156.33Zm76.73,24.07A12,12,0,0,0,168.19,189a241.5,241.5,0,0,1-8,24.87,12,12,0,0,0,6.91,15.49,11.76,11.76,0,0,0,4.29.8,12,12,0,0,0,11.21-7.71,260.2,260.2,0,0,0,8.79-27.37A12,12,0,0,0,182.83,180.4ZM128,16A112.12,112.12,0,0,0,16,127.44c0,.19,0,.38,0,.57a79.81,79.81,0,0,1-5,27.82,12,12,0,1,0,22.5,8.35A103.59,103.59,0,0,0,40,128.58c0-.19,0-.38,0-.57a88,88,0,0,1,176-.5c0,.16,0,.33,0,.5a282.12,282.12,0,0,1-6.74,61.38,12,12,0,0,0,9.09,14.33A11.84,11.84,0,0,0,221,204a12,12,0,0,0,11.7-9.38A305.87,305.87,0,0,0,240,128.55c0-.18,0-.36,0-.54A112.13,112.13,0,0,0,128,16Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M126.42,24C70.73,24.85,25.21,70.09,24,125.81a103.53,103.53,0,0,0,13.52,53.54,4,4,0,0,0,7.1-.3,119.35,119.35,0,0,0,11.37-51A71.77,71.77,0,0,1,83,71.83a8,8,0,1,1,9.86,12.61A55.82,55.82,0,0,0,72,128.07a135.28,135.28,0,0,1-18.45,68.35,4,4,0,0,0,.61,4.85c2,2,4.09,4,6.25,5.82a4,4,0,0,0,6-1A151.18,151.18,0,0,0,85,158.49a8,8,0,1,1,15.68,3.19,167.33,167.33,0,0,1-21.07,53.64,4,4,0,0,0,1.6,5.63c2.47,1.25,5,2.41,7.57,3.47a4,4,0,0,0,5-1.61A183,183,0,0,0,120,128.28a8.16,8.16,0,0,1,7.44-8.21,8,8,0,0,1,8.56,8,198.94,198.94,0,0,1-25.21,97.16,4,4,0,0,0,2.95,5.92q4.55.63,9.21.86a4,4,0,0,0,3.67-2.1A214.88,214.88,0,0,0,152,128.8c.05-13.25-10.3-24.49-23.54-24.74A24,24,0,0,0,104,128a8.1,8.1,0,0,1-7.29,8,8,8,0,0,1-8.71-8,40,40,0,0,1,40.42-40c22,.23,39.68,19.17,39.57,41.16a231.37,231.37,0,0,1-20.52,94.57,4,4,0,0,0,4.62,5.51,103.49,103.49,0,0,0,10.26-3,4,4,0,0,0,2.35-2.22,243.76,243.76,0,0,0,11.48-34,8,8,0,1,1,15.5,4q-1.12,4.37-2.4,8.7a4,4,0,0,0,6.46,4.17A104,104,0,0,0,126.42,24ZM198,161.08a8,8,0,0,1-7.92,7,8.39,8.39,0,0,1-1-.06,8,8,0,0,1-6.95-8.93,252.57,252.57,0,0,0,1.92-31,56.08,56.08,0,0,0-56-56,56.78,56.78,0,0,0-7,.43,8,8,0,0,1-2-15.89,72.1,72.1,0,0,1,81,71.49A266.93,266.93,0,0,1,198,161.08Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M70,128a132.68,132.68,0,0,1-14,59.58,6,6,0,0,1-5.38,3.33,6,6,0,0,1-5.36-8.67A120.74,120.74,0,0,0,58,128,69.72,69.72,0,0,1,84.25,73.36a6,6,0,0,1,7.51,9.37A57.73,57.73,0,0,0,70,128Zm58-6a6,6,0,0,0-6,6,186.07,186.07,0,0,1-23.23,90.07,6,6,0,0,0,10.5,5.82A198.14,198.14,0,0,0,134,128,6,6,0,0,0,128,122Zm0-32a38,38,0,0,0-38,38,6,6,0,0,0,12,0,26,26,0,0,1,52,0,216.06,216.06,0,0,1-20.71,92.85A6,6,0,1,0,144.16,226,227.94,227.94,0,0,0,166,128,38,38,0,0,0,128,90Zm0-64A102.11,102.11,0,0,0,26,128a90,90,0,0,1-5.12,30,6,6,0,1,0,11.31,4A101.83,101.83,0,0,0,38,128a90,90,0,0,1,180,0,284.7,284.7,0,0,1-5.33,54.84,6,6,0,0,0,4.72,7.05,6.8,6.8,0,0,0,1.17.11,6,6,0,0,0,5.88-4.84A295.92,295.92,0,0,0,230,128,102.12,102.12,0,0,0,128,26ZM94,154.13a6,6,0,0,0-7.07,4.69,152.82,152.82,0,0,1-17.44,46,6,6,0,0,0,10.4,6,164.77,164.77,0,0,0,18.8-49.65A6,6,0,0,0,94,154.13ZM128,58a70.76,70.76,0,0,0-8.75.54,6,6,0,1,0,1.49,11.91A58,58,0,0,1,186,128a252.27,252.27,0,0,1-1.94,31.26,6,6,0,0,0,5.21,6.69,6.59,6.59,0,0,0,.75,0,6,6,0,0,0,5.95-5.26A266.46,266.46,0,0,0,198,128,70.08,70.08,0,0,0,128,58ZM185.44,186.2a6,6,0,0,0-7.31,4.31c-1.47,5.74-3.18,11.49-5.06,17.09a6,6,0,0,0,11.38,3.82c2-5.88,3.75-11.9,5.3-17.92A6,6,0,0,0,185.44,186.2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M68,128A130.71,130.71,0,0,1,54.27,186.7a4,4,0,0,1-3.58,2.22,3.91,3.91,0,0,1-1.78-.42,4,4,0,0,1-1.8-5.36A122.71,122.71,0,0,0,60,128,67.74,67.74,0,0,1,85.5,74.92a4,4,0,0,1,5,6.25A59.74,59.74,0,0,0,68,128Zm60-4a4,4,0,0,0-4,4,188.1,188.1,0,0,1-23.48,91,4,4,0,0,0,7,3.88A196.22,196.22,0,0,0,132,128,4,4,0,0,0,128,124Zm0-32a36,36,0,0,0-36,36,4,4,0,0,0,8,0,28,28,0,0,1,56,0,218,218,0,0,1-20.9,93.7,4,4,0,1,0,7.24,3.41A226,226,0,0,0,164,128,36,36,0,0,0,128,92Zm0-64A100.11,100.11,0,0,0,28,128a91.66,91.66,0,0,1-5.24,30.67,4,4,0,1,0,7.54,2.66A99.66,99.66,0,0,0,36,128a92,92,0,0,1,184,0,286.37,286.37,0,0,1-5.37,55.23,4,4,0,0,0,3.15,4.69,4.13,4.13,0,0,0,.78.08,4,4,0,0,0,3.92-3.23A294.25,294.25,0,0,0,228,128,100.11,100.11,0,0,0,128,28ZM93.6,156.09a4,4,0,0,0-4.71,3.12,155,155,0,0,1-17.66,46.64,4,4,0,0,0,6.93,4,163.13,163.13,0,0,0,18.57-49A4,4,0,0,0,93.6,156.09ZM128,60a68.79,68.79,0,0,0-8.5.53,4,4,0,0,0,1,7.93A62.57,62.57,0,0,1,128,68a60.07,60.07,0,0,1,60,60,256.15,256.15,0,0,1-1.95,31.5,4,4,0,0,0,3.47,4.47l.5,0a4,4,0,0,0,4-3.51A264.37,264.37,0,0,0,196,128,68.08,68.08,0,0,0,128,60Zm56.93,128.12a4,4,0,0,0-4.87,2.88c-1.49,5.78-3.21,11.58-5.1,17.23a4,4,0,1,0,7.58,2.54c2-5.83,3.73-11.81,5.27-17.77A4,4,0,0,0,184.94,188.13Z"}))]]),B2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),G2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z"}))]]),q2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),K2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,84H180.2l7.61-41.85a12,12,0,0,0-23.62-4.3L155.8,84H116.2l7.61-41.85a12,12,0,1,0-23.62-4.3L91.8,84H48a12,12,0,0,0,0,24H87.44l-7.27,40H32a12,12,0,0,0,0,24H75.8l-7.61,41.85a12,12,0,0,0,9.66,14A11.43,11.43,0,0,0,80,228a12,12,0,0,0,11.8-9.86L100.2,172h39.6l-7.61,41.85a12,12,0,0,0,9.66,14,11.43,11.43,0,0,0,2.16.2,12,12,0,0,0,11.8-9.86L164.2,172H208a12,12,0,0,0,0-24H168.56l7.27-40H224a12,12,0,0,0,0-24Zm-79.83,64H104.56l7.27-40h39.61Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.82,96l-11.64,64h-64l11.64-64Z",opacity:"0.2"}),r.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116.25,112h31.5l-8,32h-31.5ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Zm-16,56a8,8,0,0,0-8-8H168.25l7.51-30.06a8,8,0,0,0-15.52-3.88L151.75,96h-31.5l7.51-30.06a8,8,0,0,0-15.52-3.88L103.75,96H64a8,8,0,0,0,0,16H99.75l-8,32H56a8,8,0,0,0,0,16H87.75l-7.51,30.06a8,8,0,0,0,5.82,9.7,8.13,8.13,0,0,0,2,.24,8,8,0,0,0,7.75-6.06L104.25,160h31.5l-7.51,30.06a8,8,0,0,0,5.82,9.7A8.13,8.13,0,0,0,136,200a8,8,0,0,0,7.75-6.06L152.25,160H192a8,8,0,0,0,0-16H156.25l8-32H200A8,8,0,0,0,208,104Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,90H173l8.89-48.93a6,6,0,1,0-11.8-2.14L160.81,90H109l8.89-48.93a6,6,0,0,0-11.8-2.14L96.81,90H48a6,6,0,0,0,0,12H94.63l-9.46,52H32a6,6,0,0,0,0,12H83L74.1,214.93a6,6,0,0,0,4.83,7A5.64,5.64,0,0,0,80,222a6,6,0,0,0,5.89-4.93L95.19,166H147l-8.89,48.93a6,6,0,0,0,4.83,7,5.64,5.64,0,0,0,1.08.1,6,6,0,0,0,5.89-4.93L159.19,166H208a6,6,0,0,0,0-12H161.37l9.46-52H224a6,6,0,0,0,0-12Zm-74.83,64H97.37l9.46-52h51.8Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,92H170.61l9.33-51.28a4,4,0,1,0-7.88-1.44L162.48,92H106.61l9.33-51.28a4,4,0,1,0-7.88-1.44L98.48,92H48a4,4,0,0,0,0,8H97L86.84,156H32a4,4,0,0,0,0,8H85.39l-9.33,51.28a4,4,0,0,0,3.22,4.65A3.65,3.65,0,0,0,80,220a4,4,0,0,0,3.94-3.29L93.52,164h55.87l-9.33,51.28a4,4,0,0,0,3.22,4.65,3.65,3.65,0,0,0,.72.07,4,4,0,0,0,3.94-3.29L157.52,164H208a4,4,0,0,0,0-8H159l10.19-56H224a4,4,0,0,0,0-8Zm-73.16,64H95l10.19-56H161Z"}))]]),Y2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),Q2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),J2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),X2=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),r.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),eu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]),tu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),r.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),au=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),r.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),su=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),r.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),nu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,154.8l-47.09-21.11-.18-.08a19.94,19.94,0,0,0-19,1.75,13.08,13.08,0,0,0-1.12.84l-22.31,19c-13-7.05-26.43-20.37-33.49-33.21l19.06-22.66a11.76,11.76,0,0,0,.85-1.15,20,20,0,0,0,1.66-18.83,1.42,1.42,0,0,1-.08-.18L101.2,32A20.06,20.06,0,0,0,80.42,20.15,60.27,60.27,0,0,0,28,80c0,81.61,66.39,148,148,148a60.27,60.27,0,0,0,59.85-52.42A20.06,20.06,0,0,0,224,154.8ZM176,204A124.15,124.15,0,0,1,52,80,36.29,36.29,0,0,1,80.48,44.46l18.82,42L80.14,109.28a12,12,0,0,0-.86,1.16A20,20,0,0,0,78,130.08c9.42,19.28,28.83,38.56,48.31,48A20,20,0,0,0,146,176.63a11.63,11.63,0,0,0,1.11-.85l22.43-19.07,42,18.81A36.29,36.29,0,0,1,176,204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M223.94,174.08A48.33,48.33,0,0,1,176,216,136,136,0,0,1,40,80,48.33,48.33,0,0,1,81.92,32.06a8,8,0,0,1,8.3,4.8l21.13,47.2a8,8,0,0,1-.66,7.53L89.32,117a7.93,7.93,0,0,0-.54,7.81c8.27,16.93,25.77,34.22,42.75,42.41a7.92,7.92,0,0,0,7.83-.59l25-21.3a8,8,0,0,1,7.59-.69l47.16,21.13A8,8,0,0,1,223.94,174.08Z",opacity:"0.2"}),r.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M221.59,160.3l-47.24-21.17a14,14,0,0,0-13.28,1.22,4.81,4.81,0,0,0-.56.42l-24.69,21a1.88,1.88,0,0,1-1.68.06c-15.87-7.66-32.31-24-40-39.65a1.91,1.91,0,0,1,0-1.68l21.07-25a6.13,6.13,0,0,0,.42-.58,14,14,0,0,0,1.12-13.27L95.73,34.49a14,14,0,0,0-14.56-8.38A54.24,54.24,0,0,0,34,80c0,78.3,63.7,142,142,142a54.25,54.25,0,0,0,53.89-47.17A14,14,0,0,0,221.59,160.3ZM176,210C104.32,210,46,151.68,46,80A42.23,42.23,0,0,1,82.67,38h.23a2,2,0,0,1,1.84,1.31l21.1,47.11a2,2,0,0,1,0,1.67L84.73,113.15a4.73,4.73,0,0,0-.43.57,14,14,0,0,0-.91,13.73c8.87,18.16,27.17,36.32,45.53,45.19a14,14,0,0,0,13.77-1c.19-.13.38-.27.56-.42l24.68-21a1.92,1.92,0,0,1,1.6-.1l47.25,21.17a2,2,0,0,1,1.21,2A42.24,42.24,0,0,1,176,210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220.78,162.13,173.56,141A12,12,0,0,0,162.18,142a3.37,3.37,0,0,0-.38.28L137,163.42a3.93,3.93,0,0,1-3.7.21c-16.24-7.84-33.05-24.52-40.89-40.57a3.9,3.9,0,0,1,.18-3.69l21.2-25.21c.1-.12.19-.25.28-.38a12,12,0,0,0,1-11.36L93.9,35.28a12,12,0,0,0-12.48-7.19A52.25,52.25,0,0,0,36,80c0,77.2,62.8,140,140,140a52.25,52.25,0,0,0,51.91-45.42A12,12,0,0,0,220.78,162.13ZM220,173.58A44.23,44.23,0,0,1,176,212C103.22,212,44,152.78,44,80A44.23,44.23,0,0,1,82.42,36a3.87,3.87,0,0,1,.48,0,4,4,0,0,1,3.67,2.49l21.11,47.14a4,4,0,0,1-.23,3.6l-21.19,25.2c-.1.13-.2.25-.29.39a12,12,0,0,0-.78,11.75c8.69,17.79,26.61,35.58,44.6,44.27a12,12,0,0,0,11.79-.87l.37-.28,24.83-21.12a3.93,3.93,0,0,1,3.57-.27l47.21,21.16A4,4,0,0,1,220,173.58Z"}))]]),ru=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),iu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M96,40l33.52,88H56Zm104,88H129.52L160,208Z",opacity:"0.2"}),r.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"}))]]),ou=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),lu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",opacity:"0.2"}),r.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"}))]]),cu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),du=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),uu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"}))]]),mu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),pu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164,56a12,12,0,0,1,12-12h12V32a12,12,0,0,1,24,0V44h12a12,12,0,0,1,0,24H212V80a12,12,0,0,1-24,0V68H176A12,12,0,0,1,164,56Zm70.51,54A107.88,107.88,0,1,1,146,21.49a12,12,0,0,1-4,23.67A85,85,0,0,0,128,44,83.94,83.94,0,0,0,62.05,179.94a83.48,83.48,0,0,1,29-23.42,52,52,0,1,1,74,0,83.36,83.36,0,0,1,29,23.42A83.52,83.52,0,0,0,212,128a85.2,85.2,0,0,0-1.16-14,12,12,0,0,1,23.67-4ZM128,148a28,28,0,1,0-28-28A28,28,0,0,0,128,148Zm0,64a83.53,83.53,0,0,0,48.43-15.43,60,60,0,0,0-96.86,0A83.53,83.53,0,0,0,128,212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a95.76,95.76,0,0,1-31.8,71.37A72,72,0,0,0,128,160a40,40,0,1,0-40-40,40,40,0,0,0,40,40,72,72,0,0,0-64.2,39.37h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,76a44,44,0,1,1-44,44A44,44,0,0,1,128,76Zm48-12h16V80a8,8,0,0,0,16,0V64h16a8,8,0,0,0,0-16H208V32a8,8,0,0,0-16,0V48H176a8,8,0,0,0,0,16Zm45.35,40.11a8,8,0,0,0-6.57,9.21A88.85,88.85,0,0,1,216,128a87.62,87.62,0,0,1-22.24,58.41A79.86,79.86,0,0,0,172,165.1a4,4,0,0,0-4.84.32,59.81,59.81,0,0,1-78.27,0A4,4,0,0,0,84,165.1a79.71,79.71,0,0,0-21.79,21.31A88,88,0,0,1,128,40a88.76,88.76,0,0,1,14.68,1.22,8,8,0,0,0,2.64-15.78,103.92,103.92,0,1,0,85.24,85.24A8,8,0,0,0,221.35,104.11Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M170,56a6,6,0,0,1,6-6h18V32a6,6,0,0,1,12,0V50h18a6,6,0,0,1,0,12H206V80a6,6,0,0,1-12,0V62H176A6,6,0,0,1,170,56Zm58.59,55A101.9,101.9,0,1,1,145,27.41a6,6,0,1,1-2,11.83A91.66,91.66,0,0,0,128,38,89.95,89.95,0,0,0,62.49,189.64a77.53,77.53,0,0,1,40-31.38,46,46,0,1,1,51,0,77.53,77.53,0,0,1,40,31.38A89.65,89.65,0,0,0,218,128a91.76,91.76,0,0,0-1.24-15,6,6,0,1,1,11.83-2ZM128,154a34,34,0,1,0-34-34A34,34,0,0,0,128,154Zm0,64A89.58,89.58,0,0,0,184.56,198a66,66,0,0,0-113.12,0A89.58,89.58,0,0,0,128,218Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M172,56a4,4,0,0,1,4-4h20V32a4,4,0,0,1,8,0V52h20a4,4,0,0,1,0,8H204V80a4,4,0,0,1-8,0V60H176A4,4,0,0,1,172,56Zm54.62,55.34a99.89,99.89,0,1,1-82-82,4,4,0,0,1-1.32,7.89A93.4,93.4,0,0,0,128,36,92,92,0,0,0,62.83,192.87a75.61,75.61,0,0,1,44.51-34,44,44,0,1,1,41.32,0,75.61,75.61,0,0,1,44.51,34A91.69,91.69,0,0,0,220,128a93.58,93.58,0,0,0-1.27-15.34,4,4,0,0,1,7.89-1.32ZM128,156a36,36,0,1,0-36-36A36,36,0,0,0,128,156Zm0,64a91.61,91.61,0,0,0,59.14-21.58,68,68,0,0,0-118.27,0A91.56,91.56,0,0,0,128,220Z"}))]]),hu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z",opacity:"0.2"}),r.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z"}))]]),fu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),wu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]),gu=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),xu=o.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),fe=r.forwardRef((e,a)=>{const{alt:s,color:n,size:i,weight:l,mirrored:m,children:c,weights:d,...p}=e,{color:u="currentColor",size:h,weight:f="regular",mirrored:g=!1,...x}=r.useContext(xu);return r.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:i??h,height:i??h,fill:n??u,viewBox:"0 0 256 256",transform:m||g?"scale(-1, 1)":void 0,...x,...p},!!s&&r.createElement("title",null,s),c,d.get(l??f))});fe.displayName="IconBase";const Fo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:y2}));Fo.displayName="ArchiveIcon";const To=Fo,Io=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:j2}));Io.displayName="ArrowCounterClockwiseIcon";const Vo=Io,zo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:_2}));zo.displayName="ArrowSquareOutIcon";const vu=zo,Do=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:k2}));Do.displayName="ArrowsLeftRightIcon";const bu=Do,Uo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:C2}));Uo.displayName="BellIcon";const yu=Uo,Wo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:N2}));Wo.displayName="BellSlashIcon";const ci=Wo,Bo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:S2}));Bo.displayName="BuildingsIcon";const ps=Bo,Go=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:E2}));Go.displayName="CameraIcon";const sn=Go,qo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:A2}));qo.displayName="CaretDownIcon";const Dt=qo,Ko=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:M2}));Ko.displayName="CaretLeftIcon";const nn=Ko,Yo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:R2}));Yo.displayName="CaretRightIcon";const Qt=Yo,Qo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:L2}));Qo.displayName="CaretUpIcon";const Jo=Qo,Xo=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:P2}));Xo.displayName="CaretUpDownIcon";const ju=Xo,el=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:$2}));el.displayName="CheckIcon";const Be=el,tl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:O2}));tl.displayName="ChecksIcon";const _u=tl,al=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:Z2}));al.displayName="CircleIcon";const ku=al,sl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:H2}));sl.displayName="ClockIcon";const Cu=sl,nl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:F2}));nl.displayName="CopyIcon";const Ga=nl,rl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:T2}));rl.displayName="DeviceMobileIcon";const Nu=rl,il=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:I2}));il.displayName="DotsThreeIcon";const Su=il,ol=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:V2}));ol.displayName="DownloadSimpleIcon";const ll=ol,cl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:z2}));cl.displayName="EnvelopeSimpleIcon";const dl=cl,ul=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:D2}));ul.displayName="EyeIcon";const Nn=ul,ml=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:U2}));ml.displayName="EyeSlashIcon";const Sn=ml,pl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:W2}));pl.displayName="FingerprintIcon";const ar=pl,hl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:B2}));hl.displayName="FolderSimpleIcon";const di=hl,fl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:G2}));fl.displayName="GearSixIcon";const Ea=fl,wl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:q2}));wl.displayName="GlobeIcon";const Eu=wl,gl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:K2}));gl.displayName="HashIcon";const xl=gl,vl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:Y2}));vl.displayName="InfoIcon";const Au=vl,bl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:Q2}));bl.displayName="KeyIcon";const Mu=bl,yl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:J2}));yl.displayName="LightningIcon";const Ru=yl,jl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:X2}));jl.displayName="LinkIcon";const Lu=jl,_l=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:eu}));_l.displayName="LockIcon";const ui=_l,kl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:tu}));kl.displayName="MagnifyingGlassIcon";const Cl=kl,Nl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:au}));Nl.displayName="PaperPlaneTiltIcon";const Sl=Nl,El=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:su}));El.displayName="PencilSimpleIcon";const Al=El,Ml=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:nu}));Ml.displayName="PhoneIcon";const Pu=Ml,Rl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:ru}));Rl.displayName="PlusIcon";const Nt=Rl,Ll=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:iu}));Ll.displayName="PulseIcon";const $u=Ll,Pl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:ou}));Pl.displayName="ShieldIcon";const Xt=Pl,$l=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:lu}));$l.displayName="SignOutIcon";const Aa=$l,Ol=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:cu}));Ol.displayName="StarIcon";const Ou=Ol,Zl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:du}));Zl.displayName="TrashIcon";const xr=Zl,Hl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:uu}));Hl.displayName="TrayIcon";const Zu=Hl,Fl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:mu}));Fl.displayName="UserIcon";const hs=Fl,Tl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:pu}));Tl.displayName="UserCirclePlusIcon";const Hu=Tl,Il=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:hu}));Il.displayName="UsersIcon";const cs=Il,Vl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:fu}));Vl.displayName="WarningIcon";const Fa=Vl,zl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:wu}));zl.displayName="WarningCircleIcon";const Ma=zl,Dl=r.forwardRef((e,a)=>r.createElement(fe,{ref:a,...e,weights:gu}));Dl.displayName="XIcon";const La=Dl;function Fu(e){var a=Object.create(null);return function(s){return a[s]===void 0&&(a[s]=e(s)),a[s]}}var Tu=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Iu=Fu(function(e){return Tu.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Xe="-ms-",ds="-moz-",De="-webkit-",Ul="comm",rn="rule",vr="decl",Vu="@import",zu="@namespace",Wl="@keyframes",Du="@layer",Bl=Math.abs,br=String.fromCharCode,sr=Object.assign;function Uu(e,a){return dt(e,0)^45?(((a<<2^dt(e,0))<<2^dt(e,1))<<2^dt(e,2))<<2^dt(e,3):0}function Gl(e){return e.trim()}function Gt(e,a){return(e=a.exec(e))?e[0]:e}function Se(e,a,s){return e.replace(a,s)}function Vs(e,a,s){return e.indexOf(a,s)}function dt(e,a){return e.charCodeAt(a)|0}function Pa(e,a,s){return e.slice(a,s)}function Mt(e){return e.length}function ql(e){return e.length}function is(e,a){return a.push(e),e}function Wu(e,a){return e.map(a).join("")}function mi(e,a){return e.filter(function(s){return!Gt(s,a)})}var on=1,Ka=1,Kl=0,Et=0,lt=0,es="";function ln(e,a,s,n,i,l,m,c){return{value:e,root:a,parent:s,type:n,props:i,children:l,line:on,column:Ka,length:m,return:"",siblings:c}}function ca(e,a){return sr(ln("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},a)}function Va(e){for(;e.root;)e=ca(e.root,{children:[e]});is(e,e.siblings)}function Bu(){return lt}function Gu(){return lt=Et>0?dt(es,--Et):0,Ka--,lt===10&&(Ka=1,on--),lt}function Pt(){return lt=Et<Kl?dt(es,Et++):0,Ka++,lt===10&&(Ka=1,on++),lt}function ua(){return dt(es,Et)}function zs(){return Et}function cn(e,a){return Pa(es,e,a)}function fs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qu(e){return on=Ka=1,Kl=Mt(es=e),Et=0,[]}function Ku(e){return es="",e}function En(e){return Gl(cn(Et-1,nr(e===91?e+2:e===40?e+1:e)))}function Yu(e){for(;(lt=ua())&<<33;)Pt();return fs(e)>2||fs(lt)>3?"":" "}function Qu(e,a){for(;--a&&Pt()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return cn(e,zs()+(a<6&&ua()==32&&Pt()==32))}function nr(e){for(;Pt();)switch(lt){case e:return Et;case 34:case 39:e!==34&&e!==39&&nr(lt);break;case 40:e===41&&nr(e);break;case 92:Pt();break}return Et}function Ju(e,a){for(;Pt()&&e+lt!==57;)if(e+lt===84&&ua()===47)break;return"/*"+cn(a,Et-1)+"*"+br(e===47?e:Pt())}function Xu(e){for(;!fs(ua());)Pt();return cn(e,Et)}function e8(e){return Ku(Ds("",null,null,null,[""],e=qu(e),0,[0],e))}function Ds(e,a,s,n,i,l,m,c,d){for(var p=0,u=0,h=m,f=0,g=0,x=0,w=1,b=1,j=1,v=0,_="",N=i,k=l,C=n,y=_;b;)switch(x=v,v=Pt()){case 40:if(x!=108&&dt(y,h-1)==58){Vs(y+=Se(En(v),"&","&\f"),"&\f",Bl(p?c[p-1]:0))!=-1&&(j=-1);break}case 34:case 39:case 91:y+=En(v);break;case 9:case 10:case 13:case 32:y+=Yu(x);break;case 92:y+=Qu(zs()-1,7);continue;case 47:switch(ua()){case 42:case 47:is(t8(Ju(Pt(),zs()),a,s,d),d),(fs(x||1)==5||fs(ua()||1)==5)&&Mt(y)&&Pa(y,-1,void 0)!==" "&&(y+=" ");break;default:y+="/"}break;case 123*w:c[p++]=Mt(y)*j;case 125*w:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+u:j==-1&&(y=Se(y,/\f/g,"")),g>0&&(Mt(y)-h||w===0&&x===47)&&is(g>32?hi(y+";",n,s,h-1,d):hi(Se(y," ","")+";",n,s,h-2,d),d);break;case 59:y+=";";default:if(is(C=pi(y,a,s,p,u,i,c,_,N=[],k=[],h,l),l),v===123)if(u===0)Ds(y,a,C,C,N,l,h,c,k);else{switch(f){case 99:if(dt(y,3)===110)break;case 108:if(dt(y,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Ds(e,C,C,n&&is(pi(e,C,C,0,0,i,c,_,i,N=[],h,k),k),i,k,h,c,n?N:k):Ds(y,C,C,C,[""],k,0,c,k)}}p=u=g=0,w=j=1,_=y="",h=m;break;case 58:h=1+Mt(y),g=x;default:if(w<1){if(v==123)--w;else if(v==125&&w++==0&&Gu()==125)continue}switch(y+=br(v),v*w){case 38:j=u>0?1:(y+="\f",-1);break;case 44:c[p++]=(Mt(y)-1)*j,j=1;break;case 64:ua()===45&&(y+=En(Pt())),f=ua(),u=h=Mt(_=y+=Xu(zs())),v++;break;case 45:x===45&&Mt(y)==2&&(w=0)}}return l}function pi(e,a,s,n,i,l,m,c,d,p,u,h){for(var f=i-1,g=i===0?l:[""],x=ql(g),w=0,b=0,j=0;w<n;++w)for(var v=0,_=Pa(e,f+1,f=Bl(b=m[w])),N=e;v<x;++v)(N=Gl(b>0?g[v]+" "+_:Se(_,/&\f/g,g[v])))&&(d[j++]=N);return ln(e,a,s,i===0?rn:c,d,p,u,h)}function t8(e,a,s,n){return ln(e,a,s,Ul,br(Bu()),Pa(e,2,-2),0,n)}function hi(e,a,s,n,i){return ln(e,a,s,vr,Pa(e,0,n),Pa(e,n+1,-1),n,i)}function Yl(e,a,s){switch(Uu(e,a)){case 5103:return De+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return De+e+e;case 4855:return De+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return ds+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return De+e+ds+e+Xe+e+e;case 5936:switch(dt(e,a+11)){case 114:return De+e+Xe+Se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return De+e+Xe+Se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return De+e+Xe+Se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return De+e+Xe+e+e;case 6165:return De+e+Xe+"flex-"+e+e;case 5187:return De+e+Se(e,/(\w+).+(:[^]+)/,De+"box-$1$2"+Xe+"flex-$1$2")+e;case 5443:return De+e+Xe+"flex-item-"+Se(e,/flex-|-self/g,"")+(Gt(e,/flex-|baseline/)?"":Xe+"grid-row-"+Se(e,/flex-|-self/g,""))+e;case 4675:return De+e+Xe+"flex-line-pack"+Se(e,/align-content|flex-|-self/g,"")+e;case 5548:return De+e+Xe+Se(e,"shrink","negative")+e;case 5292:return De+e+Xe+Se(e,"basis","preferred-size")+e;case 6060:return De+"box-"+Se(e,"-grow","")+De+e+Xe+Se(e,"grow","positive")+e;case 4554:return De+Se(e,/([^-])(transform)/g,"$1"+De+"$2")+e;case 6187:return Se(Se(Se(e,/(zoom-|grab)/,De+"$1"),/(image-set)/,De+"$1"),e,"")+e;case 5495:case 3959:return Se(e,/(image-set\([^]*)/,De+"$1$`$1");case 4968:return Se(Se(e,/(.+:)(flex-)?(.*)/,De+"box-pack:$3"+Xe+"flex-pack:$3"),/space-between/,"justify")+De+e+e;case 4200:if(!Gt(e,/flex-|baseline/))return Xe+"grid-column-align"+Pa(e,a)+e;break;case 2592:case 3360:return Xe+Se(e,"template-","")+e;case 4384:case 3616:return s&&s.some(function(n,i){return a=i,Gt(n.props,/grid-\w+-end/)})?~Vs(e+(s=s[a].value),"span",0)?e:Xe+Se(e,"-start","")+e+Xe+"grid-row-span:"+(~Vs(s,"span",0)?Gt(s,/\d+/):+Gt(s,/\d+/)-+Gt(e,/\d+/))+";":Xe+Se(e,"-start","")+e;case 4896:case 4128:return s&&s.some(function(n){return Gt(n.props,/grid-\w+-start/)})?e:Xe+Se(Se(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Se(e,/(.+)-inline(.+)/,De+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Mt(e)-1-a>6)switch(dt(e,a+1)){case 109:if(dt(e,a+4)!==45)break;case 102:return Se(e,/(.+:)(.+)-([^]+)/,"$1"+De+"$2-$3$1"+ds+(dt(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~Vs(e,"stretch",0)?Yl(Se(e,"stretch","fill-available"),a,s)+e:e}break;case 5152:case 5920:return Se(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,i,l,m,c,d,p){return Xe+i+":"+l+p+(m?Xe+i+"-span:"+(c?d:+d-+l)+p:"")+e});case 4949:if(dt(e,a+6)===121)return Se(e,":",":"+De)+e;break;case 6444:switch(dt(e,dt(e,14)===45?18:11)){case 120:return Se(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+De+(dt(e,14)===45?"inline-":"")+"box$3$1"+De+"$2$3$1"+Xe+"$2box$3")+e;case 100:return Se(e,":",":"+Xe)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Se(e,"scroll-","scroll-snap-")+e}return e}function Ks(e,a){for(var s="",n=0;n<e.length;n++)s+=a(e[n],n,e,a)||"";return s}function a8(e,a,s,n){switch(e.type){case Du:if(e.children.length)break;case Vu:case zu:case vr:return e.return=e.return||e.value;case Ul:return"";case Wl:return e.return=e.value+"{"+Ks(e.children,n)+"}";case rn:if(!Mt(e.value=e.props.join(",")))return""}return Mt(s=Ks(e.children,n))?e.return=e.value+"{"+s+"}":""}function s8(e){var a=ql(e);return function(s,n,i,l){for(var m="",c=0;c<a;c++)m+=e[c](s,n,i,l)||"";return m}}function n8(e){return function(a){a.root||(a=a.return)&&e(a)}}function r8(e,a,s,n){if(e.length>-1&&!e.return)switch(e.type){case vr:e.return=Yl(e.value,e.length,s);return;case Wl:return Ks([ca(e,{value:Se(e.value,"@","@"+De)})],n);case rn:if(e.length)return Wu(s=e.props,function(i){switch(Gt(i,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Va(ca(e,{props:[Se(i,/:(read-\w+)/,":"+ds+"$1")]})),Va(ca(e,{props:[i]})),sr(e,{props:mi(s,n)});break;case"::placeholder":Va(ca(e,{props:[Se(i,/:(plac\w+)/,":"+De+"input-$1")]})),Va(ca(e,{props:[Se(i,/:(plac\w+)/,":"+ds+"$1")]})),Va(ca(e,{props:[Se(i,/:(plac\w+)/,Xe+"input-$1")]})),Va(ca(e,{props:[i]})),sr(e,{props:mi(s,n)});break}return""})}}var An,Mn;const $a=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ql="active",Jl="data-styled-version",dn="6.4.1",yr=`/*!sc*/
|
|
19
|
+
`,us=typeof window<"u"&&typeof document<"u";function fi(e){if(typeof process<"u"&&process.env!==void 0){const a=process.env[e];if(a!==void 0&&a!=="")return a!=="false"}}const i8=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:(Mn=(An=fi("REACT_APP_SC_DISABLE_SPEEDY"))!==null&&An!==void 0?An:fi("SC_DISABLE_SPEEDY"))!==null&&Mn!==void 0?Mn:typeof process>"u"||process.env===void 0||process.env.NODE_ENV!=="production"),o8="sc-keyframes-",l8={},c8=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
20
20
|
|
|
21
21
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
22
22
|
|
|
@@ -79,11 +79,11 @@ export function App() {
|
|
|
79
79
|
\`\`\`
|
|
80
80
|
|
|
81
81
|
If you need access to the theme in an uncertain composition scenario, \`React.useContext(ThemeContext)\` will not emit an error if there is no \`ThemeProvider\` ancestor.
|
|
82
|
-
`}:{};function
|
|
82
|
+
`}:{};function xs(e,...a){return process.env.NODE_ENV==="production"?new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${a.length>0?` Args: ${a.join(", ")}`:""}`):new Error((function(...s){let n=s[0];const i=[];for(let l=1,m=s.length;l<m;l+=1)i.push(s[l]);return i.forEach(l=>{n=n.replace(/%[a-z]/,l)}),n})(c8[e],...a).trim())}const d8=1<<30;let Us=new Map,Ys=new Map,Ws=1;const Ls=e=>{if(Us.has(e))return Us.get(e);for(;Ys.has(Ws);)Ws++;const a=Ws++;if(process.env.NODE_ENV!=="production"&&((0|a)<0||a>d8))throw xs(16,`${a}`);return Us.set(e,a),Ys.set(a,e),a},u8=e=>Ys.get(e),m8=(e,a)=>{Ws=a+1,Us.set(e,a),Ys.set(a,e)},wi=/invalid hook call/i,Ps=new Set,Xl=(e,a)=>{if(process.env.NODE_ENV!=="production"){const s=`The component ${e}${a?` with the id of "${a}"`:""} has been created dynamically.
|
|
83
83
|
You may see this warning because you've called styled inside another component.
|
|
84
84
|
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
85
85
|
See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
|
|
86
|
-
`,n=console.error;try{let i=!0;console.error=(l,...m)=>{fi.test(l)?(i=!1,Ls.delete(s)):n(l,...m)},typeof o.useState=="function"&&o.useState(null),i&&!Ls.has(s)&&(console.warn(s),Ls.add(s))}catch(i){fi.test(i.message)&&Ls.delete(s)}finally{console.error=n}}},yr=Object.freeze([]),Ka=Object.freeze({});function Xl(e,a,s=Ka){return e.theme!==s.theme&&e.theme||a||s.theme}const m8=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,p8=/(^-|-$)/g;function ec(e){return e.replace(m8,"-").replace(p8,"")}const h8=/(a)(d)/gi,wi=e=>String.fromCharCode(e+(e>25?39:97));function tc(e){let a,s="";for(a=Math.abs(e);a>52;a=a/52|0)s=wi(a%52)+s;return(wi(a%52)+s).replace(h8,"$1-$2")}const nr=5381,Ma=(e,a)=>{let s=a.length;for(;s;)e=33*e^a.charCodeAt(--s);return e},ac=e=>Ma(nr,e);function sc(e){return tc(ac(e)>>>0)}function jr(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function Ws(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}function f8(e){return Ws(e)?`styled.${e}`:`Styled(${jr(e)})`}const nc=Symbol.for("react.memo"),w8=Symbol.for("react.forward_ref"),g8={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},x8={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},v8={[w8]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[nc]:rc};function gi(e){return("type"in(a=e)&&a.type.$$typeof)===nc?rc:"$$typeof"in e?v8[e.$$typeof]:g8;var a}const b8=Object.defineProperty,y8=Object.getOwnPropertyNames,j8=Object.getOwnPropertySymbols,_8=Object.getOwnPropertyDescriptor,k8=Object.getPrototypeOf,C8=Object.prototype;function ic(e,a,s){if(typeof a!="string"){const n=k8(a);n&&n!==C8&&ic(e,n,s);const i=y8(a).concat(j8(a)),l=gi(e),m=gi(a);for(let c=0;c<i.length;++c){const d=i[c];if(!(d in x8||s&&s[d]||m&&d in m||l&&d in l)){const p=_8(a,d);try{b8(e,d,p)}catch{}}}}return e}function xs(e){return typeof e=="function"}function _r(e){return typeof e=="object"&&"styledComponentId"in e}function is(e,a){return e&&a?e+" "+a:e||a||""}function rr(e,a){return e.join("")}function $a(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ir(e,a,s=!1){if(!s&&!$a(e)&&!Array.isArray(e))return a;if(Array.isArray(a))for(let n=0;n<a.length;n++)e[n]=ir(e[n],a[n]);else if($a(a))for(const n in a)e[n]=ir(e[n],a[n]);return e}function oc(e,a){Object.defineProperty(e,"toString",{value:a})}const N8=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let a=this._cIndex;if(e>this._cGroup)for(let s=this._cGroup;s<e;s++)a+=this.groupSizes[s];else for(let s=this._cGroup-1;s>=e;s--)a-=this.groupSizes[s];return this._cGroup=e,this._cIndex=a,a}insertRules(e,a){if(e>=this.groupSizes.length){const i=this.groupSizes,l=i.length;let m=l;for(;e>=m;)if(m<<=1,m<0)throw gs(16,`${e}`);this.groupSizes=new Uint32Array(m),this.groupSizes.set(i),this.length=m;for(let c=l;c<m;c++)this.groupSizes[c]=0}let s=this.indexOfGroup(e+1),n=0;for(let i=0,l=a.length;i<l;i++)this.tag.insertRule(s,a[i])&&(this.groupSizes[e]++,s++,n++);n>0&&this._cGroup>e&&(this._cIndex+=n)}clearGroup(e){if(e<this.length){const a=this.groupSizes[e],s=this.indexOfGroup(e),n=s+a;this.groupSizes[e]=0;for(let i=s;i<n;i++)this.tag.deleteRule(s);a>0&&this._cGroup>e&&(this._cIndex-=a)}}getGroup(e){let a="";if(e>=this.length||this.groupSizes[e]===0)return a;const s=this.groupSizes[e],n=this.indexOfGroup(e),i=n+s;for(let l=n;l<i;l++)a+=this.tag.getRule(l)+br;return a}},S8=`style[${Pa}][${Ql}="${cn}"]`,E8=new RegExp(`^${Pa}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),xi=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,or=e=>{if(!e)return document;if(xi(e))return e;if("getRootNode"in e){const a=e.getRootNode();if(xi(a))return a}return document},A8=(e,a,s)=>{const n=s.split(",");let i;for(let l=0,m=n.length;l<m;l++)(i=n[l])&&e.registerName(a,i)},M8=(e,a)=>{var s;const n=((s=a.textContent)!==null&&s!==void 0?s:"").split(br),i=[];for(let l=0,m=n.length;l<m;l++){const c=n[l].trim();if(!c)continue;const d=c.match(E8);if(d){const p=0|parseInt(d[1],10),u=d[2];p!==0&&(u8(u,p),A8(e,u,d[3]),e.getTag().insertRules(p,i)),i.length=0}else i.push(c)}},Mn=e=>{const a=or(e.options.target).querySelectorAll(S8);for(let s=0,n=a.length;s<n;s++){const i=a[s];i&&i.getAttribute(Pa)!==Yl&&(M8(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let as=!1;function R8(){if(as!==!1)return as;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return as=e.nonce||e.getAttribute("content")||void 0;const a=document.head.querySelector('meta[name="sc-nonce"]');if(a)return as=a.getAttribute("content")||void 0}return as=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const lc=(e,a)=>{const s=document.head,n=e||s,i=document.createElement("style"),l=(d=>{const p=Array.from(d.querySelectorAll(`style[${Pa}]`));return p[p.length-1]})(n),m=l!==void 0?l.nextSibling:null;i.setAttribute(Pa,Yl),i.setAttribute(Ql,cn);const c=a||R8();return c&&i.setAttribute("nonce",c),n.insertBefore(i,m),i},L8=class{constructor(e,a){this.element=lc(e,a),this.element.appendChild(document.createTextNode("")),this.sheet=(s=>{var n;if(s.sheet)return s.sheet;const i=(n=s.getRootNode().styleSheets)!==null&&n!==void 0?n:document.styleSheets;for(let l=0,m=i.length;l<m;l++){const c=i[l];if(c.ownerNode===s)return c}throw gs(17)})(this.element),this.length=0}insertRule(e,a){try{return this.sheet.insertRule(a,e),this.length++,!0}catch{return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const a=this.sheet.cssRules[e];return a&&a.cssText?a.cssText:""}},P8=class{constructor(e,a){this.element=lc(e,a),this.nodes=this.element.childNodes,this.length=0}insertRule(e,a){if(e<=this.length&&e>=0){const s=document.createTextNode(a);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let vi=ds;const $8={isServer:!ds,useCSSOMInjection:!r8};class vs{static registerId(a){return Rs(a)}constructor(a=Ka,s={},n){this.options=Object.assign(Object.assign({},$8),a),this.gs=s,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!a.isServer,!this.server&&ds&&vi&&(vi=!1,Mn(this)),oc(this,()=>(i=>{const l=i.getTag(),{length:m}=l;let c="";for(let d=0;d<m;d++){const p=d8(d);if(p===void 0)continue;const u=i.names.get(p);if(u===void 0||!u.size)continue;const h=l.getGroup(d);if(h.length===0)continue;const f=Pa+".g"+d+'[id="'+p+'"]';let g="";for(const x of u)x.length>0&&(g+=x+",");c+=h+f+'{content:"'+g+'"}'+br}return c})(this))}rehydrate(){!this.server&&ds&&Mn(this)}reconstructWithOptions(a,s=!0){const n=new vs(Object.assign(Object.assign({},this.options),a),this.gs,s&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&ds&&a.target!==this.options.target&&or(this.options.target)!==or(a.target)&&Mn(n),n}allocateGSInstance(a){return this.gs[a]=(this.gs[a]||0)+1}getTag(){return this.tag||(this.tag=(a=(({useCSSOMInjection:s,target:n,nonce:i})=>s?new L8(n,i):new P8(n,i))(this.options),new N8(a)));var a}hasNameForId(a,s){var n,i;return(i=(n=this.names.get(a))===null||n===void 0?void 0:n.has(s))!==null&&i!==void 0&&i}registerName(a,s){Rs(a),a.startsWith(i8)&&this.keyframeIds.add(a);const n=this.names.get(a);n?n.add(s):this.names.set(a,new Set([s]))}insertRules(a,s,n){this.registerName(a,s),this.getTag().insertRules(Rs(a),n)}clearNames(a){this.names.has(a)&&this.names.get(a).clear()}clearRules(a){this.getTag().clearGroup(Rs(a)),this.clearNames(a)}clearTag(){this.tag=void 0}}const cc=new WeakSet,O8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Z8(e,a){return a==null||typeof a=="boolean"||a===""?"":typeof a!="number"||a===0||e in O8||e.startsWith("--")?String(a).trim():a+"px"}const Ca=47;function bi(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let a="";for(let s=0;s<e.length;s++){const n=e.charCodeAt(s);a+=n>=65&&n<=90?"-"+String.fromCharCode(n+32):e[s]}return a.startsWith("ms-")?"-"+a:a}const H8=Symbol.for("sc-keyframes");function lr(e){return typeof e=="object"&&e!==null&&H8 in e}function dc(e){return xs(e)&&!(e.prototype&&e.prototype.isReactComponent)}const uc=e=>e==null||e===!1||e==="",F8=Symbol.for("react.client.reference");function yi(e){return e.$$typeof===F8}function ji(e){const a=e.$$id,s=(a&&a.includes("#")?a.split("#").pop():a)||e.name||"unknown";console.warn(`Interpolating a client component (${s}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function mc(e,a){for(const s in e){const n=e[s];e.hasOwnProperty(s)&&!uc(n)&&(Array.isArray(n)&&cc.has(n)||xs(n)?a.push(bi(s)+":",n,";"):$a(n)?(a.push(s+" {"),mc(n,a),a.push("}")):a.push(bi(s)+": "+Z8(s,n)+";"))}}function ua(e,a,s,n,i=[]){if(uc(e))return i;const l=typeof e;if(l==="string")return i.push(e),i;if(l==="function"){if(yi(e))return process.env.NODE_ENV!=="production"&&ji(e),i;if(dc(e)&&a){const m=e(a);return process.env.NODE_ENV==="production"||typeof m!="object"||Array.isArray(m)||lr(m)||$a(m)||m===null||console.error(`${jr(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),ua(m,a,s,n,i)}return i.push(e),i}if(Array.isArray(e)){for(let m=0;m<e.length;m++)ua(e[m],a,s,n,i);return i}return _r(e)?(i.push(`.${e.styledComponentId}`),i):lr(e)?(s?(e.inject(s,n),i.push(e.getName(n))):i.push(e),i):yi(e)?(process.env.NODE_ENV!=="production"&&ji(e),i):$a(e)?(mc(e,i),i):(i.push(e.toString()),i)}const T8=ac(cn);class I8{constructor(a,s,n){this.rules=a,this.componentId=s,this.baseHash=Ma(T8,s),this.baseStyle=n,vs.registerId(s)}generateAndInjectStyles(a,s,n){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(a,s,n):"";{let l="";for(let m=0;m<this.rules.length;m++){const c=this.rules[m];if(typeof c=="string")l+=c;else if(c)if(dc(c)){const d=c(a);typeof d=="string"?l+=d:d!=null&&d!==!1&&(process.env.NODE_ENV==="production"||typeof d!="object"||Array.isArray(d)||lr(d)||$a(d)||console.error(`${jr(c)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),l+=rr(ua(d,a,s,n)))}else l+=rr(ua(c,a,s,n))}if(l){this.dynamicNameCache||(this.dynamicNameCache=new Map);const m=n.hash?n.hash+l:l;let c=this.dynamicNameCache.get(m);if(!c){if(c=tc(Ma(Ma(this.baseHash,n.hash),l)>>>0),this.dynamicNameCache.size>=200){const d=this.dynamicNameCache.keys().next().value;d!==void 0&&this.dynamicNameCache.delete(d)}this.dynamicNameCache.set(m,c)}if(!s.hasNameForId(this.componentId,c)){const d=n(l,"."+c,void 0,this.componentId);s.insertRules(this.componentId,c,d)}i=is(i,c)}}return i}}const V8=/&/g;function pc(e,a){let s=0;for(;--a>=0&&e.charCodeAt(a)===92;)s++;return!(1&~s)}function Rn(e){const a=e.length;let s="",n=0,i=0,l=0,m=!1,c=!1;for(let d=0;d<a;d++){const p=e.charCodeAt(d);if(l!==0||m||p!==Ca||e.charCodeAt(d+1)!==42)if(m)p===42&&e.charCodeAt(d+1)===Ca&&(m=!1,d++);else if(p!==34&&p!==39||pc(e,d)){if(l===0)if(p===123)i++;else if(p===125){if(i--,i<0){c=!0;let u=d+1;for(;u<a;){const h=e.charCodeAt(u);if(h===59||h===10)break;u++}u<a&&e.charCodeAt(u)===59&&u++,i=0,d=u-1,n=u;continue}i===0&&(s+=e.substring(n,d+1),n=d+1)}else p===59&&i===0&&(s+=e.substring(n,d+1),n=d+1)}else l===0?l=p:l===p&&(l=0);else m=!0,d++}return c||i!==0||l!==0?(n<a&&i===0&&l===0&&(s+=e.substring(n)),s):e}function hc(e,a){const s=a+" ",n=","+s;for(let i=0;i<e.length;i++){const l=e[i];if(l.type==="rule"){l.value=(s+l.value).replaceAll(",",n);const m=l.props,c=[];for(let d=0;d<m.length;d++)c[d]=s+m[d];l.props=c}Array.isArray(l.children)&&l.type!=="@keyframes"&&hc(l.children,a)}return e}function z8({options:e=Ka,plugins:a=yr}=Ka){let s,n,i;const l=(f,g,x)=>x.startsWith(n)&&x.endsWith(n)&&x.replaceAll(n,"").length>0?`.${s}`:f,m=a.slice();m.push(f=>{f.type===nn&&f.value.includes("&")&&(i||(i=new RegExp(`\\${n}\\b`,"g")),f.props[0]=f.props[0].replace(V8,n).replace(i,l))}),e.prefix&&m.push(n8),m.push(t8);let c=[];const d=a8(m.concat(s8(f=>c.push(f)))),p=(f,g="",x="",w="&")=>{s=w,n=g,i=void 0;const b=(function(v){const k=v.indexOf("//")!==-1,N=v.indexOf("}")!==-1;if(!k&&!N)return v;if(!k)return Rn(v);const j=v.length;let C="",y=0,E=0,R=0,F=0,A=0,I=!1;for(;E<j;){const L=v.charCodeAt(E);if(L!==34&&L!==39||pc(v,E))if(R===0)if(L===Ca&&E+1<j&&v.charCodeAt(E+1)===42){for(E+=2;E+1<j&&(v.charCodeAt(E)!==42||v.charCodeAt(E+1)!==Ca);)E++;E+=2}else if(L!==40)if(L!==41)if(F>0)E++;else if(L===42&&E+1<j&&v.charCodeAt(E+1)===Ca)C+=v.substring(y,E),E+=2,y=E,I=!0;else if(L===Ca&&E+1<j&&v.charCodeAt(E+1)===Ca){for(C+=v.substring(y,E);E<j&&v.charCodeAt(E)!==10;)E++;y=E,I=!0}else L===123?A++:L===125&&A--,E++;else F>0&&F--,E++;else F++,E++;else E++;else R===0?R=L:R===L&&(R=0),E++}return I?(y<j&&(C+=v.substring(y)),A===0?C:Rn(C)):A===0?v:Rn(v)})(f);let _=Xu(x||g?x+" "+g+" { "+b+" }":b);return e.namespace&&(_=hc(_,e.namespace)),c=[],qs(_,d),c},u=e;let h=nr;for(let f=0;f<a.length;f++)a[f].name||gs(15),h=Ma(h,a[f].name);return u!=null&&u.namespace&&(h=Ma(h,u.namespace)),u!=null&&u.prefix&&(h=Ma(h,"p")),p.hash=h!==nr?h.toString():"",p}const D8=new vs,U8=z8(),fc=o.createContext({shouldForwardProp:void 0,styleSheet:D8,stylis:U8,stylisPlugins:void 0});fc.Consumer;function wc(){return o.useContext(fc)}const kr=o.createContext(void 0);kr.Consumer;const _i=Object.prototype.hasOwnProperty,Ln={};function W8(e,a){const s=typeof e!="string"?"sc":ec(e);Ln[s]=(Ln[s]||0)+1;const n=s+"-"+sc(cn+s+Ln[s]);return a?a+"-"+n:n}let Pn;function B8(e,a,s){const n=_r(e),i=e,l=!Ws(e),{attrs:m=yr,componentId:c=W8(a.displayName,a.parentComponentId),displayName:d=f8(e)}=a,p=a.displayName&&a.componentId?ec(a.displayName)+"-"+a.componentId:a.componentId||c,u=n&&i.attrs?i.attrs.concat(m).filter(Boolean):m;let{shouldForwardProp:h}=a;if(n&&i.shouldForwardProp){const w=i.shouldForwardProp;if(a.shouldForwardProp){const b=a.shouldForwardProp;h=(_,v)=>w(_,v)&&b(_,v)}else h=w}const f=new I8(s,p,n?i.componentStyle:void 0);function g(w,b){return(function(_,v,k){const{attrs:N,componentStyle:j,defaultProps:C,foldedComponentIds:y,styledComponentId:E,target:R}=_,F=o.useContext(kr),A=wc(),I=_.shouldForwardProp||A.shouldForwardProp;process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(E);const L=Xl(v,F,C)||Ka;let S,O;{const H=o.useRef(null),M=H.current;if(M!==null&&M[1]===L&&M[2]===A.styleSheet&&M[3]===A.stylis&&M[7]===j&&(function(B,D,W){const K=B,ee=D;let ce=0;for(const be in ee)if(_i.call(ee,be)&&(ce++,K[be]!==ee[be]))return!1;return ce===W})(M[0],v,M[4]))S=M[5],O=M[6];else{S=(function(D,W,K){const ee=Object.assign(Object.assign({},W),{className:void 0,theme:K}),ce=D.length>1;for(let be=0;be<D.length;be++){const Q=D[be],ie=xs(Q)?Q(ce?Object.assign({},ee):ee):Q;for(const ne in ie)ne==="className"?ee.className=is(ee.className,ie[ne]):ne==="style"?ee.style=Object.assign(Object.assign({},ee.style),ie[ne]):ne in W&&W[ne]===void 0||(ee[ne]=ie[ne])}return"className"in W&&typeof W.className=="string"&&(ee.className=is(ee.className,W.className)),ee})(N,v,L),O=(function(D,W,K,ee){const ce=D.generateAndInjectStyles(W,K,ee);return process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(ce),ce})(j,S,A.styleSheet,A.stylis);let B=0;for(const D in v)_i.call(v,D)&&B++;H.current=[v,L,A.styleSheet,A.stylis,B,S,O,j]}}process.env.NODE_ENV!=="production"&&_.warnTooManyClasses&&_.warnTooManyClasses(O);const P=S.as||R,$=(function(H,M,B,D){const W={};for(const K in H)H[K]===void 0||K[0]==="$"||K==="as"||K==="theme"&&H.theme===B||(K==="forwardedAs"?W.as=H.forwardedAs:D&&!D(K,M)||(W[K]=H[K],D||process.env.NODE_ENV!=="development"||Tu(K)||(Pn||(Pn=new Set)).has(K)||!Ws(M)||M.includes("-")||(Pn.add(K),console.warn(`styled-components: it looks like an unknown prop "${K}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));return W})(S,P,L,I);let Z=is(y,E);return O&&(Z+=" "+O),S.className&&(Z+=" "+S.className),$[Ws(P)&&P.includes("-")?"class":"className"]=Z,k&&($.ref=k),o.createElement(P,$)})(x,w,b)}g.displayName=d;let x=o.forwardRef(g);return x.attrs=u,x.componentStyle=f,x.displayName=d,x.shouldForwardProp=h,x.foldedComponentIds=n?is(i.foldedComponentIds,i.styledComponentId):"",x.styledComponentId=p,x.target=n?i.target:e,Object.defineProperty(x,"defaultProps",{get(){return this._foldedDefaultProps},set(w){this._foldedDefaultProps=n?(function(b,..._){for(const v of _)ir(b,v,!0);return b})({},i.defaultProps,w):w}}),process.env.NODE_ENV!=="production"&&(Jl(d,p),x.warnTooManyClasses=((w,b)=>{let _={},v=!1;return k=>{!v&&(_[k]=!0,Object.keys(_).length>=200)&&(console.warn(`Over 200 classes were generated for component ${w}${b?` with the id of "${b}"`:""}.
|
|
86
|
+
`,n=console.error;try{let i=!0;console.error=(l,...m)=>{wi.test(l)?(i=!1,Ps.delete(s)):n(l,...m)},typeof o.useState=="function"&&o.useState(null),i&&!Ps.has(s)&&(console.warn(s),Ps.add(s))}catch(i){wi.test(i.message)&&Ps.delete(s)}finally{console.error=n}}},jr=Object.freeze([]),Ya=Object.freeze({});function ec(e,a,s=Ya){return e.theme!==s.theme&&e.theme||a||s.theme}const p8=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,h8=/(^-|-$)/g;function tc(e){return e.replace(p8,"-").replace(h8,"")}const f8=/(a)(d)/gi,gi=e=>String.fromCharCode(e+(e>25?39:97));function ac(e){let a,s="";for(a=Math.abs(e);a>52;a=a/52|0)s=gi(a%52)+s;return(gi(a%52)+s).replace(f8,"$1-$2")}const rr=5381,Ra=(e,a)=>{let s=a.length;for(;s;)e=33*e^a.charCodeAt(--s);return e},sc=e=>Ra(rr,e);function nc(e){return ac(sc(e)>>>0)}function _r(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function Bs(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}function w8(e){return Bs(e)?`styled.${e}`:`Styled(${_r(e)})`}const rc=Symbol.for("react.memo"),g8=Symbol.for("react.forward_ref"),x8={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},v8={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ic={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},b8={[g8]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[rc]:ic};function xi(e){return("type"in(a=e)&&a.type.$$typeof)===rc?ic:"$$typeof"in e?b8[e.$$typeof]:x8;var a}const y8=Object.defineProperty,j8=Object.getOwnPropertyNames,_8=Object.getOwnPropertySymbols,k8=Object.getOwnPropertyDescriptor,C8=Object.getPrototypeOf,N8=Object.prototype;function oc(e,a,s){if(typeof a!="string"){const n=C8(a);n&&n!==N8&&oc(e,n,s);const i=j8(a).concat(_8(a)),l=xi(e),m=xi(a);for(let c=0;c<i.length;++c){const d=i[c];if(!(d in v8||s&&s[d]||m&&d in m||l&&d in l)){const p=k8(a,d);try{y8(e,d,p)}catch{}}}}return e}function vs(e){return typeof e=="function"}function kr(e){return typeof e=="object"&&"styledComponentId"in e}function os(e,a){return e&&a?e+" "+a:e||a||""}function ir(e,a){return e.join("")}function Oa(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function or(e,a,s=!1){if(!s&&!Oa(e)&&!Array.isArray(e))return a;if(Array.isArray(a))for(let n=0;n<a.length;n++)e[n]=or(e[n],a[n]);else if(Oa(a))for(const n in a)e[n]=or(e[n],a[n]);return e}function lc(e,a){Object.defineProperty(e,"toString",{value:a})}const S8=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let a=this._cIndex;if(e>this._cGroup)for(let s=this._cGroup;s<e;s++)a+=this.groupSizes[s];else for(let s=this._cGroup-1;s>=e;s--)a-=this.groupSizes[s];return this._cGroup=e,this._cIndex=a,a}insertRules(e,a){if(e>=this.groupSizes.length){const i=this.groupSizes,l=i.length;let m=l;for(;e>=m;)if(m<<=1,m<0)throw xs(16,`${e}`);this.groupSizes=new Uint32Array(m),this.groupSizes.set(i),this.length=m;for(let c=l;c<m;c++)this.groupSizes[c]=0}let s=this.indexOfGroup(e+1),n=0;for(let i=0,l=a.length;i<l;i++)this.tag.insertRule(s,a[i])&&(this.groupSizes[e]++,s++,n++);n>0&&this._cGroup>e&&(this._cIndex+=n)}clearGroup(e){if(e<this.length){const a=this.groupSizes[e],s=this.indexOfGroup(e),n=s+a;this.groupSizes[e]=0;for(let i=s;i<n;i++)this.tag.deleteRule(s);a>0&&this._cGroup>e&&(this._cIndex-=a)}}getGroup(e){let a="";if(e>=this.length||this.groupSizes[e]===0)return a;const s=this.groupSizes[e],n=this.indexOfGroup(e),i=n+s;for(let l=n;l<i;l++)a+=this.tag.getRule(l)+yr;return a}},E8=`style[${$a}][${Jl}="${dn}"]`,A8=new RegExp(`^${$a}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),vi=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,lr=e=>{if(!e)return document;if(vi(e))return e;if("getRootNode"in e){const a=e.getRootNode();if(vi(a))return a}return document},M8=(e,a,s)=>{const n=s.split(",");let i;for(let l=0,m=n.length;l<m;l++)(i=n[l])&&e.registerName(a,i)},R8=(e,a)=>{var s;const n=((s=a.textContent)!==null&&s!==void 0?s:"").split(yr),i=[];for(let l=0,m=n.length;l<m;l++){const c=n[l].trim();if(!c)continue;const d=c.match(A8);if(d){const p=0|parseInt(d[1],10),u=d[2];p!==0&&(m8(u,p),M8(e,u,d[3]),e.getTag().insertRules(p,i)),i.length=0}else i.push(c)}},Rn=e=>{const a=lr(e.options.target).querySelectorAll(E8);for(let s=0,n=a.length;s<n;s++){const i=a[s];i&&i.getAttribute($a)!==Ql&&(R8(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let ss=!1;function L8(){if(ss!==!1)return ss;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return ss=e.nonce||e.getAttribute("content")||void 0;const a=document.head.querySelector('meta[name="sc-nonce"]');if(a)return ss=a.getAttribute("content")||void 0}return ss=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const cc=(e,a)=>{const s=document.head,n=e||s,i=document.createElement("style"),l=(d=>{const p=Array.from(d.querySelectorAll(`style[${$a}]`));return p[p.length-1]})(n),m=l!==void 0?l.nextSibling:null;i.setAttribute($a,Ql),i.setAttribute(Jl,dn);const c=a||L8();return c&&i.setAttribute("nonce",c),n.insertBefore(i,m),i},P8=class{constructor(e,a){this.element=cc(e,a),this.element.appendChild(document.createTextNode("")),this.sheet=(s=>{var n;if(s.sheet)return s.sheet;const i=(n=s.getRootNode().styleSheets)!==null&&n!==void 0?n:document.styleSheets;for(let l=0,m=i.length;l<m;l++){const c=i[l];if(c.ownerNode===s)return c}throw xs(17)})(this.element),this.length=0}insertRule(e,a){try{return this.sheet.insertRule(a,e),this.length++,!0}catch{return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const a=this.sheet.cssRules[e];return a&&a.cssText?a.cssText:""}},$8=class{constructor(e,a){this.element=cc(e,a),this.nodes=this.element.childNodes,this.length=0}insertRule(e,a){if(e<=this.length&&e>=0){const s=document.createTextNode(a);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let bi=us;const O8={isServer:!us,useCSSOMInjection:!i8};class bs{static registerId(a){return Ls(a)}constructor(a=Ya,s={},n){this.options=Object.assign(Object.assign({},O8),a),this.gs=s,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!a.isServer,!this.server&&us&&bi&&(bi=!1,Rn(this)),lc(this,()=>(i=>{const l=i.getTag(),{length:m}=l;let c="";for(let d=0;d<m;d++){const p=u8(d);if(p===void 0)continue;const u=i.names.get(p);if(u===void 0||!u.size)continue;const h=l.getGroup(d);if(h.length===0)continue;const f=$a+".g"+d+'[id="'+p+'"]';let g="";for(const x of u)x.length>0&&(g+=x+",");c+=h+f+'{content:"'+g+'"}'+yr}return c})(this))}rehydrate(){!this.server&&us&&Rn(this)}reconstructWithOptions(a,s=!0){const n=new bs(Object.assign(Object.assign({},this.options),a),this.gs,s&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&us&&a.target!==this.options.target&&lr(this.options.target)!==lr(a.target)&&Rn(n),n}allocateGSInstance(a){return this.gs[a]=(this.gs[a]||0)+1}getTag(){return this.tag||(this.tag=(a=(({useCSSOMInjection:s,target:n,nonce:i})=>s?new P8(n,i):new $8(n,i))(this.options),new S8(a)));var a}hasNameForId(a,s){var n,i;return(i=(n=this.names.get(a))===null||n===void 0?void 0:n.has(s))!==null&&i!==void 0&&i}registerName(a,s){Ls(a),a.startsWith(o8)&&this.keyframeIds.add(a);const n=this.names.get(a);n?n.add(s):this.names.set(a,new Set([s]))}insertRules(a,s,n){this.registerName(a,s),this.getTag().insertRules(Ls(a),n)}clearNames(a){this.names.has(a)&&this.names.get(a).clear()}clearRules(a){this.getTag().clearGroup(Ls(a)),this.clearNames(a)}clearTag(){this.tag=void 0}}const dc=new WeakSet,Z8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function H8(e,a){return a==null||typeof a=="boolean"||a===""?"":typeof a!="number"||a===0||e in Z8||e.startsWith("--")?String(a).trim():a+"px"}const Na=47;function yi(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let a="";for(let s=0;s<e.length;s++){const n=e.charCodeAt(s);a+=n>=65&&n<=90?"-"+String.fromCharCode(n+32):e[s]}return a.startsWith("ms-")?"-"+a:a}const F8=Symbol.for("sc-keyframes");function cr(e){return typeof e=="object"&&e!==null&&F8 in e}function uc(e){return vs(e)&&!(e.prototype&&e.prototype.isReactComponent)}const mc=e=>e==null||e===!1||e==="",T8=Symbol.for("react.client.reference");function ji(e){return e.$$typeof===T8}function _i(e){const a=e.$$id,s=(a&&a.includes("#")?a.split("#").pop():a)||e.name||"unknown";console.warn(`Interpolating a client component (${s}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function pc(e,a){for(const s in e){const n=e[s];e.hasOwnProperty(s)&&!mc(n)&&(Array.isArray(n)&&dc.has(n)||vs(n)?a.push(yi(s)+":",n,";"):Oa(n)?(a.push(s+" {"),pc(n,a),a.push("}")):a.push(yi(s)+": "+H8(s,n)+";"))}}function ma(e,a,s,n,i=[]){if(mc(e))return i;const l=typeof e;if(l==="string")return i.push(e),i;if(l==="function"){if(ji(e))return process.env.NODE_ENV!=="production"&&_i(e),i;if(uc(e)&&a){const m=e(a);return process.env.NODE_ENV==="production"||typeof m!="object"||Array.isArray(m)||cr(m)||Oa(m)||m===null||console.error(`${_r(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),ma(m,a,s,n,i)}return i.push(e),i}if(Array.isArray(e)){for(let m=0;m<e.length;m++)ma(e[m],a,s,n,i);return i}return kr(e)?(i.push(`.${e.styledComponentId}`),i):cr(e)?(s?(e.inject(s,n),i.push(e.getName(n))):i.push(e),i):ji(e)?(process.env.NODE_ENV!=="production"&&_i(e),i):Oa(e)?(pc(e,i),i):(i.push(e.toString()),i)}const I8=sc(dn);class V8{constructor(a,s,n){this.rules=a,this.componentId=s,this.baseHash=Ra(I8,s),this.baseStyle=n,bs.registerId(s)}generateAndInjectStyles(a,s,n){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(a,s,n):"";{let l="";for(let m=0;m<this.rules.length;m++){const c=this.rules[m];if(typeof c=="string")l+=c;else if(c)if(uc(c)){const d=c(a);typeof d=="string"?l+=d:d!=null&&d!==!1&&(process.env.NODE_ENV==="production"||typeof d!="object"||Array.isArray(d)||cr(d)||Oa(d)||console.error(`${_r(c)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),l+=ir(ma(d,a,s,n)))}else l+=ir(ma(c,a,s,n))}if(l){this.dynamicNameCache||(this.dynamicNameCache=new Map);const m=n.hash?n.hash+l:l;let c=this.dynamicNameCache.get(m);if(!c){if(c=ac(Ra(Ra(this.baseHash,n.hash),l)>>>0),this.dynamicNameCache.size>=200){const d=this.dynamicNameCache.keys().next().value;d!==void 0&&this.dynamicNameCache.delete(d)}this.dynamicNameCache.set(m,c)}if(!s.hasNameForId(this.componentId,c)){const d=n(l,"."+c,void 0,this.componentId);s.insertRules(this.componentId,c,d)}i=os(i,c)}}return i}}const z8=/&/g;function hc(e,a){let s=0;for(;--a>=0&&e.charCodeAt(a)===92;)s++;return!(1&~s)}function Ln(e){const a=e.length;let s="",n=0,i=0,l=0,m=!1,c=!1;for(let d=0;d<a;d++){const p=e.charCodeAt(d);if(l!==0||m||p!==Na||e.charCodeAt(d+1)!==42)if(m)p===42&&e.charCodeAt(d+1)===Na&&(m=!1,d++);else if(p!==34&&p!==39||hc(e,d)){if(l===0)if(p===123)i++;else if(p===125){if(i--,i<0){c=!0;let u=d+1;for(;u<a;){const h=e.charCodeAt(u);if(h===59||h===10)break;u++}u<a&&e.charCodeAt(u)===59&&u++,i=0,d=u-1,n=u;continue}i===0&&(s+=e.substring(n,d+1),n=d+1)}else p===59&&i===0&&(s+=e.substring(n,d+1),n=d+1)}else l===0?l=p:l===p&&(l=0);else m=!0,d++}return c||i!==0||l!==0?(n<a&&i===0&&l===0&&(s+=e.substring(n)),s):e}function fc(e,a){const s=a+" ",n=","+s;for(let i=0;i<e.length;i++){const l=e[i];if(l.type==="rule"){l.value=(s+l.value).replaceAll(",",n);const m=l.props,c=[];for(let d=0;d<m.length;d++)c[d]=s+m[d];l.props=c}Array.isArray(l.children)&&l.type!=="@keyframes"&&fc(l.children,a)}return e}function D8({options:e=Ya,plugins:a=jr}=Ya){let s,n,i;const l=(f,g,x)=>x.startsWith(n)&&x.endsWith(n)&&x.replaceAll(n,"").length>0?`.${s}`:f,m=a.slice();m.push(f=>{f.type===rn&&f.value.includes("&")&&(i||(i=new RegExp(`\\${n}\\b`,"g")),f.props[0]=f.props[0].replace(z8,n).replace(i,l))}),e.prefix&&m.push(r8),m.push(a8);let c=[];const d=s8(m.concat(n8(f=>c.push(f)))),p=(f,g="",x="",w="&")=>{s=w,n=g,i=void 0;const b=(function(v){const _=v.indexOf("//")!==-1,N=v.indexOf("}")!==-1;if(!_&&!N)return v;if(!_)return Ln(v);const k=v.length;let C="",y=0,E=0,M=0,F=0,A=0,I=!1;for(;E<k;){const $=v.charCodeAt(E);if($!==34&&$!==39||hc(v,E))if(M===0)if($===Na&&E+1<k&&v.charCodeAt(E+1)===42){for(E+=2;E+1<k&&(v.charCodeAt(E)!==42||v.charCodeAt(E+1)!==Na);)E++;E+=2}else if($!==40)if($!==41)if(F>0)E++;else if($===42&&E+1<k&&v.charCodeAt(E+1)===Na)C+=v.substring(y,E),E+=2,y=E,I=!0;else if($===Na&&E+1<k&&v.charCodeAt(E+1)===Na){for(C+=v.substring(y,E);E<k&&v.charCodeAt(E)!==10;)E++;y=E,I=!0}else $===123?A++:$===125&&A--,E++;else F>0&&F--,E++;else F++,E++;else E++;else M===0?M=$:M===$&&(M=0),E++}return I?(y<k&&(C+=v.substring(y)),A===0?C:Ln(C)):A===0?v:Ln(v)})(f);let j=e8(x||g?x+" "+g+" { "+b+" }":b);return e.namespace&&(j=fc(j,e.namespace)),c=[],Ks(j,d),c},u=e;let h=rr;for(let f=0;f<a.length;f++)a[f].name||xs(15),h=Ra(h,a[f].name);return u!=null&&u.namespace&&(h=Ra(h,u.namespace)),u!=null&&u.prefix&&(h=Ra(h,"p")),p.hash=h!==rr?h.toString():"",p}const U8=new bs,W8=D8(),wc=o.createContext({shouldForwardProp:void 0,styleSheet:U8,stylis:W8,stylisPlugins:void 0});wc.Consumer;function gc(){return o.useContext(wc)}const Cr=o.createContext(void 0);Cr.Consumer;const ki=Object.prototype.hasOwnProperty,Pn={};function B8(e,a){const s=typeof e!="string"?"sc":tc(e);Pn[s]=(Pn[s]||0)+1;const n=s+"-"+nc(dn+s+Pn[s]);return a?a+"-"+n:n}let $n;function G8(e,a,s){const n=kr(e),i=e,l=!Bs(e),{attrs:m=jr,componentId:c=B8(a.displayName,a.parentComponentId),displayName:d=w8(e)}=a,p=a.displayName&&a.componentId?tc(a.displayName)+"-"+a.componentId:a.componentId||c,u=n&&i.attrs?i.attrs.concat(m).filter(Boolean):m;let{shouldForwardProp:h}=a;if(n&&i.shouldForwardProp){const w=i.shouldForwardProp;if(a.shouldForwardProp){const b=a.shouldForwardProp;h=(j,v)=>w(j,v)&&b(j,v)}else h=w}const f=new V8(s,p,n?i.componentStyle:void 0);function g(w,b){return(function(j,v,_){const{attrs:N,componentStyle:k,defaultProps:C,foldedComponentIds:y,styledComponentId:E,target:M}=j,F=o.useContext(Cr),A=gc(),I=j.shouldForwardProp||A.shouldForwardProp;process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(E);const $=ec(v,F,C)||Ya;let S,Z;{const O=o.useRef(null),R=O.current;if(R!==null&&R[1]===$&&R[2]===A.styleSheet&&R[3]===A.stylis&&R[7]===k&&(function(U,W,Y){const B=U,Q=W;let ue=0;for(const we in Q)if(ki.call(Q,we)&&(ue++,B[we]!==Q[we]))return!1;return ue===Y})(R[0],v,R[4]))S=R[5],Z=R[6];else{S=(function(W,Y,B){const Q=Object.assign(Object.assign({},Y),{className:void 0,theme:B}),ue=W.length>1;for(let we=0;we<W.length;we++){const se=W[we],te=vs(se)?se(ue?Object.assign({},Q):Q):se;for(const oe in te)oe==="className"?Q.className=os(Q.className,te[oe]):oe==="style"?Q.style=Object.assign(Object.assign({},Q.style),te[oe]):oe in Y&&Y[oe]===void 0||(Q[oe]=te[oe])}return"className"in Y&&typeof Y.className=="string"&&(Q.className=os(Q.className,Y.className)),Q})(N,v,$),Z=(function(W,Y,B,Q){const ue=W.generateAndInjectStyles(Y,B,Q);return process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(ue),ue})(k,S,A.styleSheet,A.stylis);let U=0;for(const W in v)ki.call(v,W)&&U++;O.current=[v,$,A.styleSheet,A.stylis,U,S,Z,k]}}process.env.NODE_ENV!=="production"&&j.warnTooManyClasses&&j.warnTooManyClasses(Z);const P=S.as||M,L=(function(O,R,U,W){const Y={};for(const B in O)O[B]===void 0||B[0]==="$"||B==="as"||B==="theme"&&O.theme===U||(B==="forwardedAs"?Y.as=O.forwardedAs:W&&!W(B,R)||(Y[B]=O[B],W||process.env.NODE_ENV!=="development"||Iu(B)||($n||($n=new Set)).has(B)||!Bs(R)||R.includes("-")||($n.add(B),console.warn(`styled-components: it looks like an unknown prop "${B}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));return Y})(S,P,$,I);let H=os(y,E);return Z&&(H+=" "+Z),S.className&&(H+=" "+S.className),L[Bs(P)&&P.includes("-")?"class":"className"]=H,_&&(L.ref=_),o.createElement(P,L)})(x,w,b)}g.displayName=d;let x=o.forwardRef(g);return x.attrs=u,x.componentStyle=f,x.displayName=d,x.shouldForwardProp=h,x.foldedComponentIds=n?os(i.foldedComponentIds,i.styledComponentId):"",x.styledComponentId=p,x.target=n?i.target:e,Object.defineProperty(x,"defaultProps",{get(){return this._foldedDefaultProps},set(w){this._foldedDefaultProps=n?(function(b,...j){for(const v of j)or(b,v,!0);return b})({},i.defaultProps,w):w}}),process.env.NODE_ENV!=="production"&&(Xl(d,p),x.warnTooManyClasses=((w,b)=>{let j={},v=!1;return _=>{!v&&(j[_]=!0,Object.keys(j).length>=200)&&(console.warn(`Over 200 classes were generated for component ${w}${b?` with the id of "${b}"`:""}.
|
|
87
87
|
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
88
88
|
Example:
|
|
89
89
|
const Component = styled.div.attrs(props => ({
|
|
@@ -92,28 +92,28 @@ Example:
|
|
|
92
92
|
},
|
|
93
93
|
}))\`width: 100%;\`
|
|
94
94
|
|
|
95
|
-
<Component />`),v=!0,
|
|
95
|
+
<Component />`),v=!0,j={})}})(d,p)),lc(x,()=>`.${x.styledComponentId}`),l&&oc(x,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}var q8=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function Ci(e,a){const s=[e[0]];for(let n=0,i=a.length;n<i;n+=1)s.push(a[n],e[n+1]);return s}const Ni=e=>(dc.add(e),e);function xc(e,...a){if(vs(e)||Oa(e))return Ni(ma(Ci(jr,[e,...a])));const s=e;return a.length===0&&s.length===1&&typeof s[0]=="string"?ma(s):Ni(ma(Ci(s,a)))}function dr(e,a,s=Ya){if(!a)throw xs(1,a);const n=(i,...l)=>e(a,s,xc(i,...l));return n.attrs=i=>dr(e,a,Object.assign(Object.assign({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)})),n.withConfig=i=>dr(e,a,Object.assign(Object.assign({},s),i)),n}const vc=e=>dr(G8,e),K8=vc;q8.forEach(e=>{K8[e]=vc(e)});class Y8{constructor(a,s){this.instanceRules=new Map,this.rules=a,this.componentId=s,this.isStatic=(function(n){for(let i=0;i<n.length;i+=1){const l=n[i];if(vs(l)&&!kr(l))return!1}return!0})(a),bs.registerId(this.componentId)}removeStyles(a,s){this.instanceRules.delete(a),this.rebuildGroup(s)}renderStyles(a,s,n,i){const l=this.componentId;if(this.isStatic){if(n.hasNameForId(l,l+a))this.instanceRules.has(a)||this.computeRules(a,s,n,i);else{const c=this.computeRules(a,s,n,i);n.insertRules(l,c.name,c.rules)}return}const m=this.instanceRules.get(a);if(this.computeRules(a,s,n,i),!n.server&&m){const c=m.rules,d=this.instanceRules.get(a).rules;if(c.length===d.length){let p=!0;for(let u=0;u<c.length;u++)if(c[u]!==d[u]){p=!1;break}if(p)return}}this.rebuildGroup(n)}computeRules(a,s,n,i){const l=ir(ma(this.rules,s,n,i)),m={name:this.componentId+a,rules:i(l,"")};return this.instanceRules.set(a,m),m}rebuildGroup(a){const s=this.componentId;a.clearRules(s);for(const n of this.instanceRules.values())a.insertRules(s,n.name,n.rules)}}function Q8(e,...a){const s=xc(e,...a),n=`sc-global-${nc(JSON.stringify(s))}`,i=new Y8(s,n);process.env.NODE_ENV!=="production"&&Xl(n);const l=c=>{const d=gc(),p=o.useContext(Cr);let u;{const h=o.useRef(null);h.current===null&&(h.current=d.styleSheet.allocateGSInstance(n)),u=h.current}process.env.NODE_ENV!=="production"&&o.Children.count(c.children)&&console.warn(`The global style component ${n} was given child JSX. createGlobalStyle does not render children.`),process.env.NODE_ENV!=="production"&&s.some(h=>typeof h=="string"&&h.indexOf("@import")!==-1)&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),d.styleSheet.server&&m(u,c,d.styleSheet,p,d.stylis);{const h=i.isStatic?[u,d.styleSheet,i]:[u,c,d.styleSheet,p,d.stylis,i],f=o.useRef(i);o.useLayoutEffect(()=>{d.styleSheet.server||(f.current!==i&&(d.styleSheet.clearRules(n),f.current=i),m(u,c,d.styleSheet,p,d.stylis))},h),o.useLayoutEffect(()=>()=>{d.styleSheet.server||i.removeStyles(u,d.styleSheet)},[u,d.styleSheet,i])}return d.styleSheet.server&&i.instanceRules.delete(u),null};function m(c,d,p,u,h){if(i.isStatic)i.renderStyles(c,l8,p,h);else{const f=Object.assign(Object.assign({},d),{theme:ec(d,u,l.defaultProps)});i.renderStyles(c,f,p,h)}}return o.memo(l)}process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
96
96
|
Perhaps you're looking to import 'styled-components/native'?
|
|
97
|
-
Read more about this at https://styled-components.com/docs/basics#react-native`);const
|
|
97
|
+
Read more about this at https://styled-components.com/docs/basics#react-native`);const $s=`__sc-${$a}__`;process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[$s]||(window[$s]=0),window[$s]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
98
98
|
|
|
99
|
-
See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`),window[Ps]+=1);const Q8='.wacht-root{--wa-surface: var(--wa-ov-light-surface, #ffffff);--wa-surface-subtle: var(--wa-ov-light-surface_subtle, #fafaf8);--wa-background: var(--wa-ov-light-background, #f5f5f2);--wa-canvas: var(--wa-ov-light-canvas, #ebebe7);--wa-text: var(--wa-ov-light-text, #161618);--wa-text-secondary: var(--wa-ov-light-text_secondary, #3b3b3f);--wa-text-muted: var(--wa-ov-light-text_muted, #76767c);--wa-text-faint: var(--wa-ov-light-text_faint, #a8a8ad);--wa-border: var(--wa-ov-light-border, rgba(20, 20, 22, .08));--wa-border-strong: var(--wa-ov-light-border_strong, rgba(20, 20, 22, .14));--wa-primary: var(--wa-ov-light-primary, #6b3df5);--wa-primary-soft: var(--wa-ov-light-primary_soft, rgba(107, 61, 245, .1));--wa-primary-foreground: var(--wa-ov-light-primary_foreground, #ffffff);--wa-success: var(--wa-ov-light-success, #0f8a4a);--wa-success-soft: var(--wa-ov-light-success_soft, rgba(15, 138, 74, .12));--wa-info: var(--wa-ov-light-info, #2f6fdb);--wa-info-soft: var(--wa-ov-light-info_soft, rgba(47, 111, 219, .1));--wa-warning: var(--wa-ov-light-warning, #a8650a);--wa-warning-soft: var(--wa-ov-light-warning_soft, rgba(168, 101, 10, .12));--wa-error: var(--wa-ov-light-error, #c4271f);--wa-error-soft: var(--wa-ov-light-error_soft, rgba(196, 39, 31, .1));--wa-radius: var(--wa-ov-light-radius, 6px);--wa-radius-lg: var(--wa-ov-light-radius_lg, 10px);--wa-font-sans: var(--wa-ov-light-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-light-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace;font-family:var(--wa-font-sans)}.dark .wacht-root,.wacht-root.dark{--wa-surface: var(--wa-ov-dark-surface, #131318);--wa-surface-subtle: var(--wa-ov-dark-surface_subtle, #101015);--wa-background: var(--wa-ov-dark-background, #0d0d10);--wa-canvas: var(--wa-ov-dark-canvas, #050507);--wa-text: var(--wa-ov-dark-text, #ececef);--wa-text-secondary: var(--wa-ov-dark-text_secondary, #c5c5cb);--wa-text-muted: var(--wa-ov-dark-text_muted, #8a8a92);--wa-text-faint: var(--wa-ov-dark-text_faint, #57575e);--wa-border: var(--wa-ov-dark-border, rgba(255, 255, 255, .07));--wa-border-strong: var(--wa-ov-dark-border_strong, rgba(255, 255, 255, .14));--wa-primary: var(--wa-ov-dark-primary, #9277ff);--wa-primary-soft: var(--wa-ov-dark-primary_soft, rgba(146, 119, 255, .16));--wa-primary-foreground: var(--wa-ov-dark-primary_foreground, #ffffff);--wa-success: var(--wa-ov-dark-success, #0f8a4a);--wa-success-soft: var(--wa-ov-dark-success_soft, rgba(15, 138, 74, .18));--wa-info: var(--wa-ov-dark-info, #2f6fdb);--wa-info-soft: var(--wa-ov-dark-info_soft, rgba(47, 111, 219, .18));--wa-warning: var(--wa-ov-dark-warning, #a8650a);--wa-warning-soft: var(--wa-ov-dark-warning_soft, rgba(168, 101, 10, .18));--wa-error: var(--wa-ov-dark-error, #c4271f);--wa-error-soft: var(--wa-ov-dark-error_soft, rgba(196, 39, 31, .18));--wa-radius: var(--wa-ov-dark-radius, 6px);--wa-radius-lg: var(--wa-ov-dark-radius_lg, 10px);--wa-font-sans: var(--wa-ov-dark-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-dark-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace}.wacht-root *{box-sizing:border-box}',J8='.w-flex-col{display:flex;flex-direction:column}.w-inline{display:inline-flex;align-items:center}.w-wrap{flex-wrap:wrap}.w-grow{flex:1 1 auto;min-width:0}.w-none{flex:none}.w-full{width:100%}.w-gap-1{gap:4px}.w-gap-2{gap:8px}.w-gap-3{gap:12px}.w-gap-4{gap:16px}.w-gap-5{gap:20px}.w-gap-6{gap:24px}.w-truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-contents{display:contents}.w-h-full{height:100%}.w-minh-full{min-height:100%}.w-mono-sm{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-muted)}.w-text-primary{color:var(--wa-primary)}.w-text-secondary{color:var(--wa-text-secondary)}.w-text-muted{color:var(--wa-text-muted)}.w-text-faint{color:var(--wa-text-faint)}.w-text-error{color:var(--wa-error)}.w-text-success{color:var(--wa-success)}.w-text-warning{color:var(--wa-warning)}.w-mb-4{margin-bottom:16px}.w-mt-6{margin-top:24px}.w-maxw-sm{max-width:340px}.w-rolepick-btn{min-width:120px}.w-combo-menu--pop{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60}.w-relative{position:relative}.w-card{background:var(--wa-surface);border:0;border-radius:var(--wa-radius-lg);box-shadow:0 0 0 .5px var(--wa-border),0 1px 1px #1414160a,0 4px 8px -4px #14141614,0 24px 48px -16px #14141629;overflow:hidden}.w-eyebrow{font:400 10px/1 var(--wa-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--wa-text-faint)}.w-title{font:400 17px/1.25 var(--wa-font-sans);letter-spacing:-.02em;color:var(--wa-text);margin:0}.w-title-lg{font:400 19px/1.2 var(--wa-font-sans);letter-spacing:-.022em;color:var(--wa-text);margin:0}.w-sub{font:400 13px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-sec{font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);margin:0}.w-secsub{font:400 12px/1.45 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-btn{height:32px;padding:0 13px;border-radius:var(--wa-radius);border:.5px solid transparent;font:400 12.5px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .14s ease,border-color .14s ease,filter .14s ease,box-shadow .14s ease;background:transparent;color:var(--wa-text)}.w-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-btn:disabled{opacity:.6;cursor:not-allowed}.w-btn svg{width:14px;height:14px;flex:none}.w-btn--primary{background:var(--wa-primary);color:var(--wa-primary-foreground);box-shadow:inset 0 1px #ffffff2e,0 1px 2px #1414161f,0 2px 8px -2px color-mix(in srgb,var(--wa-primary) 50%,transparent);background-image:linear-gradient(180deg,#ffffff1a,#fff0 42%)}.w-btn--primary:active:not(:disabled){filter:brightness(.97);box-shadow:inset 0 1px 2px #14141633}.w-btn--block{width:100%;height:38px;font-size:13px}.w-btn--secondary{background:var(--wa-surface);border-color:var(--wa-border-strong);color:var(--wa-text);box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a}.w-btn--ghost{background:transparent;color:var(--wa-text-secondary)}.w-btn--danger{background:transparent;color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-btn--danger-solid{background:var(--wa-error);color:#fff}.w-btn--sm{height:26px;padding:0 9px;font-size:11.5px}.w-btn--lg{height:42px;padding:0 18px;font-size:13.5px}.w-btn--icon{height:28px;width:28px;padding:0;color:var(--wa-text-muted)}.w-btn--icon:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-social{height:40px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);display:flex;align-items:center;justify-content:center;gap:10px;padding:0 14px;cursor:pointer;position:relative;box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .1s ease}.w-social:active{transform:translateY(.5px)}.w-social:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-social svg,.w-social img{width:17px;height:17px;flex:none}.w-social .w-social-label{flex:none}.w-social .w-lastused{position:absolute;top:-9px;right:12px;white-space:nowrap;font:400 9.5px/1 var(--wa-font-mono);letter-spacing:.04em;color:var(--wa-text-muted);background:var(--wa-surface);border:.5px solid var(--wa-border);padding:3px 6px;border-radius:5px}.w-field{display:flex;flex-direction:column;gap:7px}.w-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);display:flex;align-items:center;gap:4px;letter-spacing:-.005em;white-space:nowrap}.w-req{color:var(--wa-error);font-size:12px}.w-input{height:34px;padding:0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);width:100%;box-shadow:inset 0 1px 2px #1414160d;transition:border-color .14s ease,box-shadow .14s ease}.w-input::placeholder{color:var(--wa-text-faint)}.w-input:focus{outline:none;border-color:var(--wa-primary);box-shadow:inset 0 1px 2px #1414160a,0 0 0 3px var(--wa-primary-soft)}.w-input-row{display:flex;align-items:center;gap:6px}.w-input-trail{margin-left:-34px;z-index:1}.w-input-wrap{position:relative}.w-input--valid:focus{border-color:var(--wa-success);box-shadow:0 0 0 3px var(--wa-success-soft)}.w-input--invalid,.w-input[aria-invalid=true]{border-color:color-mix(in srgb,var(--wa-error) 55%,var(--wa-border-strong))}.w-input--invalid:focus,.w-input[aria-invalid=true]:focus{border-color:var(--wa-error);box-shadow:0 0 0 3px var(--wa-error-soft)}.w-input:disabled,.w-input[data-disabled]{opacity:.55;cursor:not-allowed}.w-input-err{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-error)}.w-input-ok{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-success)}.w-input-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:grid;place-items:center;border:0;background:none;cursor:pointer;color:var(--wa-text-faint);border-radius:6px}.w-input-eye:hover{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-input-eye svg{width:15px;height:15px}.w-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font:400 var(--av-fs, 13px)/1 var(--wa-font-sans);color:#fff;flex:none;background:var(--av-bg, linear-gradient(135deg, #6b3df5, #9277ff));box-shadow:inset 0 0 0 .5px #ffffff29;letter-spacing:.01em;overflow:hidden}.w-avatar img{width:100%;height:100%;object-fit:cover}.w-avatar--square{border-radius:var(--wa-radius)}.w-avatar--sm{width:20px;height:20px;font-size:10px}.w-avatar--md{width:28px;height:28px;font-size:11px}.w-avatar--lg{width:44px;height:44px;font-size:15px}.w-avatar--xl{width:80px;height:80px;font-size:24px}.w-avatar-edit{position:relative;cursor:pointer;border:0;padding:0}.w-avatar-edit .w-avatar-veil{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;display:grid;place-items:center;color:#fff;background:color-mix(in srgb,#000 45%,transparent);opacity:0;transition:opacity .15s ease;font:400 11px/1.2 var(--wa-font-sans);text-align:center;padding:0 6px}.w-avatar-edit:hover .w-avatar-veil,.w-avatar-edit[data-busy] .w-avatar-veil{opacity:1}.w-avatar-veil svg{width:18px;height:18px}.w-pill{display:inline-flex;align-items:center;gap:6px;height:21px;padding:0 8px;border-radius:4px;font:400 10.5px/1 var(--wa-font-mono);text-transform:lowercase;letter-spacing:.01em;background:var(--wa-surface-subtle);color:var(--wa-text-muted);border:.5px solid var(--wa-border);white-space:nowrap;flex:none}.w-pill .w-dot{width:5px;height:5px;border-radius:999px;background:var(--wa-text-faint)}.w-pill--success{background:var(--wa-success-soft);color:var(--wa-success);border-color:color-mix(in srgb,var(--wa-success) 26%,transparent)}.w-pill--success .w-dot{background:var(--wa-success)}.w-pill--warning{background:var(--wa-warning-soft);color:var(--wa-warning);border-color:color-mix(in srgb,var(--wa-warning) 26%,transparent)}.w-pill--warning .w-dot{background:var(--wa-warning)}.w-pill--info{background:var(--wa-info-soft);color:var(--wa-info);border-color:color-mix(in srgb,var(--wa-info) 26%,transparent)}.w-pill--info .w-dot{background:var(--wa-info)}.w-pill--current{background:var(--wa-primary-soft);color:var(--wa-primary);border-color:color-mix(in srgb,var(--wa-primary) 26%,transparent)}.w-pill--error{background:var(--wa-error-soft);color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-pill--error .w-dot{background:var(--wa-error)}.w-pill--pending{background:transparent;color:var(--wa-warning);border:.5px dashed color-mix(in srgb,var(--wa-warning) 55%,transparent)}.w-pill--pending .w-dot{background:var(--wa-warning)}.w-chip{display:inline-flex;align-items:center;gap:7px;height:24px;padding:0 5px 0 9px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary)}.w-chip-x{display:grid;place-items:center;width:16px;height:16px;border-radius:3px;color:var(--wa-text-faint);cursor:pointer}.w-chip-x:hover{background:var(--wa-border);color:var(--wa-text)}.w-chip-x svg{width:11px;height:11px}.w-or{display:flex;align-items:center;gap:14px;margin:18px 0}.w-or:before,.w-or:after{content:"";height:.5px;background:var(--wa-border);flex:1}.w-or span{font:400 10px/1 var(--wa-font-mono);letter-spacing:.14em;color:var(--wa-text-faint)}.w-hr{height:.5px;background:var(--wa-border);border:0;margin:0;width:100%}.w-list{display:flex;flex-direction:column}.w-listhead{display:grid;align-items:center;padding:0 2px 8px;font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);border-bottom:.5px solid var(--wa-border)}.w-row{display:grid;align-items:center;padding:13px 2px;border-bottom:.5px solid var(--wa-border)}.w-row:last-child{border-bottom:0}.w-row--hover{border-radius:var(--wa-radius);margin:0 -8px;padding:11px 10px;border-bottom:0;transition:background .12s ease}.w-row--hover:hover{background:var(--wa-surface-subtle)}.w-acct{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:11px 12px;border:.5px solid transparent;border-radius:var(--wa-radius-lg);background:none;cursor:pointer;transition:background .13s ease,border-color .13s ease}.w-acct:hover{background:var(--wa-surface-subtle)}.w-acct[data-active]{background:var(--wa-surface-subtle);border-color:var(--wa-border)}.w-acct .w-acct-go{color:var(--wa-text-faint);flex:none;opacity:0;transform:translate(-4px);transition:opacity .13s ease,transform .13s ease}.w-acct:hover .w-acct-go{opacity:1;transform:none;color:var(--wa-text-muted)}.w-acct[data-busy]{opacity:.55;pointer-events:none}.w-acct-list{border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden;margin-bottom:18px}.w-acct-list-head{padding:11px 14px;border-bottom:.5px solid var(--wa-border)}.w-acct-list-body{padding:6px}.w-acct-text{flex:1;min-width:0;text-align:left}.w-acct-name{display:block;font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct-text .w-secsub{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct .w-avatar{width:34px;height:34px;flex:none}.w-acct[data-active] .w-avatar{width:40px;height:40px}.w-acct-add-ic{width:36px;height:36px;border-radius:50%;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);display:grid;place-items:center;color:var(--wa-text-muted);flex:none;transition:color .13s ease,border-color .13s ease}.w-acct--add:hover .w-acct-add-ic{color:var(--wa-text);border-color:var(--wa-text-muted)}.w-acct-out{color:var(--wa-text-faint);flex:none;margin-right:-6px}.w-acct-out:hover{color:var(--wa-error);background:var(--wa-error-soft)}.w-acct--add:hover{background:var(--wa-surface-subtle)}.w-acct-foot{margin-top:8px;padding-top:10px}.w-acct-add{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:36px;border:0;background:none;cursor:pointer;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);transition:background .13s ease,color .13s ease}.w-acct-add svg{width:15px;height:15px}.w-acct-add:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-tabs{display:flex;gap:2px}.w-tab{display:inline-flex;align-items:center;gap:7px;height:30px;flex:none;white-space:nowrap;padding:0 12px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;transition:color .14s ease,background .14s ease}.w-tab svg{width:14px;height:14px}.w-tab:hover,.w-tab--active{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-tab--active svg{color:var(--wa-primary)}.w-menu{width:264px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-menu-head{display:flex;align-items:center;gap:11px;padding:11px 9px}.w-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;height:32px;padding:0 8px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;transition:background .12s ease;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-menu-item:hover{background:var(--wa-surface-subtle)}.w-menu-item svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-menu-item--danger{color:var(--wa-error)}.w-menu-item--danger svg{color:var(--wa-error)}.w-menu-item--danger:hover{background:var(--wa-error-soft)}.w-menu-trail{margin-left:auto;font:400 10.5px/1 var(--wa-font-mono);color:var(--wa-text-faint)}.w-menu-label{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:10px 9px 5px}.w-orgtrigger{display:flex;align-items:center;gap:9px;width:100%;height:40px;padding:0 9px;border:0;border-radius:var(--wa-radius);background:transparent;color:var(--wa-text);cursor:pointer;font:400 13px/1 var(--wa-font-sans);text-align:left;transition:background .12s ease}.w-orgtrigger:hover,.w-orgtrigger[data-open]{background:var(--wa-surface-subtle)}.w-orgtrigger:disabled{opacity:.6;cursor:default}.w-orgtrigger>svg{color:var(--wa-text-faint);flex:none}.w-switch-body{overflow-y:auto;padding:4px 0}.w-switch-banner{margin:8px 8px 0}.w-switch-nest{display:flex;flex-direction:column;margin:2px 0 6px 24px;padding-left:8px;border-left:.5px solid var(--wa-border)}.w-menu-item--muted{color:var(--wa-text-muted)}.w-menu-item--muted svg{color:var(--wa-text-muted)}.w-rowact{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:5px;color:var(--wa-text-muted);cursor:pointer}.w-rowact:hover{color:var(--wa-text);background:var(--wa-border)}.w-rowact svg{width:13px;height:13px}.w-danger{border:.5px solid color-mix(in srgb,var(--wa-error) 30%,transparent);background:var(--wa-error-soft);border-radius:var(--wa-radius);padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:20px}.w-link{color:var(--wa-text);font-weight:400;cursor:pointer;text-decoration:none}.w-link--sm{font-size:12px}.w-link:hover{text-decoration:underline}.w-link--muted{color:var(--wa-text-muted)}.w-mono-faint{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-faint)}@keyframes w-spin{to{transform:rotate(360deg)}}.w-spin{display:inline-block;border-radius:50%;border:2px solid var(--wa-border-strong);border-top-color:var(--wa-primary);animation:w-spin .7s linear infinite}.w-spin--on-accent{border-color:#ffffff59;border-top-color:#fff}.w-loading{display:grid;place-items:center;gap:14px;padding:40px;text-align:center}.w-otp{display:flex;gap:8px}.w-otp .w-otp-cell{width:42px;height:48px;text-align:center;font:400 20px/1 var(--wa-font-mono);color:var(--wa-text);border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);display:grid;place-items:center}.w-otp .w-otp-cell[data-active],.w-otp .w-otp-cell:focus{outline:none;border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-otp .w-otp-cell[data-filled]{border-color:var(--wa-text-muted)}.w-otp[data-error] .w-otp-cell{border-color:color-mix(in srgb,var(--wa-error) 50%,var(--wa-border-strong))}.w-otp-caret{width:1.5px;height:22px;background:var(--wa-primary);animation:w-blink 1s steps(1) infinite}@keyframes w-blink{50%{opacity:0}}.w-addr-badge{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 6px 0 12px;border-radius:999px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary)}.w-addr-badge button{border:0;background:none;cursor:pointer;color:var(--wa-primary);font:400 12px/1 var(--wa-font-sans);padding:4px 8px;border-radius:6px}.w-addr-badge button:hover{background:var(--wa-primary-soft)}.w-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:48px 24px}.w-empty .w-empty-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary)}.w-empty .w-empty-ic svg{width:20px;height:20px;color:var(--wa-primary)}.w-empty-text{display:flex;flex-direction:column;gap:4px}.w-empty h4{margin:0;font:500 14px/1.4 var(--wa-font-sans);color:var(--wa-text)}.w-empty p{margin:0;font:400 12px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);max-width:384px;text-wrap:pretty}.w-empty-action{margin-top:4px}.w-empty--fill{height:100%}.w-empty-ic--accent{width:44px;height:44px}.w-toast{display:inline-flex;align-items:center;gap:11px;padding:11px 13px 11px 14px;border-radius:var(--wa-radius-lg);background:var(--wa-surface);border:.5px solid var(--wa-border);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;min-width:280px;max-width:380px}.w-toast .w-toast-ic{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none}.w-toast .w-toast-ic svg{width:12px;height:12px}.w-toast--success .w-toast-ic{background:var(--wa-success-soft);color:var(--wa-success)}.w-toast--error .w-toast-ic{background:var(--wa-error-soft);color:var(--wa-error)}.w-toast-msg{flex:1;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text)}.w-toast-x{border:0;background:none;cursor:pointer;color:var(--wa-text-faint);width:22px;height:22px;border-radius:6px;display:grid;place-items:center;flex:none}.w-toast-x:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-toast-x svg{width:12px;height:12px}.w-pop{width:320px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-pop-body{padding:15px 15px 13px;display:flex;flex-direction:column;gap:11px}.w-pop-title{margin:0;font:400 13.5px/1.3 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-pop-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-pop-title+.w-pop-sub{margin-top:-7px}.w-pop-foot{display:flex;gap:8px;justify-content:flex-end;padding:10px 14px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-pop-foot .w-btn{width:auto}.w-pop-icon{width:38px;height:38px;border-radius:var(--wa-radius);display:grid;place-items:center;flex:none}.w-pop-icon--danger{background:var(--wa-error-soft);color:var(--wa-error)}.w-pop-icon--warn{background:var(--wa-warning-soft);color:var(--wa-warning)}.w-pop-icon svg{width:18px;height:18px}.w-locked{display:flex;align-items:center;gap:10px;height:38px;padding:0 8px 0 13px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-locked .w-locked-ic{color:var(--wa-text-faint);flex:none}.w-locked .w-locked-ic svg{width:15px;height:15px;display:block}.w-locked .w-locked-val{flex:1;font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-restricted{opacity:.55;cursor:not-allowed}.w-restricted *{pointer-events:none}.w-warn-ic{color:var(--wa-warning);display:inline-grid;place-items:center}.w-warn-ic svg{width:15px;height:15px}.w-codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border)}.w-codes span{font:400 13px/1.6 var(--wa-font-mono);color:var(--wa-text);text-align:center;letter-spacing:.04em}.w-qr{width:148px;height:148px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface);display:grid;place-items:center;color:var(--wa-text)}.w-banner{display:flex;gap:11px;padding:12px 14px;border-radius:var(--wa-radius);align-items:flex-start}.w-banner svg{width:16px;height:16px;flex:none;margin-top:1px}.w-banner-txt{font:400 12.5px/1.5 var(--wa-font-sans);text-wrap:pretty;color:var(--wa-text-secondary)}.w-banner--error{background:var(--wa-error-soft)}.w-banner--warn{background:var(--wa-warning-soft)}.w-banner--info{background:var(--wa-info-soft)}.w-banner--error svg{color:var(--wa-error)}.w-banner--warn svg{color:var(--wa-warning)}.w-banner--info svg{color:var(--wa-info)}.w-seg{display:inline-flex;padding:3px;gap:2px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-seg button{height:28px;padding:0 12px;border:0;background:none;cursor:pointer;border-radius:4px;font:400 12px/1 var(--wa-font-sans);color:var(--wa-text-muted);white-space:nowrap}.w-seg button[data-on]{background:var(--wa-surface);color:var(--wa-text);box-shadow:0 0 0 .5px var(--wa-border)}.w-steps{display:flex;gap:6px;justify-content:center}.w-steps i{width:5px;height:5px;border-radius:999px;background:var(--wa-border-strong);transition:background .2s ease,width .2s ease}.w-steps i[data-on]{background:var(--wa-primary);width:16px}.w-ibadge{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary);overflow:hidden}.w-ibadge svg{width:24px;height:24px}.w-ibadge img{width:100%;height:100%;object-fit:cover}.w-ibadge--done{width:52px;height:52px;border-radius:999px;background:var(--wa-success-soft);color:var(--wa-success)}.w-ibadge--done svg{width:26px;height:26px}.w-ibadge-wrap{position:relative}.w-ibadge-x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;display:grid;place-items:center;border-radius:999px;border:.5px solid var(--wa-border);background:var(--wa-surface);color:var(--wa-text-muted);cursor:pointer;box-shadow:0 1px 2px #1414161f}.w-ibadge-x svg{width:11px;height:11px}.w-create-foot{padding:13px 32px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle);text-align:center}.w-create-summary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:12px 16px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-auth-card{width:min(440px,100%)}.w-auth-head{display:flex;flex-direction:column;align-items:center;gap:14px;margin-bottom:24px}.w-auth-head-text{display:flex;flex-direction:column;gap:6px;text-align:center}.w-auth-title{margin:0;font:400 21px/1.2 var(--wa-font-sans);letter-spacing:-.025em;color:var(--wa-text)}.w-auth-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-auth-status{display:flex;flex-direction:column;align-items:center;gap:16px;padding-top:4px;text-align:center}.w-auth-foot{font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted)}.w-fineprint{margin:2px 2px 0;font:400 11px/1.5 var(--wa-font-sans);color:var(--wa-text-faint);text-align:center;text-wrap:pretty}.w-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.w-switch .w-switch-track{width:36px;height:20px;border-radius:999px;background:var(--wa-border-strong);border:.5px solid transparent;position:relative;transition:background .16s ease;flex:none}.w-switch .w-switch-knob{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #00000040;transition:transform .16s ease}.w-switch[data-on] .w-switch-track{background:var(--wa-primary)}.w-switch[data-on] .w-switch-knob{transform:translate(16px)}.w-switch-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text)}.w-search{display:flex;align-items:center;gap:8px;height:32px;width:240px;max-width:100%;padding:0 11px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface)}.w-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}.w-search svg{width:15px;height:15px;color:var(--wa-text-faint);flex:none}.w-search input{border:0;background:none;outline:none;flex:1;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-search input::placeholder{color:var(--wa-text-faint)}.w-combo{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px 0 12px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);transition:border-color .14s ease}.w-combo:hover{border-color:var(--wa-text-muted)}.w-combo[data-open]{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-combo .w-combo-val{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-combo .w-combo-val[data-ph]{color:var(--wa-text-faint)}.w-combo svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-combo-menu{width:100%;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-combo-opt{display:flex;align-items:center;justify-content:flex-start;gap:9px;height:30px;padding:0 8px;border-radius:5px;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-combo-opt>svg{width:15px;height:15px;flex:none;color:var(--wa-text-muted)}.w-combo-opt:hover{background:var(--wa-surface-subtle)}.w-combo-opt .w-combo-check{margin-left:auto;color:var(--wa-primary);display:grid;place-items:center}.w-combo-opt .w-combo-check svg{width:14px;height:14px}.w-combo-opt[data-disabled]{opacity:.5;cursor:not-allowed}.w-combo-grp{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:9px 9px 5px}.w-phone{display:flex;align-items:stretch;gap:0;width:100%}.w-phone .w-phone-cc{display:flex;align-items:center;gap:7px;height:34px;padding:0 10px;border:.5px solid var(--wa-border-strong);border-right:0;border-radius:var(--wa-radius) 0 0 var(--wa-radius);background:var(--wa-surface-subtle);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap}.w-phone .w-phone-cc svg{width:13px;height:13px;color:var(--wa-text-muted)}.w-phone input{flex:1;height:34px;padding:0 12px;border:.5px solid var(--wa-border-strong);border-radius:0 var(--wa-radius) var(--wa-radius) 0;background:var(--wa-surface);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);outline:none;min-width:0}.w-phone input:focus{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft);position:relative}.w-flag{width:18px;height:13px;border-radius:2px;display:inline-block;flex:none;box-shadow:inset 0 0 0 .5px #00000026}.w-country-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:50;width:260px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-country-search{display:flex;align-items:center;gap:8px;padding:9px 11px;border-bottom:.5px solid var(--wa-border)}.w-country-search svg{width:14px;height:14px;color:var(--wa-text-faint);flex:none}.w-country-search input{border:0;background:none;outline:none;flex:1;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-country-search input::placeholder{color:var(--wa-text-faint)}.w-country-list{max-height:220px;overflow-y:auto;padding:5px}.w-country-opt{display:flex;align-items:center;gap:9px;height:32px;padding:0 9px;border-radius:5px;cursor:pointer;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);width:100%;border:0;background:none;text-align:left}.w-country-opt:hover{background:var(--wa-surface-subtle)}.w-country-opt .dial{margin-left:auto;color:var(--wa-text-muted);font:400 12px/1 var(--wa-font-mono);flex:none}.w-method-stack{display:flex;flex-direction:column;gap:10px}.w-method{display:flex;align-items:center;gap:13px;width:100%;padding:13px 14px;border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;text-align:left;transition:background .14s ease,border-color .14s ease}.w-method .w-method-ic{width:34px;height:34px;border-radius:var(--wa-radius);display:grid;place-items:center;background:var(--wa-surface-subtle);color:var(--wa-text-secondary);flex:none}.w-method .w-method-ic svg{width:17px;height:17px}.w-method .w-method-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.w-method .w-method-title{font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text)}.w-method .w-method-desc{font:400 12px/1.4 var(--wa-font-sans);color:var(--wa-text-muted)}.w-method .w-method-go{color:var(--wa-text-faint);flex:none}.w-method .w-method-go svg{width:16px;height:16px}.w-method[data-disabled]{opacity:.5;cursor:not-allowed}.w-overlay{position:relative;width:100%;height:100%;background:color-mix(in srgb,#000 38%,transparent);display:grid;place-items:center;border-radius:inherit}.w-dialog{background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;width:100%;max-width:480px;overflow:hidden;display:flex;flex-direction:column}.w-dialog--panel{display:block;width:880px;max-width:100%;height:min(560px,calc(100dvh - 40px));overflow-y:auto}.w-dialog--panel .w-card{background:transparent;border-radius:0;box-shadow:none}@media(max-width:640px){.w-dialog--panel{height:calc(100dvh - 16px)}}.w-dialog--create{background:transparent;border:0;box-shadow:none;width:440px;max-width:100%;align-items:center;scrollbar-gutter:stable both-edges}.w-create-card{width:440px;max-width:100%}.w-create-body{padding:34px 32px 28px}.w-create-head{margin-bottom:24px}.w-create-steps{margin-bottom:22px}.w-text-center{text-align:center}.w-linkbtn{background:none;border:0;padding:0;cursor:pointer}.w-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#08080c80;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;justify-content:center;align-items:center;padding:20px;z-index:99999}@media(max-width:640px){.w-modal{padding:8px}}.w-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:.5px solid var(--wa-border)}.w-dialog-title{margin:0;font:400 15px/1.2 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-dialog-body{padding:20px;display:flex;flex-direction:column;gap:14px}.w-dialog-foot{display:flex;gap:8px;justify-content:flex-end;padding:14px 20px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-vtabs{display:flex;flex-direction:column;gap:2px}.w-vtab{display:flex;align-items:center;gap:10px;height:34px;padding:0 11px;border-radius:var(--wa-radius);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;text-align:left;width:100%}.w-vtab svg{width:15px;height:15px}.w-vtab:hover,.w-vtab[data-on]{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-vtab[data-on] svg{color:var(--wa-primary)}@keyframes w-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.w-skel{border-radius:6px;background:linear-gradient(90deg,var(--wa-surface-subtle) 25%,var(--wa-border) 37%,var(--wa-surface-subtle) 63%);background-size:200% 100%;animation:w-shimmer 1.4s ease infinite}.w-auth-skel{display:flex;flex-direction:column;gap:22px}.w-auth-skel-head{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:2px}.w-auth-skel-fields{display:flex;flex-direction:column;gap:15px}.w-auth-skel-field{display:flex;flex-direction:column;gap:7px}.w-skel-avatar{width:44px;height:44px;border-radius:50%}.w-skel-line{height:10px}.w-skel-title{height:16px;width:56%}.w-skel-sub{height:11px;width:78%}.w-skel-label{height:9px;width:34%}.w-skel-input{height:38px;border-radius:var(--wa-radius)}.w-skel-btn{height:38px;border-radius:var(--wa-radius);margin-top:3px}.w-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden}.w-table thead{background:var(--wa-surface-subtle)}.w-table th{text-align:left;padding:9px 16px;font:400 11px/1 var(--wa-font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--wa-text-faint);white-space:nowrap;border-bottom:.5px solid var(--wa-border)}.w-table th:last-child{text-align:right}.w-table td{padding:11px 16px;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text-secondary);vertical-align:middle;white-space:nowrap}.w-table tbody tr{transition:background .12s ease}.w-table tbody tr:not(:last-child) td{border-bottom:.5px solid var(--wa-border)}.w-table tbody tr:hover td{background:var(--wa-surface-subtle)}.w-table tbody tr:last-child td:last-child{overflow:visible}.w-td--flex>div{display:flex;align-items:center;gap:10px}.w-td--actions{text-align:right;width:auto;white-space:nowrap;position:relative;overflow:visible}.w-td--actions>*{width:fit-content;margin-left:auto}.w-td--actions>[data-dropdown-trigger]{display:inline-flex;width:fit-content;margin-left:auto}.w-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}.w-kebab{width:28px;height:28px;border-radius:6px;border:0;background:none;cursor:pointer;color:var(--wa-text-muted);display:grid;place-items:center}.w-kebab:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-kebab svg{width:16px;height:16px}.w-token{display:flex;align-items:center;gap:8px;height:36px;padding:0 6px 0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-token code{flex:1;font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-page-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 22px}.w-tabsbar{flex:none;padding:0 22px;border-bottom:.5px solid var(--wa-border);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.w-tabsbar::-webkit-scrollbar{display:none}.w-tabbody{flex:1;min-height:0;padding:20px 22px;overflow-y:auto;overflow-x:auto}.w-tabpane{min-width:300px}.w-card-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px 20px}.w-card-body{padding:16px 20px}.w-card-foot{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;padding:14px 20px;border-top:.5px solid var(--wa-border)}.w-sechead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.w-iconbox{width:22px;height:22px;flex:none;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}.w-iconbox svg,.w-iconbox img{width:22px;height:22px;display:block}.w-vrow{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0}.w-vrow:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-row-act-top{align-self:flex-start;margin-top:20px}.w-rowitem{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px}.w-rowitem:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-aside-copy{max-width:220px;text-align:center}.w-split{display:flex;min-height:400px;border-radius:var(--wa-radius-lg);overflow:hidden;border:.5px solid var(--wa-border);background:var(--wa-surface)}.w-split-aside{width:35%;min-width:200px;flex:none;background:var(--wa-surface-subtle);border-right:.5px solid var(--wa-border);padding:28px;display:flex;flex-direction:column;gap:14px}.w-split-main{flex:1;min-width:0;padding:28px;display:flex;flex-direction:column;gap:16px}@media(max-width:600px){.w-split{flex-direction:column}.w-split-aside{width:100%;border-right:0;border-bottom:.5px solid var(--wa-border)}}.w-listrow{display:flex;align-items:center;gap:12px;width:100%;padding:12px 0;text-align:left;border:0;border-bottom:.5px solid var(--wa-border);background:transparent;cursor:pointer;transition:background .12s ease}.w-listrow:last-child{border-bottom:0}.w-listrow:hover{background:var(--wa-surface-subtle)}.w-listrow:disabled{opacity:.6;cursor:not-allowed}.w-tile{border:.5px solid var(--wa-border);border-radius:var(--wa-radius);padding:12px;background:var(--wa-surface-subtle)}.w-input--area{min-height:80px;padding-top:9px;padding-bottom:9px;resize:vertical;line-height:1.5}.w-input--mono{font-family:var(--wa-font-mono)}.w-pop--wide{width:372px;max-width:calc(100vw - 24px);overflow:visible}.w-pop .w-input:not(.w-input--area),.w-pop .w-combo{height:32px}.w-feature-badge{width:52px;height:52px;border-radius:999px;display:grid;place-items:center;color:var(--wa-primary-foreground);background:linear-gradient(135deg,var(--wa-primary),var(--wa-primary-tint, #9277ff));box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-primary) 55%,transparent);margin-bottom:18px}.w-narrow{max-width:420px;margin:0 auto}.w-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.w-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.w-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}@media(max-width:600px){.w-grid-2,.w-grid-3,.w-grid-4{grid-template-columns:1fr}}.w-toast--fixed{position:fixed;bottom:20px;right:20px;z-index:1000}.w-toast--contained{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:20;width:max-content;max-width:calc(100% - 32px)}.w-notif-badge{position:absolute;top:4px;right:4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--wa-error);color:#fff;font:500 9px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--wa-surface)}.w-notif-badge[data-dot]{top:6px;right:6px;min-width:8px;height:8px;padding:0}.w-notif-row{cursor:pointer;padding:12px 16px;border-bottom:.5px solid var(--wa-border)}.w-notif-row[data-unread]{background:var(--wa-surface-subtle)}.w-notif-dot{width:8px;height:8px;border-radius:50%;background:var(--wa-primary);flex:none}.w-btn--icon[data-on]{color:var(--wa-warning)}.w-notif-pop{position:fixed;width:450px;max-width:calc(100vw - 24px);z-index:99999}.w-notif-panel{width:450px;max-width:100%;height:100%;background:var(--wa-surface);overflow:hidden}.w-notif-panel--fill{width:100%}.w-notif-head{padding:12px 16px;border-bottom:.5px solid var(--wa-border)}.w-notif-body{overflow-y:auto;background:var(--wa-surface)}.w-notif-menu{position:absolute;top:48px;right:12px;width:200px;z-index:100000}.w-banner--success{background:var(--wa-success-soft)}.w-banner--success svg{color:var(--wa-success)}@keyframes w-pop{0%{transform:scale(.5);opacity:0}60%{transform:scale(1.06)}to{transform:scale(1);opacity:1}}@keyframes w-ring{0%{transform:scale(.85);opacity:.45}to{transform:scale(1.9);opacity:0}}@keyframes w-draw{to{stroke-dashoffset:0}}@keyframes w-indeterminate{0%{transform:translate(-100%)}to{transform:translate(330%)}}.w-success{position:relative;display:grid;place-items:center;width:56px;height:56px}.w-success .ring{position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:999px;border:1.5px solid var(--wa-success);opacity:0}.w-success .disc{width:52px;height:52px;border-radius:999px;background:var(--wa-success);color:#fff;display:grid;place-items:center;box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-success) 55%,transparent)}.w-success .disc svg{width:26px;height:26px}.w-success--error .ring{border-color:var(--wa-error)}.w-success--error .disc{background:var(--wa-error);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-error) 55%,transparent)}.w-success--info .ring{border-color:var(--wa-info)}.w-success--info .disc{background:var(--wa-info);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-info) 55%,transparent)}.w-progress{position:relative;width:70%;height:3px;border-radius:999px;background:var(--wa-border);overflow:hidden}.w-progress:after{content:"";position:absolute;top:0;left:0;width:30%;height:100%;border-radius:999px;background:var(--wa-primary)}@media(prefers-reduced-motion:no-preference){.w-success .ring{animation:w-ring 1.7s ease-out infinite}.w-success .disc{animation:w-pop .42s cubic-bezier(.2,.9,.3,1.2)}.w-success .disc svg path{stroke-dasharray:26;stroke-dashoffset:26;animation:w-draw .4s .22s ease forwards}.w-progress:after{animation:w-indeterminate 1.15s ease-in-out infinite}}.w-sso-conn{padding-bottom:24px}.w-sso-conn:not(:last-child){margin-bottom:24px;border-bottom:.5px solid var(--wa-border)}.w-sso-detail{display:grid;grid-template-columns:auto 1fr;gap:4px 32px}.w-sso-scim{padding-top:16px;border-top:.5px solid var(--wa-border)}.w-sso-template{padding:12px;background:var(--wa-primary-soft);border-radius:var(--wa-radius);border:.5px solid var(--wa-primary)}.w-sso-check{padding:8px 12px;background:var(--wa-surface);border-radius:var(--wa-radius);border:.5px solid var(--wa-border)}.w-sso-check-mark{min-width:12px}.w-sso-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;transition:border-color .14s ease,background .14s ease}.w-sso-tile:hover{border-color:var(--wa-border-strong);background:var(--wa-surface-subtle)}.w-sso-logo{object-fit:contain;background:var(--wa-surface);padding:4px}.w-sso-logo--ph{background:var(--wa-surface)}.w-token-chip{background:var(--wa-surface-subtle);padding:2px 6px;border-radius:4px;color:var(--wa-text)}.w-disclosure{cursor:pointer;font:400 12.5px/1 var(--wa-font-sans)}.w-disclosure-caret{font-size:9px}.w-break-all{word-break:break-all}.w-col-full{grid-column:1 / -1}.dark .w-card{box-shadow:0 0 0 .5px var(--wa-border),0 2px 4px #0006,0 28px 60px -20px #000000b3}.dark .w-menu,.dark .w-pop,.dark .w-toast,.dark .w-dialog,.dark .w-combo-menu,.dark .w-country-pop{box-shadow:0 1px 2px #00000080,0 18px 44px -14px #000000b3}.dark .w-btn--secondary,.dark .w-social{box-shadow:inset 0 1px #ffffff0d,0 1px 1.5px #1414160a}.w-flex{display:flex}.w-inline{display:inline-flex}.w-items-center{align-items:center}.w-items-start{align-items:flex-start}.w-items-end{align-items:flex-end}.w-justify-start{justify-content:flex-start}.w-justify-center{justify-content:center}.w-justify-end{justify-content:flex-end}.w-justify-between{justify-content:space-between}',X8=Y8`
|
|
100
|
-
${Q8}
|
|
99
|
+
See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`),window[$s]+=1);const J8='.wacht-root{--wa-surface: var(--wa-ov-light-surface, #ffffff);--wa-surface-subtle: var(--wa-ov-light-surface_subtle, #fafaf8);--wa-background: var(--wa-ov-light-background, #f5f5f2);--wa-canvas: var(--wa-ov-light-canvas, #ebebe7);--wa-text: var(--wa-ov-light-text, #161618);--wa-text-secondary: var(--wa-ov-light-text_secondary, #3b3b3f);--wa-text-muted: var(--wa-ov-light-text_muted, #76767c);--wa-text-faint: var(--wa-ov-light-text_faint, #a8a8ad);--wa-border: var(--wa-ov-light-border, rgba(20, 20, 22, .08));--wa-border-strong: var(--wa-ov-light-border_strong, rgba(20, 20, 22, .14));--wa-primary: var(--wa-ov-light-primary, #6b3df5);--wa-primary-soft: var(--wa-ov-light-primary_soft, rgba(107, 61, 245, .1));--wa-primary-foreground: var(--wa-ov-light-primary_foreground, #ffffff);--wa-success: var(--wa-ov-light-success, #0f8a4a);--wa-success-soft: var(--wa-ov-light-success_soft, rgba(15, 138, 74, .12));--wa-info: var(--wa-ov-light-info, #2f6fdb);--wa-info-soft: var(--wa-ov-light-info_soft, rgba(47, 111, 219, .1));--wa-warning: var(--wa-ov-light-warning, #a8650a);--wa-warning-soft: var(--wa-ov-light-warning_soft, rgba(168, 101, 10, .12));--wa-error: var(--wa-ov-light-error, #c4271f);--wa-error-soft: var(--wa-ov-light-error_soft, rgba(196, 39, 31, .1));--wa-radius: var(--wa-ov-light-radius, 6px);--wa-radius-lg: var(--wa-ov-light-radius_lg, 10px);--wa-font-sans: var(--wa-ov-light-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-light-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace;font-family:var(--wa-font-sans)}.dark .wacht-root,.wacht-root.dark{--wa-surface: var(--wa-ov-dark-surface, #131318);--wa-surface-subtle: var(--wa-ov-dark-surface_subtle, #101015);--wa-background: var(--wa-ov-dark-background, #0d0d10);--wa-canvas: var(--wa-ov-dark-canvas, #050507);--wa-text: var(--wa-ov-dark-text, #ececef);--wa-text-secondary: var(--wa-ov-dark-text_secondary, #c5c5cb);--wa-text-muted: var(--wa-ov-dark-text_muted, #8a8a92);--wa-text-faint: var(--wa-ov-dark-text_faint, #57575e);--wa-border: var(--wa-ov-dark-border, rgba(255, 255, 255, .07));--wa-border-strong: var(--wa-ov-dark-border_strong, rgba(255, 255, 255, .14));--wa-primary: var(--wa-ov-dark-primary, #9277ff);--wa-primary-soft: var(--wa-ov-dark-primary_soft, rgba(146, 119, 255, .16));--wa-primary-foreground: var(--wa-ov-dark-primary_foreground, #ffffff);--wa-success: var(--wa-ov-dark-success, #0f8a4a);--wa-success-soft: var(--wa-ov-dark-success_soft, rgba(15, 138, 74, .18));--wa-info: var(--wa-ov-dark-info, #2f6fdb);--wa-info-soft: var(--wa-ov-dark-info_soft, rgba(47, 111, 219, .18));--wa-warning: var(--wa-ov-dark-warning, #a8650a);--wa-warning-soft: var(--wa-ov-dark-warning_soft, rgba(168, 101, 10, .18));--wa-error: var(--wa-ov-dark-error, #c4271f);--wa-error-soft: var(--wa-ov-dark-error_soft, rgba(196, 39, 31, .18));--wa-radius: var(--wa-ov-dark-radius, 6px);--wa-radius-lg: var(--wa-ov-dark-radius_lg, 10px);--wa-font-sans: var(--wa-ov-dark-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-dark-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace}.wacht-root *{box-sizing:border-box}',X8='.w-flex-col{display:flex;flex-direction:column}.w-inline{display:inline-flex;align-items:center}.w-wrap{flex-wrap:wrap}.w-grow{flex:1 1 auto;min-width:0}.w-none{flex:none}.w-full{width:100%}.w-gap-1{gap:4px}.w-gap-2{gap:8px}.w-gap-3{gap:12px}.w-gap-4{gap:16px}.w-gap-5{gap:20px}.w-gap-6{gap:24px}.w-truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-contents{display:contents}.w-h-full{height:100%}.w-minh-full{min-height:100%}.w-mono-sm{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-muted)}.w-text-primary{color:var(--wa-primary)}.w-text-secondary{color:var(--wa-text-secondary)}.w-text-muted{color:var(--wa-text-muted)}.w-text-faint{color:var(--wa-text-faint)}.w-text-error{color:var(--wa-error)}.w-text-success{color:var(--wa-success)}.w-text-warning{color:var(--wa-warning)}.w-mb-4{margin-bottom:16px}.w-mt-6{margin-top:24px}.w-maxw-sm{max-width:340px}.w-rolepick-btn{min-width:120px}.w-combo-menu--pop{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60}.w-relative{position:relative}.w-card{background:var(--wa-surface);border:0;border-radius:var(--wa-radius-lg);box-shadow:0 0 0 .5px var(--wa-border),0 1px 1px #1414160a,0 4px 8px -4px #14141614,0 24px 48px -16px #14141629;overflow:hidden}.w-eyebrow{font:400 10px/1 var(--wa-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--wa-text-faint)}.w-title{font:400 17px/1.25 var(--wa-font-sans);letter-spacing:-.02em;color:var(--wa-text);margin:0}.w-title-lg{font:400 19px/1.2 var(--wa-font-sans);letter-spacing:-.022em;color:var(--wa-text);margin:0}.w-sub{font:400 13px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-sec{font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);margin:0}.w-secsub{font:400 12px/1.45 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-btn{height:32px;padding:0 13px;border-radius:var(--wa-radius);border:.5px solid transparent;font:400 12.5px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .14s ease,border-color .14s ease,filter .14s ease,box-shadow .14s ease;background:transparent;color:var(--wa-text)}.w-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-btn:disabled{opacity:.6;cursor:not-allowed}.w-btn svg{width:14px;height:14px;flex:none}.w-btn.w-notif-bell{width:32px;height:32px}.w-btn.w-notif-bell svg{width:18px;height:18px}.w-btn--primary{background:var(--wa-primary);color:var(--wa-primary-foreground);box-shadow:inset 0 1px #ffffff2e,0 1px 2px #1414161f,0 2px 8px -2px color-mix(in srgb,var(--wa-primary) 50%,transparent);background-image:linear-gradient(180deg,#ffffff1a,#fff0 42%)}.w-btn--primary:active:not(:disabled){filter:brightness(.97);box-shadow:inset 0 1px 2px #14141633}.w-btn--block{width:100%;height:38px;font-size:13px}.w-btn--secondary{background:var(--wa-surface);border-color:var(--wa-border-strong);color:var(--wa-text);box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a}.w-btn--ghost{background:transparent;color:var(--wa-text-secondary)}.w-btn--danger{background:transparent;color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-btn--danger-solid{background:var(--wa-error);color:#fff}.w-btn--sm{height:26px;padding:0 9px;font-size:11.5px}.w-btn--lg{height:42px;padding:0 18px;font-size:13.5px}.w-btn--icon{height:28px;width:28px;padding:0;color:var(--wa-text-muted)}.w-btn--icon:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-social{height:40px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);display:flex;align-items:center;justify-content:center;gap:10px;padding:0 14px;cursor:pointer;position:relative;box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .1s ease}.w-social:active{transform:translateY(.5px)}.w-social:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-social svg,.w-social img{width:17px;height:17px;flex:none}.w-social .w-social-label{flex:none}.w-social .w-lastused{position:absolute;top:-9px;right:12px;white-space:nowrap;font:400 9.5px/1 var(--wa-font-mono);letter-spacing:.04em;color:var(--wa-text-muted);background:var(--wa-surface);border:.5px solid var(--wa-border);padding:3px 6px;border-radius:5px}.w-field{display:flex;flex-direction:column;gap:7px}.w-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);display:flex;align-items:center;gap:4px;letter-spacing:-.005em;white-space:nowrap}.w-req{color:var(--wa-error);font-size:12px}.w-input{height:34px;padding:0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);width:100%;box-shadow:inset 0 1px 2px #1414160d;transition:border-color .14s ease,box-shadow .14s ease}.w-input::placeholder{color:var(--wa-text-faint)}.w-input:focus{outline:none;border-color:var(--wa-primary);box-shadow:inset 0 1px 2px #1414160a,0 0 0 3px var(--wa-primary-soft)}.w-input-row{display:flex;align-items:center;gap:6px}.w-input-trail{margin-left:-34px;z-index:1}.w-input-wrap{position:relative}.w-input--valid:focus{border-color:var(--wa-success);box-shadow:0 0 0 3px var(--wa-success-soft)}.w-input--invalid,.w-input[aria-invalid=true]{border-color:color-mix(in srgb,var(--wa-error) 55%,var(--wa-border-strong))}.w-input--invalid:focus,.w-input[aria-invalid=true]:focus{border-color:var(--wa-error);box-shadow:0 0 0 3px var(--wa-error-soft)}.w-input:disabled,.w-input[data-disabled]{opacity:.55;cursor:not-allowed}.w-input-err{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-error)}.w-input-ok{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-success)}.w-input-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:grid;place-items:center;border:0;background:none;cursor:pointer;color:var(--wa-text-faint);border-radius:6px}.w-input-eye:hover{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-input-eye svg{width:15px;height:15px}.w-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font:400 var(--av-fs, 13px)/1 var(--wa-font-sans);color:#fff;flex:none;background:var(--av-bg, linear-gradient(135deg, #6b3df5, #9277ff));box-shadow:inset 0 0 0 .5px #ffffff29;letter-spacing:.01em;overflow:hidden}.w-avatar img{width:100%;height:100%;object-fit:cover}.w-avatar--square{border-radius:var(--wa-radius)}.w-avatar--sm{width:20px;height:20px;font-size:10px}.w-avatar--md{width:28px;height:28px;font-size:11px}.w-avatar--lg{width:44px;height:44px;font-size:15px}.w-avatar--xl{width:80px;height:80px;font-size:24px}.w-avatar-edit{position:relative;cursor:pointer;border:0;padding:0}.w-avatar-edit .w-avatar-veil{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;display:grid;place-items:center;color:#fff;background:color-mix(in srgb,#000 45%,transparent);opacity:0;transition:opacity .15s ease;font:400 11px/1.2 var(--wa-font-sans);text-align:center;padding:0 6px}.w-avatar-edit:hover .w-avatar-veil,.w-avatar-edit[data-busy] .w-avatar-veil{opacity:1}.w-avatar-veil svg{width:18px;height:18px}.w-pill{display:inline-flex;align-items:center;gap:6px;height:21px;padding:0 8px;border-radius:4px;font:400 10.5px/1 var(--wa-font-mono);text-transform:lowercase;letter-spacing:.01em;background:var(--wa-surface-subtle);color:var(--wa-text-muted);border:.5px solid var(--wa-border);white-space:nowrap;flex:none}.w-pill .w-dot{width:5px;height:5px;border-radius:999px;background:var(--wa-text-faint)}.w-pill--success{background:var(--wa-success-soft);color:var(--wa-success);border-color:color-mix(in srgb,var(--wa-success) 26%,transparent)}.w-pill--success .w-dot{background:var(--wa-success)}.w-pill--warning{background:var(--wa-warning-soft);color:var(--wa-warning);border-color:color-mix(in srgb,var(--wa-warning) 26%,transparent)}.w-pill--warning .w-dot{background:var(--wa-warning)}.w-pill--info{background:var(--wa-info-soft);color:var(--wa-info);border-color:color-mix(in srgb,var(--wa-info) 26%,transparent)}.w-pill--info .w-dot{background:var(--wa-info)}.w-pill--current{background:var(--wa-primary-soft);color:var(--wa-primary);border-color:color-mix(in srgb,var(--wa-primary) 26%,transparent)}.w-pill--error{background:var(--wa-error-soft);color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-pill--error .w-dot{background:var(--wa-error)}.w-pill--pending{background:transparent;color:var(--wa-warning);border:.5px dashed color-mix(in srgb,var(--wa-warning) 55%,transparent)}.w-pill--pending .w-dot{background:var(--wa-warning)}.w-chip{display:inline-flex;align-items:center;gap:7px;height:24px;padding:0 5px 0 9px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary)}.w-chip-x{display:grid;place-items:center;width:16px;height:16px;border-radius:3px;color:var(--wa-text-faint);cursor:pointer}.w-chip-x:hover{background:var(--wa-border);color:var(--wa-text)}.w-chip-x svg{width:11px;height:11px}.w-or{display:flex;align-items:center;gap:14px;margin:18px 0}.w-or:before,.w-or:after{content:"";height:.5px;background:var(--wa-border);flex:1}.w-or span{font:400 10px/1 var(--wa-font-mono);letter-spacing:.14em;color:var(--wa-text-faint)}.w-hr{height:.5px;background:var(--wa-border);border:0;margin:0;width:100%}.w-list{display:flex;flex-direction:column}.w-listhead{display:grid;align-items:center;padding:0 2px 8px;font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);border-bottom:.5px solid var(--wa-border)}.w-row{display:grid;align-items:center;padding:13px 2px;border-bottom:.5px solid var(--wa-border)}.w-row:last-child{border-bottom:0}.w-row--hover{border-radius:var(--wa-radius);margin:0 -8px;padding:11px 10px;border-bottom:0;transition:background .12s ease}.w-row--hover:hover{background:var(--wa-surface-subtle)}.w-acct{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:11px 12px;border:.5px solid transparent;border-radius:var(--wa-radius-lg);background:none;cursor:pointer;transition:background .13s ease,border-color .13s ease}.w-acct:hover{background:var(--wa-surface-subtle)}.w-acct[data-active]{background:var(--wa-surface-subtle);border-color:var(--wa-border)}.w-acct .w-acct-go{color:var(--wa-text-faint);flex:none;opacity:0;transform:translate(-4px);transition:opacity .13s ease,transform .13s ease}.w-acct:hover .w-acct-go{opacity:1;transform:none;color:var(--wa-text-muted)}.w-acct[data-busy]{opacity:.55;pointer-events:none}.w-acct-list{border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden;margin-bottom:18px}.w-acct-list-head{padding:11px 14px;border-bottom:.5px solid var(--wa-border)}.w-acct-list-body{padding:6px}.w-acct-text{flex:1;min-width:0;text-align:left}.w-acct-name{display:block;font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct-text .w-secsub{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct .w-avatar{width:34px;height:34px;flex:none}.w-acct[data-active] .w-avatar{width:40px;height:40px}.w-acct-add-ic{width:36px;height:36px;border-radius:50%;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);display:grid;place-items:center;color:var(--wa-text-muted);flex:none;transition:color .13s ease,border-color .13s ease}.w-acct--add:hover .w-acct-add-ic{color:var(--wa-text);border-color:var(--wa-text-muted)}.w-acct-out{color:var(--wa-text-faint);flex:none;margin-right:-6px}.w-acct-out:hover{color:var(--wa-error);background:var(--wa-error-soft)}.w-acct--add:hover{background:var(--wa-surface-subtle)}.w-acct-foot{margin-top:8px;padding-top:10px}.w-acct-add{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:36px;border:0;background:none;cursor:pointer;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);transition:background .13s ease,color .13s ease}.w-acct-add svg{width:15px;height:15px}.w-acct-add:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-tabs{display:flex;gap:2px}.w-tab{display:inline-flex;align-items:center;gap:7px;height:30px;flex:none;white-space:nowrap;padding:0 12px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;transition:color .14s ease,background .14s ease}.w-tab svg{width:14px;height:14px}.w-tab:hover,.w-tab--active{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-tab--active svg{color:var(--wa-primary)}.w-menu{width:264px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-menu-head{display:flex;align-items:center;gap:11px;padding:11px 9px}.w-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;height:32px;padding:0 8px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;transition:background .12s ease;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-menu-item:hover{background:var(--wa-surface-subtle)}.w-menu-item svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-menu-item--danger{color:var(--wa-error)}.w-menu-item--danger svg{color:var(--wa-error)}.w-menu-item--danger:hover{background:var(--wa-error-soft)}.w-menu-trail{margin-left:auto;font:400 10.5px/1 var(--wa-font-mono);color:var(--wa-text-faint)}.w-menu-label{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:10px 9px 5px}.w-orgtrigger{display:flex;align-items:center;gap:9px;width:100%;height:40px;padding:0 9px;border:0;border-radius:var(--wa-radius);background:transparent;color:var(--wa-text);cursor:pointer;font:400 13px/1 var(--wa-font-sans);text-align:left;transition:background .12s ease}.w-orgtrigger:hover,.w-orgtrigger[data-open]{background:var(--wa-surface-subtle)}.w-orgtrigger:disabled{opacity:.6;cursor:default}.w-orgtrigger>svg{color:var(--wa-text-faint);flex:none}.w-switch-body{overflow-y:auto;padding:4px 0}.w-switch-banner{margin:8px 8px 0}.w-switch-nest{display:flex;flex-direction:column;margin:2px 0 6px 24px;padding-left:8px;border-left:.5px solid var(--wa-border)}.w-menu-item--muted{color:var(--wa-text-muted)}.w-menu-item--muted svg{color:var(--wa-text-muted)}.w-rowact{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:5px;color:var(--wa-text-muted);cursor:pointer}.w-rowact:hover{color:var(--wa-text);background:var(--wa-border)}.w-rowact svg{width:13px;height:13px}.w-danger{border:.5px solid color-mix(in srgb,var(--wa-error) 30%,transparent);background:var(--wa-error-soft);border-radius:var(--wa-radius);padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:20px}.w-link{color:var(--wa-text);font-weight:400;cursor:pointer;text-decoration:none}.w-link--sm{font-size:12px}.w-link:hover{text-decoration:underline}.w-link--muted{color:var(--wa-text-muted)}.w-mono-faint{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-faint)}@keyframes w-spin{to{transform:rotate(360deg)}}.w-spin{display:inline-block;border-radius:50%;border:2px solid var(--wa-border-strong);border-top-color:var(--wa-primary);animation:w-spin .7s linear infinite}.w-spin--on-accent{border-color:#ffffff59;border-top-color:#fff}.w-loading{display:grid;place-items:center;gap:14px;padding:40px;text-align:center}.w-otp{display:flex;gap:8px}.w-otp .w-otp-cell{width:42px;height:48px;text-align:center;font:400 20px/1 var(--wa-font-mono);color:var(--wa-text);border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);display:grid;place-items:center}.w-otp .w-otp-cell[data-active],.w-otp .w-otp-cell:focus{outline:none;border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-otp .w-otp-cell[data-filled]{border-color:var(--wa-text-muted)}.w-otp[data-error] .w-otp-cell{border-color:color-mix(in srgb,var(--wa-error) 50%,var(--wa-border-strong))}.w-otp-caret{width:1.5px;height:22px;background:var(--wa-primary);animation:w-blink 1s steps(1) infinite}@keyframes w-blink{50%{opacity:0}}.w-addr-badge{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 6px 0 12px;border-radius:999px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary)}.w-addr-badge button{border:0;background:none;cursor:pointer;color:var(--wa-primary);font:400 12px/1 var(--wa-font-sans);padding:4px 8px;border-radius:6px}.w-addr-badge button:hover{background:var(--wa-primary-soft)}.w-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:48px 24px}.w-empty .w-empty-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary)}.w-empty .w-empty-ic svg{width:20px;height:20px;color:var(--wa-primary)}.w-empty-text{display:flex;flex-direction:column;gap:4px}.w-empty h4{margin:0;font:500 14px/1.4 var(--wa-font-sans);color:var(--wa-text)}.w-empty p{margin:0;font:400 12px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);max-width:384px;text-wrap:pretty}.w-empty-action{margin-top:4px}.w-empty--fill{height:100%}.w-empty-ic--accent{width:44px;height:44px}.w-toast{display:inline-flex;align-items:center;gap:11px;padding:11px 13px 11px 14px;border-radius:var(--wa-radius-lg);background:var(--wa-surface);border:.5px solid var(--wa-border);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;min-width:280px;max-width:380px}.w-toast .w-toast-ic{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none}.w-toast .w-toast-ic svg{width:12px;height:12px}.w-toast--success .w-toast-ic{background:var(--wa-success-soft);color:var(--wa-success)}.w-toast--error .w-toast-ic{background:var(--wa-error-soft);color:var(--wa-error)}.w-toast-msg{flex:1;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text)}.w-toast-x{border:0;background:none;cursor:pointer;color:var(--wa-text-faint);width:22px;height:22px;border-radius:6px;display:grid;place-items:center;flex:none}.w-toast-x:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-toast-x svg{width:12px;height:12px}.w-pop{width:320px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-pop-body{padding:15px 15px 13px;display:flex;flex-direction:column;gap:11px}.w-pop-title{margin:0;font:400 13.5px/1.3 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-pop-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-pop-title+.w-pop-sub{margin-top:-7px}.w-pop-foot{display:flex;gap:8px;justify-content:flex-end;padding:10px 14px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-pop-foot .w-btn{width:auto}.w-pop-icon{width:38px;height:38px;border-radius:var(--wa-radius);display:grid;place-items:center;flex:none}.w-pop-icon--danger{background:var(--wa-error-soft);color:var(--wa-error)}.w-pop-icon--warn{background:var(--wa-warning-soft);color:var(--wa-warning)}.w-pop-icon svg{width:18px;height:18px}.w-locked{display:flex;align-items:center;gap:10px;height:38px;padding:0 8px 0 13px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-locked .w-locked-ic{color:var(--wa-text-faint);flex:none}.w-locked .w-locked-ic svg{width:15px;height:15px;display:block}.w-locked .w-locked-val{flex:1;font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-restricted{opacity:.55;cursor:not-allowed}.w-restricted *{pointer-events:none}.w-warn-ic{color:var(--wa-warning);display:inline-grid;place-items:center}.w-warn-ic svg{width:15px;height:15px}.w-codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border)}.w-codes span{font:400 13px/1.6 var(--wa-font-mono);color:var(--wa-text);text-align:center;letter-spacing:.04em}.w-qr{width:148px;height:148px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface);display:grid;place-items:center;color:var(--wa-text)}.w-banner{display:flex;gap:11px;padding:12px 14px;border-radius:var(--wa-radius);align-items:flex-start}.w-banner svg{width:16px;height:16px;flex:none;margin-top:1px}.w-banner-txt{font:400 12.5px/1.5 var(--wa-font-sans);text-wrap:pretty;color:var(--wa-text-secondary)}.w-banner--error{background:var(--wa-error-soft)}.w-banner--warn{background:var(--wa-warning-soft)}.w-banner--info{background:var(--wa-info-soft)}.w-banner--error svg{color:var(--wa-error)}.w-banner--warn svg{color:var(--wa-warning)}.w-banner--info svg{color:var(--wa-info)}.w-seg{display:inline-flex;padding:3px;gap:2px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-seg button{height:28px;padding:0 12px;border:0;background:none;cursor:pointer;border-radius:4px;font:400 12px/1 var(--wa-font-sans);color:var(--wa-text-muted);white-space:nowrap}.w-seg button[data-on]{background:var(--wa-surface);color:var(--wa-text);box-shadow:0 0 0 .5px var(--wa-border)}.w-steps{display:flex;gap:6px;justify-content:center}.w-steps i{width:5px;height:5px;border-radius:999px;background:var(--wa-border-strong);transition:background .2s ease,width .2s ease}.w-steps i[data-on]{background:var(--wa-primary);width:16px}.w-ibadge{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary);overflow:hidden}.w-ibadge svg{width:24px;height:24px}.w-ibadge img{width:100%;height:100%;object-fit:cover}.w-ibadge--done{width:52px;height:52px;border-radius:999px;background:var(--wa-success-soft);color:var(--wa-success)}.w-ibadge--done svg{width:26px;height:26px}.w-ibadge-wrap{position:relative}.w-ibadge-x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;display:grid;place-items:center;border-radius:999px;border:.5px solid var(--wa-border);background:var(--wa-surface);color:var(--wa-text-muted);cursor:pointer;box-shadow:0 1px 2px #1414161f}.w-ibadge-x svg{width:11px;height:11px}.w-create-foot{padding:13px 32px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle);text-align:center}.w-create-summary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:12px 16px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-auth-card{width:min(440px,100%)}.w-auth-head{display:flex;flex-direction:column;align-items:center;gap:14px;margin-bottom:24px}.w-auth-head-text{display:flex;flex-direction:column;gap:6px;text-align:center}.w-auth-title{margin:0;font:400 21px/1.2 var(--wa-font-sans);letter-spacing:-.025em;color:var(--wa-text)}.w-auth-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-auth-status{display:flex;flex-direction:column;align-items:center;gap:16px;padding-top:4px;text-align:center}.w-auth-foot{font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted)}.w-fineprint{margin:2px 2px 0;font:400 11px/1.5 var(--wa-font-sans);color:var(--wa-text-faint);text-align:center;text-wrap:pretty}.w-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.w-switch .w-switch-track{width:36px;height:20px;border-radius:999px;background:var(--wa-border-strong);border:.5px solid transparent;position:relative;transition:background .16s ease;flex:none}.w-switch .w-switch-knob{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #00000040;transition:transform .16s ease}.w-switch[data-on] .w-switch-track{background:var(--wa-primary)}.w-switch[data-on] .w-switch-knob{transform:translate(16px)}.w-switch-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text)}.w-search{display:flex;align-items:center;gap:8px;height:32px;width:240px;max-width:100%;padding:0 11px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface)}.w-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}.w-search svg{width:15px;height:15px;color:var(--wa-text-faint);flex:none}.w-search input{border:0;background:none;outline:none;flex:1;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-search input::placeholder{color:var(--wa-text-faint)}.w-combo{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px 0 12px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);transition:border-color .14s ease}.w-combo:hover{border-color:var(--wa-text-muted)}.w-combo[data-open]{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-combo .w-combo-val{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-combo .w-combo-val[data-ph]{color:var(--wa-text-faint)}.w-combo svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-combo-menu{width:100%;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-combo-opt{display:flex;align-items:center;justify-content:flex-start;gap:9px;height:30px;padding:0 8px;border-radius:5px;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-combo-opt>svg{width:15px;height:15px;flex:none;color:var(--wa-text-muted)}.w-combo-opt:hover{background:var(--wa-surface-subtle)}.w-combo-opt .w-combo-check{margin-left:auto;color:var(--wa-primary);display:grid;place-items:center}.w-combo-opt .w-combo-check svg{width:14px;height:14px}.w-combo-opt[data-disabled]{opacity:.5;cursor:not-allowed}.w-combo-grp{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:9px 9px 5px}.w-phone{display:flex;align-items:stretch;gap:0;width:100%}.w-phone .w-phone-cc{display:flex;align-items:center;gap:7px;height:34px;padding:0 10px;border:.5px solid var(--wa-border-strong);border-right:0;border-radius:var(--wa-radius) 0 0 var(--wa-radius);background:var(--wa-surface-subtle);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap}.w-phone .w-phone-cc svg{width:13px;height:13px;color:var(--wa-text-muted)}.w-phone input{flex:1;height:34px;padding:0 12px;border:.5px solid var(--wa-border-strong);border-radius:0 var(--wa-radius) var(--wa-radius) 0;background:var(--wa-surface);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);outline:none;min-width:0}.w-phone input:focus{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft);position:relative}.w-flag{width:18px;height:13px;border-radius:2px;display:inline-block;flex:none;box-shadow:inset 0 0 0 .5px #00000026}.w-country-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:50;width:260px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-country-search{display:flex;align-items:center;gap:8px;padding:9px 11px;border-bottom:.5px solid var(--wa-border)}.w-country-search svg{width:14px;height:14px;color:var(--wa-text-faint);flex:none}.w-country-search input{border:0;background:none;outline:none;flex:1;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-country-search input::placeholder{color:var(--wa-text-faint)}.w-country-list{max-height:220px;overflow-y:auto;padding:5px}.w-country-opt{display:flex;align-items:center;gap:9px;height:32px;padding:0 9px;border-radius:5px;cursor:pointer;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);width:100%;border:0;background:none;text-align:left}.w-country-opt:hover{background:var(--wa-surface-subtle)}.w-country-opt .dial{margin-left:auto;color:var(--wa-text-muted);font:400 12px/1 var(--wa-font-mono);flex:none}.w-method-stack{display:flex;flex-direction:column;gap:10px}.w-method{display:flex;align-items:center;gap:13px;width:100%;padding:13px 14px;border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;text-align:left;transition:background .14s ease,border-color .14s ease}.w-method .w-method-ic{width:34px;height:34px;border-radius:var(--wa-radius);display:grid;place-items:center;background:var(--wa-surface-subtle);color:var(--wa-text-secondary);flex:none}.w-method .w-method-ic svg{width:17px;height:17px}.w-method .w-method-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.w-method .w-method-title{font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text)}.w-method .w-method-desc{font:400 12px/1.4 var(--wa-font-sans);color:var(--wa-text-muted)}.w-method .w-method-go{color:var(--wa-text-faint);flex:none}.w-method .w-method-go svg{width:16px;height:16px}.w-method[data-disabled]{opacity:.5;cursor:not-allowed}.w-overlay{position:relative;width:100%;height:100%;background:color-mix(in srgb,#000 38%,transparent);display:grid;place-items:center;border-radius:inherit}.w-dialog{background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;width:100%;max-width:480px;overflow:hidden;display:flex;flex-direction:column}.w-dialog--panel{display:block;width:880px;max-width:100%;height:min(560px,calc(100dvh - 40px));overflow-y:auto}.w-dialog--panel .w-card{background:transparent;border-radius:0;box-shadow:none}@media(max-width:640px){.w-dialog--panel{height:calc(100dvh - 16px)}}.w-dialog--create{background:transparent;border:0;box-shadow:none;width:440px;max-width:100%;align-items:center;scrollbar-gutter:stable both-edges}.w-create-card{width:440px;max-width:100%}.w-create-body{padding:34px 32px 28px}.w-create-head{margin-bottom:24px}.w-create-steps{margin-bottom:22px}.w-text-center{text-align:center}.w-linkbtn{background:none;border:0;padding:0;cursor:pointer}.w-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#08080c80;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;justify-content:center;align-items:center;padding:20px;z-index:99999}@media(max-width:640px){.w-modal{padding:8px}}.w-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:.5px solid var(--wa-border)}.w-dialog-title{margin:0;font:400 15px/1.2 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-dialog-body{padding:20px;display:flex;flex-direction:column;gap:14px}.w-dialog-foot{display:flex;gap:8px;justify-content:flex-end;padding:14px 20px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-vtabs{display:flex;flex-direction:column;gap:2px}.w-vtab{display:flex;align-items:center;gap:10px;height:34px;padding:0 11px;border-radius:var(--wa-radius);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;text-align:left;width:100%}.w-vtab svg{width:15px;height:15px}.w-vtab:hover,.w-vtab[data-on]{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-vtab[data-on] svg{color:var(--wa-primary)}@keyframes w-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.w-skel{border-radius:6px;background:linear-gradient(90deg,var(--wa-surface-subtle) 25%,var(--wa-border) 37%,var(--wa-surface-subtle) 63%);background-size:200% 100%;animation:w-shimmer 1.4s ease infinite}.w-auth-skel{display:flex;flex-direction:column;gap:22px}.w-auth-skel-head{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:2px}.w-auth-skel-fields{display:flex;flex-direction:column;gap:15px}.w-auth-skel-field{display:flex;flex-direction:column;gap:7px}.w-skel-avatar{width:44px;height:44px;border-radius:50%}.w-skel-line{height:10px}.w-skel-title{height:16px;width:56%}.w-skel-sub{height:11px;width:78%}.w-skel-label{height:9px;width:34%}.w-skel-input{height:38px;border-radius:var(--wa-radius)}.w-skel-btn{height:38px;border-radius:var(--wa-radius);margin-top:3px}.w-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden}.w-table thead{background:var(--wa-surface-subtle)}.w-table th{text-align:left;padding:9px 16px;font:400 11px/1 var(--wa-font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--wa-text-faint);white-space:nowrap;border-bottom:.5px solid var(--wa-border)}.w-table th:last-child{text-align:right}.w-table td{padding:11px 16px;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text-secondary);vertical-align:middle;white-space:nowrap}.w-table tbody tr{transition:background .12s ease}.w-table tbody tr:not(:last-child) td{border-bottom:.5px solid var(--wa-border)}.w-table tbody tr:hover td{background:var(--wa-surface-subtle)}.w-table tbody tr:last-child td:last-child{overflow:visible}.w-td--flex>div{display:flex;align-items:center;gap:10px}.w-td--actions{text-align:right;width:auto;white-space:nowrap;position:relative;overflow:visible}.w-td--actions>*{width:fit-content;margin-left:auto}.w-td--actions>[data-dropdown-trigger]{display:inline-flex;width:fit-content;margin-left:auto}.w-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}.w-kebab{width:28px;height:28px;border-radius:6px;border:0;background:none;cursor:pointer;color:var(--wa-text-muted);display:grid;place-items:center}.w-kebab:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-kebab svg{width:16px;height:16px}.w-token{display:flex;align-items:center;gap:8px;height:36px;padding:0 6px 0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-token code{flex:1;font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-page-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 22px}.w-tabsbar{flex:none;padding:0 22px;border-bottom:.5px solid var(--wa-border);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.w-tabsbar::-webkit-scrollbar{display:none}.w-tabbody{flex:1;min-height:0;padding:20px 22px;overflow-y:auto;overflow-x:auto}.w-tabpane{min-width:300px}.w-card-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px 20px}.w-card-body{padding:16px 20px}.w-card-foot{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;padding:14px 20px;border-top:.5px solid var(--wa-border)}.w-sechead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.w-iconbox{width:22px;height:22px;flex:none;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}.w-iconbox svg,.w-iconbox img{width:22px;height:22px;display:block}.w-vrow{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0}.w-vrow:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-row-act-top{align-self:flex-start;margin-top:20px}.w-rowitem{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px}.w-rowitem:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-aside-copy{max-width:220px;text-align:center}.w-split{display:flex;min-height:400px;border-radius:var(--wa-radius-lg);overflow:hidden;border:.5px solid var(--wa-border);background:var(--wa-surface)}.w-split-aside{width:35%;min-width:200px;flex:none;background:var(--wa-surface-subtle);border-right:.5px solid var(--wa-border);padding:28px;display:flex;flex-direction:column;gap:14px}.w-split-main{flex:1;min-width:0;padding:28px;display:flex;flex-direction:column;gap:16px}@media(max-width:600px){.w-split{flex-direction:column}.w-split-aside{width:100%;border-right:0;border-bottom:.5px solid var(--wa-border)}}.w-listrow{display:flex;align-items:center;gap:12px;width:100%;padding:12px 0;text-align:left;border:0;border-bottom:.5px solid var(--wa-border);background:transparent;cursor:pointer;transition:background .12s ease}.w-listrow:last-child{border-bottom:0}.w-listrow:hover{background:var(--wa-surface-subtle)}.w-listrow:disabled{opacity:.6;cursor:not-allowed}.w-tile{border:.5px solid var(--wa-border);border-radius:var(--wa-radius);padding:12px;background:var(--wa-surface-subtle)}.w-input--area{min-height:80px;padding-top:9px;padding-bottom:9px;resize:vertical;line-height:1.5}.w-input--mono{font-family:var(--wa-font-mono)}.w-pop--wide{width:372px;max-width:calc(100vw - 24px);overflow:visible}.w-pop .w-input:not(.w-input--area),.w-pop .w-combo{height:32px}.w-feature-badge{width:52px;height:52px;border-radius:999px;display:grid;place-items:center;color:var(--wa-primary-foreground);background:linear-gradient(135deg,var(--wa-primary),var(--wa-primary-tint, #9277ff));box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-primary) 55%,transparent);margin-bottom:18px}.w-narrow{max-width:420px;margin:0 auto}.w-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.w-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.w-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}@media(max-width:600px){.w-grid-2,.w-grid-3,.w-grid-4{grid-template-columns:1fr}}.w-toast--fixed{position:fixed;bottom:20px;right:20px;z-index:1000}.w-toast--contained{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:20;width:max-content;max-width:calc(100% - 32px)}.w-notif-badge{position:absolute;top:4px;right:4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--wa-error);color:#fff;font:500 9px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--wa-surface)}.w-notif-badge[data-dot]{top:6px;right:6px;min-width:8px;height:8px;padding:0}.w-notif-row{cursor:pointer;padding:12px 16px;border-bottom:.5px solid var(--wa-border)}.w-notif-row[data-unread]{background:var(--wa-surface-subtle)}.w-notif-dot{width:8px;height:8px;border-radius:50%;background:var(--wa-primary);flex:none}.w-btn--icon[data-on]{color:var(--wa-warning)}.w-notif-pop{position:fixed;width:450px;max-width:calc(100vw - 24px);z-index:99999}.w-notif-panel{width:450px;max-width:100%;height:100%;background:var(--wa-surface);overflow:hidden}.w-notif-panel--fill{width:100%}.w-notif-head{padding:12px 16px;border-bottom:.5px solid var(--wa-border)}.w-notif-body{overflow-y:auto;background:var(--wa-surface)}.w-notif-menu{position:absolute;top:48px;right:12px;width:200px;z-index:100000}.w-banner--success{background:var(--wa-success-soft)}.w-banner--success svg{color:var(--wa-success)}@keyframes w-pop{0%{transform:scale(.5);opacity:0}60%{transform:scale(1.06)}to{transform:scale(1);opacity:1}}@keyframes w-ring{0%{transform:scale(.85);opacity:.45}to{transform:scale(1.9);opacity:0}}@keyframes w-draw{to{stroke-dashoffset:0}}@keyframes w-indeterminate{0%{transform:translate(-100%)}to{transform:translate(330%)}}.w-success{position:relative;display:grid;place-items:center;width:56px;height:56px}.w-success .ring{position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:999px;border:1.5px solid var(--wa-success);opacity:0}.w-success .disc{width:52px;height:52px;border-radius:999px;background:var(--wa-success);color:#fff;display:grid;place-items:center;box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-success) 55%,transparent)}.w-success .disc svg{width:26px;height:26px}.w-success--error .ring{border-color:var(--wa-error)}.w-success--error .disc{background:var(--wa-error);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-error) 55%,transparent)}.w-success--info .ring{border-color:var(--wa-info)}.w-success--info .disc{background:var(--wa-info);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-info) 55%,transparent)}.w-progress{position:relative;width:70%;height:3px;border-radius:999px;background:var(--wa-border);overflow:hidden}.w-progress:after{content:"";position:absolute;top:0;left:0;width:30%;height:100%;border-radius:999px;background:var(--wa-primary)}@media(prefers-reduced-motion:no-preference){.w-success .ring{animation:w-ring 1.7s ease-out infinite}.w-success .disc{animation:w-pop .42s cubic-bezier(.2,.9,.3,1.2)}.w-success .disc svg path{stroke-dasharray:26;stroke-dashoffset:26;animation:w-draw .4s .22s ease forwards}.w-progress:after{animation:w-indeterminate 1.15s ease-in-out infinite}}.w-sso-conn{padding-bottom:24px}.w-sso-conn:not(:last-child){margin-bottom:24px;border-bottom:.5px solid var(--wa-border)}.w-sso-detail{display:grid;grid-template-columns:auto 1fr;gap:4px 32px}.w-sso-scim{padding-top:16px;border-top:.5px solid var(--wa-border)}.w-sso-template{padding:12px;background:var(--wa-primary-soft);border-radius:var(--wa-radius);border:.5px solid var(--wa-primary)}.w-sso-check{padding:8px 12px;background:var(--wa-surface);border-radius:var(--wa-radius);border:.5px solid var(--wa-border)}.w-sso-check-mark{min-width:12px}.w-sso-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;transition:border-color .14s ease,background .14s ease}.w-sso-tile:hover{border-color:var(--wa-border-strong);background:var(--wa-surface-subtle)}.w-sso-logo{object-fit:contain;background:var(--wa-surface);padding:4px}.w-sso-logo--ph{background:var(--wa-surface)}.w-token-chip{background:var(--wa-surface-subtle);padding:2px 6px;border-radius:4px;color:var(--wa-text)}.w-disclosure{cursor:pointer;font:400 12.5px/1 var(--wa-font-sans)}.w-disclosure-caret{font-size:9px}.w-break-all{word-break:break-all}.w-col-full{grid-column:1 / -1}.dark .w-card{box-shadow:0 0 0 .5px var(--wa-border),0 2px 4px #0006,0 28px 60px -20px #000000b3}.dark .w-menu,.dark .w-pop,.dark .w-toast,.dark .w-dialog,.dark .w-combo-menu,.dark .w-country-pop{box-shadow:0 1px 2px #00000080,0 18px 44px -14px #000000b3}.dark .w-btn--secondary,.dark .w-social{box-shadow:inset 0 1px #ffffff0d,0 1px 1.5px #1414160a}.w-flex{display:flex}.w-inline{display:inline-flex}.w-items-center{align-items:center}.w-items-start{align-items:flex-start}.w-items-end{align-items:flex-end}.w-justify-start{justify-content:flex-start}.w-justify-center{justify-content:center}.w-justify-end{justify-content:flex-end}.w-justify-between{justify-content:space-between}',em=Q8`
|
|
101
100
|
${J8}
|
|
102
|
-
`,em={display:"contents"};function tm(e){const a={};if(!e)return a;const s=(n,i)=>{if(i)for(const l in i){const m=i[l];typeof m=="string"&&m.trim()!==""&&(a[`--wa-ov-${n}-${l}`]=m)}};return s("light",e.light),s("dark",e.dark),a}const Ni=o.createContext(!1),am=o.memo(function(){return t.jsx(X8,{})});function Me({children:e,className:a,style:s,...n}){var h,f;const i=o.useContext(Ni),l=o.useContext(hr),m=(f=(h=l==null?void 0:l.deployment)==null?void 0:h.ui_settings)==null?void 0:f.theme_tokens,c=o.useMemo(()=>tm(m),[m]),[d,p]=o.useState(!1);if(o.useEffect(()=>p(!0),[]),!d)return null;const u=t.jsx("div",{...n,className:a?`wacht-root ${a}`:"wacht-root",style:{...em,...c,...s},children:e});return i?u:t.jsxs(Ni.Provider,{value:!0,children:[t.jsx(am,{}),u]})}function xa({length:e=6,onComplete:a,onResend:s,error:n,isSubmitting:i=!1}){const[l,m]=o.useState(new Array(e).fill("")),[c,d]=o.useState(60),[p,u]=o.useState(!1),h=o.useRef([]),f=o.useCallback(()=>{const _=setInterval(()=>{d(v=>v<=1?(u(!0),clearInterval(_),0):v-1)},1e3);return _},[]);o.useEffect(()=>{const _=f();return()=>clearInterval(_)},[f]);const g=async()=>{var _;!p||i||!s||(await s(),u(!1),d(60),m(new Array(e).fill("")),(_=h.current[0])==null||_.focus(),f())},x=(_,v)=>{var C;if(i)return;const k=_.value,N=[...l];N[v]=k.replace(/[^0-9]/g,""),m(N);const j=N.join("");j.length===e&&a(j),k&&v<e-1&&((C=h.current[v+1])==null||C.focus())},w=(_,v)=>{var k;i||_.key==="Backspace"&&!l[v]&&v>0&&((k=h.current[v-1])==null||k.focus())},b=(_,v)=>{var C,y;if(i)return;_.preventDefault();const k=_.clipboardData.getData("text/plain").replace(/[^0-9]/g,"").slice(0,e);if(!k.length)return;const N=[...l];for(let E=0;E<k.length&&v+E<e;E++)N[v+E]=k[E];if(v===0&&k.length===e)for(let E=0;E<e;E++)N[E]=k[E];m(N);const j=N.join("");if(j.length===e)a(j),(C=h.current[e-1])==null||C.focus();else{const E=N.findIndex((R,F)=>F>=v&&!R);E!==-1&&((y=h.current[E])==null||y.focus())}};return t.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:16},children:[t.jsx("div",{className:"w-otp","data-error":n?"":void 0,children:l.map((_,v)=>t.jsx("input",{className:"w-otp-cell",type:"text",inputMode:"numeric",maxLength:1,value:_,"data-filled":_?"":void 0,onChange:k=>x(k.target,v),onKeyDown:k=>w(k,v),onPaste:k=>b(k,v),ref:k=>{h.current[v]=k},disabled:i,autoFocus:v===0},v))}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[n&&t.jsx("span",{className:"w-input-err",children:n}),s&&(p?t.jsx("button",{type:"button",className:"w-link",style:{background:"none",border:0,cursor:"pointer",fontSize:12.5},onClick:g,disabled:i,children:"Didn't receive a code? Resend"}):t.jsxs("span",{className:"w-secsub",children:["Resend code in ",c,"s"]}))]})]})}const vc=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-labelledby":"githubIconTitle",...e,children:[t.jsx("title",{id:"githubIconTitle",children:"GitHub"}),t.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.109-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.91 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})]}),bc=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#4285F4",d:"M14.9 8.161c0-.476-.039-.954-.121-1.422h-6.64v2.695h3.802a3.24 3.24 0 01-1.407 2.127v1.75h2.269c1.332-1.22 2.097-3.02 2.097-5.15z"}),t.jsx("path",{fill:"#34A853",d:"M8.14 15c1.898 0 3.499-.62 4.665-1.69l-2.268-1.749c-.631.427-1.446.669-2.395.669-1.836 0-3.393-1.232-3.952-2.888H1.85v1.803A7.044 7.044 0 008.14 15z"}),t.jsx("path",{fill:"#FBBC04",d:"M4.187 9.342a4.17 4.17 0 010-2.68V4.859H1.849a6.97 6.97 0 000 6.286l2.338-1.803z"}),t.jsx("path",{fill:"#EA4335",d:"M8.14 3.77a3.837 3.837 0 012.7 1.05l2.01-1.999a6.786 6.786 0 00-4.71-1.82 7.042 7.042 0 00-6.29 3.858L4.186 6.66c.556-1.658 2.116-2.89 3.952-2.89z"})]}),yc=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"50",height:"50",viewBox:"0 0 50 50",...e,children:t.jsx("path",{d:"M 6.9199219 6 L 21.136719 26.726562 L 6.2285156 44 L 9.40625 44 L 22.544922 28.777344 L 32.986328 44 L 43 44 L 28.123047 22.3125 L 42.203125 6 L 39.027344 6 L 26.716797 20.261719 L 16.933594 6 L 6.9199219 6 z"})}),sm=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),jc=()=>t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",children:t.jsx("path",{fill:"#0A66C2",d:"M12.225 12.225h-1.778V9.44c0-.664-.012-1.519-.925-1.519-.926 0-1.068.724-1.068 1.47v2.834H6.676V6.498h1.707v.783h.024c.348-.594.996-.95 1.684-.925 1.802 0 2.135 1.185 2.135 2.728l-.001 3.14zM4.67 5.715a1.037 1.037 0 01-1.032-1.031c0-.566.466-1.032 1.032-1.032.566 0 1.031.466 1.032 1.032 0 .566-.466 1.032-1.032 1.032zm.889 6.51h-1.78V6.498h1.78v5.727zM13.11 2H2.885A.88.88 0 002 2.866v10.268a.88.88 0 00.885.866h10.226a.882.882 0 00.889-.866V2.865a.88.88 0 00-.889-.864z"})}),_c=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M12 21.42L15.54 10.86H8.46L12 21.42Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L8.46 10.86H2.28L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M2.28 10.86L0.86 15.14C0.72 15.54 0.86 15.98 1.18 16.24L12 21.42L2.28 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M2.28 10.86H8.46L6.12 3.58C5.98 3.18 5.42 3.18 5.28 3.58L2.28 10.86Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L15.54 10.86H21.72L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M21.72 10.86L23.14 15.14C23.28 15.54 23.14 15.98 22.82 16.24L12 21.42L21.72 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M21.72 10.86H15.54L17.88 3.58C18.02 3.18 18.58 3.18 18.72 3.58L21.72 10.86Z",fill:"#E24329"})]}),nm=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})}),kc=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{cx:"512",cy:"512",r:"512",style:{fill:"#5865f2"}}),t.jsx("path",{d:"M689.43 349a422.21 422.21 0 0 0-104.22-32.32 1.58 1.58 0 0 0-1.68.79 294.11 294.11 0 0 0-13 26.66 389.78 389.78 0 0 0-117.05 0 269.75 269.75 0 0 0-13.18-26.66 1.64 1.64 0 0 0-1.68-.79A421 421 0 0 0 334.44 349a1.49 1.49 0 0 0-.69.59c-66.37 99.17-84.55 195.9-75.63 291.41a1.76 1.76 0 0 0 .67 1.2 424.58 424.58 0 0 0 127.85 64.63 1.66 1.66 0 0 0 1.8-.59 303.45 303.45 0 0 0 26.15-42.54 1.62 1.62 0 0 0-.89-2.25 279.6 279.6 0 0 1-39.94-19 1.64 1.64 0 0 1-.16-2.72c2.68-2 5.37-4.1 7.93-6.22a1.58 1.58 0 0 1 1.65-.22c83.79 38.26 174.51 38.26 257.31 0a1.58 1.58 0 0 1 1.68.2c2.56 2.11 5.25 4.23 8 6.24a1.64 1.64 0 0 1-.14 2.72 262.37 262.37 0 0 1-40 19 1.63 1.63 0 0 0-.87 2.28 340.72 340.72 0 0 0 26.13 42.52 1.62 1.62 0 0 0 1.8.61 423.17 423.17 0 0 0 128-64.63 1.64 1.64 0 0 0 .67-1.18c10.68-110.44-17.88-206.38-75.7-291.42a1.3 1.3 0 0 0-.63-.63zM427.09 582.85c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.02 28.44-20.37 51.6-46 51.6zm170.13 0c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.01 28.44-20.17 51.6-46 51.6z",style:{fill:"#fff"}})]}),rm={google_oauth:{label:"Continue with Google",icon:t.jsx(bc,{})},github_oauth:{label:"Continue with GitHub",icon:t.jsx(vc,{})},x_oauth:{label:"Continue with X",icon:t.jsx(yc,{})},facebook_oauth:{label:"Continue with Facebook",icon:t.jsx(sm,{})},linkedin_oauth:{label:"Continue with LinkedIn",icon:t.jsx(jc,{})},gitlab_oauth:{label:"Continue with GitLab",icon:t.jsx(_c,{})},apple_oauth:{label:"Continue with Apple",icon:t.jsx(nm,{})},discord_oauth:{label:"Continue with Discord",icon:t.jsx(kc,{})}},Cr=({connections:e,callback:a})=>{const s=e.map(n=>({connection:n,config:rm[n.provider]})).filter(n=>n.config);if(!s.length)return null;if(s.length>3){const n=Math.min(s.length,4);return t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${n}, 1fr)`,gap:8},children:s.map(({connection:i,config:l})=>t.jsx("button",{type:"button",className:"w-social",style:{justifyContent:"center",padding:0},onClick:()=>a(i),title:l.label,"aria-label":l.label,children:l.icon},i.provider))})}return t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:s.map(({connection:n,config:i})=>t.jsxs("button",{type:"button",className:"w-social",onClick:()=>a(n),children:[i.icon,t.jsx("span",{className:"w-social-label",children:i.label})]},n.provider))})},St=({to:e,replace:a,children:s,...n})=>{const{navigate:i}=jt(),l=o.useCallback(m=>{m.preventDefault(),i(e,{replace:a})},[e,a,i]);return t.jsx("a",{href:e||void 0,onClick:l,...n,children:s})},qt=o.forwardRef(({onFocus:e,readOnly:a,...s},n)=>{const[i,l]=o.useState(!1);return t.jsx("input",{ref:n,...s,readOnly:a||!i,onFocus:m=>{i||l(!0),e==null||e(m)}})});qt.displayName="NoPrefillInput";const Bs=[{name:"Afghanistan",code:"AF",dialCode:"+93",flag:"🇦🇫"},{name:"Albania",code:"AL",dialCode:"+355",flag:"🇦🇱"},{name:"Algeria",code:"DZ",dialCode:"+213",flag:"🇩🇿"},{name:"American Samoa",code:"AS",dialCode:"+1684",flag:"🇺🇸"},{name:"Andorra",code:"AD",dialCode:"+376",flag:"🇦🇩"},{name:"Angola",code:"AO",dialCode:"+244",flag:"🇦🇴"},{name:"Anguilla",code:"AI",dialCode:"+1264",flag:"🇦🇮"},{name:"Antarctica",code:"AQ",dialCode:"+672",flag:"🇦🇶"},{name:"Antigua and Barbuda",code:"AG",dialCode:"+1268",flag:"🇦🇬"},{name:"Argentina",code:"AR",dialCode:"+54",flag:"🇦🇷"},{name:"Armenia",code:"AM",dialCode:"+374",flag:"🇦🇲"},{name:"Aruba",code:"AW",dialCode:"+297",flag:"🇦🇼"},{name:"Australia",code:"AU",dialCode:"+61",flag:"🇦🇺"},{name:"Austria",code:"AT",dialCode:"+43",flag:"🇦🇹"},{name:"Azerbaijan",code:"AZ",dialCode:"+994",flag:"🇦🇿"},{name:"Bahamas",code:"BS",dialCode:"+1242",flag:"🇧🇸"},{name:"Bahrain",code:"BH",dialCode:"+973",flag:"🇧🇭"},{name:"Bangladesh",code:"BD",dialCode:"+880",flag:"🇧🇩"},{name:"Barbados",code:"BB",dialCode:"+1246",flag:"🇧🇧"},{name:"Belarus",code:"BY",dialCode:"+375",flag:"🇧🇾"},{name:"Belgium",code:"BE",dialCode:"+32",flag:"🇧🇪"},{name:"Belize",code:"BZ",dialCode:"+501",flag:"🇧🇿"},{name:"Benin",code:"BJ",dialCode:"+229",flag:"🇧🇯"},{name:"Bermuda",code:"BM",dialCode:"+1441",flag:"🇧🇲"},{name:"Bhutan",code:"BT",dialCode:"+975",flag:"🇧🇹"},{name:"Bolivia",code:"BO",dialCode:"+591",flag:"🇧🇴"},{name:"Bosnia and Herzegovina",code:"BA",dialCode:"+387",flag:"🇧🇦"},{name:"Botswana",code:"BW",dialCode:"+267",flag:"🇧🇼"},{name:"Brazil",code:"BR",dialCode:"+55",flag:"🇧🇷"},{name:"British Indian Ocean Territory",code:"IO",dialCode:"+246",flag:"🇮🇴"},{name:"British Virgin Islands",code:"VG",dialCode:"+1284",flag:"🇻🇬"},{name:"Brunei",code:"BN",dialCode:"+673",flag:"🇧🇳"},{name:"Bulgaria",code:"BG",dialCode:"+359",flag:"🇧🇬"},{name:"Burkina Faso",code:"BF",dialCode:"+226",flag:"🇧🇫"},{name:"Burundi",code:"BI",dialCode:"+257",flag:"🇧🇮"},{name:"Cambodia",code:"KH",dialCode:"+855",flag:"🇰🇭"},{name:"Cameroon",code:"CM",dialCode:"+237",flag:"🇨🇲"},{name:"Canada",code:"CA",dialCode:"+1",flag:"🇨🇦"},{name:"Cape Verde",code:"CV",dialCode:"+238",flag:"🇨🇻"},{name:"Cayman Islands",code:"KY",dialCode:"+1345",flag:"🇰🇾"},{name:"Central African Republic",code:"CF",dialCode:"+236",flag:"🇨🇫"},{name:"Chad",code:"TD",dialCode:"+235",flag:"🇹🇩"},{name:"Chile",code:"CL",dialCode:"+56",flag:"🇨🇱"},{name:"China",code:"CN",dialCode:"+86",flag:"🇨🇳"},{name:"Christmas Island",code:"CX",dialCode:"+61",flag:"🇨🇽"},{name:"Cocos Islands",code:"CC",dialCode:"+61",flag:"🇨🇨"},{name:"Colombia",code:"CO",dialCode:"+57",flag:"🇨🇴"},{name:"Comoros",code:"KM",dialCode:"+269",flag:"🇰🇲"},{name:"Cook Islands",code:"CK",dialCode:"+682",flag:"🇨🇰"},{name:"Costa Rica",code:"CR",dialCode:"+506",flag:"🇨🇷"},{name:"Croatia",code:"HR",dialCode:"+385",flag:"🇭🇷"},{name:"Cuba",code:"CU",dialCode:"+53",flag:"🇨🇺"},{name:"Curacao",code:"CW",dialCode:"+599",flag:"🇨🇼"},{name:"Cyprus",code:"CY",dialCode:"+357",flag:"🇨🇾"},{name:"Czech Republic",code:"CZ",dialCode:"+420",flag:"🇨🇿"},{name:"Democratic Republic of the Congo",code:"CD",dialCode:"+243",flag:"🇨🇩"},{name:"Denmark",code:"DK",dialCode:"+45",flag:"🇩🇰"},{name:"Djibouti",code:"DJ",dialCode:"+253",flag:"🇩🇯"},{name:"Dominica",code:"DM",dialCode:"+1767",flag:"🇩🇲"},{name:"Dominican Republic",code:"DO",dialCode:"+1849",flag:"🇩🇴"},{name:"East Timor",code:"TL",dialCode:"+670",flag:"🇹🇱"},{name:"Ecuador",code:"EC",dialCode:"+593",flag:"🇪🇨"},{name:"Egypt",code:"EG",dialCode:"+20",flag:"🇪🇬"},{name:"El Salvador",code:"SV",dialCode:"+503",flag:"🇸🇻"},{name:"Equatorial Guinea",code:"GQ",dialCode:"+240",flag:"🇬🇶"},{name:"Eritrea",code:"ER",dialCode:"+291",flag:"🇪🇷"},{name:"Estonia",code:"EE",dialCode:"+372",flag:"🇪🇪"},{name:"Ethiopia",code:"ET",dialCode:"+251",flag:"🇪🇹"},{name:"Falkland Islands",code:"FK",dialCode:"+500",flag:"🇫🇰"},{name:"Faroe Islands",code:"FO",dialCode:"+298",flag:"🇫🇴"},{name:"Fiji",code:"FJ",dialCode:"+679",flag:"🇫🇯"},{name:"Finland",code:"FI",dialCode:"+358",flag:"🇫🇮"},{name:"France",code:"FR",dialCode:"+33",flag:"🇫🇷"},{name:"French Polynesia",code:"PF",dialCode:"+689",flag:"🇵🇫"},{name:"Gabon",code:"GA",dialCode:"+241",flag:"🇬🇦"},{name:"Gambia",code:"GM",dialCode:"+220",flag:"🇬🇲"},{name:"Georgia",code:"GE",dialCode:"+995",flag:"🇬🇪"},{name:"Germany",code:"DE",dialCode:"+49",flag:"🇩🇪"},{name:"Ghana",code:"GH",dialCode:"+233",flag:"🇬🇭"},{name:"Gibraltar",code:"GI",dialCode:"+350",flag:"🇬🇮"},{name:"Greece",code:"GR",dialCode:"+30",flag:"🇬🇷"},{name:"Greenland",code:"GL",dialCode:"+299",flag:"🇬🇱"},{name:"Grenada",code:"GD",dialCode:"+1473",flag:"🇬🇩"},{name:"Guam",code:"GU",dialCode:"+1671",flag:"🇬🇺"},{name:"Guatemala",code:"GT",dialCode:"+502",flag:"🇬🇹"},{name:"Guernsey",code:"GG",dialCode:"+44",flag:"🇬🇬"},{name:"Guinea",code:"GN",dialCode:"+224",flag:"🇬🇳"},{name:"Guinea-Bissau",code:"GW",dialCode:"+245",flag:"🇬🇼"},{name:"Guyana",code:"GY",dialCode:"+592",flag:"🇬🇾"},{name:"Haiti",code:"HT",dialCode:"+509",flag:"🇭🇹"},{name:"Honduras",code:"HN",dialCode:"+504",flag:"🇭🇳"},{name:"Hong Kong",code:"HK",dialCode:"+852",flag:"🇭🇰"},{name:"Hungary",code:"HU",dialCode:"+36",flag:"🇭🇺"},{name:"Iceland",code:"IS",dialCode:"+354",flag:"🇮🇸"},{name:"India",code:"IN",dialCode:"+91",flag:"🇮🇳"},{name:"Indonesia",code:"ID",dialCode:"+62",flag:"🇮🇩"},{name:"Iran",code:"IR",dialCode:"+98",flag:"🇮🇷"},{name:"Iraq",code:"IQ",dialCode:"+964",flag:"🇮🇶"},{name:"Ireland",code:"IE",dialCode:"+353",flag:"🇮🇪"},{name:"Isle of Man",code:"IM",dialCode:"+44",flag:"🇮🇲"},{name:"Israel",code:"IL",dialCode:"+972",flag:"🇮🇱"},{name:"Italy",code:"IT",dialCode:"+39",flag:"🇮🇹"},{name:"Ivory Coast",code:"CI",dialCode:"+225",flag:"🇨🇮"},{name:"Jamaica",code:"JM",dialCode:"+1876",flag:"🇯🇲"},{name:"Japan",code:"JP",dialCode:"+81",flag:"🇯🇵"},{name:"Jersey",code:"JE",dialCode:"+44",flag:"🇬🇬"},{name:"Jordan",code:"JO",dialCode:"+962",flag:"🇯🇴"},{name:"Kazakhstan",code:"KZ",dialCode:"+7",flag:"🇰🇿"},{name:"Kenya",code:"KE",dialCode:"+254",flag:"🇰🇪"},{name:"Kiribati",code:"KI",dialCode:"+686",flag:"🇰🇮"},{name:"Kosovo",code:"XK",dialCode:"+383",flag:"🇽🇰"},{name:"Kuwait",code:"KW",dialCode:"+965",flag:"🇰🇼"},{name:"Kyrgyzstan",code:"KG",dialCode:"+996",flag:"🇰🇬"},{name:"Laos",code:"LA",dialCode:"+856",flag:"🇱🇦"},{name:"Latvia",code:"LV",dialCode:"+371",flag:"🇱🇻"},{name:"Lebanon",code:"LB",dialCode:"+961",flag:"🇱🇧"},{name:"Lesotho",code:"LS",dialCode:"+266",flag:"🇱🇸"},{name:"Liberia",code:"LR",dialCode:"+231",flag:"🇱🇷"},{name:"Libya",code:"LY",dialCode:"+218",flag:"🇱🇾"},{name:"Liechtenstein",code:"LI",dialCode:"+423",flag:"🇱🇮"},{name:"Lithuania",code:"LT",dialCode:"+370",flag:"🇱🇹"},{name:"Luxembourg",code:"LU",dialCode:"+352",flag:"🇱🇺"},{name:"Macau",code:"MO",dialCode:"+853",flag:"🇲🇴"},{name:"Macedonia",code:"MK",dialCode:"+389",flag:"🇲🇰"},{name:"Madagascar",code:"MG",dialCode:"+261",flag:"🇲🇬"},{name:"Malawi",code:"MW",dialCode:"+265",flag:"🇲🇼"},{name:"Malaysia",code:"MY",dialCode:"+60",flag:"🇲🇾"},{name:"Maldives",code:"MV",dialCode:"+960",flag:"🇲🇻"},{name:"Mali",code:"ML",dialCode:"+223",flag:"🇲🇱"},{name:"Malta",code:"MT",dialCode:"+356",flag:"🇲🇹"},{name:"Marshall Islands",code:"MH",dialCode:"+692",flag:"🇲🇭"},{name:"Mauritania",code:"MR",dialCode:"+222",flag:"🇲🇷"},{name:"Mauritius",code:"MU",dialCode:"+230",flag:"🇲🇺"},{name:"Mayotte",code:"YT",dialCode:"+262",flag:"🇾🇹"},{name:"Mexico",code:"MX",dialCode:"+52",flag:"🇲🇽"},{name:"Micronesia",code:"FM",dialCode:"+691",flag:"🇫🇲"},{name:"Moldova",code:"MD",dialCode:"+373",flag:"🇲🇩"},{name:"Monaco",code:"MC",dialCode:"+377",flag:"🇲🇨"},{name:"Mongolia",code:"MN",dialCode:"+976",flag:"🇲🇳"},{name:"Montenegro",code:"ME",dialCode:"+382",flag:"🇲🇪"},{name:"Montserrat",code:"MS",dialCode:"+1664",flag:"🇲🇸"},{name:"Morocco",code:"MA",dialCode:"+212",flag:"🇲🇦"},{name:"Mozambique",code:"MZ",dialCode:"+258",flag:"🇲🇿"},{name:"Myanmar",code:"MM",dialCode:"+95",flag:"🇲🇲"},{name:"Namibia",code:"NA",dialCode:"+264",flag:"🇳🇦"},{name:"Nauru",code:"NR",dialCode:"+674",flag:"🇳🇷"},{name:"Nepal",code:"NP",dialCode:"+977",flag:"🇳🇵"},{name:"Netherlands",code:"NL",dialCode:"+31",flag:"🇳🇱"},{name:"Netherlands Antilles",code:"AN",dialCode:"+599",flag:"🇳🇱"},{name:"New Caledonia",code:"NC",dialCode:"+687",flag:"🇳🇨"},{name:"New Zealand",code:"NZ",dialCode:"+64",flag:"🇳🇿"},{name:"Nicaragua",code:"NI",dialCode:"+505",flag:"🇳🇮"},{name:"Niger",code:"NE",dialCode:"+227",flag:"🇳🇪"},{name:"Nigeria",code:"NG",dialCode:"+234",flag:"🇳🇬"},{name:"Niue",code:"NU",dialCode:"+683",flag:"🇳🇺"},{name:"North Korea",code:"KP",dialCode:"+850",flag:"🇰🇵"},{name:"Northern Mariana Islands",code:"MP",dialCode:"+1670",flag:"🇲🇵"},{name:"Norway",code:"NO",dialCode:"+47",flag:"🇳🇴"},{name:"Oman",code:"OM",dialCode:"+968",flag:"🇴🇲"},{name:"Pakistan",code:"PK",dialCode:"+92",flag:"🇵🇰"},{name:"Palau",code:"PW",dialCode:"+680",flag:"🇵🇼"},{name:"Palestine",code:"PS",dialCode:"+970",flag:"🇵🇸"},{name:"Panama",code:"PA",dialCode:"+507",flag:"🇵🇦"},{name:"Papua New Guinea",code:"PG",dialCode:"+675",flag:"🇵🇬"},{name:"Paraguay",code:"PY",dialCode:"+595",flag:"🇵🇾"},{name:"Peru",code:"PE",dialCode:"+51",flag:"🇵🇪"},{name:"Philippines",code:"PH",dialCode:"+63",flag:"🇵🇭"},{name:"Pitcairn",code:"PN",dialCode:"+64",flag:"🇵🇳"},{name:"Poland",code:"PL",dialCode:"+48",flag:"🇵🇱"},{name:"Portugal",code:"PT",dialCode:"+351",flag:"🇵🇹"},{name:"Puerto Rico",code:"PR",dialCode:"+1939",flag:"🇵🇷"},{name:"Qatar",code:"QA",dialCode:"+974",flag:"🇶🇦"},{name:"Republic of the Congo",code:"CG",dialCode:"+242",flag:"🇨🇬"},{name:"Reunion",code:"RE",dialCode:"+262",flag:"🇷🇪"},{name:"Romania",code:"RO",dialCode:"+40",flag:"🇷🇴"},{name:"Russia",code:"RU",dialCode:"+7",flag:"🇷🇺"},{name:"Rwanda",code:"RW",dialCode:"+250",flag:"🇷🇼"},{name:"Saint Barthelemy",code:"BL",dialCode:"+590",flag:"🇧🇱"},{name:"Saint Helena",code:"SH",dialCode:"+290",flag:"🇸🇭"},{name:"Saint Kitts and Nevis",code:"KN",dialCode:"+1869",flag:"🇰🇳"},{name:"Saint Lucia",code:"LC",dialCode:"+1758",flag:"🇱🇨"},{name:"Saint Martin",code:"MF",dialCode:"+590",flag:"🇲🇫"},{name:"Saint Pierre and Miquelon",code:"PM",dialCode:"+508",flag:"🇵🇲"},{name:"Saint Vincent and the Grenadines",code:"VC",dialCode:"+1784",flag:"🇻🇨"},{name:"Samoa",code:"WS",dialCode:"+685",flag:"🇼🇸"},{name:"San Marino",code:"SM",dialCode:"+378",flag:"🇸🇲"},{name:"Sao Tome and Principe",code:"ST",dialCode:"+239",flag:"🇸🇹"},{name:"Saudi Arabia",code:"SA",dialCode:"+966",flag:"🇸🇦"},{name:"Senegal",code:"SN",dialCode:"+221",flag:"🇸🇳"},{name:"Serbia",code:"RS",dialCode:"+381",flag:"🇷🇸"},{name:"Seychelles",code:"SC",dialCode:"+248",flag:"🇸🇨"},{name:"Sierra Leone",code:"SL",dialCode:"+232",flag:"🇸🇱"},{name:"Singapore",code:"SG",dialCode:"+65",flag:"🇸🇬"},{name:"Sint Maarten",code:"SX",dialCode:"+1721",flag:"🇸🇽"},{name:"Slovakia",code:"SK",dialCode:"+421",flag:"🇸🇰"},{name:"Slovenia",code:"SI",dialCode:"+386",flag:"🇸🇮"},{name:"Solomon Islands",code:"SB",dialCode:"+677",flag:"🇸🇧"},{name:"Somalia",code:"SO",dialCode:"+252",flag:"🇸🇴"},{name:"South Africa",code:"ZA",dialCode:"+27",flag:"🇿🇦"},{name:"South Korea",code:"KR",dialCode:"+82",flag:"🇰🇷"},{name:"South Sudan",code:"SS",dialCode:"+211",flag:"🇸🇸"},{name:"Spain",code:"ES",dialCode:"+34",flag:"🇪🇸"},{name:"Sri Lanka",code:"LK",dialCode:"+94",flag:"🇱🇰"},{name:"Sudan",code:"SD",dialCode:"+249",flag:"🇸🇩"},{name:"Suriname",code:"SR",dialCode:"+597",flag:"🇸🇷"},{name:"Svalbard and Jan Mayen",code:"SJ",dialCode:"+47",flag:"🇸🇯"},{name:"Swaziland",code:"SZ",dialCode:"+268",flag:"🇸🇿"},{name:"Sweden",code:"SE",dialCode:"+46",flag:"🇸🇪"},{name:"Switzerland",code:"CH",dialCode:"+41",flag:"🇨🇭"},{name:"Syria",code:"SY",dialCode:"+963",flag:"🇸🇾"},{name:"Taiwan",code:"TW",dialCode:"+886",flag:"🇹🇼"},{name:"Tajikistan",code:"TJ",dialCode:"+992",flag:"🇹🇯"},{name:"Tanzania",code:"TZ",dialCode:"+255",flag:"🇹🇿"},{name:"Thailand",code:"TH",dialCode:"+66",flag:"🇹🇭"},{name:"Togo",code:"TG",dialCode:"+228",flag:"🇹🇬"},{name:"Tokelau",code:"TK",dialCode:"+690",flag:"🇹🇰"},{name:"Tonga",code:"TO",dialCode:"+676",flag:"🇹🇴"},{name:"Trinidad and Tobago",code:"TT",dialCode:"+1868",flag:"🇹🇹"},{name:"Tunisia",code:"TN",dialCode:"+216",flag:"🇹🇳"},{name:"Turkey",code:"TR",dialCode:"+90",flag:"🇹🇷"},{name:"Turkmenistan",code:"TM",dialCode:"+993",flag:"🇹🇲"},{name:"Turks and Caicos Islands",code:"TC",dialCode:"+1649",flag:"🇹🇨"},{name:"Tuvalu",code:"TV",dialCode:"+688",flag:"🇹🇻"},{name:"U.S. Virgin Islands",code:"VI",dialCode:"+1340",flag:"🇻🇮"},{name:"Uganda",code:"UG",dialCode:"+256",flag:"🇺🇬"},{name:"Ukraine",code:"UA",dialCode:"+380",flag:"🇺🇦"},{name:"United Arab Emirates",code:"AE",dialCode:"+971",flag:"🇦🇪"},{name:"United Kingdom",code:"GB",dialCode:"+44",flag:"🇬🇧"},{name:"United States",code:"US",dialCode:"+1",flag:"🇺🇸"},{name:"Uruguay",code:"UY",dialCode:"+598",flag:"🇺🇾"},{name:"Uzbekistan",code:"UZ",dialCode:"+998",flag:"🇺🇿"},{name:"Vanuatu",code:"VU",dialCode:"+678",flag:"🇻🇺"},{name:"Vatican",code:"VA",dialCode:"+379",flag:"🇻🇦"},{name:"Venezuela",code:"VE",dialCode:"+58",flag:"🇻🇪"},{name:"Vietnam",code:"VN",dialCode:"+84",flag:"🇻🇳"},{name:"Wallis and Futuna",code:"WF",dialCode:"+681",flag:"🇼🇫"},{name:"Western Sahara",code:"EH",dialCode:"+212",flag:"🇪🇭"},{name:"Yemen",code:"YE",dialCode:"+967",flag:"🇾🇪"},{name:"Zambia",code:"ZM",dialCode:"+260",flag:"🇿🇲"},{name:"Zimbabwe",code:"ZW",dialCode:"+263",flag:"🇿🇼"}],bs=({value:e,onChange:a,error:s,countryCode:n,setCountryCode:i})=>{const[l,m]=o.useState(!1),[c,d]=o.useState(Bs.find(x=>x.code===n)||Bs[0]),p=o.useRef(null),[u,h]=o.useState(""),f=o.useRef(null);o.useEffect(()=>{function x(w){p.current&&!p.current.contains(w.target)&&m(!1)}return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[]);const g=Bs.filter(x=>x.name.toLowerCase().includes(u.toLowerCase())||x.dialCode.includes(u));return o.useEffect(()=>{i(c.dialCode)},[c,i]),t.jsxs("div",{className:"w-phone",children:[t.jsxs("div",{style:{position:"relative"},ref:p,children:[t.jsxs("button",{type:"button",className:"w-phone-cc",style:{height:"100%"},onClick:()=>m(x=>!x),children:[t.jsx("span",{children:c.flag}),t.jsx("span",{children:c.dialCode}),t.jsx(Dt,{weight:"bold"})]}),l&&t.jsxs("div",{className:"w-country-pop",children:[t.jsxs("div",{className:"w-country-search",children:[t.jsx(kl,{}),t.jsx("input",{type:"text",placeholder:"Search country…",value:u,onChange:x=>h(x.target.value),onClick:x=>x.stopPropagation()})]}),t.jsx("div",{className:"w-country-list",children:g.map(x=>t.jsxs("button",{type:"button",className:"w-country-opt",onClick:w=>{var b;w.stopPropagation(),w.preventDefault(),d(x),m(!1),(b=f.current)==null||b.focus()},children:[t.jsx("span",{children:x.flag}),t.jsx("span",{children:x.name}),t.jsx("span",{className:"dial",children:x.dialCode})]},x.code))})]})]}),t.jsx("input",{type:"tel",id:"phone",name:"phone",required:!0,minLength:7,maxLength:15,ref:f,value:e,onChange:a,placeholder:"Phone number","aria-invalid":!!s,pattern:"^\\d{7,15}$"})]})};function Nr({placement:e="center"}){var m;const{deployment:a}=_e(),[s,n]=o.useState(!1),i=(m=a==null?void 0:a.ui_settings)==null?void 0:m.logo_image_url;if(!i||s)return null;const l=e==="left"?"flex-start":e==="right"?"flex-end":"center";return t.jsx("div",{style:{display:"flex",justifyContent:l,width:"100%"},children:t.jsx("img",{src:i,alt:"Logo",onError:()=>n(!0),style:{maxWidth:40,maxHeight:40,width:"auto",height:"auto",objectFit:"contain"}})})}function et({children:e,footer:a}){return t.jsxs("div",{className:"w-card w-auth-card",children:[t.jsx("div",{className:"w-create-body",children:e}),a&&t.jsx("div",{className:"w-create-foot",children:a})]})}function rt({title:e,sub:a,children:s}){return t.jsxs("div",{className:"w-auth-head",children:[t.jsx(Nr,{}),t.jsxs("div",{className:"w-auth-head-text",children:[t.jsx("h1",{className:"w-auth-title",children:e}),a&&t.jsx("p",{className:"w-auth-sub",children:a})]}),s]})}function gt({size:e=16,onAccent:a}){return t.jsx("span",{className:a?"w-spin w-spin--on-accent":"w-spin",style:{width:e,height:e}})}function ys(){return t.jsx(Me,{children:t.jsx("div",{className:"w-card w-auth-card",children:t.jsx("div",{className:"w-create-body",children:t.jsxs("div",{className:"w-auth-skel","aria-hidden":"true",children:[t.jsxs("div",{className:"w-auth-skel-head",children:[t.jsx("span",{className:"w-skel w-skel-avatar"}),t.jsx("span",{className:"w-skel w-skel-title"}),t.jsx("span",{className:"w-skel w-skel-sub"})]}),t.jsxs("div",{className:"w-auth-skel-fields",children:[t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsx("span",{className:"w-skel w-skel-btn"})]})]})})})})}function im(e){const a=e.indexOf(":");return a>=0?e.slice(0,a):e}function om(e){const a=e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).hostname.toLowerCase()||null}catch{return null}}function lm(e){try{return new URL(e)}catch{if(typeof window>"u")return null;try{return new URL(e,window.location.origin)}catch{return null}}}function cm(e,a){return!e||!a?!1:e===a?!0:e.endsWith(`.${a}`)}function dm(e,a){if(!a)return!1;const s=lm(a);if(!s||s.protocol!=="https:"&&s.protocol!=="http:")return!1;if((e==null?void 0:e.mode)==="staging")return!0;if(s.protocol!=="https:"||!(e!=null&&e.frontend_host))return!1;const n=om(im(e.frontend_host));return n?cm(s.hostname.toLowerCase(),n):!1}function ft(e,a){return a&&dm(e,a)?a:null}function um(){var K,ee,ce,be,Q,ie,ne,U,Qe,Je,Te,Se,qe,le,V,Y;const{loading:e,signUp:a,signupAttempt:s,discardSignupAttempt:n}=po(),{signIn:i}=os("oauth"),{deployment:l}=_e(),{navigate:m}=jt(),{session:c,refetch:d,loading:p}=ot(),[u,h]=o.useState({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),[f,g]=o.useState({}),[x,w]=o.useState(!1),[b,_]=o.useState(void 0),[v,k]=o.useState(null),[N,j]=o.useState(null),[C,y]=o.useState(!1),E=((K=l==null?void 0:l.restrictions)==null?void 0:K.sign_up_mode)==="restricted",R=((ee=l==null?void 0:l.restrictions)==null?void 0:ee.sign_up_mode)==="waitlist",F=((be=(ce=l==null?void 0:l.auth_settings)==null?void 0:ce.multi_session_support)==null?void 0:be.enabled)??!1;o.useEffect(()=>{var q;if(!p&&(c!=null&&c.active_signin)&&!F&&!C){y(!0);let G=ft(l,new URLSearchParams(window.location.search).get("redirect_uri"));G||(G=((q=l==null?void 0:l.ui_settings)==null?void 0:q.after_signin_redirect_url)||null),!G&&(l!=null&&l.frontend_host)&&(G=`https://${l.frontend_host}`),G&&m(G)}},[c,p,F,l,m,C]),o.useEffect(()=>{var de;if(!l)return;const G=new URLSearchParams(window.location.search).get("invite_token");if(R&&!G){y(!0);const z=((de=l.ui_settings)==null?void 0:de.waitlist_page_url)||`https://${l.frontend_host}/waitlist`;m(z);return}G&&!v&&a&&(j(G),a.validateDeploymentInvitation(G).then(z=>{k(z),z.valid&&h(me=>({...me,first_name:z.first_name||me.first_name,last_name:z.last_name||me.last_name,email:z.email||me.email}))}).catch(()=>{g(z=>({...z,submit:"Failed to validate invitation."}))}))},[l,R,m,v,a]);const[A,I]=o.useState(!1),[L,S]=o.useState(""),O=q=>{let{name:G,value:de}=q.target;G==="phone_number"?de=de.replace(/[^0-9-]/g,""):G==="email"&&(de=de.toLowerCase()),h(z=>({...z,[G]:de})),g(z=>({...z,[G]:""}))},P=()=>{h({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),g({}),I(!1),S(""),n()},$=async q=>{if(q.preventDefault(),e||x)return;const G={},de=/^[a-zA-Z]{3,30}$/,z=/^[a-zA-Z][a-zA-Z0-9_.]{2,29}$/,me=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,st=/^\d{7,15}$/,Oe=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,125}$/;if(M!=null&&M.first_name.enabled&&(M!=null&&M.first_name.required&&!u.first_name?G.first_name="First name is required":u.first_name&&!de.test(u.first_name)&&(G.first_name="Invalid name")),M!=null&&M.last_name.enabled&&(M!=null&&M.last_name.required&&!u.last_name?G.last_name="Last name is required":u.last_name&&!de.test(u.last_name)&&(G.last_name="Invalid last name")),M!=null&&M.username.enabled&&(M!=null&&M.username.required&&!u.username?G.username="Username is required":u.username&&!z.test(u.username)&&(G.username="Username must be 3-20 characters")),M!=null&&M.email_address.enabled&&(M!=null&&M.email_address.required&&!u.email?G.email="Email address is required":u.email&&!me.test(u.email)&&(G.email="Invalid email address")),M!=null&&M.phone_number.enabled&&(M!=null&&M.phone_number.required&&!u.phone_number?G.phone_number="Phone number is required":u.phone_number&&!st.test(u.phone_number)&&(G.phone_number="Phone number must contain 7-15 digits")),M!=null&&M.password.enabled&&(u.password?Oe.test(u.password)||(G.password="Password must be 8-125 characters and include uppercase, lowercase, number, and special character"):G.password="Password is required"),g(G),!(Object.keys(G).length>0)){w(!0);try{const Ze={...u};u.phone_number&&b&&(Ze.phone_country_code=b),N&&(Ze.invite_token=N),await a.create(Ze)}catch(Ze){g({submit:Ze.message})}finally{w(!1)}}},Z=async q=>{if(!(e||x)){w(!0);try{const G=new URLSearchParams(window.location.search),de=ft(l,G.get("redirect_uri"))||void 0,{data:z}=await i.create({provider:q.provider,redirectUri:de});z&&typeof z=="object"&&"oauth_url"in z&&(window.location.href=z.oauth_url)}catch(G){g({submit:G.message})}finally{w(!1)}}},H=(l==null?void 0:l.social_connections.filter(q=>q.enabled))||[],M=l==null?void 0:l.auth_settings,B=!!((Q=M==null?void 0:M.first_name)!=null&&Q.enabled&&((ie=M==null?void 0:M.last_name)!=null&&ie.enabled)),D=async q=>{var de;if(q.preventDefault(),e||x)return;w(!0);const G={};if(!L){G.otp="OTP code is required",g(G),w(!1);return}g(G);try{const z=await a.completeVerification(L);"data"in z&&((de=z.data)!=null&&de.active_signin)&&await d()}catch{g(z=>({...z,submit:"Verification failed. Please try again."}))}finally{w(!1)}};if(o.useEffect(()=>{var q;if(s){if(s.completed){let G=ft(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(G||(G=((q=l==null?void 0:l.ui_settings)==null?void 0:q.after_signup_redirect_url)||null),!G&&(l!=null&&l.frontend_host)&&(G=`https://${l.frontend_host}`),G){let de;try{de=new URL(G)}catch{de=new URL(G,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&de.searchParams.set("__dev_session__",wt(l.backend_host)||""),m(de.toString())}return}if(!A){switch(s.current_step){case"verify_email":a.prepareVerification({strategy:"email_otp"});break;case"verify_phone":a.prepareVerification({strategy:"phone_otp"});break}I(!0)}}},[s,a,A,l,c,m]),p||C)return t.jsx(ys,{});const W=((ne=l==null?void 0:l.ui_settings)==null?void 0:ne.app_name)||"App";if(E)return t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx(St,{className:"w-link",to:(U=l==null?void 0:l.ui_settings)!=null&&U.sign_in_page_url?`${l.ui_settings.sign_in_page_url}?help=true`:"#",children:"Get help"})]}),children:[t.jsx(rt,{title:"Sign-up restricted",sub:"This app isn't open for public sign-up right now."}),t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"New account registration is currently restricted. Please check back later or contact your administrator for an invitation."})})]})});if(A){const q=(s==null?void 0:s.current_step)==="verify_phone";return t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{className:"w-link",to:((Qe=l==null?void 0:l.ui_settings)==null?void 0:Qe.support_page_url)||"#",children:"Get help"})]}),children:[t.jsx(rt,{title:q?"Check your phone":"Enter the code",sub:q?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",children:t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:P,children:[t.jsx(El,{weight:"bold"}),q?`+${u.phone_number}`:u.email]})}),t.jsxs("form",{onSubmit:D,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(xa,{onComplete:async G=>{S(G)},onResend:async()=>{const G=q?"phone_otp":"email_otp";await a.prepareVerification({strategy:G})},error:f.otp,isSubmitting:x}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e||!L,children:x&&L?t.jsx(gt,{size:15,onAccent:!0}):`Continue to ${W}`})]})]})})}return t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Already have an account?"," ",t.jsx(St,{className:"w-link",to:`${((Je=l==null?void 0:l.ui_settings)==null?void 0:Je.sign_in_page_url)??""}${window.location.search}`,children:"Sign in"})]}),children:[t.jsx(rt,{title:"Create your account",sub:v!=null&&v.valid?"You've been invited — complete your registration below.":"Get started in a few seconds."}),H.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(Cr,{connections:H,callback:Z}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})})]}),t.jsxs("form",{onSubmit:$,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[(((Te=M==null?void 0:M.first_name)==null?void 0:Te.enabled)||((Se=M==null?void 0:M.last_name)==null?void 0:Se.enabled))&&t.jsxs("div",{className:B?"w-grid-2":"",children:[((qe=M==null?void 0:M.first_name)==null?void 0:qe.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["First name",((le=M==null?void 0:M.first_name)==null?void 0:le.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"first_name",name:"first_name",autoComplete:"given-name",required:!0,minLength:3,maxLength:30,value:u.first_name,onChange:O,placeholder:"Jane","aria-invalid":!!f.first_name,pattern:"^[a-zA-Z]{3,30}$"}),f.first_name&&t.jsx("span",{className:"w-input-err",children:f.first_name})]}),((V=M==null?void 0:M.last_name)==null?void 0:V.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Last name",((Y=M==null?void 0:M.last_name)==null?void 0:Y.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"last_name",name:"last_name",autoComplete:"family-name",required:!0,minLength:3,maxLength:30,value:u.last_name,onChange:O,placeholder:"Doe","aria-invalid":!!f.last_name,pattern:"^[a-zA-Z]{3,30}$"}),f.last_name&&t.jsx("span",{className:"w-input-err",children:f.last_name})]})]}),(M==null?void 0:M.username.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Username",M.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"username",name:"username",autoComplete:"username",minLength:3,maxLength:20,value:u.username,onChange:O,placeholder:"yourname","aria-invalid":!!f.username,required:!0,pattern:"^[a-zA-Z][a-zA-Z0-9_.]{2,29}$"}),f.username&&t.jsx("span",{className:"w-input-err",children:f.username})]}),(M==null?void 0:M.email_address.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Email address",M.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",maxLength:320,value:u.email,onChange:O,placeholder:"you@company.com","aria-invalid":!!f.email,required:!0,readOnly:(v==null?void 0:v.valid)&&!!(v!=null&&v.email),pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}),f.email&&t.jsx("span",{className:"w-input-err",children:f.email})]}),(M==null?void 0:M.phone_number.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Phone number",M.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(bs,{value:u.phone_number,onChange:O,error:f.phone_number,countryCode:b,setCountryCode:_}),f.phone_number&&t.jsx("span",{className:"w-input-err",children:f.phone_number})]}),(M==null?void 0:M.password.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Password",M.password.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"new-password",value:u.password,onChange:O,placeholder:"Create a password","aria-invalid":!!f.password,required:!0,minLength:8,maxLength:128,pattern:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,125}$"}),f.password&&t.jsx("span",{className:"w-input-err",children:f.password})]}),f.submit&&t.jsx("span",{className:"w-input-err",children:f.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e,children:x?t.jsx(gt,{size:15,onAccent:!0}):"Continue"}),(()=>{var de,z;const q=(de=l==null?void 0:l.ui_settings)==null?void 0:de.tos_page_url,G=(z=l==null?void 0:l.ui_settings)==null?void 0:z.privacy_policy_url;return!q&&!G?null:t.jsxs("p",{className:"w-fineprint",children:["By continuing you agree to our"," ",q&&t.jsx(St,{className:"w-link w-link--muted",to:q,children:"Terms of Service"}),q&&G&&" and ",G&&t.jsx(St,{className:"w-link w-link--muted",to:G,children:"Privacy Policy"}),"."]})})()]})]})})}function Cc({icon:e,label:a,description:s,onClick:n,disabled:i,type:l="button"}){return t.jsxs("button",{type:l,className:"w-method",onClick:n,disabled:i,"data-disabled":i?"":void 0,children:[t.jsx("span",{className:"w-method-ic",children:e}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:a}),s&&t.jsx("span",{className:"w-method-desc",children:s})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Qt,{})})]})}const Nc=o.createContext(void 0);function Sc(){const e=o.useContext(Nc);if(!e)throw new Error("useSignIn must be used within a SignInProvider");return e}function mm({children:e}){var _;const{deployment:a}=_e(),[s,n]=o.useState((a==null?void 0:a.auth_settings.first_factor)||"email_password"),i=o.useRef(!!(a!=null&&a.auth_settings.first_factor)),[l,m]=o.useState(""),[c,d]=o.useState(!1),[p,u]=o.useState(!1),[h,f]=o.useState(!1),[g,x]=o.useState("identifier"),w=(a==null?void 0:a.social_connections.filter(v=>v.enabled))||[],b=a==null?void 0:a.auth_settings;return o.useEffect(()=>{var k;const v=(k=a==null?void 0:a.auth_settings)==null?void 0:k.first_factor;!i.current&&v&&(n(v),i.current=!0)},[(_=a==null?void 0:a.auth_settings)==null?void 0:_.first_factor]),t.jsx(Nc.Provider,{value:{email:l,showOtherOptions:c,showForgotPassword:p,otpSent:h,setFirstFactor:n,setEmail:m,setShowOtherOptions:d,setShowForgotPassword:u,setOtpSent:f,enabledSocialsProviders:w,authSettings:b,firstFactor:s,signInStep:g,setSignInStep:x},children:e})}const pm=[{key:"email_magic_link",icon:t.jsx(Mu,{}),label:"Magic link",description:"We'll email you a one-click sign-in link"},{key:"email_password",icon:t.jsx(Au,{}),label:"Email and password",description:"Sign in with your email and password"},{key:"email_otp",icon:t.jsx(gl,{}),label:"Email one-time code",description:"We'll send a verification code to your email"},{key:"phone_otp",icon:t.jsx(Cu,{}),label:"Phone number",description:"We'll send a verification code via SMS"},{key:"username_password",icon:t.jsx(ps,{}),label:"Username and password",description:"Sign in with your username and password"}];function Ec(){const{deployment:e}=_e(),{signIn:a}=os("oauth"),{setFirstFactor:s,firstFactor:n,setShowOtherOptions:i,setSignInStep:l}=Sc(),[m,c]=o.useState(!1),d=e==null?void 0:e.auth_settings,p=(e==null?void 0:e.social_connections.filter(x=>x.enabled))||[],u=async x=>{if(!m){c(!0);try{const{data:w}=await a.create({provider:x.provider});w&&typeof w=="object"&&"oauth_url"in w&&(window.location.href=w.oauth_url)}catch{}finally{c(!1)}}},h=pm.filter(x=>{if(x.key===n)return!1;const w=d==null?void 0:d.auth_factors_enabled;return w?w[x.key]:!1}),f=p.length>0,g=h.length>0;return t.jsxs(t.Fragment,{children:[f&&t.jsx(Cr,{connections:p,callback:u}),f&&g&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"or"})}),g&&t.jsx("div",{className:"w-method-stack",children:h.map(x=>t.jsx(Cc,{icon:x.icon,label:x.label,description:x.description,onClick:()=>{s(x.key),l("identifier"),i(!1)}},x.key))})]})}function hm({onBack:e}){var F;const{deployment:a}=_e(),{navigate:s}=jt(),[n,i]=o.useState("start"),[l,m]=o.useState(""),[c,d]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(""),[g,x]=o.useState(""),{forgotPassword:w,verifyOtp:b,resetPassword:_}=Eo(),[v,k]=o.useState(!1),[N,j]=o.useState(null),C=async A=>{if(A.preventDefault(),!!l){k(!0),j(null);try{await w(l),i("otp")}catch(I){j(I)}finally{k(!1)}}},y=async A=>{if(A.preventDefault(),c.length===6){k(!0),j(null);try{const I=await b(l,c);I.data&&(u(I.data.token),i("reset"))}catch(I){j(I)}finally{k(!1)}}},E=async A=>{var I,L;if(A.preventDefault(),h===g&&!(h.length<8)){k(!0),j(null);try{const S=await _(p,h);if(S.data){const O=S.data,P=O.signin_attempts&&O.signin_attempts.length>0?O.signin_attempts[O.signin_attempts.length-1]:null;if(P&&!P.completed){const $=(I=a==null?void 0:a.ui_settings)==null?void 0:I.sign_in_page_url;if($){const Z=new URL($,window.location.origin);Z.searchParams.set("signin_attempt_id",P.id),s(Z.toString())}else e()}else{const $=((L=a==null?void 0:a.ui_settings)==null?void 0:L.after_signin_redirect_url)||"/";s($)}}}catch(S){j(S)}finally{k(!1)}}},R=t.jsx("span",{className:"w-auth-foot",children:t.jsx("span",{className:"w-link",style:{cursor:"pointer"},onClick:e,children:"Back to sign in"})});return t.jsxs(Me,{children:[n==="start"&&t.jsxs(et,{footer:R,children:[t.jsx(rt,{title:"Forgot your password?",sub:"Reset it, or sign in another way."}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>i("email"),disabled:v,children:"Reset your password"}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsx(Ec,{}),t.jsxs("p",{className:"w-secsub",style:{textAlign:"center",marginTop:16},children:["Unable to reset password?"," ",t.jsx("a",{className:"w-link",href:((F=a==null?void 0:a.ui_settings)==null?void 0:F.support_page_url)||"#",children:"Get help"})]})]}),n==="email"&&t.jsxs(et,{footer:R,children:[t.jsx(rt,{title:"Forgot password",sub:"Enter your email and we'll send you a code to reset your password."}),t.jsxs("form",{onSubmit:C,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx("input",{className:"w-input",type:"email",id:"email",value:l,onChange:A=>m(A.target.value),placeholder:"you@company.com",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(gt,{size:15,onAccent:!0}):"Send code"})]})]}),n==="otp"&&t.jsxs(et,{footer:R,children:[t.jsx(rt,{title:"Enter verification code",sub:`We sent a 6-digit code to ${l}.`}),t.jsxs("form",{onSubmit:y,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(xa,{onComplete:A=>d(A),isSubmitting:v,error:N==null?void 0:N.message,onResend:async()=>{await w(l)}}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v||c.length!==6,children:v?t.jsx(gt,{size:15,onAccent:!0}):"Verify"})]})]}),n==="reset"&&t.jsxs(et,{footer:R,children:[t.jsx(rt,{title:"Reset password",sub:"Create a new password for your account."}),t.jsxs("form",{onSubmit:E,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"New password"}),t.jsx("input",{className:"w-input",type:"password",id:"password",value:h,onChange:A=>f(A.target.value),placeholder:"Enter new password",required:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Confirm new password"}),t.jsx("input",{className:"w-input",type:"password",id:"confirmPassword",value:g,onChange:A=>x(A.target.value),placeholder:"Confirm new password",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(gt,{size:15,onAccent:!0}):"Reset password"})]})]})]})}function fm({onBack:e}){var n;const{deployment:a}=_e(),s=(n=a==null?void 0:a.ui_settings)==null?void 0:n.app_name;return t.jsx(Me,{children:t.jsxs(et,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to sign in"})}),children:[t.jsx(rt,{title:"All sign-in methods",sub:`Choose another way to sign in to ${s||"your account"}`}),t.jsx(Ec,{})]})})}function Ac({methods:e,onSelectMethod:a,onBack:s}){return t.jsx(Me,{children:t.jsxs(et,{footer:s?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:s,children:"Back to login"})}):void 0,children:[t.jsx(rt,{title:"Two-factor authentication",sub:"Choose how you'd like to verify your identity"}),t.jsx("div",{className:"w-method-stack",children:e.map(n=>t.jsx(Cc,{icon:n.icon,label:n.name,description:n.phoneNumber?`${n.description} ${n.phoneNumber}`:n.description,onClick:()=>a(n.id),disabled:!n.available},n.id))})]})})}function Mc({onVerify:e,onBack:a,loading:s}){const[n,i]=o.useState(""),[l,m]=o.useState(""),c=p=>{if(p.preventDefault(),n.length!==4){m("Please enter the last 4 digits of your phone number");return}e(n)},d=p=>{const u=p.target.value.replace(/\D/g,"").slice(0,4);i(u),m("")};return t.jsx(Me,{children:t.jsxs(et,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Choose a different method"})}),children:[t.jsx(rt,{title:"Verify phone",sub:"Enter the last 4 digits of your phone number."}),t.jsxs("form",{onSubmit:c,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"lastDigits",children:"Last 4 digits"}),t.jsx("input",{className:`w-input${l?" w-input--invalid":""}`,type:"text",id:"lastDigits",name:"lastDigits",value:n,onChange:d,placeholder:"0000",maxLength:4,autoComplete:"off","aria-invalid":!!l,autoFocus:!0}),l&&t.jsx("span",{className:"w-input-err",children:l})]}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:s||n.length!==4,children:s?t.jsx(gt,{onAccent:!0}):"Send code"})]})]})})}const wm=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),gm=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),t.jsx("path",{d:"M12 18h.01"})]}),xm=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"m21 2-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4"})});function Rc({onBack:e,attempt:a,completeVerification:s,prepareVerification:n}){const{deployment:i}=_e(),[l,m]=o.useState(""),[c,d]=o.useState({}),[p,u]=o.useState(!1),[h,f]=o.useState(null),[g,x]=o.useState(!0),[w,b]=o.useState(!1),[_,v]=o.useState(""),[k,N]=o.useState(!1),{navigate:j}=jt(),C=(a==null?void 0:a.available_2fa_methods)||[],y=[{id:"authenticator",name:"Authenticator app",description:"Use your authenticator app",icon:t.jsx(wm,{}),available:C.includes("authenticator")},{id:"phone_otp",name:"Text message",description:"Get a code via SMS",icon:t.jsx(gm,{}),available:C.includes("phone_otp"),phoneNumber:_},{id:"backup_code",name:"Backup code",description:"Use one of your backup codes",icon:t.jsx(xm,{}),available:C.includes("backup_code")}].filter(L=>L.available),E=async L=>{f(L),x(!1),L==="phone_otp"&&b(!0)},R=async L=>{var S,O;if(a){u(!0);try{const P=await n({strategy:"phone_otp",lastDigits:L});P&&"data"in P&&((S=P.data)!=null&&S.otp_sent)?((O=P.data)!=null&&O.masked_phone&&v(P.data.masked_phone),b(!1)):d({phone:"Phone number verification failed"})}catch(P){d({phone:P.message})}finally{u(!1)}}},F=async(L,S)=>{if(L.preventDefault(),p)return;const O=S||l,P={};if(O?h==="authenticator"&&O.length!==6?P.code="Authentication code must be 6 digits":h==="phone_otp"&&O.length!==6&&(P.code="SMS code must be 6 digits"):P.code="Verification code is required",d(P),!(Object.keys(P).length>0)){u(!0);try{await s(O)}catch($){d({submit:$.message})}finally{u(!1)}}},A=L=>{let S=L.target.value;h!=="backup_code"&&(S=S.replace(/\D/g,"").slice(0,6)),m(S),d(O=>({...O,code:""}))};if(o.useEffect(()=>{var L;if(a.completed){N(!0);let S=ft(i,new URLSearchParams(window.location.search).get("redirect_uri"));if(S||(S=((L=i==null?void 0:i.ui_settings)==null?void 0:L.after_signin_redirect_url)||null),!S&&(i!=null&&i.frontend_host)&&(S=`https://${i.frontend_host}`),S){let O;try{O=new URL(S)}catch{O=new URL(S,window.location.origin)}(i==null?void 0:i.mode)==="staging"&&O.searchParams.set("__dev_session__",wt(i.backend_host)||""),j(O.toString())}return}},[a,i]),k)return t.jsx(ys,{});if(g)return y.length===0?t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Set up two-factor authentication",sub:"Your account requires two-factor authentication, but you haven't set up any methods yet. Please contact your administrator to set up 2FA."}),e&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to login"})})]})}):t.jsx(Ac,{methods:y,onSelectMethod:E,onBack:e});if(w&&h==="phone_otp")return t.jsx(Mc,{onVerify:R,onBack:()=>{b(!1),x(!0),f(null)},loading:p});const I=h==="authenticator"?"Enter the 6-digit code from your authenticator app":h==="phone_otp"?`Enter the 6-digit code sent to your phone ${_}`:"Enter one of your backup codes";return t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Two-factor authentication",sub:I}),t.jsxs("form",{onSubmit:F,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[h==="backup_code"?t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"code",children:"Backup code"}),t.jsx("input",{className:`w-input${c.code?" w-input--invalid":""}`,type:"text",id:"code",name:"code",value:l,onChange:A,placeholder:"Enter backup code",maxLength:20,autoComplete:"one-time-code","aria-invalid":!!c.code,autoFocus:!0}),c.code&&t.jsx("span",{className:"w-input-err",children:c.code})]}):t.jsx(xa,{onComplete:async L=>{if(m(L),h!=="backup_code"){const S=new Event("submit",{bubbles:!0,cancelable:!0});await F(S,L)}},onResend:h==="phone_otp"?async()=>{try{await n({strategy:"phone_otp",lastDigits:_.slice(-4)})}catch(L){d({submit:L.message})}}:void 0,error:c.code,isSubmitting:p}),c.submit&&t.jsx("span",{className:"w-input-err",children:c.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:p||!l,children:p?t.jsx(gt,{onAccent:!0}):"Verify"})]}),t.jsxs("div",{style:{marginTop:18,textAlign:"center",display:"flex",flexDirection:"column",gap:8},children:[t.jsx("button",{type:"button",className:"w-link",onClick:()=>{x(!0),f(null),m(""),d({})},children:"Try another method"}),e&&t.jsx("button",{type:"button",className:"w-link w-link--muted",onClick:e,children:"Back to login"})]})]})})}function Lc({attempt:e,onBack:a,completeProfile:s,completeVerification:n,prepareVerification:i}){var H,M,B,D,W,K,ee,ce,be;const{deployment:l}=_e(),{navigate:m}=jt(),[c,d]=o.useState({}),[p,u]=o.useState({}),[h,f]=o.useState("US"),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[_,v]=o.useState(null),[k,N]=o.useState(!1),j=_,C=w,y=()=>{var ie;N(!0);let Q=ft(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(Q||(Q=((ie=l==null?void 0:l.ui_settings)==null?void 0:ie.after_signin_redirect_url)||null),!Q&&(l!=null&&l.frontend_host)&&(Q=`https://${l.frontend_host}`),Q){let ne;try{ne=new URL(Q)}catch{ne=new URL(Q,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&ne.searchParams.set("__dev_session__",wt(l.backend_host)||""),m(ne.toString())}},E=async Q=>{b(!0),v(null);try{await s(Q)&&y()}catch(ie){const ne=ie;throw v(ne),ne}finally{b(!1)}},R=async Q=>{b(!0),v(null);try{return await n(Q)&&y(),!0}catch(ie){return v(ie),!1}finally{b(!1)}};if(k||!e)return t.jsx(ys,{});const F=e.missing_fields||[],A=l==null?void 0:l.auth_settings,I=(e==null?void 0:e.current_step)==="verify_phone_otp"||(e==null?void 0:e.current_step)==="verify_email_otp"||g,L=Q=>{const{name:ie,value:ne}=Q.target;d(U=>({...U,[ie]:ne})),p[ie]&&u(U=>({...U,[ie]:""}))},S=()=>{const Q={};return F.forEach(ie=>{var Qe,Je,Te,Se,qe;const ne=c[ie];let U=!1;switch(ie){case"first_name":U=((Qe=A==null?void 0:A.first_name)==null?void 0:Qe.enabled)||!1;break;case"last_name":U=((Je=A==null?void 0:A.last_name)==null?void 0:Je.enabled)||!1;break;case"username":U=((Te=A==null?void 0:A.username)==null?void 0:Te.enabled)||!1;break;case"phone_number":U=((Se=A==null?void 0:A.phone_number)==null?void 0:Se.enabled)||!1;break;case"email_address":U=((qe=A==null?void 0:A.email_address)==null?void 0:qe.enabled)||!1;break;default:U=!0}if(U&&(!ne||ne.trim()==="")){const le=ie.replace("_"," ").replace(/\b\w/g,V=>V.toUpperCase());Q[ie]=`${le} is required`}}),c.username&&F.includes("username")&&(/^[a-zA-Z0-9_-]{3,30}$/.test(c.username)||(Q.username="Username must be 3-30 characters and contain only letters, numbers, underscores, and hyphens")),c.phone_number&&F.includes("phone_number")&&(/^\d{7,15}$/.test(c.phone_number)||(Q.phone_number="Phone number must contain 7-15 digits")),c.email&&F.includes("email_address")&&(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(c.email)||(Q.email_address="Please enter a valid email address")),u(Q),Object.keys(Q).length===0},O=async Q=>{if(Q.preventDefault(),!S())return;const ie={...c};c.phone_number&&h&&(ie.phone_country_code=h),await E(ie)},P=Q=>{const ie=Q.target.value;d(ne=>({...ne,phone_number:ie})),p.phone_number&&u(ne=>({...ne,phone_number:""}))},$=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{to:(l==null?void 0:l.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]});if(I){const Q=e.current_step==="verify_phone_otp"?"Verify your phone number":"Verify your email",ie=e.current_step==="verify_phone_otp"?"Enter the 6-digit code sent to your phone":"Enter the 6-digit code sent to your email",ne=e.current_step==="verify_phone_otp"?"phone_otp":"email_otp";return t.jsx(Me,{children:t.jsxs(et,{footer:$,children:[t.jsx(rt,{title:Q,sub:ie}),t.jsxs("form",{onSubmit:U=>U.preventDefault(),noValidate:!0,style:{display:"flex",flexDirection:"column",gap:14},children:[t.jsx(xa,{onComplete:R,onResend:async()=>{await i({strategy:ne})},error:j==null?void 0:j.message,isSubmitting:C}),j&&t.jsx("span",{className:"w-input-err",children:j.message})]}),t.jsx("div",{style:{marginTop:16,textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:()=>x(!1),children:"Back to profile completion"})})]})})}const Z=!!((H=A==null?void 0:A.first_name)!=null&&H.enabled&&((M=A==null?void 0:A.last_name)!=null&&M.enabled)&&F.includes("first_name")&&F.includes("last_name"));return t.jsx(Me,{children:t.jsxs(et,{footer:a?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Back to login"})}):$,children:[t.jsx(rt,{title:"Complete your profile",sub:"Please provide the following information to continue"}),t.jsxs("form",{onSubmit:O,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(F.includes("first_name")||F.includes("last_name"))&&(((B=A==null?void 0:A.first_name)==null?void 0:B.enabled)||((D=A==null?void 0:A.last_name)==null?void 0:D.enabled))&&t.jsxs("div",{className:Z?"w-grid-2":"",children:[F.includes("first_name")&&((W=A==null?void 0:A.first_name)==null?void 0:W.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",A.first_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.first_name?" w-input--invalid":""}`,type:"text",id:"first_name",name:"first_name",value:c.first_name||"",onChange:L,placeholder:"Enter your first name",disabled:C,autoComplete:"given-name"}),p.first_name&&t.jsx("span",{className:"w-input-err",children:p.first_name})]}),F.includes("last_name")&&((K=A==null?void 0:A.last_name)==null?void 0:K.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",A.last_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.last_name?" w-input--invalid":""}`,type:"text",id:"last_name",name:"last_name",value:c.last_name||"",onChange:L,placeholder:"Enter your last name",disabled:C,autoComplete:"family-name"}),p.last_name&&t.jsx("span",{className:"w-input-err",children:p.last_name})]})]}),F.includes("username")&&((ee=A==null?void 0:A.username)==null?void 0:ee.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"username",children:["Username",A.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.username?" w-input--invalid":""}`,type:"text",id:"username",name:"username",value:c.username||"",onChange:L,placeholder:"Choose a username",disabled:C,autoComplete:"username"}),p.username&&t.jsx("span",{className:"w-input-err",children:p.username})]}),F.includes("phone_number")&&((ce=A==null?void 0:A.phone_number)==null?void 0:ce.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"phone_number",children:["Phone number",A.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(bs,{value:c.phone_number||"",onChange:P,error:p.phone_number,countryCode:h,setCountryCode:f}),p.phone_number&&t.jsx("span",{className:"w-input-err",children:p.phone_number})]}),F.includes("email_address")&&((be=A==null?void 0:A.email_address)==null?void 0:be.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",A.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.email_address?" w-input--invalid":""}`,type:"email",id:"email",name:"email",value:c.email||"",onChange:L,placeholder:"Enter your email address",disabled:C,autoComplete:"email"}),p.email_address&&t.jsx("span",{className:"w-input-err",children:p.email_address})]}),j&&t.jsx("span",{className:"w-input-err",children:j.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:C,children:C?t.jsx(gt,{onAccent:!0}):"Continue"})]})]})})}function Pc({onComplete:e,onSkip:a}){var u;const[s,n]=o.useState(!1),[i,l]=o.useState(null),{registerPasskey:m}=ga(),{deployment:c}=_e(),d=async()=>{n(!0),l(null);try{await m(),e==null||e()}catch(h){l(h instanceof Error?h.message:"Failed to register passkey")}finally{n(!1)}},p=((u=c==null?void 0:c.ui_settings)==null?void 0:u.app_name)||"this app";return t.jsxs("div",{className:"w-flex w-flex-col w-items-center w-text-center",children:[t.jsx("div",{className:"w-feature-badge",children:t.jsx(tr,{size:26})}),t.jsx("h1",{className:"w-title-lg",children:"Add a passkey"}),t.jsxs("p",{className:"w-sub",style:{marginTop:6,maxWidth:320},children:["Sign in faster and more securely with a passkey. Use your fingerprint, face, or screen lock to access ",p,"."]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,width:"100%",marginTop:24},children:[t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:d,disabled:s,children:s?t.jsxs(t.Fragment,{children:[t.jsx(gt,{size:15,onAccent:!0}),"Registering…"]}):t.jsxs(t.Fragment,{children:[t.jsx(tr,{}),"Add passkey"]})}),t.jsx("button",{type:"button",className:"w-social",onClick:a,children:"Maybe later"})]}),i&&t.jsx("p",{className:"w-input-err",style:{marginTop:14},children:i})]})}function vm(){return t.jsx(mm,{children:t.jsx(bm,{})})}function bm(){var Wt,va,ba,bt,aa,sa,na,oe,ge,Ce,De,ae,we,tt,Be,kt,yt,Fe,Bt,ra,ia,es,oa;const{deployment:e}=_e(),{navigate:a}=jt(),{session:s,loading:n,refetch:i,exchangeTicket:l,switchSignIn:m}=ot(),c=((va=(Wt=e==null?void 0:e.auth_settings)==null?void 0:Wt.multi_session_support)==null?void 0:va.enabled)??!1,{setEmail:d,otpSent:p,setOtpSent:u,showForgotPassword:h,setShowForgotPassword:f,showOtherOptions:g,setShowOtherOptions:x,enabledSocialsProviders:w,firstFactor:b,setFirstFactor:_,signInStep:v,setSignInStep:k}=Sc(),{loading:N,signIn:j,signinAttempt:C,discardSignInAttempt:y,setSignInAttempt:E}=os("generic"),{signIn:R}=os("oauth"),{signIn:F}=os("passkey"),[A,I]=o.useState({email:"",username:"",password:"",phone:""}),[L,S]=o.useState({}),[O,P]=o.useState(!1),[$,Z]=o.useState(""),[H,M]=o.useState("US"),[B,D]=o.useState(!1),[W,K]=o.useState(null),[ee,ce]=o.useState(!1),[be,Q]=o.useState(!1),[ie,ne]=o.useState(!1),[U,Qe]=o.useState(60),[Je,Te]=o.useState(!1),[Se,qe]=o.useState(null),le=[...(s==null?void 0:s.signins)||[]].sort((X,te)=>{var pe,Le;return X.id===((pe=s==null?void 0:s.active_signin)==null?void 0:pe.id)?-1:te.id===((Le=s==null?void 0:s.active_signin)==null?void 0:Le.id)?1:0});o.useEffect(()=>{const X=new URLSearchParams(window.location.search),te=X.get("error"),pe=X.get("error_description");if(te==="access_denied"&&pe){K(pe),X.delete("error"),X.delete("error_description");const Le=X.toString()?`${window.location.pathname}?${X.toString()}`:window.location.pathname;window.history.replaceState({},"",Le)}},[]),o.useEffect(()=>{if(b!=="email_magic_link"||!p)return;Qe(60),Te(!1);const X=setInterval(()=>{Qe(te=>te<=1?(Te(!0),clearInterval(X),0):te-1)},1e3);return()=>clearInterval(X)},[b,p]),o.useEffect(()=>{var X,te,pe,Le;if(!n&&(s!=null&&s.active_signin)&&!c&&!B&&!ee){let Ae=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));Ae||(Ae=((X=e==null?void 0:e.ui_settings)==null?void 0:X.after_signin_redirect_url)||null),!Ae&&(e!=null&&e.frontend_host)&&(Ae=`https://${e.frontend_host}`);const ct=(te=e==null?void 0:e.auth_settings)==null?void 0:te.passkey;(ct==null?void 0:ct.enabled)&&(ct==null?void 0:ct.prompt_registration_on_auth)&&!((Le=(pe=s.active_signin)==null?void 0:pe.user)!=null&&Le.has_passkeys)?(qe(Ae),ce(!0)):Ae&&(D(!0),a(Ae))}},[s,n,c,e,a,B]);const V=X=>{let{name:te,value:pe}=X.target;te==="phone"?pe=pe.replace(/[^0-9]/g,""):te==="email"&&(d(pe),pe=pe.toLowerCase()),I(Le=>({...Le,[te]:pe})),S(Le=>({...Le,[te]:""}))},Y=()=>{I({email:"",username:"",password:"",phone:""}),S({}),M("US"),k("identifier")},q=async X=>{if(!X){S({email:"Email address is required"});return}P(!0),S({});try{const te=await j.identify(X);if(te.strategy==="sso"&&te.connection_id){const pe=new URLSearchParams(window.location.search),Le=ft(e,pe.get("redirect_uri"))||void 0,Ae=await j.initEnterpriseSso(te.connection_id,Le);if(Ae&&Ae.sso_url){D(!0),window.location.href=Ae.sso_url;return}}else if(te.strategy==="social"&&te.provider){const pe=w.find(Le=>Le.provider===te.provider);if(pe){const Le=new URLSearchParams(window.location.search),Ae=ft(e,Le.get("redirect_uri"))||void 0,{data:ct}=await R.create({provider:pe.provider,redirectUri:Ae});if(ct&&typeof ct=="object"&&"oauth_url"in ct){D(!0),window.location.href=ct.oauth_url;return}}else k("password")}else k("password")}catch(te){S({submit:te.message})}finally{B||P(!1)}},G=async X=>{if(X.preventDefault(),N||O)return;y();const te={};if(v==="identifier"&&b==="email_password"){if(!A.email){S({email:"Email address is required"});return}await q(A.email);return}if(v==="identifier"&&b==="username_password"){if(!A.username){S({username:"Username is required"});return}S({}),k("password");return}if(b==="email_password"?(A.email||(te.email="Email address is required"),A.password||(te.password="Password is required")):b==="username_password"?(A.username||(te.username="Username is required"),A.password||(te.password="Password is required")):b==="email_otp"||b==="email_magic_link"?A.email||(te.email="Email address is required"):b==="phone_otp"&&(A.phone?/^\d{7,15}$/.test(A.phone)||(te.phone="Phone number must contain 7-15 digits"):te.phone="Phone number is required"),S(te),Object.keys(te).length>0)return;let pe="";switch(b){case"email_password":pe="plain_email";break;case"username_password":pe="plain_username";break;case"email_otp":pe="email_otp";break;case"email_magic_link":pe="magic_link";break;case"phone_otp":pe="phone_otp";break}const Le=b==="email_otp"||b==="email_magic_link"||b==="phone_otp";P(!0);try{const Ae={...A,strategy:pe};b==="phone_otp"&&H&&(Ae.phone_country_code=H),await j.create(Ae),Le||P(!1)}catch(Ae){S({submit:Ae.message}),P(!1)}},de=async X=>{if(X.preventDefault(),N||O)return;const te={};if(!$){te.otp="OTP code is required",S(te);return}P(!0),S({});try{await j.completeVerification($),u(!1),Z("")}catch(pe){S({otp:pe.message||"Verification failed"})}finally{P(!1)}},z=async X=>{if(!(N||O)){P(!0);try{const te=new URLSearchParams(window.location.search),pe=ft(e,te.get("redirect_uri"))||void 0,{data:Le}=await R.create({provider:X.provider,redirectUri:pe});Le&&typeof Le=="object"&&"oauth_url"in Le&&(window.location.href=Le.oauth_url)}catch(te){S({submit:te.message})}finally{P(!1)}}},me=async()=>{var X;if(!(N||O)){P(!0),S({});try{const te=await F.create();if("data"in te&&te.data){await i();let pe=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));pe||(pe=((X=e==null?void 0:e.ui_settings)==null?void 0:X.after_signin_redirect_url)||null),!pe&&(e!=null&&e.frontend_host)&&(pe=`https://${e.frontend_host}`),D(!0),pe&&a(pe)}}catch(te){S({submit:te.message||"Passkey sign-in failed"})}finally{P(!1)}}},st=()=>{var pe;let X=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(X||(X=((pe=e==null?void 0:e.ui_settings)==null?void 0:pe.after_signin_redirect_url)||null),!X&&(e!=null&&e.frontend_host)&&(X=`https://${e.frontend_host}`),!X)return null;let te;try{te=new URL(X)}catch{te=new URL(X,window.location.origin)}return(e==null?void 0:e.mode)==="staging"&&te.searchParams.set("__dev_session__",wt(e.backend_host)||""),te.toString()},Oe=async X=>{if(!(N||O)){S({}),P(!0);try{await m(X);const te=st();te&&(D(!0),a(te))}catch(te){S({submit:te.message||"Failed to continue with selected account"})}finally{P(!1)}}},Ze=(X,te)=>`${X||""} ${te||""}`.trim().split(" ").filter(Boolean).map(pe=>pe[0]).join("").toUpperCase().slice(0,2)||"?",mt=o.useRef(!1);if(o.useEffect(()=>{if(n)return;const X=new URLSearchParams(window.location.search),te=X.get("ticket");if(te&&!mt.current&&!N){mt.current=!0,X.delete("ticket");const Le=X.toString()?`${window.location.pathname}?${X.toString()}`:window.location.pathname;window.history.replaceState({},"",Le),(async()=>{var ct;try{P(!0),await l(te),D(!0);let Tt=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(Tt||(Tt=((ct=e==null?void 0:e.ui_settings)==null?void 0:ct.after_signin_redirect_url)||null),!Tt&&(e!=null&&e.frontend_host)&&(Tt=`https://${e.frontend_host}`),Tt){let Cs;try{Cs=new URL(Tt)}catch{Cs=new URL(Tt,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&Cs.searchParams.set("__dev_session__",wt(e.backend_host)||""),a(Cs.toString())}return}catch(Tt){S({submit:Tt.message||"Failed to exchange ticket"}),mt.current=!1}finally{P(!1)}})();return}const pe=X.get("signin_attempt_id");if(pe&&(s!=null&&s.signin_attempts)&&!C){const Le=s.signin_attempts.find(Ae=>Ae.id===pe);if(Le){E(Le),X.delete("signin_attempt_id");const Ae=X.toString()?`${window.location.pathname}?${X.toString()}`:window.location.pathname;window.history.replaceState({},"",Ae)}}},[s,n,C,E,N]),o.useEffect(()=>{var Le;if(!C)return;if(C.completed){D(!0);let Ae=new URLSearchParams(window.location.search).get("redirect_uri");if(Ae||(Ae=((Le=e==null?void 0:e.ui_settings)==null?void 0:Le.after_signin_redirect_url)||null),!Ae&&(e!=null&&e.frontend_host)&&(Ae=`https://${e.frontend_host}`),Ae){let ct;try{ct=new URL(Ae)}catch{ct=new URL(Ae,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&ct.searchParams.set("__dev_session__",wt(e.backend_host)||""),a(ct.toString())}return}if(!j||p)return;const te={verify_email:"email_otp",verify_email_otp:"email_otp",verify_email_link:"magic_link",verify_phone:"phone_otp",verify_phone_otp:"phone_otp"}[C.current_step];if(!te)return;(async()=>{try{await j.prepareVerification({strategy:te}),P(!1),u(!0)}catch{S({submit:"Failed to send verification. Please try again."}),P(!1)}})()},[C,j,p,u,a,e]),g)return t.jsx(fm,{onBack:()=>x(!1)});if(h)return t.jsx(hm,{onBack:()=>f(!1)});if((C==null?void 0:C.current_step)==="verify_second_factor")return t.jsx(Rc,{attempt:C,completeVerification:j.completeVerification,prepareVerification:j.prepareVerification,onBack:()=>{y(),Y(),u(!1)}});if((C==null?void 0:C.current_step)==="complete_profile")return t.jsx(Lc,{attempt:C,completeProfile:j.completeProfile,completeVerification:j.completeVerification,prepareVerification:j.prepareVerification,onBack:()=>{y(),Y(),u(!1)}});if(ee){const X=()=>{ce(!1),Se&&(D(!0),a(Se))},te=()=>{ce(!1),Se&&(D(!0),a(Se))};return t.jsx(Me,{children:t.jsx(et,{children:t.jsx(Pc,{onComplete:X,onSkip:te})})})}if(n||B)return t.jsx(ys,{});const J=((ba=e==null?void 0:e.ui_settings)==null?void 0:ba.app_name)||"App",ue=(C==null?void 0:C.current_step)&&["verify_email","verify_email_otp","verify_email_link","verify_phone","verify_phone_otp"].includes(C.current_step)&&p,He=b==="email_magic_link",Ee=c&&!ue&&le.length>0&&!ie,Ye=()=>{u(!1),y(),Y()};let vt;if(ue){const X=b==="phone_otp"?"Check your phone":He?"Check your inbox":"Enter the code",te=He?"We sent a magic link to your email — click it to sign in instantly.":b==="phone_otp"?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",pe=(b==="email_otp"||He)&&A.email?A.email:b==="phone_otp"&&A.phone?`+${A.phone}`:null;vt=t.jsx(rt,{title:X,sub:te,children:pe&&t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:Ye,children:[t.jsx(El,{weight:"bold"}),pe]})})}else vt=t.jsx(rt,{title:"Sign in to your account",sub:`Please enter your details to continue to ${J}.`});let Ut;ue?Ut=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{className:"w-link",to:((bt=e==null?void 0:e.ui_settings)==null?void 0:bt.support_page_url)||"#",children:"Get help"})]}):Ut=t.jsxs("span",{className:"w-auth-foot",children:["Don't have an account?"," ",t.jsx(St,{className:"w-link",to:`${((aa=e==null?void 0:e.ui_settings)==null?void 0:aa.sign_up_page_url)??""}${window.location.search}`,children:"Sign up"})]});let Ft;if(ue&&He)Ft=t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,padding:"12px 0 4px"},children:Je?t.jsx("button",{type:"button",className:"w-link w-linkbtn",onClick:async()=>{Te(!1),Qe(60);try{await j.prepareVerification({strategy:"magic_link"})}catch{}},children:"Resend magic link"}):t.jsxs("span",{className:"w-secsub",children:["Resend in ",U,"s"]})});else if(ue)Ft=t.jsxs("form",{onSubmit:de,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(xa,{onComplete:async X=>{if(Z(X),X&&X.length===6){P(!0),S({});try{await j.completeVerification(X),u(!1)}catch(te){S({otp:te.message||"Verification failed"})}finally{P(!1)}}},onResend:async()=>{const X=b==="email_otp"?"email_otp":"phone_otp";await j.prepareVerification({strategy:X})},error:L.otp,isSubmitting:O}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:O||N||!$,children:O&&$?t.jsx(gt,{size:15,onAccent:!0}):`Continue to ${J}`})]});else{const X=(b==="email_password"||b==="email_otp"||b==="email_magic_link")&&((na=(sa=e==null?void 0:e.auth_settings)==null?void 0:sa.email_address)==null?void 0:na.enabled),te=b==="username_password"&&((ge=(oe=e==null?void 0:e.auth_settings)==null?void 0:oe.username)==null?void 0:ge.enabled),pe=b==="phone_otp"&&((De=(Ce=e==null?void 0:e.auth_settings)==null?void 0:Ce.phone_number)==null?void 0:De.enabled),Le=v==="password"&&(b==="email_password"||b==="username_password")&&((we=(ae=e==null?void 0:e.auth_settings)==null?void 0:ae.password)==null?void 0:we.enabled);Ft=t.jsxs(t.Fragment,{children:[w.length>0&&t.jsx(Cr,{connections:w,callback:z}),((Be=(tt=e==null?void 0:e.auth_settings)==null?void 0:tt.passkey)==null?void 0:Be.enabled)&&t.jsxs("button",{type:"button",className:"w-social",style:{marginTop:w.length>0?10:0},onClick:me,disabled:O,children:[t.jsx(tr,{}),t.jsx("span",{children:"Sign in with a passkey"})]}),(w.length>0||((yt=(kt=e==null?void 0:e.auth_settings)==null?void 0:kt.passkey)==null?void 0:yt.enabled))&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsxs("form",{onSubmit:G,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[X&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Email address"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&b==="email_password"&&A.email?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(di,{})}),t.jsx("span",{className:"w-locked-val",children:A.email}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>k("identifier"),children:"Edit"})]}):t.jsx(qt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",value:A.email,onChange:V,placeholder:"you@company.com","aria-invalid":!!L.email}),L.email&&t.jsx("span",{className:"w-input-err",children:L.email})]}),te&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Username"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&A.username?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(di,{})}),t.jsx("span",{className:"w-locked-val",children:A.username}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>{k("identifier"),I(Ae=>({...Ae,password:""}))},children:"Edit"})]}):t.jsx(qt,{className:"w-input",type:"text",id:"username",name:"username",value:A.username,onChange:V,placeholder:"yourname","aria-invalid":!!L.username,autoComplete:"username"}),L.username&&t.jsx("span",{className:"w-input-err",children:L.username})]}),pe&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(bs,{value:A.phone,onChange:V,error:L.phone,countryCode:H,setCountryCode:M}),L.phone&&t.jsx("span",{className:"w-input-err",children:L.phone})]}),Le&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("span",{className:"w-label",children:"Password"}),t.jsx("span",{className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer"},onClick:()=>f(!0),children:"Forgot?"})]}),t.jsx(qt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"current-password",value:A.password,onChange:V,placeholder:"••••••••","aria-invalid":!!L.password}),L.password&&t.jsx("span",{className:"w-input-err",children:L.password})]}),L.submit&&t.jsx("span",{className:"w-input-err",children:L.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:O||N,children:O?t.jsx(gt,{size:15,onAccent:!0}):t.jsxs(t.Fragment,{children:[v==="identifier"?"Continue":"Sign in",t.jsx(Qt,{weight:"bold"})]})}),v==="password"&&((Bt=(Fe=e==null?void 0:e.auth_settings)==null?void 0:Fe.auth_factors_enabled)==null?void 0:Bt.email_otp)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-or",style:{margin:"5px 0"},children:t.jsx("span",{children:"OR"})}),t.jsxs("button",{type:"button",className:"w-method",disabled:O,onClick:async()=>{P(!0),S({});try{await j.create({email:A.email,strategy:"email_otp"}),_("email_otp")}catch(Ae){S({submit:Ae.message}),P(!1)}},children:[t.jsx("span",{className:"w-method-ic",children:t.jsx(gl,{})}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:"Sign in with a code"}),t.jsx("span",{className:"w-method-desc",children:"We'll send a 6-digit code to your email"})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Qt,{})})]})]})]})]})}return t.jsx(Me,{children:t.jsxs(et,{footer:Ut,children:[vt,W&&t.jsxs("div",{className:"w-banner w-banner--error",style:{marginBottom:18},children:[t.jsx(Ha,{weight:"fill"}),t.jsxs("span",{className:"w-banner-txt",children:[t.jsx("strong",{children:"Access denied."})," ",W," ",t.jsx("span",{className:"w-link",onClick:()=>K(null),children:"Try again"})]})]}),Ee&&(be?t.jsxs("div",{className:"w-acct-list",children:[t.jsx("div",{className:"w-secsub w-acct-list-head",children:"Choose an account"}),t.jsxs("div",{className:"w-acct-list-body",children:[le.map(X=>{var te,pe,Le,Ae;return t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>Oe(X.id),disabled:O||N,children:[t.jsx("span",{className:"w-avatar",children:X.user.has_profile_picture?t.jsx("img",{src:X.user.profile_picture_url,alt:((te=X.user.primary_email_address)==null?void 0:te.email)||"account"}):Ze(X.user.first_name,X.user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsx("span",{className:"w-acct-name",children:X.user.first_name&&X.user.last_name?`${X.user.first_name} ${X.user.last_name}`:X.user.first_name||((Le=(pe=X.user.primary_email_address)==null?void 0:pe.email)==null?void 0:Le.split("@")[0])||"Account"}),t.jsx("span",{className:"w-secsub",children:(Ae=X.user.primary_email_address)==null?void 0:Ae.email})]}),t.jsx(Qt,{className:"w-acct-go"})]},X.id)}),t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>{Q(!1),ne(!0),Y()},children:[t.jsx("span",{className:"w-avatar",style:{background:"var(--wa-surface-subtle)",color:"var(--wa-text-muted)"},children:t.jsx(Zu,{size:16})}),t.jsx("span",{className:"w-acct-text w-acct-name",children:"Use a different account"}),t.jsx(Qt,{className:"w-acct-go"})]})]})]}):t.jsxs("button",{type:"button",className:"w-acct","data-active":!0,style:{marginBottom:18},onClick:()=>Oe(le[0].id),disabled:O||N,children:[t.jsx("span",{className:"w-avatar",children:le[0].user.has_profile_picture?t.jsx("img",{src:le[0].user.profile_picture_url,alt:((ra=le[0].user.primary_email_address)==null?void 0:ra.email)||"account"}):Ze(le[0].user.first_name,le[0].user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsxs("span",{className:"w-acct-name",children:["Welcome back,"," ",le[0].user.first_name||((es=(ia=le[0].user.primary_email_address)==null?void 0:ia.email)==null?void 0:es.split("@")[0])||"back"]}),t.jsx("span",{className:"w-secsub",children:(oa=le[0].user.primary_email_address)==null?void 0:oa.email})]}),t.jsx("span",{className:"w-link w-link--muted w-link--sm",style:{flex:"none"},onClick:X=>{X.stopPropagation(),le.length>1?Q(!0):(ne(!0),Y())},children:"Not you?"})]})),Ft]})})}function ym(){var b,_,v,k,N,j,C,y,E,R,F,A;const{deployment:e}=_e(),{loading:a,joinWaitlist:s}=Co(),[n,i]=o.useState({first_name:"",last_name:"",email:""}),[l,m]=o.useState(!1),[c,d]=o.useState(!1),[p,u]=o.useState(null),h=()=>{if(p)return p.message},f=e==null?void 0:e.auth_settings,g=!!((b=f==null?void 0:f.first_name)!=null&&b.enabled&&((_=f==null?void 0:f.last_name)!=null&&_.enabled)),x=I=>{const{name:L,value:S}=I.target;i(O=>({...O,[L]:S}))},w=async I=>{if(I.preventDefault(),!!f){d(!0),u(null);try{(await s(n)).data&&m(!0)}catch(L){u(L)}finally{d(!1)}}};return l?t.jsx(Me,{children:t.jsx(et,{children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,textAlign:"center"},children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ge,{weight:"bold"})})]}),t.jsx("h1",{className:"w-auth-title",children:"You're on the waitlist"}),t.jsxs("p",{className:"w-auth-sub",children:["Thanks for your interest! We'll notify you at"," ",n.email," when we're ready for you to join."]})]})})}):t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx("a",{href:"/contact",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Join the waitlist",sub:"Be the first to know when we launch!"}),t.jsxs("form",{onSubmit:w,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(((v=f==null?void 0:f.first_name)==null?void 0:v.enabled)||((k=f==null?void 0:f.last_name)==null?void 0:k.enabled))&&t.jsxs("div",{className:g?"w-grid-2":"",children:[((N=f==null?void 0:f.first_name)==null?void 0:N.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",((j=f==null?void 0:f.first_name)==null?void 0:j.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"first_name",name:"first_name",required:(C=f==null?void 0:f.first_name)==null?void 0:C.required,minLength:2,maxLength:50,value:n.first_name,onChange:x,placeholder:"First name"})]}),((y=f==null?void 0:f.last_name)==null?void 0:y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",((E=f==null?void 0:f.last_name)==null?void 0:E.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"last_name",name:"last_name",required:(R=f==null?void 0:f.last_name)==null?void 0:R.required,minLength:2,maxLength:50,value:n.last_name,onChange:x,placeholder:"Last name"})]})]}),t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",((F=f==null?void 0:f.email_address)==null?void 0:F.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"email",id:"email",name:"email",required:(A=f==null?void 0:f.email_address)==null?void 0:A.required,value:n.email,onChange:x,placeholder:"Enter your email address"})]}),h()&&t.jsx("span",{className:"w-input-err",children:h()}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:c||a,children:c||a?t.jsx(gt,{onAccent:!0}):"Join waitlist"})]})]})})}function $n({title:e,sub:a,icon:s,message:n,action:i,footer:l}){return t.jsx(Me,{children:t.jsxs(et,{footer:l,children:[t.jsx(rt,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:n}),i]})]})})}function jm(){const{deployment:e}=_e(),{navigate:a}=jt(),{error:s,session:n,processed:i,signinAttempt:l,redirectUri:m,loading:c}=No(),[d,p]=o.useState(!1),[u,h]=o.useState(null),f=()=>{window.location.reload()},g=()=>{var _;const b=((_=e==null?void 0:e.ui_settings)==null?void 0:_.sign_in_page_url)||"/sign-in";a(b)},x=()=>{p(!1),u&&a(u)},w=()=>{p(!1),u&&a(u)};if(o.useEffect(()=>{var b,_,v,k,N;if(!(!i||c||d)){if(l&&!l.completed){const j=(b=e==null?void 0:e.ui_settings)==null?void 0:b.sign_in_page_url;if(j){const C=new URL(j,window.location.origin);C.searchParams.set("signin_attempt_id",l.id),m&&C.searchParams.set("redirect_uri",m),a(C.toString())}return}if(l!=null&&l.completed){const C=ft(e,m)||((_=e==null?void 0:e.ui_settings)==null?void 0:_.after_signin_redirect_url)||(e==null?void 0:e.frontend_host)||"/";let y;try{y=new URL(C)}catch{y=new URL(C,window.location.origin)}if(y){(e==null?void 0:e.mode)==="staging"&&y.searchParams.set("__dev_session__",wt(e.backend_host)||"");const E=(v=e==null?void 0:e.auth_settings)==null?void 0:v.passkey;(E==null?void 0:E.enabled)&&(E==null?void 0:E.prompt_registration_on_auth)&&!((N=(k=n==null?void 0:n.active_signin)==null?void 0:k.user)!=null&&N.has_passkeys)?(h(y.toString()),p(!0)):a(y.toString())}}}},[n,i,c,m,e,l,a]),o.useEffect(()=>{s&&s.message.includes("No OAuth callback data found")&&setTimeout(()=>{var _;const b=((_=e==null?void 0:e.ui_settings)==null?void 0:_.sign_in_page_url)||(e==null?void 0:e.frontend_host);b&&a(b)},2e3)},[s,e,a]),d)return t.jsx(Me,{children:t.jsx(et,{children:t.jsx(Pc,{onComplete:x,onSkip:w})})});if(n&&i&&!s)return t.jsx($n,{title:"Success",sub:"Authentication completed successfully",icon:t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ge,{weight:"bold"})})]}),message:"You'll be redirected to your destination shortly."});if(s){const b=s.message.includes("No OAuth callback data found");return t.jsx($n,{title:"Something went wrong",sub:"We couldn't complete your sign in",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ra,{weight:"bold"})})]}),message:s.message||"An unexpected error occurred during authentication.",action:b?void 0:t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:f,children:"Try again"}),footer:b?void 0:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:g,children:"Return to sign in"})]})})}return t.jsx($n,{title:"Completing sign in",sub:"Please wait while we authenticate you",icon:t.jsx(gt,{size:32}),message:"Verifying your credentials… this will only take a moment."})}function _m({onSuccess:e,onError:a}={}){const[s,n]=o.useState("loading"),[i,l]=o.useState(""),{token:m,attempt:c,redirectUri:d}=U1(),{verifyMagicLink:p}=So(),{navigate:u}=jt(),{deployment:h}=_e(),f=o.useRef(!1);o.useEffect(()=>{(async()=>{if(!f.current){if(!m||!c){n("error"),l("The magic link appears to be malformed. Please try signing in again."),a==null||a("Invalid magic link parameters");return}f.current=!0,n("loading"),l("Please wait while we verify your magic link.");try{await p({token:m,attempt:c,redirectUri:d}),n("success"),l("You will be redirected to your account shortly."),e==null||e(),setTimeout(()=>{var b;let w=ft(h,d);if(w||(w=(b=h==null?void 0:h.ui_settings)==null?void 0:b.after_signin_redirect_url),!w&&(h!=null&&h.frontend_host)&&(w=`https://${h.frontend_host}`),w){const _=new URL(w);(h==null?void 0:h.mode)==="staging"&&_.searchParams.set("__dev_session__",wt(h.backend_host)||""),u(_.toString())}},2e3)}catch(w){n("error"),l("The magic link may have expired or already been used. Please try signing in again."),a==null||a(w.message)}}})()},[m,c]);const g=()=>{var x;(x=h==null?void 0:h.ui_settings)!=null&&x.sign_in_page_url&&u(h.ui_settings.sign_in_page_url)};return t.jsx(Me,{children:t.jsxs(et,{children:[t.jsx(rt,{title:"Magic link",sub:"Verifying your magic link"}),t.jsxs("div",{className:"w-auth-status",children:[s==="loading"&&t.jsx(gt,{size:32}),s==="success"&&t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ge,{weight:"bold"})})]}),s==="error"&&t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ra,{weight:"bold"})})]}),t.jsx("p",{className:"w-auth-sub",children:i}),s==="error"&&t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:g,children:"Try again"})]})]})})}function km(e){var n,i;return e?((n=e.signin_attempts)==null?void 0:n.find(l=>l.requires_completion&&!l.completed))?!0:!!((i=e.signup_attempts)==null?void 0:i.find(l=>{var m,c;return((m=l.missing_fields)==null?void 0:m.length)>0||((c=l.remaining_steps)==null?void 0:c.length)>0&&!l.completed})):!1}function Cm(e){const a=e?`/profile-completion?redirect_uri=${encodeURIComponent(e)}`:"/profile-completion";window.location.href=a}function ss({kind:e}){const a=e==="success"?"w-success":e==="error"?"w-success w-success--error":"w-success w-success--info",s=e==="success"?Ge:e==="error"?Ra:Eu;return t.jsxs("div",{className:a,children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(s,{weight:"bold"})})]})}function ja({title:e,sub:a,icon:s,message:n,action:i,footer:l}){return t.jsx(Me,{children:t.jsxs(et,{footer:l,children:[t.jsx(rt,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:n}),i]})]})})}function Nm({token:e,onSuccess:a,onError:s}){var b;const{acceptInvitation:n,invitationData:i,loading:l,error:m}=Zo(),{navigate:c}=jt(),{deployment:d}=_e(),p=o.useRef(!1),u=()=>{var v;const _=new URLSearchParams(window.location.search);return{token:e||_.get("invite_token")||_.get("token"),redirectUri:ft(d,_.get("redirect_uri"))||((v=d==null?void 0:d.ui_settings)==null?void 0:v.after_signin_redirect_url)||"/"}};o.useEffect(()=>{if(p.current)return;const{token:_}=u();_&&(p.current=!0,n(_))},[n]),o.useEffect(()=>{var _;i&&(i.organization&&!i.requires_signin&&a&&a(i.organization.id,(_=i.workspace)==null?void 0:_.id),i.error_code&&s&&s(i.message||"Failed to accept invitation"))},[i,a,s]);const h=()=>{const{redirectUri:_}=u();c(_)},f=()=>{var E,R;const{token:_}=u(),v=((E=d==null?void 0:d.ui_settings)==null?void 0:E.sign_in_page_url)||"/sign-in",k=((R=d==null?void 0:d.ui_settings)==null?void 0:R.sign_up_page_url)||"/sign-up",N=new URLSearchParams;_&&N.set("invite_token",_),i!=null&&i.invited_email&&N.set("invited_email",i.invited_email);const C=`${window.location.pathname}?token=${_}`;N.set("redirect_uri",C),i!=null&&i.message&&N.set("message",i.message);const y=(i==null?void 0:i.error_code)==="INVITATION_REQUIRES_SIGNUP";c(`${y?k:v}?${N.toString()}`)},g=()=>{const{token:_}=u();_&&(p.current=!1,n(_))},x=(_,v)=>t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:v,children:_}),{token:w}=u();if(!w&&!l)return t.jsx(ja,{title:"Invalid invitation",sub:"No invitation token found",icon:t.jsx(ss,{kind:"error"}),message:"The invitation link appears to be invalid or incomplete.",action:x("Go to home",()=>c("/"))});if(l)return t.jsx(ja,{title:"Processing invitation",sub:"Please wait while we verify your invitation",icon:t.jsx(gt,{size:32}),message:"Verifying invitation… this will only take a moment."});if(i!=null&&i.organization&&!i.requires_signin)return t.jsx(ja,{title:"Invitation accepted",sub:"You've successfully joined the organization",icon:t.jsx(ss,{kind:"success"}),message:t.jsxs(t.Fragment,{children:["Welcome to"," ",t.jsx("strong",{children:i.organization.name}),i.workspace?`. You've been added to the ${i.workspace.name} workspace.`:"."]}),action:x("Continue to application",h)});if(i!=null&&i.already_member)return t.jsx(ja,{title:"Already a member",sub:"You're already part of this organization",icon:t.jsx(ss,{kind:"info"}),message:`You're already a member of ${((b=i.organization)==null?void 0:b.name)||"this organization"}. No action needed.`,action:x("Continue to application",h)});if(i!=null&&i.requires_signin){const _=i.error_code==="INVITATION_REQUIRES_SIGNUP";return t.jsx(ja,{title:_?"Sign up required":"Sign in required",sub:"To accept this invitation",icon:t.jsx(ss,{kind:"info"}),message:t.jsxs(t.Fragment,{children:["This invitation is for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email}),"."," ",_?"Create an account with this email address to accept it.":i.error_code==="INVITATION_EMAIL_MISMATCH"?"You're signed in with a different account. Please sign in with the invited email.":"Please sign in to accept this invitation."]}),action:x(_?"Sign up to accept":"Sign in to accept",f)})}return(i==null?void 0:i.error_code)==="INVITATION_EXPIRED"?t.jsx(ja,{title:"Invitation expired",sub:"This invitation is no longer valid",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(ku,{weight:"bold"})})]}),message:t.jsxs(t.Fragment,{children:["Invitation for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email})," ","has expired. Invitations are valid for 10 days — please request a new one from your organization administrator."]})}):m||i!=null&&i.error_code?t.jsx(ja,{title:"Invitation error",sub:"Unable to process invitation",icon:t.jsx(ss,{kind:"error"}),message:(i==null?void 0:i.message)||m||"Failed to accept invitation",action:x("Try again",g),footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:f,children:"Sign in manually"})]})}):null}const $c=o.createContext(void 0),Oc=()=>{const e=o.useContext($c);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},Sm=({isOpen:e,onClose:a,children:s})=>{const[n,i]=o.useState(!1);return o.useEffect(()=>{i(!0);const l=m=>{m.key==="Escape"&&e&&(a==null||a())};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[e,a]),!e||!n?null:Xs.createPortal(t.jsx("div",{className:"wacht-root",children:t.jsx($c.Provider,{value:{isOpen:e,onClose:a},children:s})}),document.body)},Em=({children:e})=>{const{onClose:a}=Oc(),s=o.useRef(null),n=i=>{s.current&&!s.current.contains(i.target)&&(a==null||a())};return t.jsx("div",{className:"w-modal",onClick:n,children:t.jsx("div",{ref:s,style:{maxWidth:"100%",minWidth:0},children:e})})},Am=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog${s?` ${s}`:""}`,style:{maxHeight:"90vh",overflowY:"auto",...a},children:e}),Mm=({children:e,showCloseButton:a=!0})=>{const{onClose:s}=Oc();return t.jsxs("div",{className:"w-dialog-head",children:[typeof e=="string"?t.jsx("h2",{className:"w-dialog-title",children:e}):e,a&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:s,children:t.jsx(Ra,{size:18})})]})},Rm=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog-body${s?` ${s}`:""}`,style:a,children:e}),Lm=({children:e})=>t.jsx("div",{className:"w-dialog-foot",children:e}),ze=Object.assign(Sm,{Overlay:Em,Content:Am,Header:Mm,Body:Rm,Footer:Lm}),Pm=({isOpen:e,onClose:a,title:s,children:n,showCloseButton:i=!0})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{children:[s&&t.jsx(ze.Header,{showCloseButton:i,children:s}),t.jsx(ze.Body,{children:n})]})})}),$m=({trigger:e,renderDialog:a})=>{const[s,n]=o.useState(!1),i=()=>n(!0),l=()=>n(!1);return t.jsxs(t.Fragment,{children:[e({onClick:i}),a({isOpen:s,onClose:l})]})},Zc=o.createContext(void 0),Hc=()=>{const e=o.useContext(Zc);if(!e)throw new Error("useDropdownContext must be used within a DropdownProvider");return e},js=({children:e,open:a,openChange:s,style:n})=>{const i=o.useRef(null),[l,m]=o.useState(!1);return o.useEffect(()=>{const c=d=>{i.current&&!i.current.contains(d.target)&&m(!1)};return l&&document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[l,s]),o.useEffect(()=>{s==null||s(l)},[l]),o.useEffect(()=>{m(!!a)},[a]),t.jsx(Zc.Provider,{value:{open:l,openChange:c=>m(c)},children:t.jsx("div",{style:{width:"fit-content",...n},ref:i,children:e})})},_s=({children:e,style:a,className:s})=>{const{open:n}=Hc(),[i,l]=o.useState({top:0,left:0}),[m,c]=o.useState(!1),d=o.useRef(null);return o.useEffect(()=>{n&&d.current?(c(!1),requestAnimationFrame(()=>{var h,f;const p=(h=d.current)==null?void 0:h.parentElement;if(!p)return;const u=p.querySelector("[data-dropdown-trigger]")||p.firstElementChild;if(u&&u!==d.current){const g=u.getBoundingClientRect(),x=(f=d.current)==null?void 0:f.getBoundingClientRect(),w=window.innerWidth,b=window.innerHeight;let _=g.bottom+4,v=g.right-((x==null?void 0:x.width)||200);v<8&&(v=g.left),v+((x==null?void 0:x.width)||200)>w-8&&(v=w-((x==null?void 0:x.width)||200)-8),x&&_+x.height>b-8&&(_=g.top-(x.height+4)),l({top:_,left:v}),c(!0)}})):c(!1)},[n]),n?t.jsx("div",{className:s?`w-menu ${s}`:"w-menu",ref:d,style:{position:"fixed",zIndex:1e3,width:"max-content",minWidth:140,maxWidth:240,...a,top:`${i.top}px`,left:`${i.left}px`,visibility:m?"visible":"hidden",opacity:m?1:0,transition:m?"opacity 0.15s ease-in-out":"none"},children:e}):null},ks=({children:e})=>{const{openChange:a,open:s}=Hc(),n=o.useCallback(()=>{a(!s)},[s,a]);return t.jsx("div",{style:{position:"relative",display:"inline-flex"},onClick:n,"data-dropdown-trigger":!0,children:e})},ea=o.forwardRef(({$destructive:e,className:a,...s},n)=>t.jsx("button",{ref:n,className:`w-menu-item${e?" w-menu-item--danger":""}${a?` ${a}`:""}`,...s}));ea.displayName="DropdownItem";const Fc=()=>t.jsx("div",{style:{height:"0.5px",background:"var(--wa-border)",width:"100%",margin:"4px 0"}}),Tc=o.forwardRef(({className:e,style:a,...s},n)=>t.jsx("form",{ref:n,className:e,style:{display:"flex",flexDirection:"column",gap:16,...a},...s}));Tc.displayName="Form";const We=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:`w-field${e?` ${e}`:""}`,...a}));We.displayName="FormGroup";const Ve=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:`w-label${e?` ${e}`:""}`,...a}));Ve.displayName="Label";const xe=o.forwardRef(({as:e="input",className:a,...s},n)=>{const i=`w-input${a?` ${a}`:""}`;return e==="textarea"?t.jsx("textarea",{className:i,...s}):t.jsx("input",{ref:n,className:i,...s})});xe.displayName="Input";const ye=({size:e,className:a})=>t.jsx("div",{className:a,style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:e?`${e}px`:"100%"},children:t.jsx("span",{className:"w-spin",style:{width:e??40,height:e??40}})}),Oa=({checked:e,onChange:a})=>t.jsxs("label",{className:"w-switch","data-on":e?"":void 0,children:[t.jsx("input",{type:"checkbox",checked:e,onChange:s=>a(s.target.checked),style:{position:"absolute",opacity:0,width:0,height:0}}),t.jsx("span",{className:"w-switch-track",children:t.jsx("span",{className:"w-switch-knob"})})]}),Kt=(e=!1)=>{const[a,s]=o.useState(e),n=o.useCallback(()=>{s(!0)},[]),i=o.useCallback(()=>{s(!1)},[]),l=o.useCallback(()=>{s(m=>!m)},[]);return{isOpen:a,open:n,close:i,toggle:l}},Ic=({onChange:e,placeholder:a,value:s})=>t.jsxs("div",{className:"w-search",children:[t.jsx(kl,{}),t.jsx("input",{type:"text",placeholder:a,value:s,onChange:n=>e(n.target.value)})]}),se=o.forwardRef(({$primary:e,$outline:a,$destructive:s,$fullWidth:n,$size:i,className:l,style:m,...c},d)=>{const h=`w-btn ${s?"w-btn--danger-solid":a?"w-btn--secondary":"w-btn--primary"}${i==="sm"?" w-btn--sm":i==="lg"?" w-btn--lg":""}${l?` ${l}`:""}`;return t.jsx("button",{ref:d,className:h,style:n?{width:"100%",...m}:m,...c})});se.displayName="Button";const Vc=e=>({position:"absolute",top:"calc(100% + 6px)",left:0,width:"100%",maxHeight:260,overflowY:"auto",zIndex:1e3,opacity:e?1:0,transform:e?"scale(1)":"scale(0.97)",transformOrigin:"top",pointerEvents:e?"auto":"none",transition:"opacity 0.15s ease, transform 0.15s ease"}),zc={width:"100%",height:32,padding:"0 9px",border:"none",borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,fontFamily:"var(--wa-font-sans)",fontSize:13,outline:"none",background:"transparent",color:"var(--wa-text)",marginBottom:4},Ys=({children:e})=>t.jsx("div",{style:{padding:"10px 9px",color:"var(--wa-text-faint)",fontFamily:"var(--wa-font-sans)",fontSize:12.5,textAlign:"center"},children:e}),dn=({options:e,value:a,onChange:s,placeholder:n="Select an option",disabled:i=!1,searchable:l=!1,width:m,name:c,id:d,groupsEnabled:p=!1,className:u})=>{const[h,f]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),_=p&&"options"in e[0],k=(_?e.flatMap(y=>y.options):e).find(y=>y.value===a),N=g?_?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,j=(y,E=!1)=>{E||(s(y),f(!1),x(""))},C=()=>{i||f(!h)};return o.useEffect(()=>{h&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[h,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(f(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":h?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":h,id:d,children:[t.jsx("span",{className:"w-combo-val","data-ph":k?void 0:"",children:k?k.label:n}),h?t.jsx(Qo,{size:16}):t.jsx(Dt,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:Vc(h),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:zc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),_?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Ys,{children:"No options available"}):y.options.map(R=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":R.disabled?"":void 0,onClick:()=>j(R.value,R.disabled),role:"option","aria-selected":R.value===a,children:[R.label,R.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ge,{size:16})})]},R.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Ys,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>j(y.value,y.disabled),role:"option","aria-selected":y.value===a,children:[y.label,y.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ge,{size:16})})]},y.value))})]}),c&&t.jsx("input",{type:"hidden",name:c,value:a||""})]})},Dc=({options:e,value:a,onChange:s,placeholder:n="Select options",disabled:i=!1,searchable:l=!1,width:m,name:c,id:d,groupsEnabled:p=!1,className:u})=>{const[h,f]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),_=p&&"options"in e[0],k=(_?e.flatMap(y=>y.options):e).filter(y=>a.includes(y.value)),N=g?_?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,j=(y,E=!1)=>{E||(a.includes(y)?s(a.filter(R=>R!==y)):s([...a,y]))},C=()=>{i||f(!h)};return o.useEffect(()=>{h&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[h,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(f(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":h?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":h,id:d,children:[t.jsx("span",{className:"w-combo-val","data-ph":k.length>0?void 0:"",children:k.length>0?k.map(y=>y.label).join(", "):n}),h?t.jsx(Qo,{size:16}):t.jsx(Dt,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:Vc(h),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:zc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),_?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Ys,{children:"No options available"}):y.options.map(R=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":R.disabled?"":void 0,onClick:()=>j(R.value,R.disabled),role:"option","aria-selected":a.includes(R.value),children:[R.label,a.includes(R.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ge,{size:16})})]},R.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Ys,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>j(y.value,y.disabled),role:"option","aria-selected":a.includes(y.value),children:[y.label,a.includes(y.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ge,{size:16})})]},y.value))})]}),c&&t.jsx("input",{type:"hidden",name:c,value:a.join(",")})]})},$s=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase().slice(0,2)||"?",Si=e=>e.trim().replace(/[<>"'&]/g,""),Om=e=>e.length>=2&&e.length<=100&&/^[a-zA-Z0-9\s_.-]+$/.test(e),Zm=e=>/.+@.+\..+/.test(e),Ei=(e,a)=>e.length?e.find(s=>s.name===a)||e[0]:null,Hm=({roles:e,value:a,onChange:s,fullWidth:n})=>{const[i,l]=o.useState(!1),m=o.useRef(null);return o.useEffect(()=>{if(!i)return;const c=d=>{m.current&&!m.current.contains(d.target)&&l(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]),t.jsxs("div",{ref:m,className:`w-relative${n?" w-full":" w-none"}`,children:[t.jsxs("button",{type:"button",className:`w-combo${n?" w-full":" w-rolepick-btn"}`,"data-open":i?"":void 0,onClick:()=>l(c=>!c),disabled:!e.length,children:[t.jsx("span",{className:"w-combo-val",children:(a==null?void 0:a.name)||"Role"}),t.jsx(Dt,{size:14})]}),i&&t.jsx("div",{className:"w-combo-menu w-combo-menu--pop",children:e.map(c=>t.jsxs("button",{type:"button",className:"w-combo-opt",onClick:()=>{s(c),l(!1)},children:[c.name,c.id===(a==null?void 0:a.id)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ge,{size:13})})]},c.id))})]})},Uc=({mode:e,organizationId:a,onSuccess:s,onCancel:n,onCreateOrganization:i})=>{var le;const l=e==="org",m=l?"organization":"workspace",c=l?"Organization":"Workspace",{createOrganization:d,getOrganizationRoles:p,inviteOrganizationMember:u}=Vt(),{createWorkspace:h,getWorkspaceRoles:f,createWorkspaceInvitation:g}=wa(),{organizationMemberships:x}=fa(),{refetch:w}=ot(),[b,_]=o.useState(0),[v,k]=o.useState(""),[N,j]=o.useState(""),[C,y]=o.useState(),[E,R]=o.useState(null),[F,A]=o.useState(!1),[I,L]=o.useState(null),[S,O]=o.useState(a),[P,$]=o.useState(!1),Z=o.useRef(null),H=o.useRef(null),[M,B]=o.useState(null),[D,W]=o.useState([]),[K,ee]=o.useState([]),[ce,be]=o.useState(""),[Q,ie]=o.useState(null),ne=(le=x==null?void 0:x.find(V=>V.organization.id===S))==null?void 0:le.organization;o.useEffect(()=>()=>{E&&URL.revokeObjectURL(E)},[E]),o.useEffect(()=>{if(!P)return;const V=Y=>{Z.current&&!Z.current.contains(Y.target)&&$(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[P]);const U=V=>{var q;const Y=(q=V.target.files)==null?void 0:q[0];if(Y){if(Y.size>2*1024*1024){L("Image must be under 2 MB.");return}if(!Y.type.startsWith("image/")){L("Please choose a valid image file.");return}E&&URL.revokeObjectURL(E),L(null),y(Y),R(URL.createObjectURL(Y))}},Qe=async()=>{var q;const V=Si(v),Y=Si(N);if(!Om(V)){L(`Enter a valid ${m} name (2–100 characters).`);return}if(!l&&!S){L("Select an organization first.");return}A(!0),L(null);try{if(l){const G=await d({name:V,description:Y,image:C}),de=((q=G==null?void 0:G.data)==null?void 0:q.organization)??(G==null?void 0:G.organization)??G;B(de);const z=await p(de).catch(()=>[]);W(z),ie(Ei(z,"Member"))}else{const G=await h(S,V,C,Y),de=(G==null?void 0:G.workspace)??G,z={...de,organization:{id:S}};B(z);const me=await f(de).catch(()=>[]);W(me),ie(Ei(me,"Editor"))}await w(),_(1)}catch(G){L((G==null?void 0:G.message)||`Failed to create ${m}.`)}finally{A(!1)}},Je=()=>{const V=ce.trim();!Zm(V)||K.some(Y=>Y.email===V)||Q&&(ee(Y=>[...Y,{email:V,roleId:Q.id,roleName:Q.name}]),be(""))},Te=V=>{(V.key==="Enter"||V.key===",")&&(V.preventDefault(),Je())},Se=async()=>{if(!K.length){_(2);return}A(!0),L(null);try{for(const V of K)l?await u(M,{email:V.email,organizationRole:{id:V.roleId}}):await g(M,V.email,V.roleId);_(2)}catch(V){L((V==null?void 0:V.message)||"Some invitations could not be sent.")}finally{A(!1)}},qe=()=>{_(0),k(""),j(""),y(void 0),E&&URL.revokeObjectURL(E),R(null),B(null),W([]),ee([]),be(""),L(null)};return t.jsxs("div",{className:"w-card w-create-card",children:[t.jsxs("div",{className:"w-create-body",children:[t.jsxs("div",{className:"w-flex-col w-items-center w-gap-3 w-create-head",children:[b===0?t.jsxs("span",{className:"w-ibadge-wrap",children:[t.jsxs("button",{type:"button",className:"w-ibadge w-avatar-edit","data-busy":F?"":void 0,onClick:()=>{var V;return(V=H.current)==null?void 0:V.click()},title:`Upload ${m} logo`,"aria-label":`Upload ${m} logo`,children:[E?t.jsx("img",{src:E,alt:`${c} logo`}):l?t.jsx(ms,{}):t.jsx(ci,{}),t.jsx("span",{className:"w-avatar-veil",children:t.jsx(an,{})})]}),t.jsx("input",{ref:H,type:"file",className:"w-none",hidden:!0,accept:"image/png, image/jpeg, image/gif, image/svg+xml",onChange:U,disabled:F}),E&&t.jsx("button",{type:"button",className:"w-ibadge-x",title:"Remove logo","aria-label":"Remove logo",onClick:()=>{E&&URL.revokeObjectURL(E),R(null),y(void 0)},children:t.jsx(Ra,{})})]}):t.jsx("span",{className:`w-ibadge${b===2?" w-ibadge--done":""}`,children:b===2?t.jsx(Ge,{}):l?t.jsx(ms,{}):t.jsx(ci,{})}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-text-center",children:[t.jsx("h1",{className:"w-title-lg",children:b===0?`Create ${l?"an":"a"} ${m}`:b===1?"Invite your team":`${c} created`}),t.jsx("p",{className:"w-sub",children:b===0?`Set up a new ${m}${l?" to collaborate with your team.":" inside your organization."}`:b===1?"Add people now, or skip and do it later.":`${v} is ready to go.`})]})]}),b<2&&t.jsxs("div",{className:"w-steps w-create-steps",children:[t.jsx("i",{"data-on":""}),t.jsx("i",{"data-on":b>=1?"":void 0})]}),I&&t.jsx("div",{className:"w-banner w-banner--error w-mb-4",children:I}),b===0&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[!l&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Organization"}),t.jsxs("div",{className:"w-relative",ref:Z,children:[t.jsxs("button",{type:"button",className:"w-combo w-full","data-open":P?"":void 0,onClick:()=>$(V=>!V),disabled:F,children:[t.jsxs("span",{className:"w-combo-val w-inline w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:ne!=null&&ne.image_url?t.jsx("img",{src:ne.image_url,alt:ne.name}):$s((ne==null?void 0:ne.name)||"O").charAt(0)}),t.jsx("span",{children:(ne==null?void 0:ne.name)||"Select organization"})]}),t.jsx(Dt,{size:14})]}),P&&t.jsxs("div",{className:"w-combo-menu w-combo-menu--pop",children:[x==null?void 0:x.map(V=>{var q;const Y=!!((q=V.eligibility_restriction)!=null&&q.type)&&V.eligibility_restriction.type!=="none";return t.jsxs("button",{type:"button",className:"w-combo-opt",disabled:Y,"data-disabled":Y?"":void 0,onClick:()=>{Y||(O(V.organization.id),$(!1))},children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:V.organization.image_url?t.jsx("img",{src:V.organization.image_url,alt:V.organization.name}):$s(V.organization.name).charAt(0)}),t.jsx("span",{children:V.organization.name})]},V.organization.id)}),i&&t.jsxs("button",{type:"button",className:"w-combo-opt w-text-primary",onClick:()=>{$(!1),i()},children:[t.jsx(Nt,{size:13}),"Create new organization"]})]})]})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:[c," name"]}),t.jsx(xe,{autoFocus:!0,value:v,onChange:V=>k(V.target.value),placeholder:l?"Acme Inc":"Product",disabled:F})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Description"," ",t.jsx("span",{className:"w-secsub",children:"· optional"})]}),t.jsx(xe,{as:"textarea",className:"w-input--area",value:N,onChange:V=>j(V.target.value),placeholder:l?"What does your team do?":"What's this workspace for?",disabled:F})]}),t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:Qe,disabled:F||!v.trim(),children:[F?t.jsx(ye,{size:15}):null,"Continue",!F&&t.jsx(Qt,{size:15})]}),n&&t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-btn--block",onClick:n,disabled:F,children:"Cancel"})]})]}),b===1&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Invite by email"}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(xe,{autoFocus:!0,className:"w-grow",value:ce,onChange:V=>be(V.target.value),onKeyDown:Te,placeholder:"teammate@acme.com"}),t.jsx(Hm,{roles:D,value:Q,onChange:ie})]}),t.jsx("span",{className:"w-secsub",children:"Press Enter to add each person."})]}),K.length>0&&t.jsx("div",{className:"w-list",children:K.map(V=>t.jsxs("div",{className:"w-row",style:{gridTemplateColumns:"1fr auto",padding:"10px 0"},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:$s(V.email)}),t.jsx("span",{className:"w-truncate w-text-secondary",children:V.email})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-pill",children:V.roleName}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",title:"Remove",onClick:()=>ee(Y=>Y.filter(q=>q.email!==V.email)),children:t.jsx(Ra,{size:13})})]})]},V.email))}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-none",onClick:()=>_(2),disabled:F,children:"Skip"}),t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-grow",onClick:Se,disabled:F,children:[F?t.jsx(ye,{size:15}):null,K.length?`Invite ${K.length} & finish`:"Finish"]})]})]}),b===2&&t.jsxs("div",{className:"w-flex-col w-items-center w-gap-4",children:[t.jsxs("div",{className:"w-create-summary",children:[t.jsx("span",{className:"w-avatar w-avatar--md",children:E?t.jsx("img",{src:E,alt:v}):$s(v)}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:v}),t.jsx("span",{className:"w-secsub",children:K.length?`${K.length} invite${K.length>1?"s":""} sent`:"No invites yet"})]})]}),t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>s==null?void 0:s(M),children:["Go to ",m,t.jsx(Qt,{size:15})]}),t.jsxs("button",{type:"button",className:"w-link w-link--muted w-linkbtn w-inline w-gap-1",onClick:qe,children:[t.jsx(Io,{size:12})," Create another"]})]})]}),b===0&&t.jsx("div",{className:"w-create-foot",children:t.jsx("span",{className:"w-secsub",children:l?"Organizations group your team, billing and settings.":"Workspaces live inside an organization."})})]})},un=({onSuccess:e,onCancel:a})=>t.jsx(Me,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(Uc,{mode:"org",onSuccess:e,onCancel:a})})}),Wc=({isOpen:e,onClose:a,onCreated:s})=>{const n=()=>{s==null||s(),a==null||a()};return t.jsx(Me,{children:t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsx(ze.Content,{className:"w-dialog--create",children:t.jsx(un,{onSuccess:n,onCancel:a})})})})})},Sr=o.createContext({screen:null,setScreen:()=>{},toast:(e,a)=>{}}),_t=()=>{const e=o.useContext(Sr);if(!e)throw new Error("useScreenContext must be used within a ScreenContextProvider");return e},Ya=({title:e,description:a,onConfirm:s,onCancel:n,style:i})=>{const l=o.useRef(null);return o.useEffect(()=>{const m=c=>{l.current&&!l.current.contains(c.target)&&n()};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[n]),t.jsxs("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1e3,right:44,...i},children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("h3",{className:"w-pop-title",children:e}),a&&t.jsx("p",{className:"w-pop-sub",children:a})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:n,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:s,children:"Confirm"})]})]})},Ai=[{id:"okta",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"saml",description:"SAML",docUrl:"https://help.okta.com/en-us/content/topics/apps/apps_app_integration_wizard_saml.htm",placeholders:{entityId:"http://www.okta.com/{yourOktaDomain}",ssoUrl:"https://{yourOktaDomain}.okta.com/app/{appId}/sso/saml"},attributeMapping:{first_name:"firstName",last_name:"lastName",email:"email"}},{id:"okta-oidc",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"oidc",description:"OIDC",docUrl:"https://developer.okta.com/docs/guides/implement-oauth-for-okta/main/",placeholders:{issuerUrl:"https://{yourOktaDomain}.okta.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"azure",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/add-application-portal-setup-sso",placeholders:{entityId:"https://sts.windows.net/{tenantId}/",ssoUrl:"https://login.microsoftonline.com/{tenantId}/saml2"},attributeMapping:{first_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",last_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",email:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"}},{id:"azure-oidc",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"oidc",description:"OIDC",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc",placeholders:{issuerUrl:"https://login.microsoftonline.com/{tenantId}/v2.0",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"google",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"saml",description:"SAML",docUrl:"https://support.google.com/a/answer/6087519",placeholders:{entityId:"https://accounts.google.com/o/saml2?idpid={idpId}",ssoUrl:"https://accounts.google.com/o/saml2/idp?idpid={idpId}"},attributeMapping:{first_name:"FirstName",last_name:"LastName",email:"email"}},{id:"google-oidc",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"oidc",description:"OIDC",docUrl:"https://developers.google.com/identity/openid-connect/openid-connect",placeholders:{issuerUrl:"https://accounts.google.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"auth0",name:"Auth0",logo:"https://cdn.auth0.com/styleguide/latest/lib/logos/img/badge.png",protocol:"oidc",description:"OIDC",docUrl:"https://auth0.com/docs/authenticate/protocols/openid-connect-protocol",placeholders:{issuerUrl:"https://{yourDomain}.auth0.com/",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"onelogin",name:"OneLogin",logo:"",protocol:"saml",description:"SAML",docUrl:"https://onelogin.service-now.com/support?id=kb_article&sys_id=912bb23adbdc1cd0ca1c400e0b96197d",placeholders:{entityId:"https://app.onelogin.com/saml/metadata/{appId}",ssoUrl:"https://{subdomain}.onelogin.com/trust/saml2/http-post/sso/{appId}"}},{id:"ping",name:"PingOne",logo:"",protocol:"saml",description:"SAML",docUrl:"https://docs.pingidentity.com/pingone/latest/connector/configure-saml.html",placeholders:{entityId:"https://auth.pingone.com/{envId}",ssoUrl:"https://auth.pingone.com/{envId}/saml20/idp/sso"}},{id:"jumpcloud",name:"JumpCloud",logo:"",protocol:"saml",description:"SAML",docUrl:"https://support.jumpcloud.com/support/s/article/single-sign-on-sso-with-saml",placeholders:{entityId:"https://sso.jumpcloud.com/saml2/{appId}",ssoUrl:"https://sso.jumpcloud.com/saml2/{appId}"}},{id:"duo",name:"Duo",logo:"",protocol:"saml",description:"SAML",docUrl:"https://duo.com/docs/sso",placeholders:{entityId:"https://sso.duosecurity.com/saml2/sp/{appId}",ssoUrl:"https://sso.duosecurity.com/saml2/idp/{appId}/sso"}},{id:"keycloak",name:"Keycloak",logo:"https://www.keycloak.org/resources/images/icon.svg",protocol:"oidc",description:"OIDC",docUrl:"https://www.keycloak.org/docs/latest/securing_apps/",placeholders:{issuerUrl:"https://{host}/realms/{realm}",scopes:"openid profile email"}},{id:"adfs",name:"ADFS",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Microsoft_logo.svg/100px-Microsoft_logo.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust",placeholders:{entityId:"http://{adfsServer}/adfs/services/trust",ssoUrl:"https://{adfsServer}/adfs/ls/"}},{id:"custom-saml",name:"Custom",logo:"",protocol:"saml",description:"SAML",docUrl:"",placeholders:{}},{id:"custom-oidc",name:"Custom",logo:"",protocol:"oidc",description:"OIDC",docUrl:"",placeholders:{}}],Fm=({template:e})=>{const[a,s]=o.useState(!1);return!e.logo||a?t.jsx("span",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo--ph",children:t.jsx(Xt,{size:18,className:"w-text-muted"})}):t.jsx("img",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo",src:e.logo,alt:e.name,onError:()=>s(!0)})},Tm=({organization:e})=>{const{getEnterpriseConnections:a,createEnterpriseConnection:s,deleteEnterpriseConnection:n,testEnterpriseConnection:i,generateSCIMToken:l,getSCIMToken:m,revokeSCIMToken:c}=Vt(),{toast:d}=_t(),[p,u]=o.useState(!1),[h,f]=o.useState(null),{data:g=[],isLoading:x,mutate:w}=ke(e!=null&&e.id?`wacht-org-sso:${e.id}`:null,async()=>await(a==null?void 0:a(e))||[],{refreshInterval:3e4,revalidateOnFocus:!1}),b=async _=>{try{await(n==null?void 0:n(e,_)),w(),d("SSO connection deleted","info")}catch(v){d(v.message||"Failed to delete connection","error")}f(null)};return x?t.jsx("div",{className:"w-loading",children:t.jsx(ye,{})}):p?t.jsx(Vm,{organization:e,onClose:()=>u(!1),onCreate:async _=>{try{await(s==null?void 0:s(e,_)),w(),u(!1),d("SSO connection created","info")}catch(v){d(v.message||"Failed to create connection","error")}}}):t.jsx(t.Fragment,{children:g.length===0?t.jsxs("div",{className:"w-empty w-empty--fill",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(Xt,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"Enterprise SSO"}),t.jsx("p",{children:"Let members sign in with your identity provider."})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{onClick:()=>u(!0),children:[t.jsx(Nt,{size:16})," Configure SSO"]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-sechead",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-title",children:"Enterprise SSO"}),t.jsx("p",{className:"w-sub",children:"Configure SAML or OIDC SSO for your organization"})]})}),g.map(_=>t.jsx(Im,{connection:_,onDelete:v=>f(v),connectionToDelete:h,onConfirmDelete:b,onCancelDelete:()=>f(null),testConnection:v=>i(e,v),generateSCIMToken:v=>l(e,v),getSCIMToken:v=>m(e,v),revokeSCIMToken:v=>c(e,v),toast:d},_.id))]})})},Im=({connection:e,onDelete:a,connectionToDelete:s,onConfirmDelete:n,onCancelDelete:i,testConnection:l,generateSCIMToken:m,getSCIMToken:c,revokeSCIMToken:d,toast:p})=>{var F,A,I,L,S;const[u,h]=o.useState(null),[f,g]=o.useState(!1),[x,w]=o.useState(null),[b,_]=o.useState(null),[v,k]=o.useState(!1),[N,j]=o.useState(null);o.useEffect(()=>{c&&e.id&&c(e.id).then(h).catch(()=>{})},[e.id,c]);const C=async()=>{if(l){k(!0),j(null);try{const O=await l(e.id);j(O)}catch(O){j({success:!1,checks:{},errors:{general:O.message||"Test failed"}})}finally{k(!1)}}},y=async()=>{if(m){g(!0);try{const O=await m(e.id);w(O.token),h({exists:!0,token:O}),p("SCIM token generated. Copy it now - it won't be shown again!","info")}catch(O){p(O.message||"Failed to generate token","error")}finally{g(!1)}}},E=async()=>{if(d){g(!0);try{await d(e.id),h({exists:!1,scim_base_url:u==null?void 0:u.scim_base_url}),w(null),p("SCIM token revoked","info")}catch(O){p(O.message||"Failed to revoke token","error")}finally{g(!1)}}},R=(O,P)=>{navigator.clipboard.writeText(O),_(P),setTimeout(()=>_(null),2e3)};return t.jsxs("div",{className:"w-flex-col w-gap-4 w-sso-conn",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-start",children:[t.jsxs("h3",{className:"w-sec w-inline w-gap-2",children:[t.jsx(Xt,{size:16}),e.protocol==="oidc"?"OIDC SSO":"SAML SSO",t.jsx("span",{className:"w-pill w-pill--current",children:e.protocol.toUpperCase()})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(se,{$size:"sm",onClick:C,disabled:v,children:v?t.jsx(ye,{size:14}):"Test"}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",$outline:!0,onClick:()=>a(e.id),className:"w-text-error",children:"Remove"}),s===e.id&&t.jsx(Ya,{title:"Delete this SSO connection?",onConfirm:()=>n(e.id),onCancel:i})]})]})]}),N&&t.jsx("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"}`,children:t.jsxs("span",{className:`w-banner-txt w-flex-col w-gap-1 ${N.success?"w-text-success":"w-text-error"}`,children:[t.jsx("span",{children:N.success?"✓ Connection is valid":"✗ Connection failed"}),N.errors&&Object.entries(N.errors).map(([O,P])=>t.jsxs("div",{children:[O.replace(/_/g," "),": ",P]},O))]})}),t.jsxs("div",{className:"w-sso-detail",children:[e.protocol==="saml"?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Entity ID"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_entity_id}),t.jsx("span",{className:"w-secsub",children:"SSO URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_sso_url})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Issuer URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.oidc_issuer_url}),t.jsx("span",{className:"w-secsub",children:"Client ID"}),t.jsx("span",{className:"w-sec",children:e.oidc_client_id}),t.jsx("span",{className:"w-secsub",children:"Scopes"}),t.jsx("span",{className:"w-sec",children:e.oidc_scopes||"openid profile email"})]}),t.jsx("span",{className:"w-secsub",children:"Created"}),t.jsx("span",{className:"w-sec",children:new Date(e.created_at).toLocaleDateString()})]}),t.jsxs("div",{className:"w-flex-col w-gap-3 w-sso-scim",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center",children:[t.jsxs("div",{className:"w-sec w-inline w-gap-2",children:[t.jsx(Xt,{size:14}),"SCIM Provisioning"]}),t.jsx("div",{className:"w-flex w-wrap w-gap-2",children:!(u!=null&&u.exists)||!((F=u==null?void 0:u.token)!=null&&F.enabled)?t.jsx(se,{$size:"sm",onClick:y,disabled:f,children:f?t.jsx(ye,{size:14}):"Generate Token"}):t.jsxs(t.Fragment,{children:[t.jsx(se,{$size:"sm",onClick:y,disabled:f,children:f?t.jsx(ye,{size:14}):"Rotate"}),t.jsx(se,{$size:"sm",$outline:!0,onClick:E,disabled:f,className:"w-text-error",children:"Revoke"})]})})]}),(((A=u==null?void 0:u.token)==null?void 0:A.scim_base_url)||x)&&t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Base URL:"}),t.jsx("code",{children:((I=u==null?void 0:u.token)==null?void 0:I.scim_base_url)||"Loading..."}),((L=u==null?void 0:u.token)==null?void 0:L.scim_base_url)&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>R(u.token.scim_base_url,"scim-url"),children:b==="scim-url"?t.jsx(Ge,{size:12}):t.jsx(Ba,{size:12})})]}),x&&t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Token:"}),t.jsx("code",{children:x}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>R(x,"scim-token"),children:b==="scim-token"?t.jsx(Ge,{size:12}):t.jsx(Ba,{size:12})})]}),t.jsx("div",{className:"w-mono-faint w-text-warning",children:"⚠️ Copy this token now. It won't be shown again."})]}),(u==null?void 0:u.exists)&&((S=u==null?void 0:u.token)==null?void 0:S.enabled)&&!x&&t.jsxs("div",{className:"w-secsub",children:["Token:"," ",t.jsxs("code",{className:"w-mono-sm w-token-chip",children:[u.token.token_prefix,"..."]}),u.token.last_used_at&&t.jsxs("span",{children:[" ","· Last used:"," ",new Date(u.token.last_used_at).toLocaleDateString()]})]})]})]})},Vm=({onCreate:e,organization:a})=>{const{getOrganizationDomains:s,testEnterpriseConnectionConfig:n}=Vt(),{deployment:i}=_e(),{toast:l}=_t(),[m,c]=o.useState(!1),[d,p]=o.useState(null),[u,h]=o.useState("saml"),[f,g]=o.useState(null),[x,w]=o.useState(!1),[b,_]=o.useState({domain_id:"",idp_entity_id:"",idp_sso_url:"",idp_certificate:"",oidc_issuer_url:"",oidc_client_id:"",oidc_client_secret:"",oidc_scopes:"openid profile email",jit_enabled:!0,attr_first_name:"",attr_last_name:"",attr_email:""}),[v,k]=o.useState(!1),[N,j]=o.useState(null),{data:C=[],isLoading:y}=ke("wacht-org-verified-domains-for-sso-screen",async()=>(await(s==null?void 0:s(a))||[]).filter($=>$.verified),{revalidateOnFocus:!1}),E=P=>{p(P),h(P.protocol),P.protocol==="saml"?_($=>{var Z,H,M;return{...$,idp_entity_id:P.placeholders.entityId||"",idp_sso_url:P.placeholders.ssoUrl||"",attr_first_name:((Z=P.attributeMapping)==null?void 0:Z.first_name)||"",attr_last_name:((H=P.attributeMapping)==null?void 0:H.last_name)||"",attr_email:((M=P.attributeMapping)==null?void 0:M.email)||""}}):_($=>{var Z,H,M;return{...$,oidc_issuer_url:P.placeholders.issuerUrl||"",oidc_scopes:P.placeholders.scopes||"openid profile email",attr_first_name:((Z=P.attributeMapping)==null?void 0:Z.first_name)||"",attr_last_name:((H=P.attributeMapping)==null?void 0:H.last_name)||"",attr_email:((M=P.attributeMapping)==null?void 0:M.email)||""}})},R=i!=null&&i.backend_host?`${i.backend_host.startsWith("https://")?"":"https://"}${i.backend_host}/auth/sso/oidc/callback`:"",F=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/metadata`:"",A=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/callback`:"",I=(P,$)=>{navigator.clipboard.writeText(P),g($),setTimeout(()=>g(null),2e3)},L=async P=>{P.preventDefault();const $=Z=>Z.includes("{")||Z.includes("}");if(u==="saml"){if(!b.idp_entity_id||$(b.idp_entity_id)){l("Please enter a valid IdP Entity ID (no placeholders)","error");return}if(!b.idp_sso_url||$(b.idp_sso_url)){l("Please enter a valid IdP SSO URL (no placeholders)","error");return}if(!b.idp_certificate){l("Please provide the X.509 Certificate","error");return}}else{if(!b.oidc_issuer_url||$(b.oidc_issuer_url)){l("Please enter a valid Issuer URL (no placeholders)","error");return}if(!b.oidc_client_id||$(b.oidc_client_id)){l("Please enter a valid Client ID (no placeholders)","error");return}if(!b.oidc_client_secret){l("Please enter the Client Secret","error");return}}c(!0);try{const Z={};b.attr_first_name&&(Z.first_name=b.attr_first_name),b.attr_last_name&&(Z.last_name=b.attr_last_name),b.attr_email&&(Z.email=b.attr_email);const H=Object.keys(Z).length>0;u==="saml"?await e({protocol:"saml",domain_id:b.domain_id||void 0,idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate,jit_enabled:b.jit_enabled,...H&&{attribute_mapping:Z}}):await e({protocol:"oidc",domain_id:b.domain_id||void 0,oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret,oidc_scopes:b.oidc_scopes,jit_enabled:b.jit_enabled,...H&&{attribute_mapping:Z}})}finally{c(!1)}},S=async()=>{k(!0),j(null);const P=H=>H.includes("{")||H.includes("}"),$={},Z={};if(u==="saml"?(b.idp_entity_id?P(b.idp_entity_id)?(Z.entity_id_valid=!1,$.entity_id_valid="IdP Entity ID contains placeholder values - please replace with actual values"):Z.entity_id_valid=!0:(Z.entity_id_valid=!1,$.entity_id_valid="IdP Entity ID is required"),b.idp_sso_url?P(b.idp_sso_url)?(Z.sso_url_valid=!1,$.sso_url_valid="IdP SSO URL contains placeholder values - please replace with actual values"):Z.sso_url_valid=!0:(Z.sso_url_valid=!1,$.sso_url_valid="IdP SSO URL is required"),b.idp_certificate?Z.certificate_provided=!0:(Z.certificate_provided=!1,$.certificate_provided="X.509 Certificate is required")):(b.oidc_issuer_url?P(b.oidc_issuer_url)?(Z.issuer_url_valid=!1,$.issuer_url_valid="Issuer URL contains placeholder values - please replace with actual values"):Z.issuer_url_valid=!0:(Z.issuer_url_valid=!1,$.issuer_url_valid="Issuer URL is required"),b.oidc_client_id?P(b.oidc_client_id)?(Z.client_id_valid=!1,$.client_id_valid="Client ID contains placeholder values - please replace with actual values"):Z.client_id_valid=!0:(Z.client_id_valid=!1,$.client_id_valid="Client ID is required")),Object.keys($).length>0){j({success:!1,checks:Z,errors:$}),k(!1);return}try{const H=u==="saml"?{protocol:"saml",idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate}:{protocol:"oidc",oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret},M=await(n==null?void 0:n(a,H));M&&j(M)}catch(H){j({success:!1,checks:{},errors:{general:"Test failed: "+H.message}})}finally{k(!1)}},O=P=>t.jsx(Fm,{template:P});return t.jsxs("form",{onSubmit:L,autoComplete:"off",className:"w-flex-col w-gap-4",children:[d?t.jsxs("div",{className:"w-flex w-items-center w-gap-4 w-sso-template",children:[O(d),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:d.name}),t.jsx("div",{className:"w-eyebrow",children:d.protocol})]}),t.jsx(se,{type:"button",$size:"sm",$outline:!0,onClick:()=>p(null),children:"Change"})]}):t.jsxs("div",{className:"w-flex-col w-gap-5",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"SAML Providers"}),t.jsx("div",{className:"w-grid-4",children:Ai.filter(P=>P.protocol==="saml").map(P=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(P),children:[O(P),t.jsx("span",{className:"w-secsub",children:P.name})]},P.id))})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"OIDC Providers"}),t.jsx("div",{className:"w-grid-4",children:Ai.filter(P=>P.protocol==="oidc").map(P=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(P),children:[O(P),t.jsx("span",{className:"w-secsub",children:P.name})]},P.id))})]})]}),d&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-sec",children:"Service Provider Details"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"ACS URL:"}),t.jsx("code",{children:A}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>I(A,"acs"),children:f==="acs"?t.jsx(Ge,{size:12}):t.jsx(Ba,{size:12})})]}),t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Metadata:"}),t.jsx("code",{children:F}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>I(F,"metadata"),children:f==="metadata"?t.jsx(Ge,{size:12}):t.jsx(Ba,{size:12})})]})]}):t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Callback:"}),t.jsx("code",{children:R}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>I(R,"callback"),children:f==="callback"?t.jsx(Ge,{size:12}):t.jsx(Ba,{size:12})})]})})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:d?`${d.name} Configuration`:"Configuration"}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[d&&d.docUrl&&t.jsxs("a",{href:d.docUrl,target:"_blank",rel:"noopener noreferrer",className:"w-link w-link--sm w-text-primary w-inline w-gap-1",children:[t.jsx(xu,{size:12})," Docs"]}),t.jsx(se,{type:"button",$size:"sm",$outline:!0,onClick:S,disabled:v||!d,children:v?t.jsx(ye,{size:16}):"Test Connection"}),t.jsx(se,{$size:"sm",type:"submit",disabled:m||C.length===0||!d,children:m?t.jsx(ye,{size:16}):"Create Connection"})]})]}),N&&(()=>{const P={entity_id_valid:"IdP Entity ID",sso_url_valid:"IdP SSO URL",certificate_provided:"X.509 Certificate",issuer_url_valid:"Issuer URL",client_id_valid:"Client ID",certificate_valid:"Certificate Valid",sso_url_reachable:"SSO URL Reachable",discovery_reachable:"Discovery Endpoint",discovery_valid:"Discovery Valid",authorization_endpoint:"Authorization Endpoint",token_endpoint:"Token Endpoint",issuer_valid:"Issuer URL Valid"};return t.jsxs("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"} w-flex-col w-gap-3`,children:[t.jsx("div",{className:`w-sec ${N.success?"w-text-success":"w-text-error"}`,children:N.success?"✓ All checks passed":"✗ Some checks failed"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:Object.entries(N.checks).map(([$,Z])=>{var H;return t.jsxs("div",{className:"w-flex w-items-start w-gap-2 w-sso-check",children:[t.jsx("span",{className:`w-sso-check-mark ${Z?"w-text-success":"w-text-error"}`,children:Z?"✓":"✗"}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:P[$]||$.replace(/_/g," ").replace(/\b\w/g,M=>M.toUpperCase())}),((H=N.errors)==null?void 0:H[$])&&t.jsx("div",{className:"w-secsub w-text-error",children:N.errors[$]})]})]},$)})})]})})(),t.jsxs("div",{className:"w-grid-2",children:[!d&&t.jsxs(We,{children:[t.jsx(Ve,{children:"Protocol *"}),t.jsxs("select",{className:"w-input",value:u,onChange:P=>h(P.target.value),children:[t.jsx("option",{value:"saml",children:"SAML"}),t.jsx("option",{value:"oidc",children:"OpenID Connect (OIDC)"})]})]}),t.jsxs(We,{className:"w-col-full",children:[t.jsx(Ve,{children:"Domain *"}),y?t.jsx("div",{className:"w-secsub",children:"Loading domains..."}):C.length===0?t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"No verified domains found. Please add and verify a domain first."})}):t.jsxs("select",{className:"w-input",value:b.domain_id,onChange:P=>_({...b,domain_id:P.target.value}),required:!0,children:[t.jsx("option",{value:"",children:"Select a verified domain"}),C.map(P=>t.jsx("option",{value:P.id,children:P.fqdn},P.id))]})]}),u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs(We,{children:[t.jsx(Ve,{children:"IdP Entity ID *"}),t.jsx(xe,{type:"text",value:b.idp_entity_id,onChange:P=>_({...b,idp_entity_id:P.target.value}),placeholder:"https://idp.example.com/entity",required:!0})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"IdP SSO URL *"}),t.jsx(xe,{type:"url",value:b.idp_sso_url,onChange:P=>_({...b,idp_sso_url:P.target.value}),placeholder:"https://idp.example.com/sso",required:!0})]}),t.jsxs(We,{className:"w-col-full",children:[t.jsx(Ve,{children:"X.509 Certificate *"}),t.jsx(xe,{as:"textarea",value:b.idp_certificate,onChange:P=>_({...b,idp_certificate:P.target.value}),placeholder:"-----BEGIN CERTIFICATE-----...",required:!0,className:"w-input--area w-input--mono"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs(We,{children:[t.jsx(Ve,{children:"Issuer URL *"}),t.jsx(xe,{type:"url",value:b.oidc_issuer_url,onChange:P=>_({...b,oidc_issuer_url:P.target.value}),placeholder:"https://login.example.com",required:!0})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Client ID *"}),t.jsx(xe,{type:"text",value:b.oidc_client_id,onChange:P=>_({...b,oidc_client_id:P.target.value}),placeholder:"your-client-id",required:!0,autoComplete:"off","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Client Secret *"}),t.jsx(xe,{type:"password",value:b.oidc_client_secret,onChange:P=>_({...b,oidc_client_secret:P.target.value}),placeholder:"your-client-secret",required:!0,autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Scopes"}),t.jsx(xe,{type:"text",value:b.oidc_scopes,onChange:P=>_({...b,oidc_scopes:P.target.value}),placeholder:"openid profile email"})]})]}),t.jsx(We,{className:"w-col-full",children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:"Enable JIT Provisioning"}),t.jsx("div",{className:"w-secsub",children:"When enabled, new users are automatically created on their first SSO login. When disabled, only pre-existing users can sign in via SSO."})]}),t.jsx(Oa,{checked:b.jit_enabled,onChange:()=>_({...b,jit_enabled:!b.jit_enabled})})]})}),t.jsxs("div",{className:"w-col-full w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-inline w-gap-2 w-text-primary w-disclosure",onClick:()=>w(!x),children:[t.jsx("span",{className:"w-disclosure-caret",children:x?"▼":"▶"}),"Advanced Options (Attribute Mapping)"]}),x&&t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-secsub",children:"Map IdP attribute names to Wacht user fields. Leave empty to use default attribute names."}),t.jsxs("div",{className:"w-grid-3",children:[t.jsxs(We,{children:[t.jsx(Ve,{children:"First Name Attribute"}),t.jsx(xe,{type:"text",value:b.attr_first_name,onChange:P=>_({...b,attr_first_name:P.target.value}),placeholder:u==="saml"?"givenName":"given_name"})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Last Name Attribute"}),t.jsx(xe,{type:"text",value:b.attr_last_name,onChange:P=>_({...b,attr_last_name:P.target.value}),placeholder:u==="saml"?"surname":"family_name"})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Email Attribute"}),t.jsx(xe,{type:"text",value:b.attr_email,onChange:P=>_({...b,attr_email:P.target.value}),placeholder:"email"})]})]})]})]})]})]})]})]})},pt=(...e)=>e.filter(Boolean).join(" "),Mi=({className:e,...a})=>t.jsx("div",{className:pt("w-contents",e),...a}),On=({className:e,...a})=>t.jsx("div",{className:pt("w-card","w-flex-col","w-full","w-minh-full",e),...a}),zm=({className:e,...a})=>t.jsx("div",{className:pt("w-tabsbar",e),...a}),Dm=({className:e,...a})=>t.jsx("div",{className:pt("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),Va=({className:e,$isActive:a,...s})=>t.jsx("button",{className:pt("w-tab",a&&"w-tab--active",e),...s}),za=({className:e,...a})=>t.jsx("span",{className:pt("w-inline","w-gap-2",e),...a}),Um=({className:e,children:a,...s})=>t.jsx("div",{className:pt("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Er=({className:e,...a})=>t.jsx("div",{className:pt("w-sechead",e),...a}),Ri=({className:e,...a})=>t.jsx("div",{className:pt("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Li=({className:e,...a})=>t.jsx("div",{className:pt("w-grow",e),...a}),Pi=({className:e,...a})=>t.jsx("div",{className:pt("w-flex","w-items-center","w-gap-3","w-none",e),...a}),mn=({className:e,...a})=>t.jsx("div",{className:pt("w-full",e),...a}),Wm=({className:e,...a})=>t.jsx("div",{className:pt("w-page-head",e),...a}),Bm=({className:e,...a})=>t.jsx("div",{className:pt("w-grow","w-flex-col","w-gap-1",e),...a}),Gm=({className:e,...a})=>t.jsx("div",{className:pt("w-sec","w-truncate",e),...a}),qm=({className:e,...a})=>t.jsx("div",{className:pt("w-secsub","w-truncate",e),...a}),Km={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},ma=({className:e,$variant:a="neutral",children:s,...n})=>t.jsxs("span",{className:pt("w-pill",Km[a],e),...n,children:[t.jsx("span",{className:"w-dot"}),s]}),$i=({className:e,$first:a,...s})=>t.jsx("div",{className:pt("w-sec",e),...s}),Ym=({organization:e})=>{var A,I,L,S,O,P;const{switchOrganization:a,refetch:s}=ot(),{workspaces:n}=wa(),{deployment:i}=_e(),{deleteOrganization:l,updateOrganization:m}=Vt(),{toast:c}=_t(),[d,p]=o.useState((e==null?void 0:e.name)||""),[u,h]=o.useState((e==null?void 0:e.description)||""),[f,g]=o.useState(!1),[x,w]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:"",default_workspace_id:""}),[b,_]=o.useState(""),[v,k]=o.useState(!1),[N,j]=o.useState(!1),C=o.useRef({name:d,description:u,security:x,isSaving:f});o.useEffect(()=>{C.current={name:d,description:u,security:x,isSaving:f}},[d,u,x,f]);const y=o.useCallback(async()=>{if(!e)return;const $=C.current;try{g(!0),await m(e,{name:$.name,description:$.description,whitelisted_ips:$.security.allowed_ips.split(`
|
|
103
|
-
`).filter(Z=>Z.trim()),enable_ip_restriction:$.security.ip_restrictions,enforce_mfa:$.security.mfa_required,auto_assigned_workspace_id:$.security.default_workspace_id||"0"}),c("Changes saved","info")}catch(Z){c(Z.message||"Failed to save changes","error")}finally{g(!1)}},[e,m,c]),E=o.useCallback(()=>{C.current.isSaving||y()},[y]);o.useEffect(()=>{var $;e&&(p(e.name||""),h(e.description||""),w({allowed_ips:(($=e.whitelisted_ips)==null?void 0:$.join(`
|
|
104
|
-
`))
|
|
105
|
-
10.0.0.0/24`,className:"w-input--area w-input--mono"})]})]})]}),((P=i==null?void 0:i.b2b_settings)==null?void 0:P.allow_org_deletion)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx($i,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start w-gap-3",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2 w-full",children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete organization"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this organization, there is no going back."})]}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{j(!N),_("")},children:N?"Cancel":"Delete organization"})]}),N&&t.jsxs("div",{className:"w-flex-col w-gap-3 w-full",children:[t.jsxs(We,{children:[t.jsxs(Ve,{htmlFor:"confirm_org_name",children:["Type"," ",t.jsx("strong",{children:e.name})," ","to confirm"]}),t.jsx(xe,{id:"confirm_org_name",type:"text",value:b,onChange:$=>_($.target.value),placeholder:e.name})]}),t.jsx(se,{$size:"sm",$destructive:!0,onClick:F,disabled:b!==e.name||v,children:v?t.jsx(ye,{size:12}):"Delete forever"})]})]})]})]}):t.jsx(ye,{})},Ar=(e,a)=>a?`${e} ${a}`:e,$t=o.forwardRef(({className:e,...a},s)=>t.jsx("table",{ref:s,className:Ar("w-table",e),...a}));$t.displayName="Table";const Ot=o.forwardRef((e,a)=>t.jsx("thead",{ref:a,...e}));Ot.displayName="TableHead";const Zt=o.forwardRef((e,a)=>t.jsx("tbody",{ref:a,...e}));Zt.displayName="TableBody";const it=o.forwardRef((e,a)=>t.jsx("tr",{ref:a,...e}));it.displayName="TableRow";const $e=o.forwardRef((e,a)=>t.jsx("th",{ref:a,...e}));$e.displayName="TableHeader";const Ke=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:e,...a}));Ke.displayName="TableCell";const Qm=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Ar("w-td--flex",e),...a}));Qm.displayName="TableCellFlex";const Ht=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Ar("w-td--actions",e),...a}));Ht.displayName="ActionsCell";const Ct=({title:e,description:a,icon:s,action:n})=>t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:s??t.jsx(Ou,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:e}),t.jsx("p",{children:a})]}),n&&t.jsx("div",{className:"w-empty-action",children:n})]}),xt=({triggerRef:e,isOpen:a,minWidth:s=300,defaultMaxHeight:n=400,offset:i=8,contentRef:l})=>{const[m,c]=o.useState();return o.useEffect(()=>{if(!a||!e.current){c(void 0);return}const d=()=>{var N;if(!e.current)return;const u=e.current.getBoundingClientRect(),h=window.innerWidth,f=window.innerHeight,g=((N=l==null?void 0:l.current)==null?void 0:N.offsetWidth)||s,x=f-u.bottom,w=u.top,b={};x>=w?(b.top=u.bottom+i,b.maxHeight=Math.min(n,x-i*2)):(b.bottom=f-u.top+i,b.maxHeight=Math.min(n,w-i*2));const _=h-u.left,v=u.right,k=_>=v?u.left:u.right-g;b.left=Math.max(i,Math.min(h-g-i,k)),c(b)},p=requestAnimationFrame(d);return window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0)}},[a,s,n,i,l]),m},Oi=({onClose:e,domain:a,triggerRef:s})=>{const n=o.useRef(null),[i,l]=o.useState(),[m,c]=o.useState(""),[d,p]=o.useState(!1),[u,h]=o.useState(!1),{addDomain:f,verifyDomain:g}=ha(),{toast:x}=_t(),w=xt({contentRef:n,triggerRef:s??{current:null},isOpen:u,minWidth:360,defaultMaxHeight:420}),b=j=>/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(j),_=j=>j.trim().toLowerCase().replace(/^https?:\/\//,""),v=async()=>{const j=_(m);if(!j){x("Please enter a domain name","error");return}if(!b(j)){x("Please enter a valid domain (e.g., example.com)","error");return}if(j.length>253){x("Domain name is too long","error");return}p(!0);try{const C=await f({fqdn:j});x("Domain added","info"),l(C.data)}catch(C){x(C.message||"Failed to add domain. Please try again.","error")}finally{p(!1)}},k=async()=>{if(!(!i||d)){p(!0);try{await g(i),e==null||e(),x("Domain verified","info")}catch(j){x(j.message||"Failed to verify domain. Check DNS records and try again.","error")}finally{p(!1)}}};if(o.useEffect(()=>{h(!0);const j=y=>{n.current&&!n.current.contains(y.target)&&(e==null||e())},C=y=>{y.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",j),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("keydown",C)}},[e]),o.useEffect(()=>{a&&l(a)},[a]),!u)return null;const N={position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"};return i?t.jsxs("div",{ref:n,className:"w-pop w-pop--wide",style:N,onClick:j=>j.stopPropagation(),role:"dialog","aria-labelledby":"verify-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"verify-domain-title",children:"Verify domain"}),t.jsx("p",{className:"w-pop-sub",children:"Add this DNS record, then verify."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Type"}),t.jsx(xe,{value:i==null?void 0:i.verification_dns_record_type,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(xe,{value:i==null?void 0:i.verification_dns_record_name,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Value"}),t.jsx(xe,{value:i==null?void 0:i.verification_dns_record_data,disabled:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:d,children:d?t.jsx(ye,{size:12}):"Verify"})]})]}):t.jsxs("div",{ref:n,className:"w-pop w-pop--wide",style:N,onClick:j=>j.stopPropagation(),role:"dialog","aria-labelledby":"add-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"add-domain-title",children:"Add domain"}),t.jsx("p",{className:"w-pop-sub",children:"Verified members auto-join this org."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Domain"}),t.jsx(xe,{type:"text",placeholder:"example.com",value:m,onChange:j=>c(j.target.value),onKeyDown:j=>{j.key==="Enter"&&m&&v()},autoFocus:!0,"aria-label":"Domain name"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!m||d,children:d?t.jsx(ye,{size:12}):"Continue"})]})]})},Jm=({organization:e})=>{const{getOrganizationDomains:a,removeOrganizationDomain:s}=Vt(),[n,i]=o.useState(null),[l,m]=o.useState(!1),[c,d]=o.useState(null),[p,u]=o.useState(new Set),h=o.useRef(null),f=o.useRef({}),{data:g=[],isLoading:x,mutate:w}=ke(e!=null&&e.id?`wacht-org-domains:${e.id}`:null,async()=>(await(a==null?void 0:a(e))||[]).map(k=>({...k,verified:k.verified!==void 0?k.verified:!1}))),b=(v,k)=>{u(N=>{const j=new Set(N);return k?j.add(v):j.delete(v),j})},_=async v=>{b(v.id,!0);try{await s(e,v),w()}finally{b(v.id,!1),i(null)}};return x?t.jsx(ye,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Er,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Domains"}),t.jsx("div",{className:"w-secsub",children:"Users with verified domain emails auto-join this organization."})]}),t.jsx(se,{ref:h,onClick:()=>m(!0),$size:"sm",children:"Add domain"}),l&&t.jsx(Oi,{onClose:()=>{m(!1),w()},triggerRef:h})]}),g!=null&&g.length?t.jsx(mn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Domain"}),t.jsx($e,{children:"Status"}),t.jsx($e,{children:"Added"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:g.map(v=>{const k=p.has(v.id);return t.jsxs(it,{children:[t.jsx(Ke,{children:v.fqdn}),t.jsx(Ke,{children:v.verified?t.jsx(ma,{$variant:"success",children:"Verified"}):t.jsx(ma,{$variant:"warning",children:"Pending"})}),t.jsx(Ke,{children:new Date(v.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{ref:N=>{N&&(f.current[v.id]=N)},$size:"sm",$outline:!0,disabled:k,onClick:()=>d(v.id),children:v.verified?"View DNS":"Verify"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:k,onClick:()=>i(v.id),children:k?t.jsx(ye,{size:12}):"Remove"})]})})]},v.id)})})]})}):t.jsx(Ct,{title:"No domains added",description:"Users with verified domain emails automatically join this organization."}),n&&t.jsx(Ya,{title:"Remove domain?",description:"Active users aren't affected, but new users with this domain won't auto-join.",onConfirm:()=>{const v=g.find(k=>k.id===n);v&&_(v)},onCancel:()=>i(null)}),c&&t.jsx(Oi,{domain:g.find(v=>v.id===c),onClose:()=>d(null),triggerRef:{current:f.current[c]}})]})},Bc=({onClose:e,onSuccess:a,roles:s,triggerRef:n})=>{const i=o.useRef(null),[l,m]=o.useState(""),[c,d]=o.useState(null),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{inviteMember:g}=ha(),{toast:x}=_t(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:360,defaultMaxHeight:360}),b=s.map(k=>({value:k.id,label:k.name})),_=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=l.trim().toLowerCase();if(!(!k||!c)){if(!_(k)){x("Please enter a valid email address","error");return}if(k.length>320){x("Email address is too long","error");return}u(!0);try{await g({email:k,organizationRole:c}),a==null||a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{u(!1)}}};return o.useEffect(()=>{f(!0);const k=j=>{i.current&&!i.current.contains(j.target)&&(e==null||e())},N=j=>{j.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]),h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email"}),t.jsx(xe,{type:"email",placeholder:"colleague@company.com",value:l,onChange:k=>m(k.target.value),onKeyDown:k=>{k.key==="Enter"&&l&&c&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Role"}),t.jsx(dn,{options:b,value:c==null?void 0:c.id,onChange:k=>d(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!c||p,children:p?t.jsx(ye,{size:12}):"Send invite"})]})]}):null},Xm=({organization:e})=>{const{getOrganizationMembers:a,getOrganizationRoles:s,addRoleToOrganizationMember:n,removeRoleFromOrganizationMember:i,removeOrganizationMember:l}=Vt(),{session:m}=ot(),{toast:c}=_t(),[d,p]=o.useState(""),[u,h]=o.useState(1),[f]=o.useState(10),[g,x]=o.useState(!1),[w,b]=o.useState(new Set),_=o.useRef(null),[v,k]=o.useState(d);o.useEffect(()=>{const S=setTimeout(()=>{k(d),h(1)},500);return()=>clearTimeout(S)},[d]);const{data:N,mutate:j}=ke(e?`wacht-api-organizations:${e.id}:members:${u}:${f}:${v}`:null,()=>a==null?void 0:a(e,{page:u,limit:f,search:v}),{keepPreviousData:!0}),C=(N==null?void 0:N.data)||[],y=(N==null?void 0:N.meta)||{total:0,limit:10},E=Math.ceil(y.total/(y.limit||10)),{data:R=[]}=ke(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),F=R,A=(S,O)=>{b(P=>{const $=new Set(P);return O?$.add(S):$.delete(S),$})},I=async(S,O,P)=>{A(S.id,!0);try{P?(await i(e,S,O),c("Role removed","info")):(await n(e,S,O),c("Role added","info")),j()}catch($){c($.message||"Failed to update role","error")}finally{A(S.id,!1)}},L=async S=>{A(S.id,!0);try{await l(e,S),j(),c("Member removed","info")}catch(O){c(O.message||"Failed to remove member","error")}finally{A(S.id,!1)}};return N?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Ic,{value:d,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[y.total>0&&t.jsxs("div",{className:"w-secsub",children:[y.total," member",y.total!==1?"s":""]}),t.jsx(se,{ref:_,onClick:()=>x(!0),$size:"sm",children:"Invite"})]})]}),g&&t.jsx(Bc,{onClose:()=>x(!1),onSuccess:()=>{j(),x(!1)},roles:F,triggerRef:_}),C.length===0?t.jsx(Ct,{title:d?"No members match":"No members yet",description:"Invite someone or connect a corporate domain to auto-join."}):t.jsx(mn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Member"}),t.jsx($e,{children:"Joined"}),t.jsx($e,{children:"Roles"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:C.map(S=>{var $,Z;const O=(($=S.user)==null?void 0:$.id)===((Z=m==null?void 0:m.active_signin)==null?void 0:Z.user_id),P=w.has(S.id);return t.jsxs(it,{children:[t.jsx(Ke,{children:t.jsx(e4,{member:S,isCurrentUser:O})}),t.jsx(Ke,{children:new Date(S.created_at).toLocaleDateString()}),t.jsx(Ke,{children:t.jsx(t4,{member:S,roles:F,onToggle:I,disabled:P})}),t.jsx(Ht,{children:t.jsx("div",{className:"w-actions",children:t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:P||O,onClick:()=>L(S),title:O?"You cannot remove yourself":"Remove member",children:P?t.jsx(ye,{size:12}):"Remove"})})})]},S.id)})})]})}),E>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4 w-mt-6",children:[t.jsx(se,{onClick:()=>h(S=>Math.max(1,S-1)),disabled:u===1,$size:"sm",$outline:!0,children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",E]}),t.jsx(se,{onClick:()=>h(S=>Math.min(E,S+1)),disabled:u===E,$size:"sm",$outline:!0,children:"Next"})]})]}):t.jsx(ye,{})},e4=({member:e,isCurrentUser:a})=>{var l,m;const s=e.user,n=(c="",d="")=>`${c[0]||""}${d[0]||""}`.toUpperCase()||"?",i=s?`${s.first_name||""} ${s.last_name||""}`.trim()||((l=s.primary_email_address)==null?void 0:l.email):"Unknown";return t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx("div",{className:"w-avatar w-avatar--md",children:s!=null&&s.profile_picture_url?t.jsx("img",{src:s.profile_picture_url,alt:i}):n(s==null?void 0:s.first_name,s==null?void 0:s.last_name)}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:i}),a&&t.jsx(ma,{$variant:"neutral",children:"You"})]}),t.jsx("span",{className:"w-secsub",children:(m=s==null?void 0:s.primary_email_address)==null?void 0:m.email})]})]})},t4=({member:e,roles:a,onToggle:s,disabled:n})=>{var c;const i=e.roles||[],l=d=>i.some(p=>p.id===d),m=i.length===0?"No role":i.length===1?(c=i[0])==null?void 0:c.name:`${i.length} roles`;return t.jsxs(js,{children:[t.jsx(ks,{children:t.jsxs(se,{$size:"sm",$outline:!0,disabled:n,className:"w-justify-between w-rolepick-btn",children:[m,t.jsx(Dt,{size:12})]})}),t.jsx(_s,{children:a.length===0?t.jsx("div",{className:"w-secsub w-menu-head",children:"No roles configured"}):a.map(d=>{const p=l(d.id);return t.jsx(ea,{onClick:()=>s(e,d,p),children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-3 w-full",children:[t.jsx("span",{children:d.name}),p&&t.jsx(Ge,{size:13,className:"w-text-primary"})]})},d.id)})})]})},a4=e=>{const a=e.expires_at;return a?new Date(a).getTime()<Date.now():!1},s4=({organization:e})=>{const{getOrganizationInvitations:a,getOrganizationRoles:s,discardOrganizationInvitation:n,resendOrganizationInvitation:i}=Vt(),{toast:l}=_t(),[m,c]=o.useState(!1),[d,p]=o.useState(new Set),u=o.useRef(null),{data:h=[],isLoading:f,mutate:g}=ke(e?`wacht-api-organizations:${e.id}:invitations`:null,()=>(a==null?void 0:a(e))||[]),{data:x=[],isLoading:w}=ke(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),b=x,_=(N,j)=>{p(C=>{const y=new Set(C);return j?y.add(N):y.delete(N),y})},v=async N=>{_(N.id,!0);try{await n(e,N),g(),l("Invitation cancelled","info")}catch(j){l(j.message||"Failed to cancel invitation","error")}finally{_(N.id,!1)}},k=async N=>{_(N.id,!0);try{await i(e,N),l("Invitation resent","info")}catch(j){l(j.message||"Failed to resend invitation","error")}finally{_(N.id,!1)}};return f||w?t.jsx(ye,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Er,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this organization."})]}),t.jsx(se,{ref:u,onClick:()=>c(!0),$size:"sm",children:"Invite"})]}),m&&t.jsx(Bc,{onClose:()=>c(!1),onSuccess:()=>{g(),c(!1)},roles:b,triggerRef:u}),h.length===0?t.jsx(Ct,{title:"No pending invitations",description:"Invite members to collaborate."}):t.jsx(mn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Email"}),t.jsx($e,{children:"Role"}),t.jsx($e,{children:"Status"}),t.jsx($e,{children:"Invited"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:h.map(N=>{var y;const j=a4(N),C=d.has(N.id);return t.jsxs(it,{children:[t.jsx(Ke,{children:N.email}),t.jsx(Ke,{children:((y=N.initial_organization_role)==null?void 0:y.name)||"No role"}),t.jsx(Ke,{children:j?t.jsx(ma,{$variant:"danger",children:"Expired"}):t.jsx(ma,{$variant:"warning",children:"Pending"})}),t.jsx(Ke,{children:new Date(N.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{$size:"sm",$outline:!0,disabled:C,onClick:()=>k(N),children:"Resend"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:C,onClick:()=>v(N),children:C?t.jsx(ye,{size:12}):"Cancel"})]})})]},N.id)})})]})})]})},Zi=({onClose:e,onSuccess:a,role:s,triggerRef:n})=>{var j;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[c,d]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{deployment:g}=_e(),{toast:x}=_t(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:400,defaultMaxHeight:500}),b=!!s,_=Array.isArray((j=g==null?void 0:g.b2b_settings)==null?void 0:j.organization_permissions)?g.b2b_settings.organization_permissions.map(C=>({value:C,label:C})):[];o.useEffect(()=>{f(!0);const C=R=>{i.current&&!i.current.contains(R.target)&&(e==null||e())},y=R=>{R.key==="Escape"&&(e==null||e())},E=setTimeout(()=>{document.addEventListener("mousedown",C),document.addEventListener("keydown",y)},100);return()=>{clearTimeout(E),document.removeEventListener("mousedown",C),document.removeEventListener("keydown",y)}},[e]);const v=C=>C.trim().replace(/[<>"'&]/g,""),k=C=>C.length>=2&&C.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(C),N=async()=>{const C=v(l);if(!C){x("Please enter a role name","error");return}if(!k(C)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(c.length===0){x("Please select at least one permission","error");return}u(!0);try{const y={id:s==null?void 0:s.id,name:C,permissions:c};a==null||a(y)}catch(y){x(y.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:C=>C.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(xe,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:C=>m(C.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Dc,{options:_,value:c,onChange:d,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:!l||p,children:p?t.jsx(ye,{size:12}):b?"Update":"Create"})]})]}):null};function Mr(e){return typeof e=="object"&&e!==null}function Gc(e,a){const s=e[a];return typeof s=="string"?s.length>0&&s!=="0":typeof s=="number"?Number.isFinite(s)&&s>0:!1}function n4(e,a){const s=e[a];return typeof s=="boolean"?s:null}function qc(e){if(!Mr(e))return!1;const a=n4(e,"is_deployment_level");return a!==null?a:!1}function r4(e){return!Mr(e)||qc(e)?!1:Gc(e,"organization_id")}function dr(e){return!Mr(e)||qc(e)?!1:Gc(e,"workspace_id")}const i4=({organization:e})=>{var j;const{getOrganizationRoles:a,removeOrganizationRoles:s}=Vt(),{deployment:n}=_e(),[i,l]=o.useState({isOpen:!1}),[m,c]=o.useState(null),[d,p]=o.useState(null),[u,h]=o.useState(new Set),f=o.useRef(null),g=o.useRef(new Map),{data:x=[],isLoading:w,mutate:b}=ke(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(a==null?void 0:a(e))||[]),_=(C,y)=>{h(E=>{const R=new Set(E);return y?R.add(C):R.delete(C),R})},v=async C=>{try{await new Promise(y=>setTimeout(y,500)),c({text:`Role ${C.id?"updated":"created"} successfully`,type:"success"}),l({isOpen:!1}),b()}catch(y){const E=y instanceof Error?y.message:"Failed to save role";c({text:E,type:"error"})}finally{setTimeout(()=>c(null),3e3)}},k=async C=>{_(C.id,!0);try{await s(e,C),b()}finally{_(C.id,!1),p(null)}};if(w&&x.length===0)return t.jsx(ye,{});const N=C=>{const y=r4(C),E=u.has(C.id),R=C.permissions.length;return t.jsxs(it,{children:[t.jsx(Ke,{children:t.jsxs("span",{className:"w-inline w-gap-2 w-sec",children:[C.name,!y&&t.jsx(ma,{$variant:"neutral",children:"Default"})]})}),t.jsx(Ke,{children:R===0?t.jsx(ma,{$variant:"neutral",children:"No permissions"}):t.jsxs("div",{className:"w-inline w-items-center w-gap-2",children:[t.jsxs(ma,{$variant:"primary",children:[R," ",R===1?"permission":"permissions"]}),t.jsx("span",{className:"w-truncate w-text-secondary w-maxw-sm",children:C.permissions.join(", ")})]})}),t.jsx(Ht,{children:y?t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{ref:F=>{F&&g.current.set(C.id,F)},$size:"sm",$outline:!0,disabled:E,onClick:()=>l({isOpen:!0,role:C,triggerElement:g.current.get(C.id)??null}),children:"Edit"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:E,onClick:()=>p(C.id),children:E?t.jsx(ye,{size:12}):"Delete"})]}):t.jsx("span",{className:"w-secsub",children:"Read-only"})})]},C.id)};return t.jsxs(t.Fragment,{children:[m&&t.jsxs("div",{className:`w-banner ${m.type==="success"?"w-banner--success":"w-banner--error"} w-mb-4`,children:[m.type==="success"?t.jsx(Ge,{size:16}):t.jsx(Ha,{size:16}),t.jsx("span",{className:"w-banner-txt",children:m.text})]}),t.jsxs(Er,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for members."})]}),((j=n==null?void 0:n.b2b_settings)==null?void 0:j.custom_org_role_enabled)&&t.jsx(se,{ref:f,onClick:()=>l({isOpen:!0,triggerElement:f.current}),$size:"sm",children:"Add role"})]}),i.isOpen&&!i.role&&t.jsx(Zi,{onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||f.current}}),x.length===0?t.jsx(Ct,{title:"No roles yet",description:"Define custom roles to manage granular permissions."}):t.jsx(t.Fragment,{children:t.jsx(mn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Role"}),t.jsx($e,{children:"Permissions"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:x.map(N)})]})})}),d&&t.jsx(Ya,{title:"Delete role?",description:"This action cannot be undone. Users with this role might lose access to certain features.",onConfirm:()=>{const C=x.find(y=>y.id===d);C&&k(C)},onCancel:()=>p(null)}),i.isOpen&&i.role&&t.jsx(Zi,{role:i.role,onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||null}})]})},o4=()=>{const{activeOrganization:e,loading:a}=ha(),[s,n]=o.useState(null);return o.useEffect(()=>{e?n(e):!a&&!e&&s&&n(null)},[e,a,s]),{activeOrganization:s||e,loading:a}},Kc=()=>{var w,b,_;const{loading:e,activeOrganization:a}=o4(),{updateOrganization:s}=ha(),{deployment:n}=_e(),[i,l]=o.useState("general"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((v,k="info")=>{c(v),p(k),setTimeout(()=>c(null),3e3)},[]),x=async v=>{var N;const k=(N=v.target.files)==null?void 0:N[0];if(k){if(k.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!k.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s({image:k}),g("Logo updated","info")}catch(j){g((j==null?void 0:j.message)||"Failed to update logo","error")}finally{h(!1),f.current&&(f.current.value="")}}};return e&&!a?t.jsx(Me,{children:t.jsx(On,{className:"w-items-center w-justify-center",children:t.jsx(ye,{})})}):a?t.jsx(Me,{children:t.jsx(Mi,{children:t.jsx(Sr.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(On,{className:"w-relative",children:[t.jsxs(Wm,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var v;return(v=f.current)==null?void 0:v.click()},disabled:u,title:"Change logo","aria-label":"Change organization logo",children:[a.image_url?t.jsx("img",{src:a.image_url,alt:a.name}):((w=a.name)==null?void 0:w.slice(0,2).toUpperCase())||"O",t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(ye,{size:14}):t.jsx(an,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(Bm,{children:[t.jsx(Gm,{children:a.name}),t.jsx(qm,{children:a.member_count!=null?`${a.member_count} members`:"Organization settings"})]})]}),t.jsx(zm,{children:t.jsxs(Dm,{children:[t.jsx(Va,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(za,{children:[t.jsx(Sa,{size:16})," General"]})}),t.jsx(Va,{$isActive:i==="domains",onClick:()=>l("domains"),children:t.jsxs(za,{children:[t.jsx(Su,{size:16})," Domains"]})}),t.jsx(Va,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(za,{children:[t.jsx(ls,{size:16})," Members"]})}),t.jsx(Va,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(za,{children:[t.jsx(cl,{size:16})," Invitations"]})}),((b=n==null?void 0:n.b2b_settings)==null?void 0:b.custom_org_role_enabled)&&t.jsx(Va,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(za,{children:[t.jsx(Xt,{size:16})," Roles"]})}),((_=n==null?void 0:n.b2b_settings)==null?void 0:_.enterprise_sso_enabled)&&t.jsx(Va,{$isActive:i==="sso",onClick:()=>l("sso"),children:t.jsxs(za,{children:[t.jsx(Xt,{size:16})," SSO"]})})]})}),t.jsxs(Um,{children:[i==="general"&&t.jsx(Ym,{organization:a}),i==="domains"&&t.jsx(Jm,{organization:a}),i==="members"&&t.jsx(Xm,{organization:a}),i==="invitations"&&t.jsx(s4,{organization:a}),i==="roles"&&t.jsx(i4,{organization:a}),i==="sso"&&t.jsx(Tm,{organization:a})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Ha,{size:12}):t.jsx(Ge,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})}):t.jsx(Me,{children:t.jsx(Mi,{children:t.jsx(On,{className:"w-items-center w-justify-center",children:t.jsxs("div",{className:"w-empty",children:[t.jsx("span",{className:"w-empty-ic",children:t.jsx(ms,{size:20})}),t.jsx("h4",{children:"No Organization Selected"}),t.jsx(s0,{})]})})})})},Yc=({isOpen:e,onClose:a,title:s,showHeader:n,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{className:"w-dialog--panel",children:[n&&t.jsx(ze.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(Kc,{}),l&&t.jsx(ze.Footer,{children:l})]})})}),Rr=({organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:n})=>t.jsx(Me,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(Uc,{mode:"ws",organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:n})})}),Lr=({isOpen:e,onClose:a,onCreated:s,organizationId:n})=>{const[i,l]=o.useState(!1),[m,c]=o.useState(n),d=()=>{s==null||s(),a==null||a()},p=()=>{l(!0)},u=h=>{var g,x,w;const f=((x=(g=h==null?void 0:h.data)==null?void 0:g.organization)==null?void 0:x.id)??((w=h==null?void 0:h.organization)==null?void 0:w.id)??(h==null?void 0:h.id);f&&c(f),l(!1)};return t.jsx(Me,{children:t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsx(ze.Content,{className:"w-dialog--create",children:i?t.jsx(un,{onSuccess:u,onCancel:()=>l(!1)}):t.jsx(Rr,{organizationId:m||n,onSuccess:d,onCancel:a,onCreateOrganization:p})})})})})},ht=(...e)=>e.filter(Boolean).join(" "),l4=({className:e,...a})=>t.jsx("div",{className:ht("w-contents",e),...a}),Hi=({className:e,...a})=>t.jsx("div",{className:ht("w-card","w-flex-col","w-full","w-minh-full",e),...a}),c4=({className:e,...a})=>t.jsx("div",{className:ht("w-tabsbar",e),...a}),d4=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),Os=({$isActive:e,className:a,...s})=>t.jsx("button",{className:ht("w-tab",e&&"w-tab--active",a),...s}),Zs=({className:e,...a})=>t.jsx("span",{className:ht("w-inline","w-gap-2",e),...a}),u4=({className:e,children:a,...s})=>t.jsx("div",{className:ht("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Qs=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:ht("w-kebab",e),...a}));Qs.displayName="IconButton";const Qc=({className:e,...a})=>t.jsx("div",{className:ht("w-sechead",e),...a}),Fi=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Ti=({className:e,...a})=>t.jsx("div",{className:ht("w-grow",e),...a}),Ii=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-gap-3","w-none",e),...a}),Pr=({className:e,...a})=>t.jsx("div",{className:ht("w-full",e),...a}),m4=({className:e,...a})=>t.jsx("div",{className:ht("w-page-head",e),...a}),p4=({className:e,...a})=>t.jsx("div",{className:ht("w-grow","w-flex-col","w-gap-1",e),...a}),h4=({className:e,...a})=>t.jsx("div",{className:ht("w-sec","w-truncate",e),...a}),f4=({className:e,...a})=>t.jsx("div",{className:ht("w-secsub","w-truncate",e),...a}),Vi=({$first:e,className:a,...s})=>t.jsx("div",{className:ht("w-sec",a),...s}),w4=()=>{var E,R;const{activeWorkspace:e,loading:a,updateWorkspace:s}=zt(),{deleteWorkspace:n}=wa(),{deployment:i}=_e(),{toast:l}=_t(),[m,c]=o.useState((e==null?void 0:e.name)||""),[d,p]=o.useState((e==null?void 0:e.description)||""),[u,h]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:""}),[f,g]=o.useState(!1),[x,w]=o.useState(""),[b,_]=o.useState(!1),[v,k]=o.useState(!1);o.useEffect(()=>{var F;e&&(c(e.name||""),p(e.description||""),h({mfa_required:e.enforce_2fa||!1,ip_restrictions:e.enable_ip_restriction||!1,allowed_ips:((F=e.whitelisted_ips)==null?void 0:F.join(`
|
|
101
|
+
${X8}
|
|
102
|
+
`,tm={display:"contents"};function am(e){const a={};if(!e)return a;const s=(n,i)=>{if(i)for(const l in i){const m=i[l];typeof m=="string"&&m.trim()!==""&&(a[`--wa-ov-${n}-${l}`]=m)}};return s("light",e.light),s("dark",e.dark),a}function ts(){var s,n;const e=o.useContext(fr),a=(n=(s=e==null?void 0:e.deployment)==null?void 0:s.ui_settings)==null?void 0:n.theme_tokens;return o.useMemo(()=>am(a),[a])}const Si=o.createContext(!1),sm=o.memo(function(){return t.jsx(em,{})});function Pe({children:e,className:a,style:s,...n}){const i=o.useContext(Si),l=ts(),[m,c]=o.useState(!1);if(o.useEffect(()=>c(!0),[]),!m)return null;const d=t.jsx("div",{...n,className:a?`wacht-root ${a}`:"wacht-root",style:{...tm,...l,...s},children:e});return i?d:t.jsxs(Si.Provider,{value:!0,children:[t.jsx(sm,{}),d]})}function va({length:e=6,onComplete:a,onResend:s,error:n,isSubmitting:i=!1}){const[l,m]=o.useState(new Array(e).fill("")),[c,d]=o.useState(60),[p,u]=o.useState(!1),h=o.useRef([]),f=o.useCallback(()=>{const j=setInterval(()=>{d(v=>v<=1?(u(!0),clearInterval(j),0):v-1)},1e3);return j},[]);o.useEffect(()=>{const j=f();return()=>clearInterval(j)},[f]);const g=async()=>{var j;!p||i||!s||(await s(),u(!1),d(60),m(new Array(e).fill("")),(j=h.current[0])==null||j.focus(),f())},x=(j,v)=>{var C;if(i)return;const _=j.value,N=[...l];N[v]=_.replace(/[^0-9]/g,""),m(N);const k=N.join("");k.length===e&&a(k),_&&v<e-1&&((C=h.current[v+1])==null||C.focus())},w=(j,v)=>{var _;i||j.key==="Backspace"&&!l[v]&&v>0&&((_=h.current[v-1])==null||_.focus())},b=(j,v)=>{var C,y;if(i)return;j.preventDefault();const _=j.clipboardData.getData("text/plain").replace(/[^0-9]/g,"").slice(0,e);if(!_.length)return;const N=[...l];for(let E=0;E<_.length&&v+E<e;E++)N[v+E]=_[E];if(v===0&&_.length===e)for(let E=0;E<e;E++)N[E]=_[E];m(N);const k=N.join("");if(k.length===e)a(k),(C=h.current[e-1])==null||C.focus();else{const E=N.findIndex((M,F)=>F>=v&&!M);E!==-1&&((y=h.current[E])==null||y.focus())}};return t.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:16},children:[t.jsx("div",{className:"w-otp","data-error":n?"":void 0,children:l.map((j,v)=>t.jsx("input",{className:"w-otp-cell",type:"text",inputMode:"numeric",maxLength:1,value:j,"data-filled":j?"":void 0,onChange:_=>x(_.target,v),onKeyDown:_=>w(_,v),onPaste:_=>b(_,v),ref:_=>{h.current[v]=_},disabled:i,autoFocus:v===0},v))}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[n&&t.jsx("span",{className:"w-input-err",children:n}),s&&(p?t.jsx("button",{type:"button",className:"w-link",style:{background:"none",border:0,cursor:"pointer",fontSize:12.5},onClick:g,disabled:i,children:"Didn't receive a code? Resend"}):t.jsxs("span",{className:"w-secsub",children:["Resend code in ",c,"s"]}))]})]})}const bc=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-labelledby":"githubIconTitle",...e,children:[t.jsx("title",{id:"githubIconTitle",children:"GitHub"}),t.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.109-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.91 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})]}),yc=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#4285F4",d:"M14.9 8.161c0-.476-.039-.954-.121-1.422h-6.64v2.695h3.802a3.24 3.24 0 01-1.407 2.127v1.75h2.269c1.332-1.22 2.097-3.02 2.097-5.15z"}),t.jsx("path",{fill:"#34A853",d:"M8.14 15c1.898 0 3.499-.62 4.665-1.69l-2.268-1.749c-.631.427-1.446.669-2.395.669-1.836 0-3.393-1.232-3.952-2.888H1.85v1.803A7.044 7.044 0 008.14 15z"}),t.jsx("path",{fill:"#FBBC04",d:"M4.187 9.342a4.17 4.17 0 010-2.68V4.859H1.849a6.97 6.97 0 000 6.286l2.338-1.803z"}),t.jsx("path",{fill:"#EA4335",d:"M8.14 3.77a3.837 3.837 0 012.7 1.05l2.01-1.999a6.786 6.786 0 00-4.71-1.82 7.042 7.042 0 00-6.29 3.858L4.186 6.66c.556-1.658 2.116-2.89 3.952-2.89z"})]}),jc=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"50",height:"50",viewBox:"0 0 50 50",...e,children:t.jsx("path",{d:"M 6.9199219 6 L 21.136719 26.726562 L 6.2285156 44 L 9.40625 44 L 22.544922 28.777344 L 32.986328 44 L 43 44 L 28.123047 22.3125 L 42.203125 6 L 39.027344 6 L 26.716797 20.261719 L 16.933594 6 L 6.9199219 6 z"})}),nm=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),_c=()=>t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",children:t.jsx("path",{fill:"#0A66C2",d:"M12.225 12.225h-1.778V9.44c0-.664-.012-1.519-.925-1.519-.926 0-1.068.724-1.068 1.47v2.834H6.676V6.498h1.707v.783h.024c.348-.594.996-.95 1.684-.925 1.802 0 2.135 1.185 2.135 2.728l-.001 3.14zM4.67 5.715a1.037 1.037 0 01-1.032-1.031c0-.566.466-1.032 1.032-1.032.566 0 1.031.466 1.032 1.032 0 .566-.466 1.032-1.032 1.032zm.889 6.51h-1.78V6.498h1.78v5.727zM13.11 2H2.885A.88.88 0 002 2.866v10.268a.88.88 0 00.885.866h10.226a.882.882 0 00.889-.866V2.865a.88.88 0 00-.889-.864z"})}),kc=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M12 21.42L15.54 10.86H8.46L12 21.42Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L8.46 10.86H2.28L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M2.28 10.86L0.86 15.14C0.72 15.54 0.86 15.98 1.18 16.24L12 21.42L2.28 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M2.28 10.86H8.46L6.12 3.58C5.98 3.18 5.42 3.18 5.28 3.58L2.28 10.86Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L15.54 10.86H21.72L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M21.72 10.86L23.14 15.14C23.28 15.54 23.14 15.98 22.82 16.24L12 21.42L21.72 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M21.72 10.86H15.54L17.88 3.58C18.02 3.18 18.58 3.18 18.72 3.58L21.72 10.86Z",fill:"#E24329"})]}),rm=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})}),Cc=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{cx:"512",cy:"512",r:"512",style:{fill:"#5865f2"}}),t.jsx("path",{d:"M689.43 349a422.21 422.21 0 0 0-104.22-32.32 1.58 1.58 0 0 0-1.68.79 294.11 294.11 0 0 0-13 26.66 389.78 389.78 0 0 0-117.05 0 269.75 269.75 0 0 0-13.18-26.66 1.64 1.64 0 0 0-1.68-.79A421 421 0 0 0 334.44 349a1.49 1.49 0 0 0-.69.59c-66.37 99.17-84.55 195.9-75.63 291.41a1.76 1.76 0 0 0 .67 1.2 424.58 424.58 0 0 0 127.85 64.63 1.66 1.66 0 0 0 1.8-.59 303.45 303.45 0 0 0 26.15-42.54 1.62 1.62 0 0 0-.89-2.25 279.6 279.6 0 0 1-39.94-19 1.64 1.64 0 0 1-.16-2.72c2.68-2 5.37-4.1 7.93-6.22a1.58 1.58 0 0 1 1.65-.22c83.79 38.26 174.51 38.26 257.31 0a1.58 1.58 0 0 1 1.68.2c2.56 2.11 5.25 4.23 8 6.24a1.64 1.64 0 0 1-.14 2.72 262.37 262.37 0 0 1-40 19 1.63 1.63 0 0 0-.87 2.28 340.72 340.72 0 0 0 26.13 42.52 1.62 1.62 0 0 0 1.8.61 423.17 423.17 0 0 0 128-64.63 1.64 1.64 0 0 0 .67-1.18c10.68-110.44-17.88-206.38-75.7-291.42a1.3 1.3 0 0 0-.63-.63zM427.09 582.85c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.02 28.44-20.37 51.6-46 51.6zm170.13 0c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.01 28.44-20.17 51.6-46 51.6z",style:{fill:"#fff"}})]}),im={google_oauth:{label:"Continue with Google",icon:t.jsx(yc,{})},github_oauth:{label:"Continue with GitHub",icon:t.jsx(bc,{})},x_oauth:{label:"Continue with X",icon:t.jsx(jc,{})},facebook_oauth:{label:"Continue with Facebook",icon:t.jsx(nm,{})},linkedin_oauth:{label:"Continue with LinkedIn",icon:t.jsx(_c,{})},gitlab_oauth:{label:"Continue with GitLab",icon:t.jsx(kc,{})},apple_oauth:{label:"Continue with Apple",icon:t.jsx(rm,{})},discord_oauth:{label:"Continue with Discord",icon:t.jsx(Cc,{})}},Nr=({connections:e,callback:a})=>{const s=e.map(n=>({connection:n,config:im[n.provider]})).filter(n=>n.config);if(!s.length)return null;if(s.length>3){const n=Math.min(s.length,4);return t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${n}, 1fr)`,gap:8},children:s.map(({connection:i,config:l})=>t.jsx("button",{type:"button",className:"w-social",style:{justifyContent:"center",padding:0},onClick:()=>a(i),title:l.label,"aria-label":l.label,children:l.icon},i.provider))})}return t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:s.map(({connection:n,config:i})=>t.jsxs("button",{type:"button",className:"w-social",onClick:()=>a(n),children:[i.icon,t.jsx("span",{className:"w-social-label",children:i.label})]},n.provider))})},St=({to:e,replace:a,children:s,...n})=>{const{navigate:i}=_t(),l=o.useCallback(m=>{m.preventDefault(),i(e,{replace:a})},[e,a,i]);return t.jsx("a",{href:e||void 0,onClick:l,...n,children:s})},qt=o.forwardRef(({onFocus:e,readOnly:a,...s},n)=>{const[i,l]=o.useState(!1);return t.jsx("input",{ref:n,...s,readOnly:a||!i,onFocus:m=>{i||l(!0),e==null||e(m)}})});qt.displayName="NoPrefillInput";const Gs=[{name:"Afghanistan",code:"AF",dialCode:"+93",flag:"🇦🇫"},{name:"Albania",code:"AL",dialCode:"+355",flag:"🇦🇱"},{name:"Algeria",code:"DZ",dialCode:"+213",flag:"🇩🇿"},{name:"American Samoa",code:"AS",dialCode:"+1684",flag:"🇺🇸"},{name:"Andorra",code:"AD",dialCode:"+376",flag:"🇦🇩"},{name:"Angola",code:"AO",dialCode:"+244",flag:"🇦🇴"},{name:"Anguilla",code:"AI",dialCode:"+1264",flag:"🇦🇮"},{name:"Antarctica",code:"AQ",dialCode:"+672",flag:"🇦🇶"},{name:"Antigua and Barbuda",code:"AG",dialCode:"+1268",flag:"🇦🇬"},{name:"Argentina",code:"AR",dialCode:"+54",flag:"🇦🇷"},{name:"Armenia",code:"AM",dialCode:"+374",flag:"🇦🇲"},{name:"Aruba",code:"AW",dialCode:"+297",flag:"🇦🇼"},{name:"Australia",code:"AU",dialCode:"+61",flag:"🇦🇺"},{name:"Austria",code:"AT",dialCode:"+43",flag:"🇦🇹"},{name:"Azerbaijan",code:"AZ",dialCode:"+994",flag:"🇦🇿"},{name:"Bahamas",code:"BS",dialCode:"+1242",flag:"🇧🇸"},{name:"Bahrain",code:"BH",dialCode:"+973",flag:"🇧🇭"},{name:"Bangladesh",code:"BD",dialCode:"+880",flag:"🇧🇩"},{name:"Barbados",code:"BB",dialCode:"+1246",flag:"🇧🇧"},{name:"Belarus",code:"BY",dialCode:"+375",flag:"🇧🇾"},{name:"Belgium",code:"BE",dialCode:"+32",flag:"🇧🇪"},{name:"Belize",code:"BZ",dialCode:"+501",flag:"🇧🇿"},{name:"Benin",code:"BJ",dialCode:"+229",flag:"🇧🇯"},{name:"Bermuda",code:"BM",dialCode:"+1441",flag:"🇧🇲"},{name:"Bhutan",code:"BT",dialCode:"+975",flag:"🇧🇹"},{name:"Bolivia",code:"BO",dialCode:"+591",flag:"🇧🇴"},{name:"Bosnia and Herzegovina",code:"BA",dialCode:"+387",flag:"🇧🇦"},{name:"Botswana",code:"BW",dialCode:"+267",flag:"🇧🇼"},{name:"Brazil",code:"BR",dialCode:"+55",flag:"🇧🇷"},{name:"British Indian Ocean Territory",code:"IO",dialCode:"+246",flag:"🇮🇴"},{name:"British Virgin Islands",code:"VG",dialCode:"+1284",flag:"🇻🇬"},{name:"Brunei",code:"BN",dialCode:"+673",flag:"🇧🇳"},{name:"Bulgaria",code:"BG",dialCode:"+359",flag:"🇧🇬"},{name:"Burkina Faso",code:"BF",dialCode:"+226",flag:"🇧🇫"},{name:"Burundi",code:"BI",dialCode:"+257",flag:"🇧🇮"},{name:"Cambodia",code:"KH",dialCode:"+855",flag:"🇰🇭"},{name:"Cameroon",code:"CM",dialCode:"+237",flag:"🇨🇲"},{name:"Canada",code:"CA",dialCode:"+1",flag:"🇨🇦"},{name:"Cape Verde",code:"CV",dialCode:"+238",flag:"🇨🇻"},{name:"Cayman Islands",code:"KY",dialCode:"+1345",flag:"🇰🇾"},{name:"Central African Republic",code:"CF",dialCode:"+236",flag:"🇨🇫"},{name:"Chad",code:"TD",dialCode:"+235",flag:"🇹🇩"},{name:"Chile",code:"CL",dialCode:"+56",flag:"🇨🇱"},{name:"China",code:"CN",dialCode:"+86",flag:"🇨🇳"},{name:"Christmas Island",code:"CX",dialCode:"+61",flag:"🇨🇽"},{name:"Cocos Islands",code:"CC",dialCode:"+61",flag:"🇨🇨"},{name:"Colombia",code:"CO",dialCode:"+57",flag:"🇨🇴"},{name:"Comoros",code:"KM",dialCode:"+269",flag:"🇰🇲"},{name:"Cook Islands",code:"CK",dialCode:"+682",flag:"🇨🇰"},{name:"Costa Rica",code:"CR",dialCode:"+506",flag:"🇨🇷"},{name:"Croatia",code:"HR",dialCode:"+385",flag:"🇭🇷"},{name:"Cuba",code:"CU",dialCode:"+53",flag:"🇨🇺"},{name:"Curacao",code:"CW",dialCode:"+599",flag:"🇨🇼"},{name:"Cyprus",code:"CY",dialCode:"+357",flag:"🇨🇾"},{name:"Czech Republic",code:"CZ",dialCode:"+420",flag:"🇨🇿"},{name:"Democratic Republic of the Congo",code:"CD",dialCode:"+243",flag:"🇨🇩"},{name:"Denmark",code:"DK",dialCode:"+45",flag:"🇩🇰"},{name:"Djibouti",code:"DJ",dialCode:"+253",flag:"🇩🇯"},{name:"Dominica",code:"DM",dialCode:"+1767",flag:"🇩🇲"},{name:"Dominican Republic",code:"DO",dialCode:"+1849",flag:"🇩🇴"},{name:"East Timor",code:"TL",dialCode:"+670",flag:"🇹🇱"},{name:"Ecuador",code:"EC",dialCode:"+593",flag:"🇪🇨"},{name:"Egypt",code:"EG",dialCode:"+20",flag:"🇪🇬"},{name:"El Salvador",code:"SV",dialCode:"+503",flag:"🇸🇻"},{name:"Equatorial Guinea",code:"GQ",dialCode:"+240",flag:"🇬🇶"},{name:"Eritrea",code:"ER",dialCode:"+291",flag:"🇪🇷"},{name:"Estonia",code:"EE",dialCode:"+372",flag:"🇪🇪"},{name:"Ethiopia",code:"ET",dialCode:"+251",flag:"🇪🇹"},{name:"Falkland Islands",code:"FK",dialCode:"+500",flag:"🇫🇰"},{name:"Faroe Islands",code:"FO",dialCode:"+298",flag:"🇫🇴"},{name:"Fiji",code:"FJ",dialCode:"+679",flag:"🇫🇯"},{name:"Finland",code:"FI",dialCode:"+358",flag:"🇫🇮"},{name:"France",code:"FR",dialCode:"+33",flag:"🇫🇷"},{name:"French Polynesia",code:"PF",dialCode:"+689",flag:"🇵🇫"},{name:"Gabon",code:"GA",dialCode:"+241",flag:"🇬🇦"},{name:"Gambia",code:"GM",dialCode:"+220",flag:"🇬🇲"},{name:"Georgia",code:"GE",dialCode:"+995",flag:"🇬🇪"},{name:"Germany",code:"DE",dialCode:"+49",flag:"🇩🇪"},{name:"Ghana",code:"GH",dialCode:"+233",flag:"🇬🇭"},{name:"Gibraltar",code:"GI",dialCode:"+350",flag:"🇬🇮"},{name:"Greece",code:"GR",dialCode:"+30",flag:"🇬🇷"},{name:"Greenland",code:"GL",dialCode:"+299",flag:"🇬🇱"},{name:"Grenada",code:"GD",dialCode:"+1473",flag:"🇬🇩"},{name:"Guam",code:"GU",dialCode:"+1671",flag:"🇬🇺"},{name:"Guatemala",code:"GT",dialCode:"+502",flag:"🇬🇹"},{name:"Guernsey",code:"GG",dialCode:"+44",flag:"🇬🇬"},{name:"Guinea",code:"GN",dialCode:"+224",flag:"🇬🇳"},{name:"Guinea-Bissau",code:"GW",dialCode:"+245",flag:"🇬🇼"},{name:"Guyana",code:"GY",dialCode:"+592",flag:"🇬🇾"},{name:"Haiti",code:"HT",dialCode:"+509",flag:"🇭🇹"},{name:"Honduras",code:"HN",dialCode:"+504",flag:"🇭🇳"},{name:"Hong Kong",code:"HK",dialCode:"+852",flag:"🇭🇰"},{name:"Hungary",code:"HU",dialCode:"+36",flag:"🇭🇺"},{name:"Iceland",code:"IS",dialCode:"+354",flag:"🇮🇸"},{name:"India",code:"IN",dialCode:"+91",flag:"🇮🇳"},{name:"Indonesia",code:"ID",dialCode:"+62",flag:"🇮🇩"},{name:"Iran",code:"IR",dialCode:"+98",flag:"🇮🇷"},{name:"Iraq",code:"IQ",dialCode:"+964",flag:"🇮🇶"},{name:"Ireland",code:"IE",dialCode:"+353",flag:"🇮🇪"},{name:"Isle of Man",code:"IM",dialCode:"+44",flag:"🇮🇲"},{name:"Israel",code:"IL",dialCode:"+972",flag:"🇮🇱"},{name:"Italy",code:"IT",dialCode:"+39",flag:"🇮🇹"},{name:"Ivory Coast",code:"CI",dialCode:"+225",flag:"🇨🇮"},{name:"Jamaica",code:"JM",dialCode:"+1876",flag:"🇯🇲"},{name:"Japan",code:"JP",dialCode:"+81",flag:"🇯🇵"},{name:"Jersey",code:"JE",dialCode:"+44",flag:"🇬🇬"},{name:"Jordan",code:"JO",dialCode:"+962",flag:"🇯🇴"},{name:"Kazakhstan",code:"KZ",dialCode:"+7",flag:"🇰🇿"},{name:"Kenya",code:"KE",dialCode:"+254",flag:"🇰🇪"},{name:"Kiribati",code:"KI",dialCode:"+686",flag:"🇰🇮"},{name:"Kosovo",code:"XK",dialCode:"+383",flag:"🇽🇰"},{name:"Kuwait",code:"KW",dialCode:"+965",flag:"🇰🇼"},{name:"Kyrgyzstan",code:"KG",dialCode:"+996",flag:"🇰🇬"},{name:"Laos",code:"LA",dialCode:"+856",flag:"🇱🇦"},{name:"Latvia",code:"LV",dialCode:"+371",flag:"🇱🇻"},{name:"Lebanon",code:"LB",dialCode:"+961",flag:"🇱🇧"},{name:"Lesotho",code:"LS",dialCode:"+266",flag:"🇱🇸"},{name:"Liberia",code:"LR",dialCode:"+231",flag:"🇱🇷"},{name:"Libya",code:"LY",dialCode:"+218",flag:"🇱🇾"},{name:"Liechtenstein",code:"LI",dialCode:"+423",flag:"🇱🇮"},{name:"Lithuania",code:"LT",dialCode:"+370",flag:"🇱🇹"},{name:"Luxembourg",code:"LU",dialCode:"+352",flag:"🇱🇺"},{name:"Macau",code:"MO",dialCode:"+853",flag:"🇲🇴"},{name:"Macedonia",code:"MK",dialCode:"+389",flag:"🇲🇰"},{name:"Madagascar",code:"MG",dialCode:"+261",flag:"🇲🇬"},{name:"Malawi",code:"MW",dialCode:"+265",flag:"🇲🇼"},{name:"Malaysia",code:"MY",dialCode:"+60",flag:"🇲🇾"},{name:"Maldives",code:"MV",dialCode:"+960",flag:"🇲🇻"},{name:"Mali",code:"ML",dialCode:"+223",flag:"🇲🇱"},{name:"Malta",code:"MT",dialCode:"+356",flag:"🇲🇹"},{name:"Marshall Islands",code:"MH",dialCode:"+692",flag:"🇲🇭"},{name:"Mauritania",code:"MR",dialCode:"+222",flag:"🇲🇷"},{name:"Mauritius",code:"MU",dialCode:"+230",flag:"🇲🇺"},{name:"Mayotte",code:"YT",dialCode:"+262",flag:"🇾🇹"},{name:"Mexico",code:"MX",dialCode:"+52",flag:"🇲🇽"},{name:"Micronesia",code:"FM",dialCode:"+691",flag:"🇫🇲"},{name:"Moldova",code:"MD",dialCode:"+373",flag:"🇲🇩"},{name:"Monaco",code:"MC",dialCode:"+377",flag:"🇲🇨"},{name:"Mongolia",code:"MN",dialCode:"+976",flag:"🇲🇳"},{name:"Montenegro",code:"ME",dialCode:"+382",flag:"🇲🇪"},{name:"Montserrat",code:"MS",dialCode:"+1664",flag:"🇲🇸"},{name:"Morocco",code:"MA",dialCode:"+212",flag:"🇲🇦"},{name:"Mozambique",code:"MZ",dialCode:"+258",flag:"🇲🇿"},{name:"Myanmar",code:"MM",dialCode:"+95",flag:"🇲🇲"},{name:"Namibia",code:"NA",dialCode:"+264",flag:"🇳🇦"},{name:"Nauru",code:"NR",dialCode:"+674",flag:"🇳🇷"},{name:"Nepal",code:"NP",dialCode:"+977",flag:"🇳🇵"},{name:"Netherlands",code:"NL",dialCode:"+31",flag:"🇳🇱"},{name:"Netherlands Antilles",code:"AN",dialCode:"+599",flag:"🇳🇱"},{name:"New Caledonia",code:"NC",dialCode:"+687",flag:"🇳🇨"},{name:"New Zealand",code:"NZ",dialCode:"+64",flag:"🇳🇿"},{name:"Nicaragua",code:"NI",dialCode:"+505",flag:"🇳🇮"},{name:"Niger",code:"NE",dialCode:"+227",flag:"🇳🇪"},{name:"Nigeria",code:"NG",dialCode:"+234",flag:"🇳🇬"},{name:"Niue",code:"NU",dialCode:"+683",flag:"🇳🇺"},{name:"North Korea",code:"KP",dialCode:"+850",flag:"🇰🇵"},{name:"Northern Mariana Islands",code:"MP",dialCode:"+1670",flag:"🇲🇵"},{name:"Norway",code:"NO",dialCode:"+47",flag:"🇳🇴"},{name:"Oman",code:"OM",dialCode:"+968",flag:"🇴🇲"},{name:"Pakistan",code:"PK",dialCode:"+92",flag:"🇵🇰"},{name:"Palau",code:"PW",dialCode:"+680",flag:"🇵🇼"},{name:"Palestine",code:"PS",dialCode:"+970",flag:"🇵🇸"},{name:"Panama",code:"PA",dialCode:"+507",flag:"🇵🇦"},{name:"Papua New Guinea",code:"PG",dialCode:"+675",flag:"🇵🇬"},{name:"Paraguay",code:"PY",dialCode:"+595",flag:"🇵🇾"},{name:"Peru",code:"PE",dialCode:"+51",flag:"🇵🇪"},{name:"Philippines",code:"PH",dialCode:"+63",flag:"🇵🇭"},{name:"Pitcairn",code:"PN",dialCode:"+64",flag:"🇵🇳"},{name:"Poland",code:"PL",dialCode:"+48",flag:"🇵🇱"},{name:"Portugal",code:"PT",dialCode:"+351",flag:"🇵🇹"},{name:"Puerto Rico",code:"PR",dialCode:"+1939",flag:"🇵🇷"},{name:"Qatar",code:"QA",dialCode:"+974",flag:"🇶🇦"},{name:"Republic of the Congo",code:"CG",dialCode:"+242",flag:"🇨🇬"},{name:"Reunion",code:"RE",dialCode:"+262",flag:"🇷🇪"},{name:"Romania",code:"RO",dialCode:"+40",flag:"🇷🇴"},{name:"Russia",code:"RU",dialCode:"+7",flag:"🇷🇺"},{name:"Rwanda",code:"RW",dialCode:"+250",flag:"🇷🇼"},{name:"Saint Barthelemy",code:"BL",dialCode:"+590",flag:"🇧🇱"},{name:"Saint Helena",code:"SH",dialCode:"+290",flag:"🇸🇭"},{name:"Saint Kitts and Nevis",code:"KN",dialCode:"+1869",flag:"🇰🇳"},{name:"Saint Lucia",code:"LC",dialCode:"+1758",flag:"🇱🇨"},{name:"Saint Martin",code:"MF",dialCode:"+590",flag:"🇲🇫"},{name:"Saint Pierre and Miquelon",code:"PM",dialCode:"+508",flag:"🇵🇲"},{name:"Saint Vincent and the Grenadines",code:"VC",dialCode:"+1784",flag:"🇻🇨"},{name:"Samoa",code:"WS",dialCode:"+685",flag:"🇼🇸"},{name:"San Marino",code:"SM",dialCode:"+378",flag:"🇸🇲"},{name:"Sao Tome and Principe",code:"ST",dialCode:"+239",flag:"🇸🇹"},{name:"Saudi Arabia",code:"SA",dialCode:"+966",flag:"🇸🇦"},{name:"Senegal",code:"SN",dialCode:"+221",flag:"🇸🇳"},{name:"Serbia",code:"RS",dialCode:"+381",flag:"🇷🇸"},{name:"Seychelles",code:"SC",dialCode:"+248",flag:"🇸🇨"},{name:"Sierra Leone",code:"SL",dialCode:"+232",flag:"🇸🇱"},{name:"Singapore",code:"SG",dialCode:"+65",flag:"🇸🇬"},{name:"Sint Maarten",code:"SX",dialCode:"+1721",flag:"🇸🇽"},{name:"Slovakia",code:"SK",dialCode:"+421",flag:"🇸🇰"},{name:"Slovenia",code:"SI",dialCode:"+386",flag:"🇸🇮"},{name:"Solomon Islands",code:"SB",dialCode:"+677",flag:"🇸🇧"},{name:"Somalia",code:"SO",dialCode:"+252",flag:"🇸🇴"},{name:"South Africa",code:"ZA",dialCode:"+27",flag:"🇿🇦"},{name:"South Korea",code:"KR",dialCode:"+82",flag:"🇰🇷"},{name:"South Sudan",code:"SS",dialCode:"+211",flag:"🇸🇸"},{name:"Spain",code:"ES",dialCode:"+34",flag:"🇪🇸"},{name:"Sri Lanka",code:"LK",dialCode:"+94",flag:"🇱🇰"},{name:"Sudan",code:"SD",dialCode:"+249",flag:"🇸🇩"},{name:"Suriname",code:"SR",dialCode:"+597",flag:"🇸🇷"},{name:"Svalbard and Jan Mayen",code:"SJ",dialCode:"+47",flag:"🇸🇯"},{name:"Swaziland",code:"SZ",dialCode:"+268",flag:"🇸🇿"},{name:"Sweden",code:"SE",dialCode:"+46",flag:"🇸🇪"},{name:"Switzerland",code:"CH",dialCode:"+41",flag:"🇨🇭"},{name:"Syria",code:"SY",dialCode:"+963",flag:"🇸🇾"},{name:"Taiwan",code:"TW",dialCode:"+886",flag:"🇹🇼"},{name:"Tajikistan",code:"TJ",dialCode:"+992",flag:"🇹🇯"},{name:"Tanzania",code:"TZ",dialCode:"+255",flag:"🇹🇿"},{name:"Thailand",code:"TH",dialCode:"+66",flag:"🇹🇭"},{name:"Togo",code:"TG",dialCode:"+228",flag:"🇹🇬"},{name:"Tokelau",code:"TK",dialCode:"+690",flag:"🇹🇰"},{name:"Tonga",code:"TO",dialCode:"+676",flag:"🇹🇴"},{name:"Trinidad and Tobago",code:"TT",dialCode:"+1868",flag:"🇹🇹"},{name:"Tunisia",code:"TN",dialCode:"+216",flag:"🇹🇳"},{name:"Turkey",code:"TR",dialCode:"+90",flag:"🇹🇷"},{name:"Turkmenistan",code:"TM",dialCode:"+993",flag:"🇹🇲"},{name:"Turks and Caicos Islands",code:"TC",dialCode:"+1649",flag:"🇹🇨"},{name:"Tuvalu",code:"TV",dialCode:"+688",flag:"🇹🇻"},{name:"U.S. Virgin Islands",code:"VI",dialCode:"+1340",flag:"🇻🇮"},{name:"Uganda",code:"UG",dialCode:"+256",flag:"🇺🇬"},{name:"Ukraine",code:"UA",dialCode:"+380",flag:"🇺🇦"},{name:"United Arab Emirates",code:"AE",dialCode:"+971",flag:"🇦🇪"},{name:"United Kingdom",code:"GB",dialCode:"+44",flag:"🇬🇧"},{name:"United States",code:"US",dialCode:"+1",flag:"🇺🇸"},{name:"Uruguay",code:"UY",dialCode:"+598",flag:"🇺🇾"},{name:"Uzbekistan",code:"UZ",dialCode:"+998",flag:"🇺🇿"},{name:"Vanuatu",code:"VU",dialCode:"+678",flag:"🇻🇺"},{name:"Vatican",code:"VA",dialCode:"+379",flag:"🇻🇦"},{name:"Venezuela",code:"VE",dialCode:"+58",flag:"🇻🇪"},{name:"Vietnam",code:"VN",dialCode:"+84",flag:"🇻🇳"},{name:"Wallis and Futuna",code:"WF",dialCode:"+681",flag:"🇼🇫"},{name:"Western Sahara",code:"EH",dialCode:"+212",flag:"🇪🇭"},{name:"Yemen",code:"YE",dialCode:"+967",flag:"🇾🇪"},{name:"Zambia",code:"ZM",dialCode:"+260",flag:"🇿🇲"},{name:"Zimbabwe",code:"ZW",dialCode:"+263",flag:"🇿🇼"}],ys=({value:e,onChange:a,error:s,countryCode:n,setCountryCode:i})=>{const[l,m]=o.useState(!1),[c,d]=o.useState(Gs.find(x=>x.code===n)||Gs[0]),p=o.useRef(null),[u,h]=o.useState(""),f=o.useRef(null);o.useEffect(()=>{function x(w){p.current&&!p.current.contains(w.target)&&m(!1)}return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[]);const g=Gs.filter(x=>x.name.toLowerCase().includes(u.toLowerCase())||x.dialCode.includes(u));return o.useEffect(()=>{i(c.dialCode)},[c,i]),t.jsxs("div",{className:"w-phone",children:[t.jsxs("div",{style:{position:"relative"},ref:p,children:[t.jsxs("button",{type:"button",className:"w-phone-cc",style:{height:"100%"},onClick:()=>m(x=>!x),children:[t.jsx("span",{children:c.flag}),t.jsx("span",{children:c.dialCode}),t.jsx(Dt,{weight:"bold"})]}),l&&t.jsxs("div",{className:"w-country-pop",children:[t.jsxs("div",{className:"w-country-search",children:[t.jsx(Cl,{}),t.jsx("input",{type:"text",placeholder:"Search country…",value:u,onChange:x=>h(x.target.value),onClick:x=>x.stopPropagation()})]}),t.jsx("div",{className:"w-country-list",children:g.map(x=>t.jsxs("button",{type:"button",className:"w-country-opt",onClick:w=>{var b;w.stopPropagation(),w.preventDefault(),d(x),m(!1),(b=f.current)==null||b.focus()},children:[t.jsx("span",{children:x.flag}),t.jsx("span",{children:x.name}),t.jsx("span",{className:"dial",children:x.dialCode})]},x.code))})]})]}),t.jsx("input",{type:"tel",id:"phone",name:"phone",required:!0,minLength:7,maxLength:15,ref:f,value:e,onChange:a,placeholder:"Phone number","aria-invalid":!!s,pattern:"^\\d{7,15}$"})]})};function Sr({placement:e="center"}){var m;const{deployment:a}=ke(),[s,n]=o.useState(!1),i=(m=a==null?void 0:a.ui_settings)==null?void 0:m.logo_image_url;if(!i||s)return null;const l=e==="left"?"flex-start":e==="right"?"flex-end":"center";return t.jsx("div",{style:{display:"flex",justifyContent:l,width:"100%"},children:t.jsx("img",{src:i,alt:"Logo",onError:()=>n(!0),style:{maxWidth:40,maxHeight:40,width:"auto",height:"auto",objectFit:"contain"}})})}function et({children:e,footer:a}){return t.jsxs("div",{className:"w-card w-auth-card",children:[t.jsx("div",{className:"w-create-body",children:e}),a&&t.jsx("div",{className:"w-create-foot",children:a})]})}function st({title:e,sub:a,children:s}){return t.jsxs("div",{className:"w-auth-head",children:[t.jsx(Sr,{}),t.jsxs("div",{className:"w-auth-head-text",children:[t.jsx("h1",{className:"w-auth-title",children:e}),a&&t.jsx("p",{className:"w-auth-sub",children:a})]}),s]})}function gt({size:e=16,onAccent:a}){return t.jsx("span",{className:a?"w-spin w-spin--on-accent":"w-spin",style:{width:e,height:e}})}function js(){return t.jsx(Pe,{children:t.jsx("div",{className:"w-card w-auth-card",children:t.jsx("div",{className:"w-create-body",children:t.jsxs("div",{className:"w-auth-skel","aria-hidden":"true",children:[t.jsxs("div",{className:"w-auth-skel-head",children:[t.jsx("span",{className:"w-skel w-skel-avatar"}),t.jsx("span",{className:"w-skel w-skel-title"}),t.jsx("span",{className:"w-skel w-skel-sub"})]}),t.jsxs("div",{className:"w-auth-skel-fields",children:[t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsx("span",{className:"w-skel w-skel-btn"})]})]})})})})}function om(e){const a=e.indexOf(":");return a>=0?e.slice(0,a):e}function lm(e){const a=e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).hostname.toLowerCase()||null}catch{return null}}function cm(e){try{return new URL(e)}catch{if(typeof window>"u")return null;try{return new URL(e,window.location.origin)}catch{return null}}}function dm(e,a){return!e||!a?!1:e===a?!0:e.endsWith(`.${a}`)}function um(e,a){if(!a)return!1;const s=cm(a);if(!s||s.protocol!=="https:"&&s.protocol!=="http:")return!1;if((e==null?void 0:e.mode)==="staging")return!0;if(s.protocol!=="https:"||!(e!=null&&e.frontend_host))return!1;const n=lm(om(e.frontend_host));return n?dm(s.hostname.toLowerCase(),n):!1}function ft(e,a){return a&&um(e,a)?a:null}function mm(){var B,Q,ue,we,se,te,oe,Ee,K,Ge,Ie,Ye,Ae,ce,D,G;const{loading:e,signUp:a,signupAttempt:s,discardSignupAttempt:n}=ho(),{signIn:i}=ls("oauth"),{deployment:l}=ke(),{navigate:m}=_t(),{session:c,refetch:d,loading:p}=rt(),[u,h]=o.useState({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),[f,g]=o.useState({}),[x,w]=o.useState(!1),[b,j]=o.useState(void 0),[v,_]=o.useState(null),[N,k]=o.useState(null),[C,y]=o.useState(!1),E=((B=l==null?void 0:l.restrictions)==null?void 0:B.sign_up_mode)==="restricted",M=((Q=l==null?void 0:l.restrictions)==null?void 0:Q.sign_up_mode)==="waitlist",F=((we=(ue=l==null?void 0:l.auth_settings)==null?void 0:ue.multi_session_support)==null?void 0:we.enabled)??!1;o.useEffect(()=>{var q;if(!p&&(c!=null&&c.active_signin)&&!F&&!C){y(!0);let V=ft(l,new URLSearchParams(window.location.search).get("redirect_uri"));V||(V=((q=l==null?void 0:l.ui_settings)==null?void 0:q.after_signin_redirect_url)||null),!V&&(l!=null&&l.frontend_host)&&(V=`https://${l.frontend_host}`),V&&m(V)}},[c,p,F,l,m,C]),o.useEffect(()=>{var de;if(!l)return;const V=new URLSearchParams(window.location.search).get("invite_token");if(M&&!V){y(!0);const z=((de=l.ui_settings)==null?void 0:de.waitlist_page_url)||`https://${l.frontend_host}/waitlist`;m(z);return}V&&!v&&a&&(k(V),a.validateDeploymentInvitation(V).then(z=>{_(z),z.valid&&h(le=>({...le,first_name:z.first_name||le.first_name,last_name:z.last_name||le.last_name,email:z.email||le.email}))}).catch(()=>{g(z=>({...z,submit:"Failed to validate invitation."}))}))},[l,M,m,v,a]);const[A,I]=o.useState(!1),[$,S]=o.useState(""),Z=q=>{let{name:V,value:de}=q.target;V==="phone_number"?de=de.replace(/[^0-9-]/g,""):V==="email"&&(de=de.toLowerCase()),h(z=>({...z,[V]:de})),g(z=>({...z,[V]:""}))},P=()=>{h({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),g({}),I(!1),S(""),n()},L=async q=>{if(q.preventDefault(),e||x)return;const V={},de=/^[a-zA-Z]{3,30}$/,z=/^[a-zA-Z][a-zA-Z0-9_.]{2,29}$/,le=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Je=/^\d{7,15}$/,it=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,125}$/;if(R!=null&&R.first_name.enabled&&(R!=null&&R.first_name.required&&!u.first_name?V.first_name="First name is required":u.first_name&&!de.test(u.first_name)&&(V.first_name="Invalid name")),R!=null&&R.last_name.enabled&&(R!=null&&R.last_name.required&&!u.last_name?V.last_name="Last name is required":u.last_name&&!de.test(u.last_name)&&(V.last_name="Invalid last name")),R!=null&&R.username.enabled&&(R!=null&&R.username.required&&!u.username?V.username="Username is required":u.username&&!z.test(u.username)&&(V.username="Username must be 3-20 characters")),R!=null&&R.email_address.enabled&&(R!=null&&R.email_address.required&&!u.email?V.email="Email address is required":u.email&&!le.test(u.email)&&(V.email="Invalid email address")),R!=null&&R.phone_number.enabled&&(R!=null&&R.phone_number.required&&!u.phone_number?V.phone_number="Phone number is required":u.phone_number&&!Je.test(u.phone_number)&&(V.phone_number="Phone number must contain 7-15 digits")),R!=null&&R.password.enabled&&(u.password?it.test(u.password)||(V.password="Password must be 8-125 characters and include uppercase, lowercase, number, and special character"):V.password="Password is required"),g(V),!(Object.keys(V).length>0)){w(!0);try{const ge={...u};u.phone_number&&b&&(ge.phone_country_code=b),N&&(ge.invite_token=N),await a.create(ge)}catch(ge){g({submit:ge.message})}finally{w(!1)}}},H=async q=>{if(!(e||x)){w(!0);try{const V=new URLSearchParams(window.location.search),de=ft(l,V.get("redirect_uri"))||void 0,{data:z}=await i.create({provider:q.provider,redirectUri:de});z&&typeof z=="object"&&"oauth_url"in z&&(window.location.href=z.oauth_url)}catch(V){g({submit:V.message})}finally{w(!1)}}},O=(l==null?void 0:l.social_connections.filter(q=>q.enabled))||[],R=l==null?void 0:l.auth_settings,U=!!((se=R==null?void 0:R.first_name)!=null&&se.enabled&&((te=R==null?void 0:R.last_name)!=null&&te.enabled)),W=async q=>{var de;if(q.preventDefault(),e||x)return;w(!0);const V={};if(!$){V.otp="OTP code is required",g(V),w(!1);return}g(V);try{const z=await a.completeVerification($);"data"in z&&((de=z.data)!=null&&de.active_signin)&&await d()}catch{g(z=>({...z,submit:"Verification failed. Please try again."}))}finally{w(!1)}};if(o.useEffect(()=>{var q;if(s){if(s.completed){let V=ft(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(V||(V=((q=l==null?void 0:l.ui_settings)==null?void 0:q.after_signup_redirect_url)||null),!V&&(l!=null&&l.frontend_host)&&(V=`https://${l.frontend_host}`),V){let de;try{de=new URL(V)}catch{de=new URL(V,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&de.searchParams.set("__dev_session__",wt(l.backend_host)||""),m(de.toString())}return}if(!A){switch(s.current_step){case"verify_email":a.prepareVerification({strategy:"email_otp"});break;case"verify_phone":a.prepareVerification({strategy:"phone_otp"});break}I(!0)}}},[s,a,A,l,c,m]),p||C)return t.jsx(js,{});const Y=((oe=l==null?void 0:l.ui_settings)==null?void 0:oe.app_name)||"App";if(E)return t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx(St,{className:"w-link",to:(Ee=l==null?void 0:l.ui_settings)!=null&&Ee.sign_in_page_url?`${l.ui_settings.sign_in_page_url}?help=true`:"#",children:"Get help"})]}),children:[t.jsx(st,{title:"Sign-up restricted",sub:"This app isn't open for public sign-up right now."}),t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"New account registration is currently restricted. Please check back later or contact your administrator for an invitation."})})]})});if(A){const q=(s==null?void 0:s.current_step)==="verify_phone";return t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{className:"w-link",to:((K=l==null?void 0:l.ui_settings)==null?void 0:K.support_page_url)||"#",children:"Get help"})]}),children:[t.jsx(st,{title:q?"Check your phone":"Enter the code",sub:q?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",children:t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:P,children:[t.jsx(Al,{weight:"bold"}),q?`+${u.phone_number}`:u.email]})}),t.jsxs("form",{onSubmit:W,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(va,{onComplete:async V=>{S(V)},onResend:async()=>{const V=q?"phone_otp":"email_otp";await a.prepareVerification({strategy:V})},error:f.otp,isSubmitting:x}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e||!$,children:x&&$?t.jsx(gt,{size:15,onAccent:!0}):`Continue to ${Y}`})]})]})})}return t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Already have an account?"," ",t.jsx(St,{className:"w-link",to:`${((Ge=l==null?void 0:l.ui_settings)==null?void 0:Ge.sign_in_page_url)??""}${window.location.search}`,children:"Sign in"})]}),children:[t.jsx(st,{title:"Create your account",sub:v!=null&&v.valid?"You've been invited — complete your registration below.":"Get started in a few seconds."}),O.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(Nr,{connections:O,callback:H}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})})]}),t.jsxs("form",{onSubmit:L,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[(((Ie=R==null?void 0:R.first_name)==null?void 0:Ie.enabled)||((Ye=R==null?void 0:R.last_name)==null?void 0:Ye.enabled))&&t.jsxs("div",{className:U?"w-grid-2":"",children:[((Ae=R==null?void 0:R.first_name)==null?void 0:Ae.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["First name",((ce=R==null?void 0:R.first_name)==null?void 0:ce.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"first_name",name:"first_name",autoComplete:"given-name",required:!0,minLength:3,maxLength:30,value:u.first_name,onChange:Z,placeholder:"Jane","aria-invalid":!!f.first_name,pattern:"^[a-zA-Z]{3,30}$"}),f.first_name&&t.jsx("span",{className:"w-input-err",children:f.first_name})]}),((D=R==null?void 0:R.last_name)==null?void 0:D.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Last name",((G=R==null?void 0:R.last_name)==null?void 0:G.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"last_name",name:"last_name",autoComplete:"family-name",required:!0,minLength:3,maxLength:30,value:u.last_name,onChange:Z,placeholder:"Doe","aria-invalid":!!f.last_name,pattern:"^[a-zA-Z]{3,30}$"}),f.last_name&&t.jsx("span",{className:"w-input-err",children:f.last_name})]})]}),(R==null?void 0:R.username.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Username",R.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"username",name:"username",autoComplete:"username",minLength:3,maxLength:20,value:u.username,onChange:Z,placeholder:"yourname","aria-invalid":!!f.username,required:!0,pattern:"^[a-zA-Z][a-zA-Z0-9_.]{2,29}$"}),f.username&&t.jsx("span",{className:"w-input-err",children:f.username})]}),(R==null?void 0:R.email_address.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Email address",R.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",maxLength:320,value:u.email,onChange:Z,placeholder:"you@company.com","aria-invalid":!!f.email,required:!0,readOnly:(v==null?void 0:v.valid)&&!!(v!=null&&v.email),pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}),f.email&&t.jsx("span",{className:"w-input-err",children:f.email})]}),(R==null?void 0:R.phone_number.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Phone number",R.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(ys,{value:u.phone_number,onChange:Z,error:f.phone_number,countryCode:b,setCountryCode:j}),f.phone_number&&t.jsx("span",{className:"w-input-err",children:f.phone_number})]}),(R==null?void 0:R.password.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Password",R.password.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"new-password",value:u.password,onChange:Z,placeholder:"Create a password","aria-invalid":!!f.password,required:!0,minLength:8,maxLength:128,pattern:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,125}$"}),f.password&&t.jsx("span",{className:"w-input-err",children:f.password})]}),f.submit&&t.jsx("span",{className:"w-input-err",children:f.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e,children:x?t.jsx(gt,{size:15,onAccent:!0}):"Continue"}),(()=>{var de,z;const q=(de=l==null?void 0:l.ui_settings)==null?void 0:de.tos_page_url,V=(z=l==null?void 0:l.ui_settings)==null?void 0:z.privacy_policy_url;return!q&&!V?null:t.jsxs("p",{className:"w-fineprint",children:["By continuing you agree to our"," ",q&&t.jsx(St,{className:"w-link w-link--muted",to:q,children:"Terms of Service"}),q&&V&&" and ",V&&t.jsx(St,{className:"w-link w-link--muted",to:V,children:"Privacy Policy"}),"."]})})()]})]})})}function Nc({icon:e,label:a,description:s,onClick:n,disabled:i,type:l="button"}){return t.jsxs("button",{type:l,className:"w-method",onClick:n,disabled:i,"data-disabled":i?"":void 0,children:[t.jsx("span",{className:"w-method-ic",children:e}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:a}),s&&t.jsx("span",{className:"w-method-desc",children:s})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Qt,{})})]})}const Sc=o.createContext(void 0);function Ec(){const e=o.useContext(Sc);if(!e)throw new Error("useSignIn must be used within a SignInProvider");return e}function pm({children:e}){var j;const{deployment:a}=ke(),[s,n]=o.useState((a==null?void 0:a.auth_settings.first_factor)||"email_password"),i=o.useRef(!!(a!=null&&a.auth_settings.first_factor)),[l,m]=o.useState(""),[c,d]=o.useState(!1),[p,u]=o.useState(!1),[h,f]=o.useState(!1),[g,x]=o.useState("identifier"),w=(a==null?void 0:a.social_connections.filter(v=>v.enabled))||[],b=a==null?void 0:a.auth_settings;return o.useEffect(()=>{var _;const v=(_=a==null?void 0:a.auth_settings)==null?void 0:_.first_factor;!i.current&&v&&(n(v),i.current=!0)},[(j=a==null?void 0:a.auth_settings)==null?void 0:j.first_factor]),t.jsx(Sc.Provider,{value:{email:l,showOtherOptions:c,showForgotPassword:p,otpSent:h,setFirstFactor:n,setEmail:m,setShowOtherOptions:d,setShowForgotPassword:u,setOtpSent:f,enabledSocialsProviders:w,authSettings:b,firstFactor:s,signInStep:g,setSignInStep:x},children:e})}const hm=[{key:"email_magic_link",icon:t.jsx(Ru,{}),label:"Magic link",description:"We'll email you a one-click sign-in link"},{key:"email_password",icon:t.jsx(Mu,{}),label:"Email and password",description:"Sign in with your email and password"},{key:"email_otp",icon:t.jsx(xl,{}),label:"Email one-time code",description:"We'll send a verification code to your email"},{key:"phone_otp",icon:t.jsx(Nu,{}),label:"Phone number",description:"We'll send a verification code via SMS"},{key:"username_password",icon:t.jsx(hs,{}),label:"Username and password",description:"Sign in with your username and password"}];function Ac(){const{deployment:e}=ke(),{signIn:a}=ls("oauth"),{setFirstFactor:s,firstFactor:n,setShowOtherOptions:i,setSignInStep:l}=Ec(),[m,c]=o.useState(!1),d=e==null?void 0:e.auth_settings,p=(e==null?void 0:e.social_connections.filter(x=>x.enabled))||[],u=async x=>{if(!m){c(!0);try{const{data:w}=await a.create({provider:x.provider});w&&typeof w=="object"&&"oauth_url"in w&&(window.location.href=w.oauth_url)}catch{}finally{c(!1)}}},h=hm.filter(x=>{if(x.key===n)return!1;const w=d==null?void 0:d.auth_factors_enabled;return w?w[x.key]:!1}),f=p.length>0,g=h.length>0;return t.jsxs(t.Fragment,{children:[f&&t.jsx(Nr,{connections:p,callback:u}),f&&g&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"or"})}),g&&t.jsx("div",{className:"w-method-stack",children:h.map(x=>t.jsx(Nc,{icon:x.icon,label:x.label,description:x.description,onClick:()=>{s(x.key),l("identifier"),i(!1)}},x.key))})]})}function fm({onBack:e}){var F;const{deployment:a}=ke(),{navigate:s}=_t(),[n,i]=o.useState("start"),[l,m]=o.useState(""),[c,d]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(""),[g,x]=o.useState(""),{forgotPassword:w,verifyOtp:b,resetPassword:j}=Ao(),[v,_]=o.useState(!1),[N,k]=o.useState(null),C=async A=>{if(A.preventDefault(),!!l){_(!0),k(null);try{await w(l),i("otp")}catch(I){k(I)}finally{_(!1)}}},y=async A=>{if(A.preventDefault(),c.length===6){_(!0),k(null);try{const I=await b(l,c);I.data&&(u(I.data.token),i("reset"))}catch(I){k(I)}finally{_(!1)}}},E=async A=>{var I,$;if(A.preventDefault(),h===g&&!(h.length<8)){_(!0),k(null);try{const S=await j(p,h);if(S.data){const Z=S.data,P=Z.signin_attempts&&Z.signin_attempts.length>0?Z.signin_attempts[Z.signin_attempts.length-1]:null;if(P&&!P.completed){const L=(I=a==null?void 0:a.ui_settings)==null?void 0:I.sign_in_page_url;if(L){const H=new URL(L,window.location.origin);H.searchParams.set("signin_attempt_id",P.id),s(H.toString())}else e()}else{const L=(($=a==null?void 0:a.ui_settings)==null?void 0:$.after_signin_redirect_url)||"/";s(L)}}}catch(S){k(S)}finally{_(!1)}}},M=t.jsx("span",{className:"w-auth-foot",children:t.jsx("span",{className:"w-link",style:{cursor:"pointer"},onClick:e,children:"Back to sign in"})});return t.jsxs(Pe,{children:[n==="start"&&t.jsxs(et,{footer:M,children:[t.jsx(st,{title:"Forgot your password?",sub:"Reset it, or sign in another way."}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>i("email"),disabled:v,children:"Reset your password"}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsx(Ac,{}),t.jsxs("p",{className:"w-secsub",style:{textAlign:"center",marginTop:16},children:["Unable to reset password?"," ",t.jsx("a",{className:"w-link",href:((F=a==null?void 0:a.ui_settings)==null?void 0:F.support_page_url)||"#",children:"Get help"})]})]}),n==="email"&&t.jsxs(et,{footer:M,children:[t.jsx(st,{title:"Forgot password",sub:"Enter your email and we'll send you a code to reset your password."}),t.jsxs("form",{onSubmit:C,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx("input",{className:"w-input",type:"email",id:"email",value:l,onChange:A=>m(A.target.value),placeholder:"you@company.com",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(gt,{size:15,onAccent:!0}):"Send code"})]})]}),n==="otp"&&t.jsxs(et,{footer:M,children:[t.jsx(st,{title:"Enter verification code",sub:`We sent a 6-digit code to ${l}.`}),t.jsxs("form",{onSubmit:y,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(va,{onComplete:A=>d(A),isSubmitting:v,error:N==null?void 0:N.message,onResend:async()=>{await w(l)}}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v||c.length!==6,children:v?t.jsx(gt,{size:15,onAccent:!0}):"Verify"})]})]}),n==="reset"&&t.jsxs(et,{footer:M,children:[t.jsx(st,{title:"Reset password",sub:"Create a new password for your account."}),t.jsxs("form",{onSubmit:E,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"New password"}),t.jsx("input",{className:"w-input",type:"password",id:"password",value:h,onChange:A=>f(A.target.value),placeholder:"Enter new password",required:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Confirm new password"}),t.jsx("input",{className:"w-input",type:"password",id:"confirmPassword",value:g,onChange:A=>x(A.target.value),placeholder:"Confirm new password",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(gt,{size:15,onAccent:!0}):"Reset password"})]})]})]})}function wm({onBack:e}){var n;const{deployment:a}=ke(),s=(n=a==null?void 0:a.ui_settings)==null?void 0:n.app_name;return t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to sign in"})}),children:[t.jsx(st,{title:"All sign-in methods",sub:`Choose another way to sign in to ${s||"your account"}`}),t.jsx(Ac,{})]})})}function Mc({methods:e,onSelectMethod:a,onBack:s}){return t.jsx(Pe,{children:t.jsxs(et,{footer:s?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:s,children:"Back to login"})}):void 0,children:[t.jsx(st,{title:"Two-factor authentication",sub:"Choose how you'd like to verify your identity"}),t.jsx("div",{className:"w-method-stack",children:e.map(n=>t.jsx(Nc,{icon:n.icon,label:n.name,description:n.phoneNumber?`${n.description} ${n.phoneNumber}`:n.description,onClick:()=>a(n.id),disabled:!n.available},n.id))})]})})}function Rc({onVerify:e,onBack:a,loading:s}){const[n,i]=o.useState(""),[l,m]=o.useState(""),c=p=>{if(p.preventDefault(),n.length!==4){m("Please enter the last 4 digits of your phone number");return}e(n)},d=p=>{const u=p.target.value.replace(/\D/g,"").slice(0,4);i(u),m("")};return t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Choose a different method"})}),children:[t.jsx(st,{title:"Verify phone",sub:"Enter the last 4 digits of your phone number."}),t.jsxs("form",{onSubmit:c,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"lastDigits",children:"Last 4 digits"}),t.jsx("input",{className:`w-input${l?" w-input--invalid":""}`,type:"text",id:"lastDigits",name:"lastDigits",value:n,onChange:d,placeholder:"0000",maxLength:4,autoComplete:"off","aria-invalid":!!l,autoFocus:!0}),l&&t.jsx("span",{className:"w-input-err",children:l})]}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:s||n.length!==4,children:s?t.jsx(gt,{onAccent:!0}):"Send code"})]})]})})}const gm=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),xm=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),t.jsx("path",{d:"M12 18h.01"})]}),vm=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"m21 2-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4"})});function Lc({onBack:e,attempt:a,completeVerification:s,prepareVerification:n}){const{deployment:i}=ke(),[l,m]=o.useState(""),[c,d]=o.useState({}),[p,u]=o.useState(!1),[h,f]=o.useState(null),[g,x]=o.useState(!0),[w,b]=o.useState(!1),[j,v]=o.useState(""),[_,N]=o.useState(!1),{navigate:k}=_t(),C=(a==null?void 0:a.available_2fa_methods)||[],y=[{id:"authenticator",name:"Authenticator app",description:"Use your authenticator app",icon:t.jsx(gm,{}),available:C.includes("authenticator")},{id:"phone_otp",name:"Text message",description:"Get a code via SMS",icon:t.jsx(xm,{}),available:C.includes("phone_otp"),phoneNumber:j},{id:"backup_code",name:"Backup code",description:"Use one of your backup codes",icon:t.jsx(vm,{}),available:C.includes("backup_code")}].filter($=>$.available),E=async $=>{f($),x(!1),$==="phone_otp"&&b(!0)},M=async $=>{var S,Z;if(a){u(!0);try{const P=await n({strategy:"phone_otp",lastDigits:$});P&&"data"in P&&((S=P.data)!=null&&S.otp_sent)?((Z=P.data)!=null&&Z.masked_phone&&v(P.data.masked_phone),b(!1)):d({phone:"Phone number verification failed"})}catch(P){d({phone:P.message})}finally{u(!1)}}},F=async($,S)=>{if($.preventDefault(),p)return;const Z=S||l,P={};if(Z?h==="authenticator"&&Z.length!==6?P.code="Authentication code must be 6 digits":h==="phone_otp"&&Z.length!==6&&(P.code="SMS code must be 6 digits"):P.code="Verification code is required",d(P),!(Object.keys(P).length>0)){u(!0);try{await s(Z)}catch(L){d({submit:L.message})}finally{u(!1)}}},A=$=>{let S=$.target.value;h!=="backup_code"&&(S=S.replace(/\D/g,"").slice(0,6)),m(S),d(Z=>({...Z,code:""}))};if(o.useEffect(()=>{var $;if(a.completed){N(!0);let S=ft(i,new URLSearchParams(window.location.search).get("redirect_uri"));if(S||(S=(($=i==null?void 0:i.ui_settings)==null?void 0:$.after_signin_redirect_url)||null),!S&&(i!=null&&i.frontend_host)&&(S=`https://${i.frontend_host}`),S){let Z;try{Z=new URL(S)}catch{Z=new URL(S,window.location.origin)}(i==null?void 0:i.mode)==="staging"&&Z.searchParams.set("__dev_session__",wt(i.backend_host)||""),k(Z.toString())}return}},[a,i]),_)return t.jsx(js,{});if(g)return y.length===0?t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(st,{title:"Set up two-factor authentication",sub:"Your account requires two-factor authentication, but you haven't set up any methods yet. Please contact your administrator to set up 2FA."}),e&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to login"})})]})}):t.jsx(Mc,{methods:y,onSelectMethod:E,onBack:e});if(w&&h==="phone_otp")return t.jsx(Rc,{onVerify:M,onBack:()=>{b(!1),x(!0),f(null)},loading:p});const I=h==="authenticator"?"Enter the 6-digit code from your authenticator app":h==="phone_otp"?`Enter the 6-digit code sent to your phone ${j}`:"Enter one of your backup codes";return t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(st,{title:"Two-factor authentication",sub:I}),t.jsxs("form",{onSubmit:F,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[h==="backup_code"?t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"code",children:"Backup code"}),t.jsx("input",{className:`w-input${c.code?" w-input--invalid":""}`,type:"text",id:"code",name:"code",value:l,onChange:A,placeholder:"Enter backup code",maxLength:20,autoComplete:"one-time-code","aria-invalid":!!c.code,autoFocus:!0}),c.code&&t.jsx("span",{className:"w-input-err",children:c.code})]}):t.jsx(va,{onComplete:async $=>{if(m($),h!=="backup_code"){const S=new Event("submit",{bubbles:!0,cancelable:!0});await F(S,$)}},onResend:h==="phone_otp"?async()=>{try{await n({strategy:"phone_otp",lastDigits:j.slice(-4)})}catch($){d({submit:$.message})}}:void 0,error:c.code,isSubmitting:p}),c.submit&&t.jsx("span",{className:"w-input-err",children:c.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:p||!l,children:p?t.jsx(gt,{onAccent:!0}):"Verify"})]}),t.jsxs("div",{style:{marginTop:18,textAlign:"center",display:"flex",flexDirection:"column",gap:8},children:[t.jsx("button",{type:"button",className:"w-link",onClick:()=>{x(!0),f(null),m(""),d({})},children:"Try another method"}),e&&t.jsx("button",{type:"button",className:"w-link w-link--muted",onClick:e,children:"Back to login"})]})]})})}function Pc({attempt:e,onBack:a,completeProfile:s,completeVerification:n,prepareVerification:i}){var O,R,U,W,Y,B,Q,ue,we;const{deployment:l}=ke(),{navigate:m}=_t(),[c,d]=o.useState({}),[p,u]=o.useState({}),[h,f]=o.useState("US"),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[j,v]=o.useState(null),[_,N]=o.useState(!1),k=j,C=w,y=()=>{var te;N(!0);let se=ft(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(se||(se=((te=l==null?void 0:l.ui_settings)==null?void 0:te.after_signin_redirect_url)||null),!se&&(l!=null&&l.frontend_host)&&(se=`https://${l.frontend_host}`),se){let oe;try{oe=new URL(se)}catch{oe=new URL(se,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&oe.searchParams.set("__dev_session__",wt(l.backend_host)||""),m(oe.toString())}},E=async se=>{b(!0),v(null);try{await s(se)&&y()}catch(te){const oe=te;throw v(oe),oe}finally{b(!1)}},M=async se=>{b(!0),v(null);try{return await n(se)&&y(),!0}catch(te){return v(te),!1}finally{b(!1)}};if(_||!e)return t.jsx(js,{});const F=e.missing_fields||[],A=l==null?void 0:l.auth_settings,I=(e==null?void 0:e.current_step)==="verify_phone_otp"||(e==null?void 0:e.current_step)==="verify_email_otp"||g,$=se=>{const{name:te,value:oe}=se.target;d(Ee=>({...Ee,[te]:oe})),p[te]&&u(Ee=>({...Ee,[te]:""}))},S=()=>{const se={};return F.forEach(te=>{var K,Ge,Ie,Ye,Ae;const oe=c[te];let Ee=!1;switch(te){case"first_name":Ee=((K=A==null?void 0:A.first_name)==null?void 0:K.enabled)||!1;break;case"last_name":Ee=((Ge=A==null?void 0:A.last_name)==null?void 0:Ge.enabled)||!1;break;case"username":Ee=((Ie=A==null?void 0:A.username)==null?void 0:Ie.enabled)||!1;break;case"phone_number":Ee=((Ye=A==null?void 0:A.phone_number)==null?void 0:Ye.enabled)||!1;break;case"email_address":Ee=((Ae=A==null?void 0:A.email_address)==null?void 0:Ae.enabled)||!1;break;default:Ee=!0}if(Ee&&(!oe||oe.trim()==="")){const ce=te.replace("_"," ").replace(/\b\w/g,D=>D.toUpperCase());se[te]=`${ce} is required`}}),c.username&&F.includes("username")&&(/^[a-zA-Z0-9_-]{3,30}$/.test(c.username)||(se.username="Username must be 3-30 characters and contain only letters, numbers, underscores, and hyphens")),c.phone_number&&F.includes("phone_number")&&(/^\d{7,15}$/.test(c.phone_number)||(se.phone_number="Phone number must contain 7-15 digits")),c.email&&F.includes("email_address")&&(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(c.email)||(se.email_address="Please enter a valid email address")),u(se),Object.keys(se).length===0},Z=async se=>{if(se.preventDefault(),!S())return;const te={...c};c.phone_number&&h&&(te.phone_country_code=h),await E(te)},P=se=>{const te=se.target.value;d(oe=>({...oe,phone_number:te})),p.phone_number&&u(oe=>({...oe,phone_number:""}))},L=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{to:(l==null?void 0:l.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]});if(I){const se=e.current_step==="verify_phone_otp"?"Verify your phone number":"Verify your email",te=e.current_step==="verify_phone_otp"?"Enter the 6-digit code sent to your phone":"Enter the 6-digit code sent to your email",oe=e.current_step==="verify_phone_otp"?"phone_otp":"email_otp";return t.jsx(Pe,{children:t.jsxs(et,{footer:L,children:[t.jsx(st,{title:se,sub:te}),t.jsxs("form",{onSubmit:Ee=>Ee.preventDefault(),noValidate:!0,style:{display:"flex",flexDirection:"column",gap:14},children:[t.jsx(va,{onComplete:M,onResend:async()=>{await i({strategy:oe})},error:k==null?void 0:k.message,isSubmitting:C}),k&&t.jsx("span",{className:"w-input-err",children:k.message})]}),t.jsx("div",{style:{marginTop:16,textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:()=>x(!1),children:"Back to profile completion"})})]})})}const H=!!((O=A==null?void 0:A.first_name)!=null&&O.enabled&&((R=A==null?void 0:A.last_name)!=null&&R.enabled)&&F.includes("first_name")&&F.includes("last_name"));return t.jsx(Pe,{children:t.jsxs(et,{footer:a?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Back to login"})}):L,children:[t.jsx(st,{title:"Complete your profile",sub:"Please provide the following information to continue"}),t.jsxs("form",{onSubmit:Z,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(F.includes("first_name")||F.includes("last_name"))&&(((U=A==null?void 0:A.first_name)==null?void 0:U.enabled)||((W=A==null?void 0:A.last_name)==null?void 0:W.enabled))&&t.jsxs("div",{className:H?"w-grid-2":"",children:[F.includes("first_name")&&((Y=A==null?void 0:A.first_name)==null?void 0:Y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",A.first_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.first_name?" w-input--invalid":""}`,type:"text",id:"first_name",name:"first_name",value:c.first_name||"",onChange:$,placeholder:"Enter your first name",disabled:C,autoComplete:"given-name"}),p.first_name&&t.jsx("span",{className:"w-input-err",children:p.first_name})]}),F.includes("last_name")&&((B=A==null?void 0:A.last_name)==null?void 0:B.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",A.last_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.last_name?" w-input--invalid":""}`,type:"text",id:"last_name",name:"last_name",value:c.last_name||"",onChange:$,placeholder:"Enter your last name",disabled:C,autoComplete:"family-name"}),p.last_name&&t.jsx("span",{className:"w-input-err",children:p.last_name})]})]}),F.includes("username")&&((Q=A==null?void 0:A.username)==null?void 0:Q.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"username",children:["Username",A.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.username?" w-input--invalid":""}`,type:"text",id:"username",name:"username",value:c.username||"",onChange:$,placeholder:"Choose a username",disabled:C,autoComplete:"username"}),p.username&&t.jsx("span",{className:"w-input-err",children:p.username})]}),F.includes("phone_number")&&((ue=A==null?void 0:A.phone_number)==null?void 0:ue.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"phone_number",children:["Phone number",A.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(ys,{value:c.phone_number||"",onChange:P,error:p.phone_number,countryCode:h,setCountryCode:f}),p.phone_number&&t.jsx("span",{className:"w-input-err",children:p.phone_number})]}),F.includes("email_address")&&((we=A==null?void 0:A.email_address)==null?void 0:we.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",A.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.email_address?" w-input--invalid":""}`,type:"email",id:"email",name:"email",value:c.email||"",onChange:$,placeholder:"Enter your email address",disabled:C,autoComplete:"email"}),p.email_address&&t.jsx("span",{className:"w-input-err",children:p.email_address})]}),k&&t.jsx("span",{className:"w-input-err",children:k.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:C,children:C?t.jsx(gt,{onAccent:!0}):"Continue"})]})]})})}function $c({onComplete:e,onSkip:a}){var u;const[s,n]=o.useState(!1),[i,l]=o.useState(null),{registerPasskey:m}=xa(),{deployment:c}=ke(),d=async()=>{n(!0),l(null);try{await m(),e==null||e()}catch(h){l(h instanceof Error?h.message:"Failed to register passkey")}finally{n(!1)}},p=((u=c==null?void 0:c.ui_settings)==null?void 0:u.app_name)||"this app";return t.jsxs("div",{className:"w-flex w-flex-col w-items-center w-text-center",children:[t.jsx("div",{className:"w-feature-badge",children:t.jsx(ar,{size:26})}),t.jsx("h1",{className:"w-title-lg",children:"Add a passkey"}),t.jsxs("p",{className:"w-sub",style:{marginTop:6,maxWidth:320},children:["Sign in faster and more securely with a passkey. Use your fingerprint, face, or screen lock to access ",p,"."]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,width:"100%",marginTop:24},children:[t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:d,disabled:s,children:s?t.jsxs(t.Fragment,{children:[t.jsx(gt,{size:15,onAccent:!0}),"Registering…"]}):t.jsxs(t.Fragment,{children:[t.jsx(ar,{}),"Add passkey"]})}),t.jsx("button",{type:"button",className:"w-social",onClick:a,children:"Maybe later"})]}),i&&t.jsx("p",{className:"w-input-err",style:{marginTop:14},children:i})]})}function bm(){return t.jsx(pm,{children:t.jsx(ym,{})})}function ym(){var Wt,ba,ya,bt,aa,sa,na,ra,ie,xe,Ne,J,ve,qe,Ve,yt,jt,We,ht,Bt,ia,oa,la;const{deployment:e}=ke(),{navigate:a}=_t(),{session:s,loading:n,refetch:i,exchangeTicket:l,switchSignIn:m}=rt(),c=((ba=(Wt=e==null?void 0:e.auth_settings)==null?void 0:Wt.multi_session_support)==null?void 0:ba.enabled)??!1,{setEmail:d,otpSent:p,setOtpSent:u,showForgotPassword:h,setShowForgotPassword:f,showOtherOptions:g,setShowOtherOptions:x,enabledSocialsProviders:w,firstFactor:b,setFirstFactor:j,signInStep:v,setSignInStep:_}=Ec(),{loading:N,signIn:k,signinAttempt:C,discardSignInAttempt:y,setSignInAttempt:E}=ls("generic"),{signIn:M}=ls("oauth"),{signIn:F}=ls("passkey"),[A,I]=o.useState({email:"",username:"",password:"",phone:""}),[$,S]=o.useState({}),[Z,P]=o.useState(!1),[L,H]=o.useState(""),[O,R]=o.useState("US"),[U,W]=o.useState(!1),[Y,B]=o.useState(null),[Q,ue]=o.useState(!1),[we,se]=o.useState(!1),[te,oe]=o.useState(!1),[Ee,K]=o.useState(60),[Ge,Ie]=o.useState(!1),[Ye,Ae]=o.useState(null),ce=[...(s==null?void 0:s.signins)||[]].sort((ee,ae)=>{var pe,Oe;return ee.id===((pe=s==null?void 0:s.active_signin)==null?void 0:pe.id)?-1:ae.id===((Oe=s==null?void 0:s.active_signin)==null?void 0:Oe.id)?1:0});o.useEffect(()=>{const ee=new URLSearchParams(window.location.search),ae=ee.get("error"),pe=ee.get("error_description");if(ae==="access_denied"&&pe){B(pe),ee.delete("error"),ee.delete("error_description");const Oe=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Oe)}},[]),o.useEffect(()=>{if(b!=="email_magic_link"||!p)return;K(60),Ie(!1);const ee=setInterval(()=>{K(ae=>ae<=1?(Ie(!0),clearInterval(ee),0):ae-1)},1e3);return()=>clearInterval(ee)},[b,p]),o.useEffect(()=>{var ee,ae,pe,Oe;if(!n&&(s!=null&&s.active_signin)&&!c&&!U&&!Q){let Re=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));Re||(Re=((ee=e==null?void 0:e.ui_settings)==null?void 0:ee.after_signin_redirect_url)||null),!Re&&(e!=null&&e.frontend_host)&&(Re=`https://${e.frontend_host}`);const ct=(ae=e==null?void 0:e.auth_settings)==null?void 0:ae.passkey;(ct==null?void 0:ct.enabled)&&(ct==null?void 0:ct.prompt_registration_on_auth)&&!((Oe=(pe=s.active_signin)==null?void 0:pe.user)!=null&&Oe.has_passkeys)?(Ae(Re),ue(!0)):Re&&(W(!0),a(Re))}},[s,n,c,e,a,U]);const D=ee=>{let{name:ae,value:pe}=ee.target;ae==="phone"?pe=pe.replace(/[^0-9]/g,""):ae==="email"&&(d(pe),pe=pe.toLowerCase()),I(Oe=>({...Oe,[ae]:pe})),S(Oe=>({...Oe,[ae]:""}))},G=()=>{I({email:"",username:"",password:"",phone:""}),S({}),R("US"),_("identifier")},q=async ee=>{if(!ee){S({email:"Email address is required"});return}P(!0),S({});try{const ae=await k.identify(ee);if(ae.strategy==="sso"&&ae.connection_id){const pe=new URLSearchParams(window.location.search),Oe=ft(e,pe.get("redirect_uri"))||void 0,Re=await k.initEnterpriseSso(ae.connection_id,Oe);if(Re&&Re.sso_url){W(!0),window.location.href=Re.sso_url;return}}else if(ae.strategy==="social"&&ae.provider){const pe=w.find(Oe=>Oe.provider===ae.provider);if(pe){const Oe=new URLSearchParams(window.location.search),Re=ft(e,Oe.get("redirect_uri"))||void 0,{data:ct}=await M.create({provider:pe.provider,redirectUri:Re});if(ct&&typeof ct=="object"&&"oauth_url"in ct){W(!0),window.location.href=ct.oauth_url;return}}else _("password")}else _("password")}catch(ae){S({submit:ae.message})}finally{U||P(!1)}},V=async ee=>{if(ee.preventDefault(),N||Z)return;y();const ae={};if(v==="identifier"&&b==="email_password"){if(!A.email){S({email:"Email address is required"});return}await q(A.email);return}if(v==="identifier"&&b==="username_password"){if(!A.username){S({username:"Username is required"});return}S({}),_("password");return}if(b==="email_password"?(A.email||(ae.email="Email address is required"),A.password||(ae.password="Password is required")):b==="username_password"?(A.username||(ae.username="Username is required"),A.password||(ae.password="Password is required")):b==="email_otp"||b==="email_magic_link"?A.email||(ae.email="Email address is required"):b==="phone_otp"&&(A.phone?/^\d{7,15}$/.test(A.phone)||(ae.phone="Phone number must contain 7-15 digits"):ae.phone="Phone number is required"),S(ae),Object.keys(ae).length>0)return;let pe="";switch(b){case"email_password":pe="plain_email";break;case"username_password":pe="plain_username";break;case"email_otp":pe="email_otp";break;case"email_magic_link":pe="magic_link";break;case"phone_otp":pe="phone_otp";break}const Oe=b==="email_otp"||b==="email_magic_link"||b==="phone_otp";P(!0);try{const Re={...A,strategy:pe};b==="phone_otp"&&O&&(Re.phone_country_code=O),await k.create(Re),Oe||P(!1)}catch(Re){S({submit:Re.message}),P(!1)}},de=async ee=>{if(ee.preventDefault(),N||Z)return;const ae={};if(!L){ae.otp="OTP code is required",S(ae);return}P(!0),S({});try{await k.completeVerification(L),u(!1),H("")}catch(pe){S({otp:pe.message||"Verification failed"})}finally{P(!1)}},z=async ee=>{if(!(N||Z)){P(!0);try{const ae=new URLSearchParams(window.location.search),pe=ft(e,ae.get("redirect_uri"))||void 0,{data:Oe}=await M.create({provider:ee.provider,redirectUri:pe});Oe&&typeof Oe=="object"&&"oauth_url"in Oe&&(window.location.href=Oe.oauth_url)}catch(ae){S({submit:ae.message})}finally{P(!1)}}},le=async()=>{var ee;if(!(N||Z)){P(!0),S({});try{const ae=await F.create();if("data"in ae&&ae.data){await i();let pe=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));pe||(pe=((ee=e==null?void 0:e.ui_settings)==null?void 0:ee.after_signin_redirect_url)||null),!pe&&(e!=null&&e.frontend_host)&&(pe=`https://${e.frontend_host}`),W(!0),pe&&a(pe)}}catch(ae){S({submit:ae.message||"Passkey sign-in failed"})}finally{P(!1)}}},Je=()=>{var pe;let ee=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(ee||(ee=((pe=e==null?void 0:e.ui_settings)==null?void 0:pe.after_signin_redirect_url)||null),!ee&&(e!=null&&e.frontend_host)&&(ee=`https://${e.frontend_host}`),!ee)return null;let ae;try{ae=new URL(ee)}catch{ae=new URL(ee,window.location.origin)}return(e==null?void 0:e.mode)==="staging"&&ae.searchParams.set("__dev_session__",wt(e.backend_host)||""),ae.toString()},it=async ee=>{if(!(N||Z)){S({}),P(!0);try{await m(ee);const ae=Je();ae&&(W(!0),a(ae))}catch(ae){S({submit:ae.message||"Failed to continue with selected account"})}finally{P(!1)}}},ge=(ee,ae)=>`${ee||""} ${ae||""}`.trim().split(" ").filter(Boolean).map(pe=>pe[0]).join("").toUpperCase().slice(0,2)||"?",ot=o.useRef(!1);if(o.useEffect(()=>{if(n)return;const ee=new URLSearchParams(window.location.search),ae=ee.get("ticket");if(ae&&!ot.current&&!N){ot.current=!0,ee.delete("ticket");const Oe=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Oe),(async()=>{var ct;try{P(!0),await l(ae),W(!0);let Tt=ft(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(Tt||(Tt=((ct=e==null?void 0:e.ui_settings)==null?void 0:ct.after_signin_redirect_url)||null),!Tt&&(e!=null&&e.frontend_host)&&(Tt=`https://${e.frontend_host}`),Tt){let Ns;try{Ns=new URL(Tt)}catch{Ns=new URL(Tt,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&Ns.searchParams.set("__dev_session__",wt(e.backend_host)||""),a(Ns.toString())}return}catch(Tt){S({submit:Tt.message||"Failed to exchange ticket"}),ot.current=!1}finally{P(!1)}})();return}const pe=ee.get("signin_attempt_id");if(pe&&(s!=null&&s.signin_attempts)&&!C){const Oe=s.signin_attempts.find(Re=>Re.id===pe);if(Oe){E(Oe),ee.delete("signin_attempt_id");const Re=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Re)}}},[s,n,C,E,N]),o.useEffect(()=>{var Oe;if(!C)return;if(C.completed){W(!0);let Re=new URLSearchParams(window.location.search).get("redirect_uri");if(Re||(Re=((Oe=e==null?void 0:e.ui_settings)==null?void 0:Oe.after_signin_redirect_url)||null),!Re&&(e!=null&&e.frontend_host)&&(Re=`https://${e.frontend_host}`),Re){let ct;try{ct=new URL(Re)}catch{ct=new URL(Re,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&ct.searchParams.set("__dev_session__",wt(e.backend_host)||""),a(ct.toString())}return}if(!k||p)return;const ae={verify_email:"email_otp",verify_email_otp:"email_otp",verify_email_link:"magic_link",verify_phone:"phone_otp",verify_phone_otp:"phone_otp"}[C.current_step];if(!ae)return;(async()=>{try{await k.prepareVerification({strategy:ae}),P(!1),u(!0)}catch{S({submit:"Failed to send verification. Please try again."}),P(!1)}})()},[C,k,p,u,a,e]),g)return t.jsx(wm,{onBack:()=>x(!1)});if(h)return t.jsx(fm,{onBack:()=>f(!1)});if((C==null?void 0:C.current_step)==="verify_second_factor")return t.jsx(Lc,{attempt:C,completeVerification:k.completeVerification,prepareVerification:k.prepareVerification,onBack:()=>{y(),G(),u(!1)}});if((C==null?void 0:C.current_step)==="complete_profile")return t.jsx(Pc,{attempt:C,completeProfile:k.completeProfile,completeVerification:k.completeVerification,prepareVerification:k.prepareVerification,onBack:()=>{y(),G(),u(!1)}});if(Q){const ee=()=>{ue(!1),Ye&&(W(!0),a(Ye))},ae=()=>{ue(!1),Ye&&(W(!0),a(Ye))};return t.jsx(Pe,{children:t.jsx(et,{children:t.jsx($c,{onComplete:ee,onSkip:ae})})})}if(n||U)return t.jsx(js,{});const X=((ya=e==null?void 0:e.ui_settings)==null?void 0:ya.app_name)||"App",me=(C==null?void 0:C.current_step)&&["verify_email","verify_email_otp","verify_email_link","verify_phone","verify_phone_otp"].includes(C.current_step)&&p,Le=b==="email_magic_link",Me=c&&!me&&ce.length>0&&!te,Qe=()=>{u(!1),y(),G()};let vt;if(me){const ee=b==="phone_otp"?"Check your phone":Le?"Check your inbox":"Enter the code",ae=Le?"We sent a magic link to your email — click it to sign in instantly.":b==="phone_otp"?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",pe=(b==="email_otp"||Le)&&A.email?A.email:b==="phone_otp"&&A.phone?`+${A.phone}`:null;vt=t.jsx(st,{title:ee,sub:ae,children:pe&&t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:Qe,children:[t.jsx(Al,{weight:"bold"}),pe]})})}else vt=t.jsx(st,{title:"Sign in to your account",sub:`Please enter your details to continue to ${X}.`});let Ut;me?Ut=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(St,{className:"w-link",to:((bt=e==null?void 0:e.ui_settings)==null?void 0:bt.support_page_url)||"#",children:"Get help"})]}):Ut=t.jsxs("span",{className:"w-auth-foot",children:["Don't have an account?"," ",t.jsx(St,{className:"w-link",to:`${((aa=e==null?void 0:e.ui_settings)==null?void 0:aa.sign_up_page_url)??""}${window.location.search}`,children:"Sign up"})]});let Ft;if(me&&Le)Ft=t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,padding:"12px 0 4px"},children:Ge?t.jsx("button",{type:"button",className:"w-link w-linkbtn",onClick:async()=>{Ie(!1),K(60);try{await k.prepareVerification({strategy:"magic_link"})}catch{}},children:"Resend magic link"}):t.jsxs("span",{className:"w-secsub",children:["Resend in ",Ee,"s"]})});else if(me)Ft=t.jsxs("form",{onSubmit:de,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(va,{onComplete:async ee=>{if(H(ee),ee&&ee.length===6){P(!0),S({});try{await k.completeVerification(ee),u(!1)}catch(ae){S({otp:ae.message||"Verification failed"})}finally{P(!1)}}},onResend:async()=>{const ee=b==="email_otp"?"email_otp":"phone_otp";await k.prepareVerification({strategy:ee})},error:$.otp,isSubmitting:Z}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:Z||N||!L,children:Z&&L?t.jsx(gt,{size:15,onAccent:!0}):`Continue to ${X}`})]});else{const ee=(b==="email_password"||b==="email_otp"||b==="email_magic_link")&&((na=(sa=e==null?void 0:e.auth_settings)==null?void 0:sa.email_address)==null?void 0:na.enabled),ae=b==="username_password"&&((ie=(ra=e==null?void 0:e.auth_settings)==null?void 0:ra.username)==null?void 0:ie.enabled),pe=b==="phone_otp"&&((Ne=(xe=e==null?void 0:e.auth_settings)==null?void 0:xe.phone_number)==null?void 0:Ne.enabled),Oe=v==="password"&&(b==="email_password"||b==="username_password")&&((ve=(J=e==null?void 0:e.auth_settings)==null?void 0:J.password)==null?void 0:ve.enabled);Ft=t.jsxs(t.Fragment,{children:[w.length>0&&t.jsx(Nr,{connections:w,callback:z}),((Ve=(qe=e==null?void 0:e.auth_settings)==null?void 0:qe.passkey)==null?void 0:Ve.enabled)&&t.jsxs("button",{type:"button",className:"w-social",style:{marginTop:w.length>0?10:0},onClick:le,disabled:Z,children:[t.jsx(ar,{}),t.jsx("span",{children:"Sign in with a passkey"})]}),(w.length>0||((jt=(yt=e==null?void 0:e.auth_settings)==null?void 0:yt.passkey)==null?void 0:jt.enabled))&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsxs("form",{onSubmit:V,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[ee&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Email address"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&b==="email_password"&&A.email?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(ui,{})}),t.jsx("span",{className:"w-locked-val",children:A.email}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>_("identifier"),children:"Edit"})]}):t.jsx(qt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",value:A.email,onChange:D,placeholder:"you@company.com","aria-invalid":!!$.email}),$.email&&t.jsx("span",{className:"w-input-err",children:$.email})]}),ae&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Username"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&A.username?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(ui,{})}),t.jsx("span",{className:"w-locked-val",children:A.username}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>{_("identifier"),I(Re=>({...Re,password:""}))},children:"Edit"})]}):t.jsx(qt,{className:"w-input",type:"text",id:"username",name:"username",value:A.username,onChange:D,placeholder:"yourname","aria-invalid":!!$.username,autoComplete:"username"}),$.username&&t.jsx("span",{className:"w-input-err",children:$.username})]}),pe&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(ys,{value:A.phone,onChange:D,error:$.phone,countryCode:O,setCountryCode:R}),$.phone&&t.jsx("span",{className:"w-input-err",children:$.phone})]}),Oe&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("span",{className:"w-label",children:"Password"}),t.jsx("span",{className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer"},onClick:()=>f(!0),children:"Forgot?"})]}),t.jsx(qt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"current-password",value:A.password,onChange:D,placeholder:"••••••••","aria-invalid":!!$.password}),$.password&&t.jsx("span",{className:"w-input-err",children:$.password})]}),$.submit&&t.jsx("span",{className:"w-input-err",children:$.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:Z||N,children:Z?t.jsx(gt,{size:15,onAccent:!0}):t.jsxs(t.Fragment,{children:[v==="identifier"?"Continue":"Sign in",t.jsx(Qt,{weight:"bold"})]})}),v==="password"&&((ht=(We=e==null?void 0:e.auth_settings)==null?void 0:We.auth_factors_enabled)==null?void 0:ht.email_otp)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-or",style:{margin:"5px 0"},children:t.jsx("span",{children:"OR"})}),t.jsxs("button",{type:"button",className:"w-method",disabled:Z,onClick:async()=>{P(!0),S({});try{await k.create({email:A.email,strategy:"email_otp"}),j("email_otp")}catch(Re){S({submit:Re.message}),P(!1)}},children:[t.jsx("span",{className:"w-method-ic",children:t.jsx(xl,{})}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:"Sign in with a code"}),t.jsx("span",{className:"w-method-desc",children:"We'll send a 6-digit code to your email"})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Qt,{})})]})]})]})]})}return t.jsx(Pe,{children:t.jsxs(et,{footer:Ut,children:[vt,Y&&t.jsxs("div",{className:"w-banner w-banner--error",style:{marginBottom:18},children:[t.jsx(Fa,{weight:"fill"}),t.jsxs("span",{className:"w-banner-txt",children:[t.jsx("strong",{children:"Access denied."})," ",Y," ",t.jsx("span",{className:"w-link",onClick:()=>B(null),children:"Try again"})]})]}),Me&&(we?t.jsxs("div",{className:"w-acct-list",children:[t.jsx("div",{className:"w-secsub w-acct-list-head",children:"Choose an account"}),t.jsxs("div",{className:"w-acct-list-body",children:[ce.map(ee=>{var ae,pe,Oe,Re;return t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>it(ee.id),disabled:Z||N,children:[t.jsx("span",{className:"w-avatar",children:ee.user.has_profile_picture?t.jsx("img",{src:ee.user.profile_picture_url,alt:((ae=ee.user.primary_email_address)==null?void 0:ae.email)||"account"}):ge(ee.user.first_name,ee.user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsx("span",{className:"w-acct-name",children:ee.user.first_name&&ee.user.last_name?`${ee.user.first_name} ${ee.user.last_name}`:ee.user.first_name||((Oe=(pe=ee.user.primary_email_address)==null?void 0:pe.email)==null?void 0:Oe.split("@")[0])||"Account"}),t.jsx("span",{className:"w-secsub",children:(Re=ee.user.primary_email_address)==null?void 0:Re.email})]}),t.jsx(Qt,{className:"w-acct-go"})]},ee.id)}),t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>{se(!1),oe(!0),G()},children:[t.jsx("span",{className:"w-avatar",style:{background:"var(--wa-surface-subtle)",color:"var(--wa-text-muted)"},children:t.jsx(Hu,{size:16})}),t.jsx("span",{className:"w-acct-text w-acct-name",children:"Use a different account"}),t.jsx(Qt,{className:"w-acct-go"})]})]})]}):t.jsxs("button",{type:"button",className:"w-acct","data-active":!0,style:{marginBottom:18},onClick:()=>it(ce[0].id),disabled:Z||N,children:[t.jsx("span",{className:"w-avatar",children:ce[0].user.has_profile_picture?t.jsx("img",{src:ce[0].user.profile_picture_url,alt:((Bt=ce[0].user.primary_email_address)==null?void 0:Bt.email)||"account"}):ge(ce[0].user.first_name,ce[0].user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsxs("span",{className:"w-acct-name",children:["Welcome back,"," ",ce[0].user.first_name||((oa=(ia=ce[0].user.primary_email_address)==null?void 0:ia.email)==null?void 0:oa.split("@")[0])||"back"]}),t.jsx("span",{className:"w-secsub",children:(la=ce[0].user.primary_email_address)==null?void 0:la.email})]}),t.jsx("span",{className:"w-link w-link--muted w-link--sm",style:{flex:"none"},onClick:ee=>{ee.stopPropagation(),ce.length>1?se(!0):(oe(!0),G())},children:"Not you?"})]})),Ft]})})}function jm(){var b,j,v,_,N,k,C,y,E,M,F,A;const{deployment:e}=ke(),{loading:a,joinWaitlist:s}=No(),[n,i]=o.useState({first_name:"",last_name:"",email:""}),[l,m]=o.useState(!1),[c,d]=o.useState(!1),[p,u]=o.useState(null),h=()=>{if(p)return p.message},f=e==null?void 0:e.auth_settings,g=!!((b=f==null?void 0:f.first_name)!=null&&b.enabled&&((j=f==null?void 0:f.last_name)!=null&&j.enabled)),x=I=>{const{name:$,value:S}=I.target;i(Z=>({...Z,[$]:S}))},w=async I=>{if(I.preventDefault(),!!f){d(!0),u(null);try{(await s(n)).data&&m(!0)}catch($){u($)}finally{d(!1)}}};return l?t.jsx(Pe,{children:t.jsx(et,{children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,textAlign:"center"},children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Be,{weight:"bold"})})]}),t.jsx("h1",{className:"w-auth-title",children:"You're on the waitlist"}),t.jsxs("p",{className:"w-auth-sub",children:["Thanks for your interest! We'll notify you at"," ",n.email," when we're ready for you to join."]})]})})}):t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx("a",{href:"/contact",className:"w-link",children:"Get help"})]}),children:[t.jsx(st,{title:"Join the waitlist",sub:"Be the first to know when we launch!"}),t.jsxs("form",{onSubmit:w,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(((v=f==null?void 0:f.first_name)==null?void 0:v.enabled)||((_=f==null?void 0:f.last_name)==null?void 0:_.enabled))&&t.jsxs("div",{className:g?"w-grid-2":"",children:[((N=f==null?void 0:f.first_name)==null?void 0:N.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",((k=f==null?void 0:f.first_name)==null?void 0:k.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"first_name",name:"first_name",required:(C=f==null?void 0:f.first_name)==null?void 0:C.required,minLength:2,maxLength:50,value:n.first_name,onChange:x,placeholder:"First name"})]}),((y=f==null?void 0:f.last_name)==null?void 0:y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",((E=f==null?void 0:f.last_name)==null?void 0:E.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"last_name",name:"last_name",required:(M=f==null?void 0:f.last_name)==null?void 0:M.required,minLength:2,maxLength:50,value:n.last_name,onChange:x,placeholder:"Last name"})]})]}),t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",((F=f==null?void 0:f.email_address)==null?void 0:F.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"email",id:"email",name:"email",required:(A=f==null?void 0:f.email_address)==null?void 0:A.required,value:n.email,onChange:x,placeholder:"Enter your email address"})]}),h()&&t.jsx("span",{className:"w-input-err",children:h()}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:c||a,children:c||a?t.jsx(gt,{onAccent:!0}):"Join waitlist"})]})]})})}function On({title:e,sub:a,icon:s,message:n,action:i,footer:l}){return t.jsx(Pe,{children:t.jsxs(et,{footer:l,children:[t.jsx(st,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:n}),i]})]})})}function _m(){const{deployment:e}=ke(),{navigate:a}=_t(),{error:s,session:n,processed:i,signinAttempt:l,redirectUri:m,loading:c}=So(),[d,p]=o.useState(!1),[u,h]=o.useState(null),f=()=>{window.location.reload()},g=()=>{var j;const b=((j=e==null?void 0:e.ui_settings)==null?void 0:j.sign_in_page_url)||"/sign-in";a(b)},x=()=>{p(!1),u&&a(u)},w=()=>{p(!1),u&&a(u)};if(o.useEffect(()=>{var b,j,v,_,N;if(!(!i||c||d)){if(l&&!l.completed){const k=(b=e==null?void 0:e.ui_settings)==null?void 0:b.sign_in_page_url;if(k){const C=new URL(k,window.location.origin);C.searchParams.set("signin_attempt_id",l.id),m&&C.searchParams.set("redirect_uri",m),a(C.toString())}return}if(l!=null&&l.completed){const C=ft(e,m)||((j=e==null?void 0:e.ui_settings)==null?void 0:j.after_signin_redirect_url)||(e==null?void 0:e.frontend_host)||"/";let y;try{y=new URL(C)}catch{y=new URL(C,window.location.origin)}if(y){(e==null?void 0:e.mode)==="staging"&&y.searchParams.set("__dev_session__",wt(e.backend_host)||"");const E=(v=e==null?void 0:e.auth_settings)==null?void 0:v.passkey;(E==null?void 0:E.enabled)&&(E==null?void 0:E.prompt_registration_on_auth)&&!((N=(_=n==null?void 0:n.active_signin)==null?void 0:_.user)!=null&&N.has_passkeys)?(h(y.toString()),p(!0)):a(y.toString())}}}},[n,i,c,m,e,l,a]),o.useEffect(()=>{s&&s.message.includes("No OAuth callback data found")&&setTimeout(()=>{var j;const b=((j=e==null?void 0:e.ui_settings)==null?void 0:j.sign_in_page_url)||(e==null?void 0:e.frontend_host);b&&a(b)},2e3)},[s,e,a]),d)return t.jsx(Pe,{children:t.jsx(et,{children:t.jsx($c,{onComplete:x,onSkip:w})})});if(n&&i&&!s)return t.jsx(On,{title:"Success",sub:"Authentication completed successfully",icon:t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Be,{weight:"bold"})})]}),message:"You'll be redirected to your destination shortly."});if(s){const b=s.message.includes("No OAuth callback data found");return t.jsx(On,{title:"Something went wrong",sub:"We couldn't complete your sign in",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(La,{weight:"bold"})})]}),message:s.message||"An unexpected error occurred during authentication.",action:b?void 0:t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:f,children:"Try again"}),footer:b?void 0:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:g,children:"Return to sign in"})]})})}return t.jsx(On,{title:"Completing sign in",sub:"Please wait while we authenticate you",icon:t.jsx(gt,{size:32}),message:"Verifying your credentials… this will only take a moment."})}function km({onSuccess:e,onError:a}={}){const[s,n]=o.useState("loading"),[i,l]=o.useState(""),{token:m,attempt:c,redirectUri:d}=W1(),{verifyMagicLink:p}=Eo(),{navigate:u}=_t(),{deployment:h}=ke(),f=o.useRef(!1);o.useEffect(()=>{(async()=>{if(!f.current){if(!m||!c){n("error"),l("The magic link appears to be malformed. Please try signing in again."),a==null||a("Invalid magic link parameters");return}f.current=!0,n("loading"),l("Please wait while we verify your magic link.");try{await p({token:m,attempt:c,redirectUri:d}),n("success"),l("You will be redirected to your account shortly."),e==null||e(),setTimeout(()=>{var b;let w=ft(h,d);if(w||(w=(b=h==null?void 0:h.ui_settings)==null?void 0:b.after_signin_redirect_url),!w&&(h!=null&&h.frontend_host)&&(w=`https://${h.frontend_host}`),w){const j=new URL(w);(h==null?void 0:h.mode)==="staging"&&j.searchParams.set("__dev_session__",wt(h.backend_host)||""),u(j.toString())}},2e3)}catch(w){n("error"),l("The magic link may have expired or already been used. Please try signing in again."),a==null||a(w.message)}}})()},[m,c]);const g=()=>{var x;(x=h==null?void 0:h.ui_settings)!=null&&x.sign_in_page_url&&u(h.ui_settings.sign_in_page_url)};return t.jsx(Pe,{children:t.jsxs(et,{children:[t.jsx(st,{title:"Magic link",sub:"Verifying your magic link"}),t.jsxs("div",{className:"w-auth-status",children:[s==="loading"&&t.jsx(gt,{size:32}),s==="success"&&t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Be,{weight:"bold"})})]}),s==="error"&&t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(La,{weight:"bold"})})]}),t.jsx("p",{className:"w-auth-sub",children:i}),s==="error"&&t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:g,children:"Try again"})]})]})})}function Cm(e){var n,i;return e?((n=e.signin_attempts)==null?void 0:n.find(l=>l.requires_completion&&!l.completed))?!0:!!((i=e.signup_attempts)==null?void 0:i.find(l=>{var m,c;return((m=l.missing_fields)==null?void 0:m.length)>0||((c=l.remaining_steps)==null?void 0:c.length)>0&&!l.completed})):!1}function Nm(e){const a=e?`/profile-completion?redirect_uri=${encodeURIComponent(e)}`:"/profile-completion";window.location.href=a}function ns({kind:e}){const a=e==="success"?"w-success":e==="error"?"w-success w-success--error":"w-success w-success--info",s=e==="success"?Be:e==="error"?La:Au;return t.jsxs("div",{className:a,children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(s,{weight:"bold"})})]})}function _a({title:e,sub:a,icon:s,message:n,action:i,footer:l}){return t.jsx(Pe,{children:t.jsxs(et,{footer:l,children:[t.jsx(st,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:n}),i]})]})})}function Sm({token:e,onSuccess:a,onError:s}){var b;const{acceptInvitation:n,invitationData:i,loading:l,error:m}=Ho(),{navigate:c}=_t(),{deployment:d}=ke(),p=o.useRef(!1),u=()=>{var v;const j=new URLSearchParams(window.location.search);return{token:e||j.get("invite_token")||j.get("token"),redirectUri:ft(d,j.get("redirect_uri"))||((v=d==null?void 0:d.ui_settings)==null?void 0:v.after_signin_redirect_url)||"/"}};o.useEffect(()=>{if(p.current)return;const{token:j}=u();j&&(p.current=!0,n(j))},[n]),o.useEffect(()=>{var j;i&&(i.organization&&!i.requires_signin&&a&&a(i.organization.id,(j=i.workspace)==null?void 0:j.id),i.error_code&&s&&s(i.message||"Failed to accept invitation"))},[i,a,s]);const h=()=>{const{redirectUri:j}=u();c(j)},f=()=>{var E,M;const{token:j}=u(),v=((E=d==null?void 0:d.ui_settings)==null?void 0:E.sign_in_page_url)||"/sign-in",_=((M=d==null?void 0:d.ui_settings)==null?void 0:M.sign_up_page_url)||"/sign-up",N=new URLSearchParams;j&&N.set("invite_token",j),i!=null&&i.invited_email&&N.set("invited_email",i.invited_email);const C=`${window.location.pathname}?token=${j}`;N.set("redirect_uri",C),i!=null&&i.message&&N.set("message",i.message);const y=(i==null?void 0:i.error_code)==="INVITATION_REQUIRES_SIGNUP";c(`${y?_:v}?${N.toString()}`)},g=()=>{const{token:j}=u();j&&(p.current=!1,n(j))},x=(j,v)=>t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:v,children:j}),{token:w}=u();if(!w&&!l)return t.jsx(_a,{title:"Invalid invitation",sub:"No invitation token found",icon:t.jsx(ns,{kind:"error"}),message:"The invitation link appears to be invalid or incomplete.",action:x("Go to home",()=>c("/"))});if(l)return t.jsx(_a,{title:"Processing invitation",sub:"Please wait while we verify your invitation",icon:t.jsx(gt,{size:32}),message:"Verifying invitation… this will only take a moment."});if(i!=null&&i.organization&&!i.requires_signin)return t.jsx(_a,{title:"Invitation accepted",sub:"You've successfully joined the organization",icon:t.jsx(ns,{kind:"success"}),message:t.jsxs(t.Fragment,{children:["Welcome to"," ",t.jsx("strong",{children:i.organization.name}),i.workspace?`. You've been added to the ${i.workspace.name} workspace.`:"."]}),action:x("Continue to application",h)});if(i!=null&&i.already_member)return t.jsx(_a,{title:"Already a member",sub:"You're already part of this organization",icon:t.jsx(ns,{kind:"info"}),message:`You're already a member of ${((b=i.organization)==null?void 0:b.name)||"this organization"}. No action needed.`,action:x("Continue to application",h)});if(i!=null&&i.requires_signin){const j=i.error_code==="INVITATION_REQUIRES_SIGNUP";return t.jsx(_a,{title:j?"Sign up required":"Sign in required",sub:"To accept this invitation",icon:t.jsx(ns,{kind:"info"}),message:t.jsxs(t.Fragment,{children:["This invitation is for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email}),"."," ",j?"Create an account with this email address to accept it.":i.error_code==="INVITATION_EMAIL_MISMATCH"?"You're signed in with a different account. Please sign in with the invited email.":"Please sign in to accept this invitation."]}),action:x(j?"Sign up to accept":"Sign in to accept",f)})}return(i==null?void 0:i.error_code)==="INVITATION_EXPIRED"?t.jsx(_a,{title:"Invitation expired",sub:"This invitation is no longer valid",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Cu,{weight:"bold"})})]}),message:t.jsxs(t.Fragment,{children:["Invitation for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email})," ","has expired. Invitations are valid for 10 days — please request a new one from your organization administrator."]})}):m||i!=null&&i.error_code?t.jsx(_a,{title:"Invitation error",sub:"Unable to process invitation",icon:t.jsx(ns,{kind:"error"}),message:(i==null?void 0:i.message)||m||"Failed to accept invitation",action:x("Try again",g),footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:f,children:"Sign in manually"})]})}):null}const Oc=o.createContext(void 0),Zc=()=>{const e=o.useContext(Oc);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},Em=({isOpen:e,onClose:a,children:s})=>{const[n,i]=o.useState(!1),l=ts();return o.useEffect(()=>{i(!0);const m=c=>{c.key==="Escape"&&e&&(a==null||a())};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e,a]),!e||!n?null:en.createPortal(t.jsx("div",{className:"wacht-root",style:l,children:t.jsx(Oc.Provider,{value:{isOpen:e,onClose:a},children:s})}),document.body)},Am=({children:e})=>{const{onClose:a}=Zc(),s=o.useRef(null),n=i=>{s.current&&!s.current.contains(i.target)&&(a==null||a())};return t.jsx("div",{className:"w-modal",onClick:n,children:t.jsx("div",{ref:s,style:{maxWidth:"100%",minWidth:0},children:e})})},Mm=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog${s?` ${s}`:""}`,style:{maxHeight:"90vh",overflowY:"auto",...a},children:e}),Rm=({children:e,showCloseButton:a=!0})=>{const{onClose:s}=Zc();return t.jsxs("div",{className:"w-dialog-head",children:[typeof e=="string"?t.jsx("h2",{className:"w-dialog-title",children:e}):e,a&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:s,children:t.jsx(La,{size:18})})]})},Lm=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog-body${s?` ${s}`:""}`,style:a,children:e}),Pm=({children:e})=>t.jsx("div",{className:"w-dialog-foot",children:e}),ze=Object.assign(Em,{Overlay:Am,Content:Mm,Header:Rm,Body:Lm,Footer:Pm}),$m=({isOpen:e,onClose:a,title:s,children:n,showCloseButton:i=!0})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{children:[s&&t.jsx(ze.Header,{showCloseButton:i,children:s}),t.jsx(ze.Body,{children:n})]})})}),Om=({trigger:e,renderDialog:a})=>{const[s,n]=o.useState(!1),i=()=>n(!0),l=()=>n(!1);return t.jsxs(t.Fragment,{children:[e({onClick:i}),a({isOpen:s,onClose:l})]})},Hc=o.createContext(void 0),Fc=()=>{const e=o.useContext(Hc);if(!e)throw new Error("useDropdownContext must be used within a DropdownProvider");return e},_s=({children:e,open:a,openChange:s,style:n})=>{const i=o.useRef(null),[l,m]=o.useState(!1);return o.useEffect(()=>{const c=d=>{i.current&&!i.current.contains(d.target)&&m(!1)};return l&&document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[l,s]),o.useEffect(()=>{s==null||s(l)},[l]),o.useEffect(()=>{m(!!a)},[a]),t.jsx(Hc.Provider,{value:{open:l,openChange:c=>m(c)},children:t.jsx("div",{style:{width:"fit-content",...n},ref:i,children:e})})},ks=({children:e,style:a,className:s})=>{const{open:n}=Fc(),[i,l]=o.useState({top:0,left:0}),[m,c]=o.useState(!1),d=o.useRef(null);return o.useEffect(()=>{n&&d.current?(c(!1),requestAnimationFrame(()=>{var h,f;const p=(h=d.current)==null?void 0:h.parentElement;if(!p)return;const u=p.querySelector("[data-dropdown-trigger]")||p.firstElementChild;if(u&&u!==d.current){const g=u.getBoundingClientRect(),x=(f=d.current)==null?void 0:f.getBoundingClientRect(),w=window.innerWidth,b=window.innerHeight;let j=g.bottom+4,v=g.right-((x==null?void 0:x.width)||200);v<8&&(v=g.left),v+((x==null?void 0:x.width)||200)>w-8&&(v=w-((x==null?void 0:x.width)||200)-8),x&&j+x.height>b-8&&(j=g.top-(x.height+4)),l({top:j,left:v}),c(!0)}})):c(!1)},[n]),n?t.jsx("div",{className:s?`w-menu ${s}`:"w-menu",ref:d,style:{position:"fixed",zIndex:1e3,width:"max-content",minWidth:140,maxWidth:240,...a,top:`${i.top}px`,left:`${i.left}px`,visibility:m?"visible":"hidden",opacity:m?1:0,transition:m?"opacity 0.15s ease-in-out":"none"},children:e}):null},Cs=({children:e})=>{const{openChange:a,open:s}=Fc(),n=o.useCallback(()=>{a(!s)},[s,a]);return t.jsx("div",{style:{position:"relative",display:"inline-flex"},onClick:n,"data-dropdown-trigger":!0,children:e})},ea=o.forwardRef(({$destructive:e,className:a,...s},n)=>t.jsx("button",{ref:n,className:`w-menu-item${e?" w-menu-item--danger":""}${a?` ${a}`:""}`,...s}));ea.displayName="DropdownItem";const Tc=()=>t.jsx("div",{style:{height:"0.5px",background:"var(--wa-border)",width:"100%",margin:"4px 0"}}),Ic=o.forwardRef(({className:e,style:a,...s},n)=>t.jsx("form",{ref:n,className:e,style:{display:"flex",flexDirection:"column",gap:16,...a},...s}));Ic.displayName="Form";const Ue=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:`w-field${e?` ${e}`:""}`,...a}));Ue.displayName="FormGroup";const Te=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:`w-label${e?` ${e}`:""}`,...a}));Te.displayName="Label";const be=o.forwardRef(({as:e="input",className:a,...s},n)=>{const i=`w-input${a?` ${a}`:""}`;return e==="textarea"?t.jsx("textarea",{className:i,...s}):t.jsx("input",{ref:n,className:i,...s})});be.displayName="Input";const je=({size:e,className:a})=>t.jsx("div",{className:a,style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:e?`${e}px`:"100%"},children:t.jsx("span",{className:"w-spin",style:{width:e??40,height:e??40}})}),Za=({checked:e,onChange:a})=>t.jsxs("label",{className:"w-switch","data-on":e?"":void 0,children:[t.jsx("input",{type:"checkbox",checked:e,onChange:s=>a(s.target.checked),style:{position:"absolute",opacity:0,width:0,height:0}}),t.jsx("span",{className:"w-switch-track",children:t.jsx("span",{className:"w-switch-knob"})})]}),Kt=(e=!1)=>{const[a,s]=o.useState(e),n=o.useCallback(()=>{s(!0)},[]),i=o.useCallback(()=>{s(!1)},[]),l=o.useCallback(()=>{s(m=>!m)},[]);return{isOpen:a,open:n,close:i,toggle:l}},Vc=({onChange:e,placeholder:a,value:s})=>t.jsxs("div",{className:"w-search",children:[t.jsx(Cl,{}),t.jsx("input",{type:"text",placeholder:a,value:s,onChange:n=>e(n.target.value)})]}),ne=o.forwardRef(({$primary:e,$outline:a,$destructive:s,$fullWidth:n,$size:i,className:l,style:m,...c},d)=>{const h=`w-btn ${s?"w-btn--danger-solid":a?"w-btn--secondary":"w-btn--primary"}${i==="sm"?" w-btn--sm":i==="lg"?" w-btn--lg":""}${l?` ${l}`:""}`;return t.jsx("button",{ref:d,className:h,style:n?{width:"100%",...m}:m,...c})});ne.displayName="Button";const zc=e=>({position:"absolute",top:"calc(100% + 6px)",left:0,width:"100%",maxHeight:260,overflowY:"auto",zIndex:1e3,opacity:e?1:0,transform:e?"scale(1)":"scale(0.97)",transformOrigin:"top",pointerEvents:e?"auto":"none",transition:"opacity 0.15s ease, transform 0.15s ease"}),Dc={width:"100%",height:32,padding:"0 9px",border:"none",borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,fontFamily:"var(--wa-font-sans)",fontSize:13,outline:"none",background:"transparent",color:"var(--wa-text)",marginBottom:4},Qs=({children:e})=>t.jsx("div",{style:{padding:"10px 9px",color:"var(--wa-text-faint)",fontFamily:"var(--wa-font-sans)",fontSize:12.5,textAlign:"center"},children:e}),un=({options:e,value:a,onChange:s,placeholder:n="Select an option",disabled:i=!1,searchable:l=!1,width:m,name:c,id:d,groupsEnabled:p=!1,className:u})=>{const[h,f]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),j=p&&"options"in e[0],_=(j?e.flatMap(y=>y.options):e).find(y=>y.value===a),N=g?j?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,k=(y,E=!1)=>{E||(s(y),f(!1),x(""))},C=()=>{i||f(!h)};return o.useEffect(()=>{h&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[h,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(f(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":h?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":h,id:d,children:[t.jsx("span",{className:"w-combo-val","data-ph":_?void 0:"",children:_?_.label:n}),h?t.jsx(Jo,{size:16}):t.jsx(Dt,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:zc(h),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:Dc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),j?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Qs,{children:"No options available"}):y.options.map(M=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":M.disabled?"":void 0,onClick:()=>k(M.value,M.disabled),role:"option","aria-selected":M.value===a,children:[M.label,M.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Be,{size:16})})]},M.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Qs,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>k(y.value,y.disabled),role:"option","aria-selected":y.value===a,children:[y.label,y.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Be,{size:16})})]},y.value))})]}),c&&t.jsx("input",{type:"hidden",name:c,value:a||""})]})},Uc=({options:e,value:a,onChange:s,placeholder:n="Select options",disabled:i=!1,searchable:l=!1,width:m,name:c,id:d,groupsEnabled:p=!1,className:u})=>{const[h,f]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),j=p&&"options"in e[0],_=(j?e.flatMap(y=>y.options):e).filter(y=>a.includes(y.value)),N=g?j?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,k=(y,E=!1)=>{E||(a.includes(y)?s(a.filter(M=>M!==y)):s([...a,y]))},C=()=>{i||f(!h)};return o.useEffect(()=>{h&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[h,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(f(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":h?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":h,id:d,children:[t.jsx("span",{className:"w-combo-val","data-ph":_.length>0?void 0:"",children:_.length>0?_.map(y=>y.label).join(", "):n}),h?t.jsx(Jo,{size:16}):t.jsx(Dt,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:zc(h),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:Dc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),j?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Qs,{children:"No options available"}):y.options.map(M=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":M.disabled?"":void 0,onClick:()=>k(M.value,M.disabled),role:"option","aria-selected":a.includes(M.value),children:[M.label,a.includes(M.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Be,{size:16})})]},M.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Qs,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>k(y.value,y.disabled),role:"option","aria-selected":a.includes(y.value),children:[y.label,a.includes(y.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Be,{size:16})})]},y.value))})]}),c&&t.jsx("input",{type:"hidden",name:c,value:a.join(",")})]})},Os=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase().slice(0,2)||"?",Ei=e=>e.trim().replace(/[<>"'&]/g,""),Zm=e=>e.length>=2&&e.length<=100&&/^[a-zA-Z0-9\s_.-]+$/.test(e),Hm=e=>/.+@.+\..+/.test(e),Ai=(e,a)=>e.length?e.find(s=>s.name===a)||e[0]:null,Fm=({roles:e,value:a,onChange:s,fullWidth:n})=>{const[i,l]=o.useState(!1),m=o.useRef(null);return o.useEffect(()=>{if(!i)return;const c=d=>{m.current&&!m.current.contains(d.target)&&l(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]),t.jsxs("div",{ref:m,className:`w-relative${n?" w-full":" w-none"}`,children:[t.jsxs("button",{type:"button",className:`w-combo${n?" w-full":" w-rolepick-btn"}`,"data-open":i?"":void 0,onClick:()=>l(c=>!c),disabled:!e.length,children:[t.jsx("span",{className:"w-combo-val",children:(a==null?void 0:a.name)||"Role"}),t.jsx(Dt,{size:14})]}),i&&t.jsx("div",{className:"w-combo-menu w-combo-menu--pop",children:e.map(c=>t.jsxs("button",{type:"button",className:"w-combo-opt",onClick:()=>{s(c),l(!1)},children:[c.name,c.id===(a==null?void 0:a.id)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Be,{size:13})})]},c.id))})]})},Wc=({mode:e,organizationId:a,onSuccess:s,onCancel:n,onCreateOrganization:i})=>{var ce;const l=e==="org",m=l?"organization":"workspace",c=l?"Organization":"Workspace",{createOrganization:d,getOrganizationRoles:p,inviteOrganizationMember:u}=Vt(),{createWorkspace:h,getWorkspaceRoles:f,createWorkspaceInvitation:g}=ga(),{organizationMemberships:x}=wa(),{refetch:w}=rt(),[b,j]=o.useState(0),[v,_]=o.useState(""),[N,k]=o.useState(""),[C,y]=o.useState(),[E,M]=o.useState(null),[F,A]=o.useState(!1),[I,$]=o.useState(null),[S,Z]=o.useState(a),[P,L]=o.useState(!1),H=o.useRef(null),O=o.useRef(null),[R,U]=o.useState(null),[W,Y]=o.useState([]),[B,Q]=o.useState([]),[ue,we]=o.useState(""),[se,te]=o.useState(null),oe=(ce=x==null?void 0:x.find(D=>D.organization.id===S))==null?void 0:ce.organization;o.useEffect(()=>()=>{E&&URL.revokeObjectURL(E)},[E]),o.useEffect(()=>{if(!P)return;const D=G=>{H.current&&!H.current.contains(G.target)&&L(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[P]);const Ee=D=>{var q;const G=(q=D.target.files)==null?void 0:q[0];if(G){if(G.size>2*1024*1024){$("Image must be under 2 MB.");return}if(!G.type.startsWith("image/")){$("Please choose a valid image file.");return}E&&URL.revokeObjectURL(E),$(null),y(G),M(URL.createObjectURL(G))}},K=async()=>{var q;const D=Ei(v),G=Ei(N);if(!Zm(D)){$(`Enter a valid ${m} name (2–100 characters).`);return}if(!l&&!S){$("Select an organization first.");return}A(!0),$(null);try{if(l){const V=await d({name:D,description:G,image:C}),de=((q=V==null?void 0:V.data)==null?void 0:q.organization)??(V==null?void 0:V.organization)??V;U(de);const z=await p(de).catch(()=>[]);Y(z),te(Ai(z,"Member"))}else{const V=await h(S,D,C,G),de=(V==null?void 0:V.workspace)??V,z={...de,organization:{id:S}};U(z);const le=await f(de).catch(()=>[]);Y(le),te(Ai(le,"Editor"))}await w(),j(1)}catch(V){$((V==null?void 0:V.message)||`Failed to create ${m}.`)}finally{A(!1)}},Ge=()=>{const D=ue.trim();!Hm(D)||B.some(G=>G.email===D)||se&&(Q(G=>[...G,{email:D,roleId:se.id,roleName:se.name}]),we(""))},Ie=D=>{(D.key==="Enter"||D.key===",")&&(D.preventDefault(),Ge())},Ye=async()=>{if(!B.length){j(2);return}A(!0),$(null);try{for(const D of B)l?await u(R,{email:D.email,organizationRole:{id:D.roleId}}):await g(R,D.email,D.roleId);j(2)}catch(D){$((D==null?void 0:D.message)||"Some invitations could not be sent.")}finally{A(!1)}},Ae=()=>{j(0),_(""),k(""),y(void 0),E&&URL.revokeObjectURL(E),M(null),U(null),Y([]),Q([]),we(""),$(null)};return t.jsxs("div",{className:"w-card w-create-card",children:[t.jsxs("div",{className:"w-create-body",children:[t.jsxs("div",{className:"w-flex-col w-items-center w-gap-3 w-create-head",children:[b===0?t.jsxs("span",{className:"w-ibadge-wrap",children:[t.jsxs("button",{type:"button",className:"w-ibadge w-avatar-edit","data-busy":F?"":void 0,onClick:()=>{var D;return(D=O.current)==null?void 0:D.click()},title:`Upload ${m} logo`,"aria-label":`Upload ${m} logo`,children:[E?t.jsx("img",{src:E,alt:`${c} logo`}):l?t.jsx(ps,{}):t.jsx(di,{}),t.jsx("span",{className:"w-avatar-veil",children:t.jsx(sn,{})})]}),t.jsx("input",{ref:O,type:"file",className:"w-none",hidden:!0,accept:"image/png, image/jpeg, image/gif, image/svg+xml",onChange:Ee,disabled:F}),E&&t.jsx("button",{type:"button",className:"w-ibadge-x",title:"Remove logo","aria-label":"Remove logo",onClick:()=>{E&&URL.revokeObjectURL(E),M(null),y(void 0)},children:t.jsx(La,{})})]}):t.jsx("span",{className:`w-ibadge${b===2?" w-ibadge--done":""}`,children:b===2?t.jsx(Be,{}):l?t.jsx(ps,{}):t.jsx(di,{})}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-text-center",children:[t.jsx("h1",{className:"w-title-lg",children:b===0?`Create ${l?"an":"a"} ${m}`:b===1?"Invite your team":`${c} created`}),t.jsx("p",{className:"w-sub",children:b===0?`Set up a new ${m}${l?" to collaborate with your team.":" inside your organization."}`:b===1?"Add people now, or skip and do it later.":`${v} is ready to go.`})]})]}),b<2&&t.jsxs("div",{className:"w-steps w-create-steps",children:[t.jsx("i",{"data-on":""}),t.jsx("i",{"data-on":b>=1?"":void 0})]}),I&&t.jsx("div",{className:"w-banner w-banner--error w-mb-4",children:I}),b===0&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[!l&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Organization"}),t.jsxs("div",{className:"w-relative",ref:H,children:[t.jsxs("button",{type:"button",className:"w-combo w-full","data-open":P?"":void 0,onClick:()=>L(D=>!D),disabled:F,children:[t.jsxs("span",{className:"w-combo-val w-inline w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:oe!=null&&oe.image_url?t.jsx("img",{src:oe.image_url,alt:oe.name}):Os((oe==null?void 0:oe.name)||"O").charAt(0)}),t.jsx("span",{children:(oe==null?void 0:oe.name)||"Select organization"})]}),t.jsx(Dt,{size:14})]}),P&&t.jsxs("div",{className:"w-combo-menu w-combo-menu--pop",children:[x==null?void 0:x.map(D=>{var q;const G=!!((q=D.eligibility_restriction)!=null&&q.type)&&D.eligibility_restriction.type!=="none";return t.jsxs("button",{type:"button",className:"w-combo-opt",disabled:G,"data-disabled":G?"":void 0,onClick:()=>{G||(Z(D.organization.id),L(!1))},children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:D.organization.image_url?t.jsx("img",{src:D.organization.image_url,alt:D.organization.name}):Os(D.organization.name).charAt(0)}),t.jsx("span",{children:D.organization.name})]},D.organization.id)}),i&&t.jsxs("button",{type:"button",className:"w-combo-opt w-text-primary",onClick:()=>{L(!1),i()},children:[t.jsx(Nt,{size:13}),"Create new organization"]})]})]})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:[c," name"]}),t.jsx(be,{autoFocus:!0,value:v,onChange:D=>_(D.target.value),placeholder:l?"Acme Inc":"Product",disabled:F})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Description"," ",t.jsx("span",{className:"w-secsub",children:"· optional"})]}),t.jsx(be,{as:"textarea",className:"w-input--area",value:N,onChange:D=>k(D.target.value),placeholder:l?"What does your team do?":"What's this workspace for?",disabled:F})]}),t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:K,disabled:F||!v.trim(),children:[F?t.jsx(je,{size:15}):null,"Continue",!F&&t.jsx(Qt,{size:15})]}),n&&t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-btn--block",onClick:n,disabled:F,children:"Cancel"})]})]}),b===1&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Invite by email"}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(be,{autoFocus:!0,className:"w-grow",value:ue,onChange:D=>we(D.target.value),onKeyDown:Ie,placeholder:"teammate@acme.com"}),t.jsx(Fm,{roles:W,value:se,onChange:te})]}),t.jsx("span",{className:"w-secsub",children:"Press Enter to add each person."})]}),B.length>0&&t.jsx("div",{className:"w-list",children:B.map(D=>t.jsxs("div",{className:"w-row",style:{gridTemplateColumns:"1fr auto",padding:"10px 0"},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:Os(D.email)}),t.jsx("span",{className:"w-truncate w-text-secondary",children:D.email})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-pill",children:D.roleName}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",title:"Remove",onClick:()=>Q(G=>G.filter(q=>q.email!==D.email)),children:t.jsx(La,{size:13})})]})]},D.email))}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-none",onClick:()=>j(2),disabled:F,children:"Skip"}),t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-grow",onClick:Ye,disabled:F,children:[F?t.jsx(je,{size:15}):null,B.length?`Invite ${B.length} & finish`:"Finish"]})]})]}),b===2&&t.jsxs("div",{className:"w-flex-col w-items-center w-gap-4",children:[t.jsxs("div",{className:"w-create-summary",children:[t.jsx("span",{className:"w-avatar w-avatar--md",children:E?t.jsx("img",{src:E,alt:v}):Os(v)}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:v}),t.jsx("span",{className:"w-secsub",children:B.length?`${B.length} invite${B.length>1?"s":""} sent`:"No invites yet"})]})]}),t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>s==null?void 0:s(R),children:["Go to ",m,t.jsx(Qt,{size:15})]}),t.jsxs("button",{type:"button",className:"w-link w-link--muted w-linkbtn w-inline w-gap-1",onClick:Ae,children:[t.jsx(Vo,{size:12})," Create another"]})]})]}),b===0&&t.jsx("div",{className:"w-create-foot",children:t.jsx("span",{className:"w-secsub",children:l?"Organizations group your team, billing and settings.":"Workspaces live inside an organization."})})]})},mn=({onSuccess:e,onCancel:a})=>t.jsx(Pe,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(Wc,{mode:"org",onSuccess:e,onCancel:a})})}),Bc=({isOpen:e,onClose:a,onCreated:s})=>{const n=()=>{s==null||s(),a==null||a()};return t.jsx(Pe,{children:t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsx(ze.Content,{className:"w-dialog--create",children:t.jsx(mn,{onSuccess:n,onCancel:a})})})})})},Er=o.createContext({screen:null,setScreen:()=>{},toast:(e,a)=>{}}),kt=()=>{const e=o.useContext(Er);if(!e)throw new Error("useScreenContext must be used within a ScreenContextProvider");return e},Qa=({title:e,description:a,onConfirm:s,onCancel:n,style:i})=>{const l=o.useRef(null);return o.useEffect(()=>{const m=c=>{l.current&&!l.current.contains(c.target)&&n()};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[n]),t.jsxs("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1e3,right:44,...i},children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("h3",{className:"w-pop-title",children:e}),a&&t.jsx("p",{className:"w-pop-sub",children:a})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:n,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:s,children:"Confirm"})]})]})},Mi=[{id:"okta",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"saml",description:"SAML",docUrl:"https://help.okta.com/en-us/content/topics/apps/apps_app_integration_wizard_saml.htm",placeholders:{entityId:"http://www.okta.com/{yourOktaDomain}",ssoUrl:"https://{yourOktaDomain}.okta.com/app/{appId}/sso/saml"},attributeMapping:{first_name:"firstName",last_name:"lastName",email:"email"}},{id:"okta-oidc",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"oidc",description:"OIDC",docUrl:"https://developer.okta.com/docs/guides/implement-oauth-for-okta/main/",placeholders:{issuerUrl:"https://{yourOktaDomain}.okta.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"azure",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/add-application-portal-setup-sso",placeholders:{entityId:"https://sts.windows.net/{tenantId}/",ssoUrl:"https://login.microsoftonline.com/{tenantId}/saml2"},attributeMapping:{first_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",last_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",email:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"}},{id:"azure-oidc",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"oidc",description:"OIDC",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc",placeholders:{issuerUrl:"https://login.microsoftonline.com/{tenantId}/v2.0",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"google",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"saml",description:"SAML",docUrl:"https://support.google.com/a/answer/6087519",placeholders:{entityId:"https://accounts.google.com/o/saml2?idpid={idpId}",ssoUrl:"https://accounts.google.com/o/saml2/idp?idpid={idpId}"},attributeMapping:{first_name:"FirstName",last_name:"LastName",email:"email"}},{id:"google-oidc",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"oidc",description:"OIDC",docUrl:"https://developers.google.com/identity/openid-connect/openid-connect",placeholders:{issuerUrl:"https://accounts.google.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"auth0",name:"Auth0",logo:"https://cdn.auth0.com/styleguide/latest/lib/logos/img/badge.png",protocol:"oidc",description:"OIDC",docUrl:"https://auth0.com/docs/authenticate/protocols/openid-connect-protocol",placeholders:{issuerUrl:"https://{yourDomain}.auth0.com/",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"onelogin",name:"OneLogin",logo:"",protocol:"saml",description:"SAML",docUrl:"https://onelogin.service-now.com/support?id=kb_article&sys_id=912bb23adbdc1cd0ca1c400e0b96197d",placeholders:{entityId:"https://app.onelogin.com/saml/metadata/{appId}",ssoUrl:"https://{subdomain}.onelogin.com/trust/saml2/http-post/sso/{appId}"}},{id:"ping",name:"PingOne",logo:"",protocol:"saml",description:"SAML",docUrl:"https://docs.pingidentity.com/pingone/latest/connector/configure-saml.html",placeholders:{entityId:"https://auth.pingone.com/{envId}",ssoUrl:"https://auth.pingone.com/{envId}/saml20/idp/sso"}},{id:"jumpcloud",name:"JumpCloud",logo:"",protocol:"saml",description:"SAML",docUrl:"https://support.jumpcloud.com/support/s/article/single-sign-on-sso-with-saml",placeholders:{entityId:"https://sso.jumpcloud.com/saml2/{appId}",ssoUrl:"https://sso.jumpcloud.com/saml2/{appId}"}},{id:"duo",name:"Duo",logo:"",protocol:"saml",description:"SAML",docUrl:"https://duo.com/docs/sso",placeholders:{entityId:"https://sso.duosecurity.com/saml2/sp/{appId}",ssoUrl:"https://sso.duosecurity.com/saml2/idp/{appId}/sso"}},{id:"keycloak",name:"Keycloak",logo:"https://www.keycloak.org/resources/images/icon.svg",protocol:"oidc",description:"OIDC",docUrl:"https://www.keycloak.org/docs/latest/securing_apps/",placeholders:{issuerUrl:"https://{host}/realms/{realm}",scopes:"openid profile email"}},{id:"adfs",name:"ADFS",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Microsoft_logo.svg/100px-Microsoft_logo.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust",placeholders:{entityId:"http://{adfsServer}/adfs/services/trust",ssoUrl:"https://{adfsServer}/adfs/ls/"}},{id:"custom-saml",name:"Custom",logo:"",protocol:"saml",description:"SAML",docUrl:"",placeholders:{}},{id:"custom-oidc",name:"Custom",logo:"",protocol:"oidc",description:"OIDC",docUrl:"",placeholders:{}}],Tm=({template:e})=>{const[a,s]=o.useState(!1);return!e.logo||a?t.jsx("span",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo--ph",children:t.jsx(Xt,{size:18,className:"w-text-muted"})}):t.jsx("img",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo",src:e.logo,alt:e.name,onError:()=>s(!0)})},Im=({organization:e})=>{const{getEnterpriseConnections:a,createEnterpriseConnection:s,deleteEnterpriseConnection:n,testEnterpriseConnection:i,generateSCIMToken:l,getSCIMToken:m,revokeSCIMToken:c}=Vt(),{toast:d}=kt(),[p,u]=o.useState(!1),[h,f]=o.useState(null),{data:g=[],isLoading:x,mutate:w}=Ce(e!=null&&e.id?`wacht-org-sso:${e.id}`:null,async()=>await(a==null?void 0:a(e))||[],{refreshInterval:3e4,revalidateOnFocus:!1}),b=async j=>{try{await(n==null?void 0:n(e,j)),w(),d("SSO connection deleted","info")}catch(v){d(v.message||"Failed to delete connection","error")}f(null)};return x?t.jsx("div",{className:"w-loading",children:t.jsx(je,{})}):p?t.jsx(zm,{organization:e,onClose:()=>u(!1),onCreate:async j=>{try{await(s==null?void 0:s(e,j)),w(),u(!1),d("SSO connection created","info")}catch(v){d(v.message||"Failed to create connection","error")}}}):t.jsx(t.Fragment,{children:g.length===0?t.jsxs("div",{className:"w-empty w-empty--fill",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(Xt,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"Enterprise SSO"}),t.jsx("p",{children:"Let members sign in with your identity provider."})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(ne,{onClick:()=>u(!0),children:[t.jsx(Nt,{size:16})," Configure SSO"]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-sechead",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-title",children:"Enterprise SSO"}),t.jsx("p",{className:"w-sub",children:"Configure SAML or OIDC SSO for your organization"})]})}),g.map(j=>t.jsx(Vm,{connection:j,onDelete:v=>f(v),connectionToDelete:h,onConfirmDelete:b,onCancelDelete:()=>f(null),testConnection:v=>i(e,v),generateSCIMToken:v=>l(e,v),getSCIMToken:v=>m(e,v),revokeSCIMToken:v=>c(e,v),toast:d},j.id))]})})},Vm=({connection:e,onDelete:a,connectionToDelete:s,onConfirmDelete:n,onCancelDelete:i,testConnection:l,generateSCIMToken:m,getSCIMToken:c,revokeSCIMToken:d,toast:p})=>{var F,A,I,$,S;const[u,h]=o.useState(null),[f,g]=o.useState(!1),[x,w]=o.useState(null),[b,j]=o.useState(null),[v,_]=o.useState(!1),[N,k]=o.useState(null);o.useEffect(()=>{c&&e.id&&c(e.id).then(h).catch(()=>{})},[e.id,c]);const C=async()=>{if(l){_(!0),k(null);try{const Z=await l(e.id);k(Z)}catch(Z){k({success:!1,checks:{},errors:{general:Z.message||"Test failed"}})}finally{_(!1)}}},y=async()=>{if(m){g(!0);try{const Z=await m(e.id);w(Z.token),h({exists:!0,token:Z}),p("SCIM token generated. Copy it now - it won't be shown again!","info")}catch(Z){p(Z.message||"Failed to generate token","error")}finally{g(!1)}}},E=async()=>{if(d){g(!0);try{await d(e.id),h({exists:!1,scim_base_url:u==null?void 0:u.scim_base_url}),w(null),p("SCIM token revoked","info")}catch(Z){p(Z.message||"Failed to revoke token","error")}finally{g(!1)}}},M=(Z,P)=>{navigator.clipboard.writeText(Z),j(P),setTimeout(()=>j(null),2e3)};return t.jsxs("div",{className:"w-flex-col w-gap-4 w-sso-conn",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-start",children:[t.jsxs("h3",{className:"w-sec w-inline w-gap-2",children:[t.jsx(Xt,{size:16}),e.protocol==="oidc"?"OIDC SSO":"SAML SSO",t.jsx("span",{className:"w-pill w-pill--current",children:e.protocol.toUpperCase()})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(ne,{$size:"sm",onClick:C,disabled:v,children:v?t.jsx(je,{size:14}):"Test"}),t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$size:"sm",$outline:!0,onClick:()=>a(e.id),className:"w-text-error",children:"Remove"}),s===e.id&&t.jsx(Qa,{title:"Delete this SSO connection?",onConfirm:()=>n(e.id),onCancel:i})]})]})]}),N&&t.jsx("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"}`,children:t.jsxs("span",{className:`w-banner-txt w-flex-col w-gap-1 ${N.success?"w-text-success":"w-text-error"}`,children:[t.jsx("span",{children:N.success?"✓ Connection is valid":"✗ Connection failed"}),N.errors&&Object.entries(N.errors).map(([Z,P])=>t.jsxs("div",{children:[Z.replace(/_/g," "),": ",P]},Z))]})}),t.jsxs("div",{className:"w-sso-detail",children:[e.protocol==="saml"?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Entity ID"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_entity_id}),t.jsx("span",{className:"w-secsub",children:"SSO URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_sso_url})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Issuer URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.oidc_issuer_url}),t.jsx("span",{className:"w-secsub",children:"Client ID"}),t.jsx("span",{className:"w-sec",children:e.oidc_client_id}),t.jsx("span",{className:"w-secsub",children:"Scopes"}),t.jsx("span",{className:"w-sec",children:e.oidc_scopes||"openid profile email"})]}),t.jsx("span",{className:"w-secsub",children:"Created"}),t.jsx("span",{className:"w-sec",children:new Date(e.created_at).toLocaleDateString()})]}),t.jsxs("div",{className:"w-flex-col w-gap-3 w-sso-scim",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center",children:[t.jsxs("div",{className:"w-sec w-inline w-gap-2",children:[t.jsx(Xt,{size:14}),"SCIM Provisioning"]}),t.jsx("div",{className:"w-flex w-wrap w-gap-2",children:!(u!=null&&u.exists)||!((F=u==null?void 0:u.token)!=null&&F.enabled)?t.jsx(ne,{$size:"sm",onClick:y,disabled:f,children:f?t.jsx(je,{size:14}):"Generate Token"}):t.jsxs(t.Fragment,{children:[t.jsx(ne,{$size:"sm",onClick:y,disabled:f,children:f?t.jsx(je,{size:14}):"Rotate"}),t.jsx(ne,{$size:"sm",$outline:!0,onClick:E,disabled:f,className:"w-text-error",children:"Revoke"})]})})]}),(((A=u==null?void 0:u.token)==null?void 0:A.scim_base_url)||x)&&t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Base URL:"}),t.jsx("code",{children:((I=u==null?void 0:u.token)==null?void 0:I.scim_base_url)||"Loading..."}),(($=u==null?void 0:u.token)==null?void 0:$.scim_base_url)&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>M(u.token.scim_base_url,"scim-url"),children:b==="scim-url"?t.jsx(Be,{size:12}):t.jsx(Ga,{size:12})})]}),x&&t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Token:"}),t.jsx("code",{children:x}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>M(x,"scim-token"),children:b==="scim-token"?t.jsx(Be,{size:12}):t.jsx(Ga,{size:12})})]}),t.jsx("div",{className:"w-mono-faint w-text-warning",children:"⚠️ Copy this token now. It won't be shown again."})]}),(u==null?void 0:u.exists)&&((S=u==null?void 0:u.token)==null?void 0:S.enabled)&&!x&&t.jsxs("div",{className:"w-secsub",children:["Token:"," ",t.jsxs("code",{className:"w-mono-sm w-token-chip",children:[u.token.token_prefix,"..."]}),u.token.last_used_at&&t.jsxs("span",{children:[" ","· Last used:"," ",new Date(u.token.last_used_at).toLocaleDateString()]})]})]})]})},zm=({onCreate:e,organization:a})=>{const{getOrganizationDomains:s,testEnterpriseConnectionConfig:n}=Vt(),{deployment:i}=ke(),{toast:l}=kt(),[m,c]=o.useState(!1),[d,p]=o.useState(null),[u,h]=o.useState("saml"),[f,g]=o.useState(null),[x,w]=o.useState(!1),[b,j]=o.useState({domain_id:"",idp_entity_id:"",idp_sso_url:"",idp_certificate:"",oidc_issuer_url:"",oidc_client_id:"",oidc_client_secret:"",oidc_scopes:"openid profile email",jit_enabled:!0,attr_first_name:"",attr_last_name:"",attr_email:""}),[v,_]=o.useState(!1),[N,k]=o.useState(null),{data:C=[],isLoading:y}=Ce("wacht-org-verified-domains-for-sso-screen",async()=>(await(s==null?void 0:s(a))||[]).filter(L=>L.verified),{revalidateOnFocus:!1}),E=P=>{p(P),h(P.protocol),P.protocol==="saml"?j(L=>{var H,O,R;return{...L,idp_entity_id:P.placeholders.entityId||"",idp_sso_url:P.placeholders.ssoUrl||"",attr_first_name:((H=P.attributeMapping)==null?void 0:H.first_name)||"",attr_last_name:((O=P.attributeMapping)==null?void 0:O.last_name)||"",attr_email:((R=P.attributeMapping)==null?void 0:R.email)||""}}):j(L=>{var H,O,R;return{...L,oidc_issuer_url:P.placeholders.issuerUrl||"",oidc_scopes:P.placeholders.scopes||"openid profile email",attr_first_name:((H=P.attributeMapping)==null?void 0:H.first_name)||"",attr_last_name:((O=P.attributeMapping)==null?void 0:O.last_name)||"",attr_email:((R=P.attributeMapping)==null?void 0:R.email)||""}})},M=i!=null&&i.backend_host?`${i.backend_host.startsWith("https://")?"":"https://"}${i.backend_host}/auth/sso/oidc/callback`:"",F=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/metadata`:"",A=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/callback`:"",I=(P,L)=>{navigator.clipboard.writeText(P),g(L),setTimeout(()=>g(null),2e3)},$=async P=>{P.preventDefault();const L=H=>H.includes("{")||H.includes("}");if(u==="saml"){if(!b.idp_entity_id||L(b.idp_entity_id)){l("Please enter a valid IdP Entity ID (no placeholders)","error");return}if(!b.idp_sso_url||L(b.idp_sso_url)){l("Please enter a valid IdP SSO URL (no placeholders)","error");return}if(!b.idp_certificate){l("Please provide the X.509 Certificate","error");return}}else{if(!b.oidc_issuer_url||L(b.oidc_issuer_url)){l("Please enter a valid Issuer URL (no placeholders)","error");return}if(!b.oidc_client_id||L(b.oidc_client_id)){l("Please enter a valid Client ID (no placeholders)","error");return}if(!b.oidc_client_secret){l("Please enter the Client Secret","error");return}}c(!0);try{const H={};b.attr_first_name&&(H.first_name=b.attr_first_name),b.attr_last_name&&(H.last_name=b.attr_last_name),b.attr_email&&(H.email=b.attr_email);const O=Object.keys(H).length>0;u==="saml"?await e({protocol:"saml",domain_id:b.domain_id||void 0,idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate,jit_enabled:b.jit_enabled,...O&&{attribute_mapping:H}}):await e({protocol:"oidc",domain_id:b.domain_id||void 0,oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret,oidc_scopes:b.oidc_scopes,jit_enabled:b.jit_enabled,...O&&{attribute_mapping:H}})}finally{c(!1)}},S=async()=>{_(!0),k(null);const P=O=>O.includes("{")||O.includes("}"),L={},H={};if(u==="saml"?(b.idp_entity_id?P(b.idp_entity_id)?(H.entity_id_valid=!1,L.entity_id_valid="IdP Entity ID contains placeholder values - please replace with actual values"):H.entity_id_valid=!0:(H.entity_id_valid=!1,L.entity_id_valid="IdP Entity ID is required"),b.idp_sso_url?P(b.idp_sso_url)?(H.sso_url_valid=!1,L.sso_url_valid="IdP SSO URL contains placeholder values - please replace with actual values"):H.sso_url_valid=!0:(H.sso_url_valid=!1,L.sso_url_valid="IdP SSO URL is required"),b.idp_certificate?H.certificate_provided=!0:(H.certificate_provided=!1,L.certificate_provided="X.509 Certificate is required")):(b.oidc_issuer_url?P(b.oidc_issuer_url)?(H.issuer_url_valid=!1,L.issuer_url_valid="Issuer URL contains placeholder values - please replace with actual values"):H.issuer_url_valid=!0:(H.issuer_url_valid=!1,L.issuer_url_valid="Issuer URL is required"),b.oidc_client_id?P(b.oidc_client_id)?(H.client_id_valid=!1,L.client_id_valid="Client ID contains placeholder values - please replace with actual values"):H.client_id_valid=!0:(H.client_id_valid=!1,L.client_id_valid="Client ID is required")),Object.keys(L).length>0){k({success:!1,checks:H,errors:L}),_(!1);return}try{const O=u==="saml"?{protocol:"saml",idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate}:{protocol:"oidc",oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret},R=await(n==null?void 0:n(a,O));R&&k(R)}catch(O){k({success:!1,checks:{},errors:{general:"Test failed: "+O.message}})}finally{_(!1)}},Z=P=>t.jsx(Tm,{template:P});return t.jsxs("form",{onSubmit:$,autoComplete:"off",className:"w-flex-col w-gap-4",children:[d?t.jsxs("div",{className:"w-flex w-items-center w-gap-4 w-sso-template",children:[Z(d),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:d.name}),t.jsx("div",{className:"w-eyebrow",children:d.protocol})]}),t.jsx(ne,{type:"button",$size:"sm",$outline:!0,onClick:()=>p(null),children:"Change"})]}):t.jsxs("div",{className:"w-flex-col w-gap-5",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"SAML Providers"}),t.jsx("div",{className:"w-grid-4",children:Mi.filter(P=>P.protocol==="saml").map(P=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(P),children:[Z(P),t.jsx("span",{className:"w-secsub",children:P.name})]},P.id))})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"OIDC Providers"}),t.jsx("div",{className:"w-grid-4",children:Mi.filter(P=>P.protocol==="oidc").map(P=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(P),children:[Z(P),t.jsx("span",{className:"w-secsub",children:P.name})]},P.id))})]})]}),d&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-sec",children:"Service Provider Details"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"ACS URL:"}),t.jsx("code",{children:A}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>I(A,"acs"),children:f==="acs"?t.jsx(Be,{size:12}):t.jsx(Ga,{size:12})})]}),t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Metadata:"}),t.jsx("code",{children:F}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>I(F,"metadata"),children:f==="metadata"?t.jsx(Be,{size:12}):t.jsx(Ga,{size:12})})]})]}):t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Callback:"}),t.jsx("code",{children:M}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>I(M,"callback"),children:f==="callback"?t.jsx(Be,{size:12}):t.jsx(Ga,{size:12})})]})})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:d?`${d.name} Configuration`:"Configuration"}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[d&&d.docUrl&&t.jsxs("a",{href:d.docUrl,target:"_blank",rel:"noopener noreferrer",className:"w-link w-link--sm w-text-primary w-inline w-gap-1",children:[t.jsx(vu,{size:12})," Docs"]}),t.jsx(ne,{type:"button",$size:"sm",$outline:!0,onClick:S,disabled:v||!d,children:v?t.jsx(je,{size:16}):"Test Connection"}),t.jsx(ne,{$size:"sm",type:"submit",disabled:m||C.length===0||!d,children:m?t.jsx(je,{size:16}):"Create Connection"})]})]}),N&&(()=>{const P={entity_id_valid:"IdP Entity ID",sso_url_valid:"IdP SSO URL",certificate_provided:"X.509 Certificate",issuer_url_valid:"Issuer URL",client_id_valid:"Client ID",certificate_valid:"Certificate Valid",sso_url_reachable:"SSO URL Reachable",discovery_reachable:"Discovery Endpoint",discovery_valid:"Discovery Valid",authorization_endpoint:"Authorization Endpoint",token_endpoint:"Token Endpoint",issuer_valid:"Issuer URL Valid"};return t.jsxs("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"} w-flex-col w-gap-3`,children:[t.jsx("div",{className:`w-sec ${N.success?"w-text-success":"w-text-error"}`,children:N.success?"✓ All checks passed":"✗ Some checks failed"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:Object.entries(N.checks).map(([L,H])=>{var O;return t.jsxs("div",{className:"w-flex w-items-start w-gap-2 w-sso-check",children:[t.jsx("span",{className:`w-sso-check-mark ${H?"w-text-success":"w-text-error"}`,children:H?"✓":"✗"}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:P[L]||L.replace(/_/g," ").replace(/\b\w/g,R=>R.toUpperCase())}),((O=N.errors)==null?void 0:O[L])&&t.jsx("div",{className:"w-secsub w-text-error",children:N.errors[L]})]})]},L)})})]})})(),t.jsxs("div",{className:"w-grid-2",children:[!d&&t.jsxs(Ue,{children:[t.jsx(Te,{children:"Protocol *"}),t.jsxs("select",{className:"w-input",value:u,onChange:P=>h(P.target.value),children:[t.jsx("option",{value:"saml",children:"SAML"}),t.jsx("option",{value:"oidc",children:"OpenID Connect (OIDC)"})]})]}),t.jsxs(Ue,{className:"w-col-full",children:[t.jsx(Te,{children:"Domain *"}),y?t.jsx("div",{className:"w-secsub",children:"Loading domains..."}):C.length===0?t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"No verified domains found. Please add and verify a domain first."})}):t.jsxs("select",{className:"w-input",value:b.domain_id,onChange:P=>j({...b,domain_id:P.target.value}),required:!0,children:[t.jsx("option",{value:"",children:"Select a verified domain"}),C.map(P=>t.jsx("option",{value:P.id,children:P.fqdn},P.id))]})]}),u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs(Ue,{children:[t.jsx(Te,{children:"IdP Entity ID *"}),t.jsx(be,{type:"text",value:b.idp_entity_id,onChange:P=>j({...b,idp_entity_id:P.target.value}),placeholder:"https://idp.example.com/entity",required:!0})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"IdP SSO URL *"}),t.jsx(be,{type:"url",value:b.idp_sso_url,onChange:P=>j({...b,idp_sso_url:P.target.value}),placeholder:"https://idp.example.com/sso",required:!0})]}),t.jsxs(Ue,{className:"w-col-full",children:[t.jsx(Te,{children:"X.509 Certificate *"}),t.jsx(be,{as:"textarea",value:b.idp_certificate,onChange:P=>j({...b,idp_certificate:P.target.value}),placeholder:"-----BEGIN CERTIFICATE-----...",required:!0,className:"w-input--area w-input--mono"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Ue,{children:[t.jsx(Te,{children:"Issuer URL *"}),t.jsx(be,{type:"url",value:b.oidc_issuer_url,onChange:P=>j({...b,oidc_issuer_url:P.target.value}),placeholder:"https://login.example.com",required:!0})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Client ID *"}),t.jsx(be,{type:"text",value:b.oidc_client_id,onChange:P=>j({...b,oidc_client_id:P.target.value}),placeholder:"your-client-id",required:!0,autoComplete:"off","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Client Secret *"}),t.jsx(be,{type:"password",value:b.oidc_client_secret,onChange:P=>j({...b,oidc_client_secret:P.target.value}),placeholder:"your-client-secret",required:!0,autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Scopes"}),t.jsx(be,{type:"text",value:b.oidc_scopes,onChange:P=>j({...b,oidc_scopes:P.target.value}),placeholder:"openid profile email"})]})]}),t.jsx(Ue,{className:"w-col-full",children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:"Enable JIT Provisioning"}),t.jsx("div",{className:"w-secsub",children:"When enabled, new users are automatically created on their first SSO login. When disabled, only pre-existing users can sign in via SSO."})]}),t.jsx(Za,{checked:b.jit_enabled,onChange:()=>j({...b,jit_enabled:!b.jit_enabled})})]})}),t.jsxs("div",{className:"w-col-full w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-inline w-gap-2 w-text-primary w-disclosure",onClick:()=>w(!x),children:[t.jsx("span",{className:"w-disclosure-caret",children:x?"▼":"▶"}),"Advanced Options (Attribute Mapping)"]}),x&&t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-secsub",children:"Map IdP attribute names to Wacht user fields. Leave empty to use default attribute names."}),t.jsxs("div",{className:"w-grid-3",children:[t.jsxs(Ue,{children:[t.jsx(Te,{children:"First Name Attribute"}),t.jsx(be,{type:"text",value:b.attr_first_name,onChange:P=>j({...b,attr_first_name:P.target.value}),placeholder:u==="saml"?"givenName":"given_name"})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Last Name Attribute"}),t.jsx(be,{type:"text",value:b.attr_last_name,onChange:P=>j({...b,attr_last_name:P.target.value}),placeholder:u==="saml"?"surname":"family_name"})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Email Attribute"}),t.jsx(be,{type:"text",value:b.attr_email,onChange:P=>j({...b,attr_email:P.target.value}),placeholder:"email"})]})]})]})]})]})]})]})]})},mt=(...e)=>e.filter(Boolean).join(" "),Ri=({className:e,...a})=>t.jsx("div",{className:mt("w-contents",e),...a}),Zn=({className:e,...a})=>t.jsx("div",{className:mt("w-card","w-flex-col","w-full","w-minh-full",e),...a}),Dm=({className:e,...a})=>t.jsx("div",{className:mt("w-tabsbar",e),...a}),Um=({className:e,...a})=>t.jsx("div",{className:mt("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),za=({className:e,$isActive:a,...s})=>t.jsx("button",{className:mt("w-tab",a&&"w-tab--active",e),...s}),Da=({className:e,...a})=>t.jsx("span",{className:mt("w-inline","w-gap-2",e),...a}),Wm=({className:e,children:a,...s})=>t.jsx("div",{className:mt("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Ar=({className:e,...a})=>t.jsx("div",{className:mt("w-sechead",e),...a}),Li=({className:e,...a})=>t.jsx("div",{className:mt("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Pi=({className:e,...a})=>t.jsx("div",{className:mt("w-grow",e),...a}),$i=({className:e,...a})=>t.jsx("div",{className:mt("w-flex","w-items-center","w-gap-3","w-none",e),...a}),pn=({className:e,...a})=>t.jsx("div",{className:mt("w-full",e),...a}),Bm=({className:e,...a})=>t.jsx("div",{className:mt("w-page-head",e),...a}),Gm=({className:e,...a})=>t.jsx("div",{className:mt("w-grow","w-flex-col","w-gap-1",e),...a}),qm=({className:e,...a})=>t.jsx("div",{className:mt("w-sec","w-truncate",e),...a}),Km=({className:e,...a})=>t.jsx("div",{className:mt("w-secsub","w-truncate",e),...a}),Ym={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},pa=({className:e,$variant:a="neutral",children:s,...n})=>t.jsxs("span",{className:mt("w-pill",Ym[a],e),...n,children:[t.jsx("span",{className:"w-dot"}),s]}),Oi=({className:e,$first:a,...s})=>t.jsx("div",{className:mt("w-sec",e),...s}),Qm=({organization:e})=>{var A,I,$,S,Z,P;const{switchOrganization:a,refetch:s}=rt(),{workspaces:n}=ga(),{deployment:i}=ke(),{deleteOrganization:l,updateOrganization:m}=Vt(),{toast:c}=kt(),[d,p]=o.useState((e==null?void 0:e.name)||""),[u,h]=o.useState((e==null?void 0:e.description)||""),[f,g]=o.useState(!1),[x,w]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:"",default_workspace_id:""}),[b,j]=o.useState(""),[v,_]=o.useState(!1),[N,k]=o.useState(!1),C=o.useRef({name:d,description:u,security:x,isSaving:f});o.useEffect(()=>{C.current={name:d,description:u,security:x,isSaving:f}},[d,u,x,f]);const y=o.useCallback(async()=>{if(!e)return;const L=C.current;try{g(!0),await m(e,{name:L.name,description:L.description,whitelisted_ips:L.security.allowed_ips.split(`
|
|
103
|
+
`).filter(H=>H.trim()),enable_ip_restriction:L.security.ip_restrictions,enforce_mfa:L.security.mfa_required,auto_assigned_workspace_id:L.security.default_workspace_id||"0"}),c("Changes saved","info")}catch(H){c(H.message||"Failed to save changes","error")}finally{g(!1)}},[e,m,c]),E=o.useCallback(()=>{C.current.isSaving||y()},[y]);o.useEffect(()=>{var L;e&&(p(e.name||""),h(e.description||""),w({allowed_ips:((L=e.whitelisted_ips)==null?void 0:L.join(`
|
|
104
|
+
`))||"",ip_restrictions:e.enable_ip_restriction||!1,mfa_required:e.enforce_mfa||!1,default_workspace_id:e.auto_assigned_workspace_id||""}))},[e]);const M=o.useMemo(()=>n.filter(L=>L.organization.id===(e==null?void 0:e.id)),[n,e==null?void 0:e.id]),F=async()=>{if(!(!e||b!==e.name))try{_(!0),await a(""),await l(e),await s(),c("Organization deleted","info")}catch{c("Failed to delete organization","error")}finally{_(!1),j("")}};return e?t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"name",children:"Organization name"}),t.jsx(be,{id:"name",value:d,onChange:L=>p(L.target.value),onBlur:E,placeholder:"Organization name",required:!0})]}),t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"description",children:"Description"}),t.jsx(be,{id:"description",as:"textarea",value:u,onChange:L=>h(L.target.value),onBlur:E,placeholder:"Optional description",className:"w-input--area"})]}),((A=i==null?void 0:i.b2b_settings)==null?void 0:A.workspaces_enabled)&&M.length>0&&t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"default_workspace",children:"Default workspace"}),t.jsx(un,{options:M.map(L=>({value:L.id,label:L.name})),value:x.default_workspace_id,onChange:L=>{w(H=>({...H,default_workspace_id:L})),setTimeout(E,0)},placeholder:"Select default workspace"})]})]}),(((I=i==null?void 0:i.b2b_settings)==null?void 0:I.enforce_mfa_per_org_enabled)||(($=i==null?void 0:i.b2b_settings)==null?void 0:$.ip_allowlist_per_org_enabled))&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Oi,{children:"Security"}),((S=i==null?void 0:i.b2b_settings)==null?void 0:S.enforce_mfa_per_org_enabled)&&t.jsxs(Li,{children:[t.jsxs(Pi,{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Multi-factor authentication"}),t.jsx("p",{className:"w-secsub",children:"Require all members to set up MFA for added security."})]}),t.jsx($i,{children:t.jsx(Za,{checked:x.mfa_required,onChange:()=>{const L=!x.mfa_required;w(H=>({...H,mfa_required:L})),setTimeout(E,0)}})})]}),((Z=i==null?void 0:i.b2b_settings)==null?void 0:Z.ip_allowlist_per_org_enabled)&&t.jsxs(t.Fragment,{children:[t.jsxs(Li,{children:[t.jsxs(Pi,{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"IP restrictions"}),t.jsx("p",{className:"w-secsub",children:"Only allow access from specific IP addresses."})]}),t.jsx($i,{children:t.jsx(Za,{checked:x.ip_restrictions,onChange:()=>{const L=!x.ip_restrictions;w(H=>({...H,ip_restrictions:L})),setTimeout(E,0)}})})]}),x.ip_restrictions&&t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"allowed_ips",children:"Allowed IP addresses"}),t.jsx(be,{id:"allowed_ips",as:"textarea",value:x.allowed_ips,onChange:L=>w(H=>({...H,allowed_ips:L.target.value})),onBlur:E,placeholder:`192.168.1.1
|
|
105
|
+
10.0.0.0/24`,className:"w-input--area w-input--mono"})]})]})]}),((P=i==null?void 0:i.b2b_settings)==null?void 0:P.allow_org_deletion)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Oi,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start w-gap-3",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2 w-full",children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete organization"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this organization, there is no going back."})]}),t.jsx(ne,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{k(!N),j("")},children:N?"Cancel":"Delete organization"})]}),N&&t.jsxs("div",{className:"w-flex-col w-gap-3 w-full",children:[t.jsxs(Ue,{children:[t.jsxs(Te,{htmlFor:"confirm_org_name",children:["Type"," ",t.jsx("strong",{children:e.name})," ","to confirm"]}),t.jsx(be,{id:"confirm_org_name",type:"text",value:b,onChange:L=>j(L.target.value),placeholder:e.name})]}),t.jsx(ne,{$size:"sm",$destructive:!0,onClick:F,disabled:b!==e.name||v,children:v?t.jsx(je,{size:12}):"Delete forever"})]})]})]})]}):t.jsx(je,{})},Mr=(e,a)=>a?`${e} ${a}`:e,$t=o.forwardRef(({className:e,...a},s)=>t.jsx("table",{ref:s,className:Mr("w-table",e),...a}));$t.displayName="Table";const Ot=o.forwardRef((e,a)=>t.jsx("thead",{ref:a,...e}));Ot.displayName="TableHead";const Zt=o.forwardRef((e,a)=>t.jsx("tbody",{ref:a,...e}));Zt.displayName="TableBody";const nt=o.forwardRef((e,a)=>t.jsx("tr",{ref:a,...e}));nt.displayName="TableRow";const He=o.forwardRef((e,a)=>t.jsx("th",{ref:a,...e}));He.displayName="TableHeader";const Ke=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:e,...a}));Ke.displayName="TableCell";const Jm=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Mr("w-td--flex",e),...a}));Jm.displayName="TableCellFlex";const Ht=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Mr("w-td--actions",e),...a}));Ht.displayName="ActionsCell";const Ct=({title:e,description:a,icon:s,action:n})=>t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:s??t.jsx(Zu,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:e}),t.jsx("p",{children:a})]}),n&&t.jsx("div",{className:"w-empty-action",children:n})]}),xt=({triggerRef:e,isOpen:a,minWidth:s=300,defaultMaxHeight:n=400,offset:i=8,contentRef:l})=>{const[m,c]=o.useState();return o.useEffect(()=>{if(!a||!e.current){c(void 0);return}const d=()=>{var N;if(!e.current)return;const u=e.current.getBoundingClientRect(),h=window.innerWidth,f=window.innerHeight,g=((N=l==null?void 0:l.current)==null?void 0:N.offsetWidth)||s,x=f-u.bottom,w=u.top,b={};x>=w?(b.top=u.bottom+i,b.maxHeight=Math.min(n,x-i*2)):(b.bottom=f-u.top+i,b.maxHeight=Math.min(n,w-i*2));const j=h-u.left,v=u.right,_=j>=v?u.left:u.right-g;b.left=Math.max(i,Math.min(h-g-i,_)),c(b)},p=requestAnimationFrame(d);return window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0)}},[a,s,n,i,l]),m},Zi=({onClose:e,domain:a,triggerRef:s})=>{const n=o.useRef(null),[i,l]=o.useState(),[m,c]=o.useState(""),[d,p]=o.useState(!1),[u,h]=o.useState(!1),{addDomain:f,verifyDomain:g}=fa(),{toast:x}=kt(),w=xt({contentRef:n,triggerRef:s??{current:null},isOpen:u,minWidth:360,defaultMaxHeight:420}),b=k=>/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(k),j=k=>k.trim().toLowerCase().replace(/^https?:\/\//,""),v=async()=>{const k=j(m);if(!k){x("Please enter a domain name","error");return}if(!b(k)){x("Please enter a valid domain (e.g., example.com)","error");return}if(k.length>253){x("Domain name is too long","error");return}p(!0);try{const C=await f({fqdn:k});x("Domain added","info"),l(C.data)}catch(C){x(C.message||"Failed to add domain. Please try again.","error")}finally{p(!1)}},_=async()=>{if(!(!i||d)){p(!0);try{await g(i),e==null||e(),x("Domain verified","info")}catch(k){x(k.message||"Failed to verify domain. Check DNS records and try again.","error")}finally{p(!1)}}};if(o.useEffect(()=>{h(!0);const k=y=>{n.current&&!n.current.contains(y.target)&&(e==null||e())},C=y=>{y.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",C)}},[e]),o.useEffect(()=>{a&&l(a)},[a]),!u)return null;const N={position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"};return i?t.jsxs("div",{ref:n,className:"w-pop w-pop--wide",style:N,onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"verify-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"verify-domain-title",children:"Verify domain"}),t.jsx("p",{className:"w-pop-sub",children:"Add this DNS record, then verify."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Type"}),t.jsx(be,{value:i==null?void 0:i.verification_dns_record_type,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(be,{value:i==null?void 0:i.verification_dns_record_name,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Value"}),t.jsx(be,{value:i==null?void 0:i.verification_dns_record_data,disabled:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:_,disabled:d,children:d?t.jsx(je,{size:12}):"Verify"})]})]}):t.jsxs("div",{ref:n,className:"w-pop w-pop--wide",style:N,onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"add-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"add-domain-title",children:"Add domain"}),t.jsx("p",{className:"w-pop-sub",children:"Verified members auto-join this org."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Domain"}),t.jsx(be,{type:"text",placeholder:"example.com",value:m,onChange:k=>c(k.target.value),onKeyDown:k=>{k.key==="Enter"&&m&&v()},autoFocus:!0,"aria-label":"Domain name"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!m||d,children:d?t.jsx(je,{size:12}):"Continue"})]})]})},Xm=({organization:e})=>{const{getOrganizationDomains:a,removeOrganizationDomain:s}=Vt(),[n,i]=o.useState(null),[l,m]=o.useState(!1),[c,d]=o.useState(null),[p,u]=o.useState(new Set),h=o.useRef(null),f=o.useRef({}),{data:g=[],isLoading:x,mutate:w}=Ce(e!=null&&e.id?`wacht-org-domains:${e.id}`:null,async()=>(await(a==null?void 0:a(e))||[]).map(_=>({..._,verified:_.verified!==void 0?_.verified:!1}))),b=(v,_)=>{u(N=>{const k=new Set(N);return _?k.add(v):k.delete(v),k})},j=async v=>{b(v.id,!0);try{await s(e,v),w()}finally{b(v.id,!1),i(null)}};return x?t.jsx(je,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Ar,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Domains"}),t.jsx("div",{className:"w-secsub",children:"Users with verified domain emails auto-join this organization."})]}),t.jsx(ne,{ref:h,onClick:()=>m(!0),$size:"sm",children:"Add domain"}),l&&t.jsx(Zi,{onClose:()=>{m(!1),w()},triggerRef:h})]}),g!=null&&g.length?t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Domain"}),t.jsx(He,{children:"Status"}),t.jsx(He,{children:"Added"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:g.map(v=>{const _=p.has(v.id);return t.jsxs(nt,{children:[t.jsx(Ke,{children:v.fqdn}),t.jsx(Ke,{children:v.verified?t.jsx(pa,{$variant:"success",children:"Verified"}):t.jsx(pa,{$variant:"warning",children:"Pending"})}),t.jsx(Ke,{children:new Date(v.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(ne,{ref:N=>{N&&(f.current[v.id]=N)},$size:"sm",$outline:!0,disabled:_,onClick:()=>d(v.id),children:v.verified?"View DNS":"Verify"}),t.jsx(ne,{$size:"sm",$outline:!0,$destructive:!0,disabled:_,onClick:()=>i(v.id),children:_?t.jsx(je,{size:12}):"Remove"})]})})]},v.id)})})]})}):t.jsx(Ct,{title:"No domains added",description:"Users with verified domain emails automatically join this organization."}),n&&t.jsx(Qa,{title:"Remove domain?",description:"Active users aren't affected, but new users with this domain won't auto-join.",onConfirm:()=>{const v=g.find(_=>_.id===n);v&&j(v)},onCancel:()=>i(null)}),c&&t.jsx(Zi,{domain:g.find(v=>v.id===c),onClose:()=>d(null),triggerRef:{current:f.current[c]}})]})},Gc=({onClose:e,onSuccess:a,roles:s,triggerRef:n})=>{const i=o.useRef(null),[l,m]=o.useState(""),[c,d]=o.useState(null),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{inviteMember:g}=fa(),{toast:x}=kt(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:360,defaultMaxHeight:360}),b=s.map(_=>({value:_.id,label:_.name})),j=_=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_),v=async()=>{const _=l.trim().toLowerCase();if(!(!_||!c)){if(!j(_)){x("Please enter a valid email address","error");return}if(_.length>320){x("Email address is too long","error");return}u(!0);try{await g({email:_,organizationRole:c}),a==null||a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{u(!1)}}};return o.useEffect(()=>{f(!0);const _=k=>{i.current&&!i.current.contains(k.target)&&(e==null||e())},N=k=>{k.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",_),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",N)}},[e]),h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email"}),t.jsx(be,{type:"email",placeholder:"colleague@company.com",value:l,onChange:_=>m(_.target.value),onKeyDown:_=>{_.key==="Enter"&&l&&c&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Role"}),t.jsx(un,{options:b,value:c==null?void 0:c.id,onChange:_=>d(s.find(N=>N.id===_)),placeholder:"Select a role","aria-label":"Select role for invited member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!c||p,children:p?t.jsx(je,{size:12}):"Send invite"})]})]}):null},e4=({organization:e})=>{const{getOrganizationMembers:a,getOrganizationRoles:s,addRoleToOrganizationMember:n,removeRoleFromOrganizationMember:i,removeOrganizationMember:l}=Vt(),{session:m}=rt(),{toast:c}=kt(),[d,p]=o.useState(""),[u,h]=o.useState(1),[f]=o.useState(10),[g,x]=o.useState(!1),[w,b]=o.useState(new Set),j=o.useRef(null),[v,_]=o.useState(d);o.useEffect(()=>{const S=setTimeout(()=>{_(d),h(1)},500);return()=>clearTimeout(S)},[d]);const{data:N,mutate:k}=Ce(e?`wacht-api-organizations:${e.id}:members:${u}:${f}:${v}`:null,()=>a==null?void 0:a(e,{page:u,limit:f,search:v}),{keepPreviousData:!0}),C=(N==null?void 0:N.data)||[],y=(N==null?void 0:N.meta)||{total:0,limit:10},E=Math.ceil(y.total/(y.limit||10)),{data:M=[]}=Ce(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),F=M,A=(S,Z)=>{b(P=>{const L=new Set(P);return Z?L.add(S):L.delete(S),L})},I=async(S,Z,P)=>{A(S.id,!0);try{P?(await i(e,S,Z),c("Role removed","info")):(await n(e,S,Z),c("Role added","info")),k()}catch(L){c(L.message||"Failed to update role","error")}finally{A(S.id,!1)}},$=async S=>{A(S.id,!0);try{await l(e,S),k(),c("Member removed","info")}catch(Z){c(Z.message||"Failed to remove member","error")}finally{A(S.id,!1)}};return N?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Vc,{value:d,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[y.total>0&&t.jsxs("div",{className:"w-secsub",children:[y.total," member",y.total!==1?"s":""]}),t.jsx(ne,{ref:j,onClick:()=>x(!0),$size:"sm",children:"Invite"})]})]}),g&&t.jsx(Gc,{onClose:()=>x(!1),onSuccess:()=>{k(),x(!1)},roles:F,triggerRef:j}),C.length===0?t.jsx(Ct,{title:d?"No members match":"No members yet",description:"Invite someone or connect a corporate domain to auto-join."}):t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Member"}),t.jsx(He,{children:"Joined"}),t.jsx(He,{children:"Roles"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:C.map(S=>{var L,H;const Z=((L=S.user)==null?void 0:L.id)===((H=m==null?void 0:m.active_signin)==null?void 0:H.user_id),P=w.has(S.id);return t.jsxs(nt,{children:[t.jsx(Ke,{children:t.jsx(t4,{member:S,isCurrentUser:Z})}),t.jsx(Ke,{children:new Date(S.created_at).toLocaleDateString()}),t.jsx(Ke,{children:t.jsx(a4,{member:S,roles:F,onToggle:I,disabled:P})}),t.jsx(Ht,{children:t.jsx("div",{className:"w-actions",children:t.jsx(ne,{$size:"sm",$outline:!0,$destructive:!0,disabled:P||Z,onClick:()=>$(S),title:Z?"You cannot remove yourself":"Remove member",children:P?t.jsx(je,{size:12}):"Remove"})})})]},S.id)})})]})}),E>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4 w-mt-6",children:[t.jsx(ne,{onClick:()=>h(S=>Math.max(1,S-1)),disabled:u===1,$size:"sm",$outline:!0,children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",E]}),t.jsx(ne,{onClick:()=>h(S=>Math.min(E,S+1)),disabled:u===E,$size:"sm",$outline:!0,children:"Next"})]})]}):t.jsx(je,{})},t4=({member:e,isCurrentUser:a})=>{var l,m;const s=e.user,n=(c="",d="")=>`${c[0]||""}${d[0]||""}`.toUpperCase()||"?",i=s?`${s.first_name||""} ${s.last_name||""}`.trim()||((l=s.primary_email_address)==null?void 0:l.email):"Unknown";return t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx("div",{className:"w-avatar w-avatar--md",children:s!=null&&s.profile_picture_url?t.jsx("img",{src:s.profile_picture_url,alt:i}):n(s==null?void 0:s.first_name,s==null?void 0:s.last_name)}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:i}),a&&t.jsx(pa,{$variant:"neutral",children:"You"})]}),t.jsx("span",{className:"w-secsub",children:(m=s==null?void 0:s.primary_email_address)==null?void 0:m.email})]})]})},a4=({member:e,roles:a,onToggle:s,disabled:n})=>{var c;const i=e.roles||[],l=d=>i.some(p=>p.id===d),m=i.length===0?"No role":i.length===1?(c=i[0])==null?void 0:c.name:`${i.length} roles`;return t.jsxs(_s,{children:[t.jsx(Cs,{children:t.jsxs(ne,{$size:"sm",$outline:!0,disabled:n,className:"w-justify-between w-rolepick-btn",children:[m,t.jsx(Dt,{size:12})]})}),t.jsx(ks,{children:a.length===0?t.jsx("div",{className:"w-secsub w-menu-head",children:"No roles configured"}):a.map(d=>{const p=l(d.id);return t.jsx(ea,{onClick:()=>s(e,d,p),children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-3 w-full",children:[t.jsx("span",{children:d.name}),p&&t.jsx(Be,{size:13,className:"w-text-primary"})]})},d.id)})})]})},s4=e=>{const a=e.expires_at;return a?new Date(a).getTime()<Date.now():!1},n4=({organization:e})=>{const{getOrganizationInvitations:a,getOrganizationRoles:s,discardOrganizationInvitation:n,resendOrganizationInvitation:i}=Vt(),{toast:l}=kt(),[m,c]=o.useState(!1),[d,p]=o.useState(new Set),u=o.useRef(null),{data:h=[],isLoading:f,mutate:g}=Ce(e?`wacht-api-organizations:${e.id}:invitations`:null,()=>(a==null?void 0:a(e))||[]),{data:x=[],isLoading:w}=Ce(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),b=x,j=(N,k)=>{p(C=>{const y=new Set(C);return k?y.add(N):y.delete(N),y})},v=async N=>{j(N.id,!0);try{await n(e,N),g(),l("Invitation cancelled","info")}catch(k){l(k.message||"Failed to cancel invitation","error")}finally{j(N.id,!1)}},_=async N=>{j(N.id,!0);try{await i(e,N),l("Invitation resent","info")}catch(k){l(k.message||"Failed to resend invitation","error")}finally{j(N.id,!1)}};return f||w?t.jsx(je,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Ar,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this organization."})]}),t.jsx(ne,{ref:u,onClick:()=>c(!0),$size:"sm",children:"Invite"})]}),m&&t.jsx(Gc,{onClose:()=>c(!1),onSuccess:()=>{g(),c(!1)},roles:b,triggerRef:u}),h.length===0?t.jsx(Ct,{title:"No pending invitations",description:"Invite members to collaborate."}):t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Email"}),t.jsx(He,{children:"Role"}),t.jsx(He,{children:"Status"}),t.jsx(He,{children:"Invited"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:h.map(N=>{var y;const k=s4(N),C=d.has(N.id);return t.jsxs(nt,{children:[t.jsx(Ke,{children:N.email}),t.jsx(Ke,{children:((y=N.initial_organization_role)==null?void 0:y.name)||"No role"}),t.jsx(Ke,{children:k?t.jsx(pa,{$variant:"danger",children:"Expired"}):t.jsx(pa,{$variant:"warning",children:"Pending"})}),t.jsx(Ke,{children:new Date(N.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(ne,{$size:"sm",$outline:!0,disabled:C,onClick:()=>_(N),children:"Resend"}),t.jsx(ne,{$size:"sm",$outline:!0,$destructive:!0,disabled:C,onClick:()=>v(N),children:C?t.jsx(je,{size:12}):"Cancel"})]})})]},N.id)})})]})})]})},Hi=({onClose:e,onSuccess:a,role:s,triggerRef:n})=>{var k;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[c,d]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{deployment:g}=ke(),{toast:x}=kt(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:400,defaultMaxHeight:500}),b=!!s,j=Array.isArray((k=g==null?void 0:g.b2b_settings)==null?void 0:k.organization_permissions)?g.b2b_settings.organization_permissions.map(C=>({value:C,label:C})):[];o.useEffect(()=>{f(!0);const C=M=>{i.current&&!i.current.contains(M.target)&&(e==null||e())},y=M=>{M.key==="Escape"&&(e==null||e())},E=setTimeout(()=>{document.addEventListener("mousedown",C),document.addEventListener("keydown",y)},100);return()=>{clearTimeout(E),document.removeEventListener("mousedown",C),document.removeEventListener("keydown",y)}},[e]);const v=C=>C.trim().replace(/[<>"'&]/g,""),_=C=>C.length>=2&&C.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(C),N=async()=>{const C=v(l);if(!C){x("Please enter a role name","error");return}if(!_(C)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(c.length===0){x("Please select at least one permission","error");return}u(!0);try{const y={id:s==null?void 0:s.id,name:C,permissions:c};a==null||a(y)}catch(y){x(y.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:C=>C.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(be,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:C=>m(C.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Uc,{options:j,value:c,onChange:d,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:!l||p,children:p?t.jsx(je,{size:12}):b?"Update":"Create"})]})]}):null};function Rr(e){return typeof e=="object"&&e!==null}function qc(e,a){const s=e[a];return typeof s=="string"?s.length>0&&s!=="0":typeof s=="number"?Number.isFinite(s)&&s>0:!1}function r4(e,a){const s=e[a];return typeof s=="boolean"?s:null}function Kc(e){if(!Rr(e))return!1;const a=r4(e,"is_deployment_level");return a!==null?a:!1}function i4(e){return!Rr(e)||Kc(e)?!1:qc(e,"organization_id")}function ur(e){return!Rr(e)||Kc(e)?!1:qc(e,"workspace_id")}const o4=({organization:e})=>{var k;const{getOrganizationRoles:a,removeOrganizationRoles:s}=Vt(),{deployment:n}=ke(),[i,l]=o.useState({isOpen:!1}),[m,c]=o.useState(null),[d,p]=o.useState(null),[u,h]=o.useState(new Set),f=o.useRef(null),g=o.useRef(new Map),{data:x=[],isLoading:w,mutate:b}=Ce(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(a==null?void 0:a(e))||[]),j=(C,y)=>{h(E=>{const M=new Set(E);return y?M.add(C):M.delete(C),M})},v=async C=>{try{await new Promise(y=>setTimeout(y,500)),c({text:`Role ${C.id?"updated":"created"} successfully`,type:"success"}),l({isOpen:!1}),b()}catch(y){const E=y instanceof Error?y.message:"Failed to save role";c({text:E,type:"error"})}finally{setTimeout(()=>c(null),3e3)}},_=async C=>{j(C.id,!0);try{await s(e,C),b()}finally{j(C.id,!1),p(null)}};if(w&&x.length===0)return t.jsx(je,{});const N=C=>{const y=i4(C),E=u.has(C.id),M=C.permissions.length;return t.jsxs(nt,{children:[t.jsx(Ke,{children:t.jsxs("span",{className:"w-inline w-gap-2 w-sec",children:[C.name,!y&&t.jsx(pa,{$variant:"neutral",children:"Default"})]})}),t.jsx(Ke,{children:M===0?t.jsx(pa,{$variant:"neutral",children:"No permissions"}):t.jsxs("div",{className:"w-inline w-items-center w-gap-2",children:[t.jsxs(pa,{$variant:"primary",children:[M," ",M===1?"permission":"permissions"]}),t.jsx("span",{className:"w-truncate w-text-secondary w-maxw-sm",children:C.permissions.join(", ")})]})}),t.jsx(Ht,{children:y?t.jsxs("div",{className:"w-actions",children:[t.jsx(ne,{ref:F=>{F&&g.current.set(C.id,F)},$size:"sm",$outline:!0,disabled:E,onClick:()=>l({isOpen:!0,role:C,triggerElement:g.current.get(C.id)??null}),children:"Edit"}),t.jsx(ne,{$size:"sm",$outline:!0,$destructive:!0,disabled:E,onClick:()=>p(C.id),children:E?t.jsx(je,{size:12}):"Delete"})]}):t.jsx("span",{className:"w-secsub",children:"Read-only"})})]},C.id)};return t.jsxs(t.Fragment,{children:[m&&t.jsxs("div",{className:`w-banner ${m.type==="success"?"w-banner--success":"w-banner--error"} w-mb-4`,children:[m.type==="success"?t.jsx(Be,{size:16}):t.jsx(Fa,{size:16}),t.jsx("span",{className:"w-banner-txt",children:m.text})]}),t.jsxs(Ar,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for members."})]}),((k=n==null?void 0:n.b2b_settings)==null?void 0:k.custom_org_role_enabled)&&t.jsx(ne,{ref:f,onClick:()=>l({isOpen:!0,triggerElement:f.current}),$size:"sm",children:"Add role"})]}),i.isOpen&&!i.role&&t.jsx(Hi,{onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||f.current}}),x.length===0?t.jsx(Ct,{title:"No roles yet",description:"Define custom roles to manage granular permissions."}):t.jsx(t.Fragment,{children:t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Role"}),t.jsx(He,{children:"Permissions"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:x.map(N)})]})})}),d&&t.jsx(Qa,{title:"Delete role?",description:"This action cannot be undone. Users with this role might lose access to certain features.",onConfirm:()=>{const C=x.find(y=>y.id===d);C&&_(C)},onCancel:()=>p(null)}),i.isOpen&&i.role&&t.jsx(Hi,{role:i.role,onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||null}})]})},l4=()=>{const{activeOrganization:e,loading:a}=fa(),[s,n]=o.useState(null);return o.useEffect(()=>{e?n(e):!a&&!e&&s&&n(null)},[e,a,s]),{activeOrganization:s||e,loading:a}},Yc=()=>{var w,b,j;const{loading:e,activeOrganization:a}=l4(),{updateOrganization:s}=fa(),{deployment:n}=ke(),[i,l]=o.useState("general"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((v,_="info")=>{c(v),p(_),setTimeout(()=>c(null),3e3)},[]),x=async v=>{var N;const _=(N=v.target.files)==null?void 0:N[0];if(_){if(_.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!_.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s({image:_}),g("Logo updated","info")}catch(k){g((k==null?void 0:k.message)||"Failed to update logo","error")}finally{h(!1),f.current&&(f.current.value="")}}};return e&&!a?t.jsx(Pe,{children:t.jsx(Zn,{className:"w-items-center w-justify-center",children:t.jsx(je,{})})}):a?t.jsx(Pe,{children:t.jsx(Ri,{children:t.jsx(Er.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(Zn,{className:"w-relative",children:[t.jsxs(Bm,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var v;return(v=f.current)==null?void 0:v.click()},disabled:u,title:"Change logo","aria-label":"Change organization logo",children:[a.image_url?t.jsx("img",{src:a.image_url,alt:a.name}):((w=a.name)==null?void 0:w.slice(0,2).toUpperCase())||"O",t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(je,{size:14}):t.jsx(sn,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(Gm,{children:[t.jsx(qm,{children:a.name}),t.jsx(Km,{children:a.member_count!=null?`${a.member_count} members`:"Organization settings"})]})]}),t.jsx(Dm,{children:t.jsxs(Um,{children:[t.jsx(za,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Da,{children:[t.jsx(Ea,{size:16})," General"]})}),t.jsx(za,{$isActive:i==="domains",onClick:()=>l("domains"),children:t.jsxs(Da,{children:[t.jsx(Eu,{size:16})," Domains"]})}),t.jsx(za,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Da,{children:[t.jsx(cs,{size:16})," Members"]})}),t.jsx(za,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Da,{children:[t.jsx(dl,{size:16})," Invitations"]})}),((b=n==null?void 0:n.b2b_settings)==null?void 0:b.custom_org_role_enabled)&&t.jsx(za,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Da,{children:[t.jsx(Xt,{size:16})," Roles"]})}),((j=n==null?void 0:n.b2b_settings)==null?void 0:j.enterprise_sso_enabled)&&t.jsx(za,{$isActive:i==="sso",onClick:()=>l("sso"),children:t.jsxs(Da,{children:[t.jsx(Xt,{size:16})," SSO"]})})]})}),t.jsxs(Wm,{children:[i==="general"&&t.jsx(Qm,{organization:a}),i==="domains"&&t.jsx(Xm,{organization:a}),i==="members"&&t.jsx(e4,{organization:a}),i==="invitations"&&t.jsx(n4,{organization:a}),i==="roles"&&t.jsx(o4,{organization:a}),i==="sso"&&t.jsx(Im,{organization:a})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Fa,{size:12}):t.jsx(Be,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})}):t.jsx(Pe,{children:t.jsx(Ri,{children:t.jsx(Zn,{className:"w-items-center w-justify-center",children:t.jsxs("div",{className:"w-empty",children:[t.jsx("span",{className:"w-empty-ic",children:t.jsx(ps,{size:20})}),t.jsx("h4",{children:"No Organization Selected"}),t.jsx(n0,{})]})})})})},Qc=({isOpen:e,onClose:a,title:s,showHeader:n,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{className:"w-dialog--panel",children:[n&&t.jsx(ze.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(Yc,{}),l&&t.jsx(ze.Footer,{children:l})]})})}),Lr=({organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:n})=>t.jsx(Pe,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(Wc,{mode:"ws",organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:n})})}),Pr=({isOpen:e,onClose:a,onCreated:s,organizationId:n})=>{const[i,l]=o.useState(!1),[m,c]=o.useState(n),d=()=>{s==null||s(),a==null||a()},p=()=>{l(!0)},u=h=>{var g,x,w;const f=((x=(g=h==null?void 0:h.data)==null?void 0:g.organization)==null?void 0:x.id)??((w=h==null?void 0:h.organization)==null?void 0:w.id)??(h==null?void 0:h.id);f&&c(f),l(!1)};return t.jsx(Pe,{children:t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsx(ze.Content,{className:"w-dialog--create",children:i?t.jsx(mn,{onSuccess:u,onCancel:()=>l(!1)}):t.jsx(Lr,{organizationId:m||n,onSuccess:d,onCancel:a,onCreateOrganization:p})})})})})},pt=(...e)=>e.filter(Boolean).join(" "),c4=({className:e,...a})=>t.jsx("div",{className:pt("w-contents",e),...a}),Fi=({className:e,...a})=>t.jsx("div",{className:pt("w-card","w-flex-col","w-full","w-minh-full",e),...a}),d4=({className:e,...a})=>t.jsx("div",{className:pt("w-tabsbar",e),...a}),u4=({className:e,...a})=>t.jsx("div",{className:pt("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),Zs=({$isActive:e,className:a,...s})=>t.jsx("button",{className:pt("w-tab",e&&"w-tab--active",a),...s}),Hs=({className:e,...a})=>t.jsx("span",{className:pt("w-inline","w-gap-2",e),...a}),m4=({className:e,children:a,...s})=>t.jsx("div",{className:pt("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Js=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:pt("w-kebab",e),...a}));Js.displayName="IconButton";const Jc=({className:e,...a})=>t.jsx("div",{className:pt("w-sechead",e),...a}),Ti=({className:e,...a})=>t.jsx("div",{className:pt("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Ii=({className:e,...a})=>t.jsx("div",{className:pt("w-grow",e),...a}),Vi=({className:e,...a})=>t.jsx("div",{className:pt("w-flex","w-items-center","w-gap-3","w-none",e),...a}),$r=({className:e,...a})=>t.jsx("div",{className:pt("w-full",e),...a}),p4=({className:e,...a})=>t.jsx("div",{className:pt("w-page-head",e),...a}),h4=({className:e,...a})=>t.jsx("div",{className:pt("w-grow","w-flex-col","w-gap-1",e),...a}),f4=({className:e,...a})=>t.jsx("div",{className:pt("w-sec","w-truncate",e),...a}),w4=({className:e,...a})=>t.jsx("div",{className:pt("w-secsub","w-truncate",e),...a}),zi=({$first:e,className:a,...s})=>t.jsx("div",{className:pt("w-sec",a),...s}),g4=()=>{var E,M;const{activeWorkspace:e,loading:a,updateWorkspace:s}=zt(),{deleteWorkspace:n}=ga(),{deployment:i}=ke(),{toast:l}=kt(),[m,c]=o.useState((e==null?void 0:e.name)||""),[d,p]=o.useState((e==null?void 0:e.description)||""),[u,h]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:""}),[f,g]=o.useState(!1),[x,w]=o.useState(""),[b,j]=o.useState(!1),[v,_]=o.useState(!1);o.useEffect(()=>{var F;e&&(c(e.name||""),p(e.description||""),h({mfa_required:e.enforce_2fa||!1,ip_restrictions:e.enable_ip_restriction||!1,allowed_ips:((F=e.whitelisted_ips)==null?void 0:F.join(`
|
|
106
106
|
`))||""}))},[e]);const N=async()=>{if(!(!e||f))try{g(!0),await s({name:m,description:d,enforce_2fa:u.mfa_required,enable_ip_restriction:u.ip_restrictions,whitelisted_ips:u.allowed_ips.split(`
|
|
107
|
-
`).filter(F=>F.trim())}),l("Changes saved","info")}catch(F){l(F.message||"Failed to save changes","error")}finally{g(!1)}},
|
|
108
|
-
10.0.0.0/24`,className:"w-input--area w-mono-sm"})]})]})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Vi,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger",children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Delete workspace"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this workspace, there is no going back."})]}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{k(!v),w("")},children:v?"Cancel":"Delete workspace"})]}),v&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(We,{children:[t.jsxs(Ve,{htmlFor:"confirm_workspace_name",children:["Type ",t.jsx("strong",{children:e.name})," to confirm"]}),t.jsx(xe,{id:"confirm_workspace_name",type:"text",value:x,onChange:F=>w(F.target.value),placeholder:e.name})]}),t.jsx(se,{$size:"sm",$destructive:!0,onClick:j,disabled:x!==e.name||b,children:b?t.jsx(ye,{size:12}):"Delete forever"})]})]})]})},g4=({onClose:e,onSuccess:a,roles:s,triggerRef:n})=>{const i=o.useRef(null),[l,m]=o.useState(""),[c,d]=o.useState(null),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{toast:g}=_t(),{inviteMember:x}=zt(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:360,defaultMaxHeight:320}),b=s.map(k=>({value:k.id,label:k.name}));o.useEffect(()=>{f(!0);const k=C=>{i.current&&!i.current.contains(C.target)&&(e==null||e())},N=C=>{C.key==="Escape"&&(e==null||e())},j=setTimeout(()=>{document.addEventListener("mousedown",k),document.addEventListener("keydown",N)},100);return()=>{clearTimeout(j),document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]);const _=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=l.trim().toLowerCase();if(!(!k||!c)){if(!_(k)){g("Please enter a valid email address","error");return}if(k.length>320){g("Email address is too long","error");return}u(!0);try{await x({email:k,workspaceRoleId:c.id}),a==null||a()}catch(N){const j=N.message||"Failed to send invitation. Please try again.";g(j,"error")}finally{u(!1)}}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,maxHeight:w!=null&&w.maxHeight?`${w.maxHeight}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-workspace-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-workspace-member-title",children:"Invite member"}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Email Address"}),t.jsx(xe,{type:"email",placeholder:"colleague@company.com",value:l,onChange:k=>m(k.target.value),autoFocus:!0,"aria-label":"Email address for workspace invitation","aria-describedby":"workspace-email-help"})]}),t.jsxs(We,{children:[t.jsx(Ve,{children:"Role"}),t.jsx(dn,{options:b,value:c==null?void 0:c.id,onChange:k=>d(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited workspace member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!c||p,children:p?t.jsx(ye,{size:14}):"Send invite"})]})]}):null},x4=()=>{const{activeWorkspace:e,getMembers:a,getRoles:s,removeMember:n,addMemberRole:i,removeMemberRole:l}=zt(),{session:m}=ot(),{toast:c}=_t(),[d,p]=o.useState(""),[u,h]=o.useState(1),[f]=o.useState(10),[g,x]=o.useState(""),[w,b]=o.useState(!1),_=o.useRef(null);o.useEffect(()=>{const A=setTimeout(()=>{x(d),h(1)},500);return()=>clearTimeout(A)},[d]);const{data:v,mutate:k}=ke(e?`wacht-api-workspaces:${e.id}:members:${u}:${f}:${g}`:null,()=>a==null?void 0:a({page:u,limit:f,search:g}),{keepPreviousData:!0}),N=(v==null?void 0:v.data)||[],j=(v==null?void 0:v.meta)||{total:0,limit:10},C=Math.ceil(j.total/(j.limit||10)),{data:y=[]}=ke(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),E=y,R=async(A,I,L)=>{try{L?(await l(A,I),c("Role removed","info")):(await i(A,I),c("Role added","info")),k()}catch{c("Failed to update role","error")}},F=async A=>{try{await n(A),c("Member removed","info"),k()}catch{c("Failed to remove member","error")}};return v?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Ic,{value:d,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[j.total>0&&t.jsxs("div",{className:"w-text-muted w-secsub",children:[j.total," member",j.total!==1?"s":""]}),t.jsx(se,{ref:_,onClick:()=>b(!0),$size:"sm",children:"Invite"})]})]}),w&&t.jsx(g4,{onClose:()=>b(!1),onSuccess:()=>{k(),b(!1)},roles:E,triggerRef:_}),N.length===0?t.jsx(Ct,{title:d?"No members match":"No members yet",description:"Members added to the organization can be invited here."}):t.jsx(t.Fragment,{children:t.jsx(Pr,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Member"}),t.jsx($e,{children:"Joined"}),t.jsx($e,{children:"Role"})]})}),t.jsx(Zt,{children:N.map(A=>t.jsxs(it,{children:[t.jsx(Ke,{children:t.jsx(v4,{member:A,session:m})}),t.jsx(Ke,{children:new Date(A.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsx(b4,{member:A,roles:E,onToggle:(I,L)=>R(A.id,I,L),onRemove:()=>F(A.id)})})]},A.id))})]})})}),C>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4",children:[t.jsx(se,{onClick:()=>h(A=>Math.max(1,A-1)),disabled:u===1,$size:"sm",children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",C]}),t.jsx(se,{onClick:()=>h(A=>Math.min(C,A+1)),disabled:u===C,$size:"sm",children:"Next"})]})]}):t.jsx(ye,{})},v4=({member:e,session:a,subtitle:s})=>{var m,c,d;const n=e.public_user_data||e.user,i=(n==null?void 0:n.id)===((m=a==null?void 0:a.active_signin)==null?void 0:m.user_id),l=(p="",u="")=>`${p[0]||""}${u[0]||""} `.toUpperCase();return t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx("div",{className:"w-avatar",children:n!=null&&n.profile_picture_url?t.jsx("img",{src:n.profile_picture_url,alt:"Avatar"}):l(n==null?void 0:n.first_name,n==null?void 0:n.last_name)||"?"}),t.jsxs("div",{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:n?`${n.first_name||""} ${n.last_name||""} `.trim()||((c=n.primary_email_address)==null?void 0:c.email):"Unknown"}),i&&t.jsx("span",{className:"w-pill",children:"You"})]}),t.jsxs("div",{className:"w-flex w-wrap w-gap-2 w-secsub",children:[t.jsx("span",{children:(d=n==null?void 0:n.primary_email_address)==null?void 0:d.email}),s&&t.jsxs("span",{className:"w-text-muted",children:["• ",s]})]})]})]})},b4=({member:e,roles:a,onToggle:s,onRemove:n})=>{var m;const i=e.roles||[],l=c=>i.some(d=>d.id===c);return t.jsxs(js,{children:[t.jsx(ks,{children:t.jsxs(se,{$outline:!0,$size:"sm",className:"w-justify-between w-rolepick-btn",children:[i.length>0?(m=i==null?void 0:i[0])==null?void 0:m.name:"No role"," ",t.jsx(Dt,{size:14})]})}),t.jsxs(_s,{children:[a.map(c=>{const d=l(c.id);return t.jsx(ea,{onClick:()=>s(c.id,d),children:t.jsxs("div",{className:"w-flex w-justify-between w-full w-gap-3",children:[t.jsx("span",{children:c.name}),d&&t.jsx(Ge,{size:14,className:"w-text-success"})]})},c.id)}),t.jsx(Fc,{}),t.jsx(ea,{$destructive:!0,onClick:n,children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(gr,{size:14})," Remove Member"]})})]})]})},y4=({onClose:e,onSuccess:a,roles:s,createInvitation:n,triggerRef:i})=>{const l=o.useRef(null),[m,c]=o.useState(""),[d,p]=o.useState(s[0]||null),[u,h]=o.useState(!1),[f,g]=o.useState(!1),{toast:x}=_t(),w=xt({contentRef:l,triggerRef:i,isOpen:f,minWidth:360,defaultMaxHeight:320}),b=s.map(k=>({value:k.id,label:k.name})),_=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=m.trim().toLowerCase();if(!(!k||!d)){if(!_(k)){x("Please enter a valid email address","error");return}if(k.length>320){x("Email address is too long","error");return}h(!0);try{await n({email:k,role_id:d.id}),a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{h(!1)}}};return o.useEffect(()=>{g(!0);const k=j=>{l.current&&!l.current.contains(j.target)&&(e==null||e())},N=j=>{j.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]),f?t.jsxs("div",{ref:l,className:"w-pop w-pop--wide w-pop-body",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Email"}),t.jsx(xe,{type:"email",placeholder:"colleague@company.com",value:m,onChange:k=>c(k.target.value),onKeyDown:k=>{k.key==="Enter"&&m&&d&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Role"}),t.jsx(dn,{options:b,value:d==null?void 0:d.id,onChange:k=>p(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited member"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(se,{$size:"sm",$outline:!0,$fullWidth:!0,onClick:e,children:"Cancel"}),t.jsx(se,{$size:"sm",$fullWidth:!0,onClick:v,disabled:!m||!d||u,children:u?t.jsx(ye,{size:12}):"Send invite"})]})]}):null},j4=()=>{const{activeWorkspace:e,loading:a,getRoles:s,getInvitations:n,inviteMember:i,discardInvitation:l,resendInvitation:m}=zt(),{toast:c}=_t(),[d,p]=o.useState(!0),[u,h]=o.useState(!0),[f,g]=o.useState([]),[x,w]=o.useState([]),[b,_]=o.useState(!1),v=o.useRef(null),k=async()=>{if(e){p(!0),h(!0);try{const[C,y]=await Promise.all([s(),n()]);w(C),g(y)}catch{}finally{p(!1),h(!1)}}};o.useEffect(()=>{k()},[e==null?void 0:e.id]);const N=async C=>{try{await l(C),k(),c("Invitation cancelled","info")}catch{c("Failed to cancel invitation","error")}},j=async C=>{try{await m(C),k(),c("Invitation resent","info")}catch{c("Failed to resend invitation","error")}};return a||d||u?t.jsx(ye,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Qc,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this workspace."})]}),t.jsx(se,{ref:v,onClick:()=>_(!0),$size:"sm",children:"Invite"})]}),b&&t.jsx(y4,{onClose:()=>_(!1),onSuccess:()=>{k(),_(!1),c("Invitation sent","info")},roles:x,createInvitation:C=>i({email:C.email,workspaceRoleId:C.role_id}),triggerRef:v}),f.length===0?t.jsx(Ct,{title:"No pending invitations",description:"Invite members to your workspace."}):t.jsx(t.Fragment,{children:t.jsx(Pr,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Email"}),t.jsx($e,{children:"Role"}),t.jsx($e,{children:"Invited"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:f.map(C=>{var y,E;return t.jsxs(it,{children:[t.jsx(Ke,{children:C.email}),t.jsx(Ke,{children:((y=C.initial_workspace_role)==null?void 0:y.name)||((E=C.initial_organization_role)==null?void 0:E.name)||"No role"}),t.jsx(Ke,{children:new Date(C.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsx(_4,{onResend:()=>j(C.id),onCancel:()=>N(C.id)})})]},C.id)})})]})})})]})},_4=({onResend:e,onCancel:a})=>t.jsxs(js,{children:[t.jsx(ks,{children:t.jsx(Qs,{children:"•••"})}),t.jsxs(_s,{children:[t.jsxs(ea,{onClick:e,children:[t.jsx(Nl,{size:16})," Resend"]}),t.jsxs(ea,{$destructive:!0,onClick:a,children:[t.jsx(gr,{size:16})," Cancel"]})]})]}),zi=({onClose:e,onSuccess:a,role:s,triggerRef:n})=>{var C,y;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[c,d]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{deployment:g}=_e(),{toast:x}=_t(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:400,defaultMaxHeight:500}),b=!!s,_=((C=g==null?void 0:g.b2b_settings)==null?void 0:C.workspace_permissions)||((y=g==null?void 0:g.b2b_settings)==null?void 0:y.organization_permissions)||[],v=Array.isArray(_)?_.map(E=>({value:E,label:E})):[];o.useEffect(()=>{f(!0);const E=A=>{i.current&&!i.current.contains(A.target)&&(e==null||e())},R=A=>{A.key==="Escape"&&(e==null||e())},F=setTimeout(()=>{document.addEventListener("mousedown",E),document.addEventListener("keydown",R)},100);return()=>{clearTimeout(F),document.removeEventListener("mousedown",E),document.removeEventListener("keydown",R)}},[e]);const k=E=>E.trim().replace(/[<>"'&]/g,""),N=E=>E.length>=2&&E.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(E),j=async()=>{const E=k(l);if(!E){x("Please enter a role name","error");return}if(!N(E)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(c.length===0){x("Please select at least one permission","error");return}u(!0);try{const R={id:s==null?void 0:s.id,name:E,permissions:c};a==null||a(R)}catch(R){x(R.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:E=>E.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(xe,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:E=>m(E.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Dc,{options:v,value:c,onChange:d,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:j,disabled:!l||p,children:p?t.jsx(ye,{size:12}):b?"Update":"Create"})]})]}):null},k4=()=>{var N;const{activeWorkspace:e,loading:a,getRoles:s,createRole:n,deleteRole:i}=zt(),{deployment:l}=_e(),{toast:m}=_t(),[c,d]=o.useState({isOpen:!1}),[p,u]=o.useState(null),[h,f]=o.useState(null),g=o.useRef(null),x=o.useRef(new Map),{data:w=[],isLoading:b,mutate:_}=ke(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),v=async j=>{try{await n(j.name,j.permissions||[]),m("Role saved successfully","info"),d({isOpen:!1}),_()}catch{m("Failed to save role","error")}},k=async j=>{try{await i(j),m("Role deleted","info"),u(null),_()}catch{m("Failed to delete role","error")}};return a||b?t.jsx(ye,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Qc,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for this workspace."})]}),((N=l==null?void 0:l.b2b_settings)==null?void 0:N.custom_workspace_role_enabled)&&t.jsx(se,{ref:g,onClick:()=>d({isOpen:!0,triggerElement:g.current}),$size:"sm",children:"Add role"})]}),c.isOpen&&!c.role&&t.jsx(zi,{triggerRef:{current:c.triggerElement||null},onClose:()=>d({isOpen:!1}),onSuccess:v}),w.length===0?t.jsx(Ct,{title:"No roles yet",description:"Create workspace-specific roles to manage access."}):t.jsx(t.Fragment,{children:t.jsx(Pr,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Role"}),t.jsx($e,{children:"Permissions"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:w.map(j=>{var C;return t.jsxs(it,{children:[t.jsx(Ke,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2 w-wrap",children:[t.jsx("span",{className:"w-sec",children:j.name}),!dr(j)&&t.jsx("span",{className:"w-pill",children:"Default"})]})}),t.jsx(Ke,{children:t.jsxs("span",{className:"w-text-secondary",children:[(C=j.permissions)==null?void 0:C.join(", "),!dr(j)&&" • Cannot be edited or deleted"]})}),t.jsx(Ht,{children:t.jsx(C4,{role:j,onEdit:y=>d({isOpen:!0,role:j,triggerElement:y}),onDelete:()=>u(j.id),open:h===j.id,onOpenChange:y=>f(y?j.id:null),dropdownButtonRefs:x})})]},j.id)})})]})})}),p&&t.jsx(Ya,{title:"Delete role?",description:"Are you sure? This will remove the role from all workspace members.",onConfirm:()=>{const j=w.find(C=>C.id===p);j&&k(j)},onCancel:()=>u(null)}),c.isOpen&&c.role&&t.jsx(zi,{role:c.role,triggerRef:{current:c.triggerElement||null},onClose:()=>d({isOpen:!1}),onSuccess:v})]})},C4=({role:e,onEdit:a,onDelete:s,open:n,onOpenChange:i,dropdownButtonRefs:l})=>dr(e)?t.jsxs(js,{open:n,openChange:i,children:[t.jsx(ks,{children:t.jsx(Qs,{ref:c=>{c&&l.current.set(e.id,c)},children:"•••"})}),t.jsxs(_s,{children:[t.jsx(ea,{onClick:()=>a(l.current.get(e.id)??null),children:"Edit Role"}),t.jsxs(ea,{$destructive:!0,onClick:s,children:[t.jsx(gr,{size:16})," Remove Role"]})]})]}):t.jsx(Qs,{disabled:!0,title:"Deployment roles cannot be edited","aria-label":"Deployment roles cannot be edited",children:"•••"}),N4=e=>(e||"").slice(0,2).toUpperCase()||"W",Jc=()=>{var b,_;const{activeWorkspace:e,loading:a,updateWorkspace:s}=zt(),{deployment:n}=_e(),[i,l]=o.useState("general"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((v,k="info")=>{c(v),p(k),setTimeout(()=>c(null),3e3)},[]),x=async v=>{var N;const k=(N=v.target.files)==null?void 0:N[0];if(k){if(k.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!k.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s({image:k}),g("Logo updated","info")}catch(j){g((j==null?void 0:j.message)||"Failed to update logo","error")}finally{h(!1),f.current&&(f.current.value="")}}};if(a&&!e)return t.jsx(Me,{children:t.jsx(Hi,{className:"w-items-center w-justify-center",children:t.jsx(ye,{})})});if(!e)return null;const w=(b=e.organization)==null?void 0:b.name;return t.jsx(Me,{children:t.jsx(l4,{children:t.jsx(Sr.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(Hi,{className:"w-relative",children:[t.jsxs(m4,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit",onClick:()=>{var v;return(v=f.current)==null?void 0:v.click()},disabled:u,"data-busy":u?"":void 0,title:"Change logo","aria-label":"Change workspace logo",children:[e.image_url?t.jsx("img",{src:e.image_url,alt:e.name}):N4(e.name),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(ye,{size:14}):t.jsx(an,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",className:"w-none",hidden:!0,onChange:x}),t.jsxs(p4,{children:[t.jsx(h4,{children:e.name}),t.jsx(f4,{children:w?`${w} · Workspace settings`:"Workspace settings"})]})]}),t.jsx(c4,{children:t.jsxs(d4,{children:[t.jsx(Os,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Zs,{children:[t.jsx(Sa,{size:14})," General"]})}),t.jsx(Os,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Zs,{children:[t.jsx(ls,{size:14})," Members"]})}),t.jsx(Os,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Zs,{children:[t.jsx(Nl,{size:14})," Invitations"]})}),((_=n==null?void 0:n.b2b_settings)==null?void 0:_.custom_workspace_role_enabled)&&t.jsx(Os,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Zs,{children:[t.jsx(Xt,{size:14})," Roles"]})})]})}),t.jsxs(u4,{children:[i==="general"&&t.jsx(w4,{}),i==="members"&&t.jsx(x4,{}),i==="invitations"&&t.jsx(j4,{}),i==="roles"&&t.jsx(k4,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Ha,{size:14}):t.jsx(Ge,{size:14})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},$r=({isOpen:e,onClose:a,title:s,showHeader:n,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{className:"w-dialog--panel",children:[n&&t.jsx(ze.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(Jc,{}),l&&t.jsx(ze.Footer,{children:l})]})})}),Xc=["organization:admin"],e0=["organization:admin","organization:manage"],t0=["workspace:admin"],a0=["workspace:admin","workspace:manage"];function Or(e,a){return e!=null&&e.roles?e.roles.some(s=>{var n;return(n=s.permissions)==null?void 0:n.some(i=>a.includes(i))}):!1}function Zr(e){return Or(e,e0)}function S4(e){return Or(e,Xc)}function Hr(e,a){return e!=null&&e.roles?e.roles.some(s=>{var n;return(n=s.permissions)==null?void 0:n.some(i=>a.includes(i))}):!1}function Fr(e){return Hr(e,a0)}function E4(e){return Hr(e,t0)}const s0=({showPersonal:e=!0})=>{var Se,qe,le;const[a,s]=o.useState(!1),[n,i]=o.useState(!1),[l,m]=o.useState(new Set),c=o.useRef(null),d=o.useRef(null),p=xt({triggerRef:c,isOpen:a,minWidth:300}),u=Kt(!1),h=Kt(!1),f=Kt(!1),g=Kt(!1),[x,w]=o.useState(null),[b,_]=o.useState(null),{organizationMemberships:v,loading:k,refetch:N}=fa(),{activeOrganization:j,activeMembership:C,leave:y}=ha(),{activeWorkspace:E,activeMembership:R,leave:F}=zt(),{workspaces:A,loading:I}=wa(),{session:L,switchOrganization:S,switchWorkspace:O}=ot(),{deployment:P}=_e(),$=P==null?void 0:P.b2b_settings.organizations_enabled,Z=$&&(P==null?void 0:P.b2b_settings.workspaces_enabled),H=P==null?void 0:P.b2b_settings.allow_users_to_create_orgs,M=!C,B=o.useMemo(()=>{var Y,q;return M?{name:"Personal account",image_url:(q=(Y=L==null?void 0:L.active_signin)==null?void 0:Y.user)==null?void 0:q.profile_picture_url,isPersonal:!0}:{name:Z&&E?`${j==null?void 0:j.name} / ${E.name}`:(j==null?void 0:j.name)||"",image_url:j==null?void 0:j.image_url,isPersonal:!1}},[M,j,E,L,Z]);if(o.useEffect(()=>{j&&Z&&m(V=>{if(V.has(j.id))return V;const Y=new Set(V);return Y.add(j.id),Y})},[j,Z]),o.useEffect(()=>{if(!a)return;let V=null;const Y=setTimeout(()=>{const q=G=>{var z,me;const de=G.target;(z=c.current)!=null&&z.contains(de)||(me=d.current)!=null&&me.contains(de)||(s(!1),_(null))};document.addEventListener("mousedown",q),V=()=>document.removeEventListener("mousedown",q)},50);return()=>{clearTimeout(Y),V==null||V()}},[a]),o.useEffect(()=>{if(!b)return;const V=setTimeout(()=>_(null),5e3);return()=>clearTimeout(V)},[b]),!$)return null;const D=V=>V.split(" ").map(Y=>Y[0]).join("").toUpperCase().slice(0,2),W=V=>{i(!0),S(V).finally(()=>i(!1))},K=V=>{i(!0),O(V).finally(()=>i(!1))},ee=V=>{m(Y=>{const q=new Set(Y);return q.has(V)?q.delete(V):q.add(V),q})},ce=()=>{h.open(),s(!1)},be=()=>{g.open(),s(!1)},Q=async()=>{if(y){_(null);try{await y(),await N(),s(!1)}catch(V){_(V instanceof Error?V.message:"Failed to leave organization")}}},ie=async()=>{if(F){_(null);try{await F(),s(!1)}catch(V){_(V instanceof Error?V.message:"Failed to leave workspace")}}},ne=!!((Se=C==null?void 0:C.eligibility_restriction)!=null&&Se.type)&&C.eligibility_restriction.type!=="none",U=!!j&&!ne&&Zr(C),Qe=!!Z&&!!E&&!ne&&Fr(R);return!!!L||k||Z&&I?t.jsx(Me,{children:t.jsx("div",{className:"w-full w-relative",children:t.jsxs("div",{className:"w-combo",children:[t.jsx("span",{className:"w-skel",style:{width:20,height:20}}),t.jsx("span",{className:"w-skel w-grow",style:{height:12}})]})})}):t.jsx(Me,{children:t.jsxs("div",{className:"w-full w-relative",children:[t.jsxs("button",{ref:c,className:"w-orgtrigger","data-open":a?"":void 0,onClick:()=>{s(!a),a||_(null)},disabled:n,children:[t.jsx("span",{className:`w-avatar w-avatar--sm${B.isPersonal,""}`,children:B.image_url?t.jsx("img",{src:B.image_url,alt:B.name}):B.isPersonal?t.jsx(ps,{size:11}):D(B.name)}),t.jsx("span",{className:"w-grow w-truncate",children:B.name}),t.jsx(yu,{size:13})]}),typeof window<"u"&&Xs.createPortal(t.jsxs("div",{ref:d,className:"wacht-root w-menu w-flex-col",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 16px)",maxHeight:p!=null&&p.maxHeight?`${p.maxHeight}px`:420,padding:0,zIndex:99999,top:(p==null?void 0:p.top)!==void 0?`${p.top}px`:void 0,bottom:(p==null?void 0:p.bottom)!==void 0?`${p.bottom}px`:void 0,left:(p==null?void 0:p.left)!==void 0?`${p.left}px`:void 0,right:(p==null?void 0:p.right)!==void 0?`${p.right}px`:void 0,visibility:p&&a?"visible":"hidden",opacity:a&&p?1:0,transform:a?"translateY(0)":"translateY(-4px)",pointerEvents:a?"auto":"none",transition:`opacity 0.15s ease, transform 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`},children:[b&&t.jsxs("div",{className:"w-banner w-banner--error w-switch-banner",children:[t.jsx(Aa,{size:13}),t.jsx("span",{className:"w-banner-txt w-text-error",children:b})]}),t.jsx("div",{className:"w-grow w-switch-body",children:k||I?t.jsx(t.Fragment,{children:[1,2,3].map(V=>t.jsxs("div",{className:"w-flex w-items-center w-gap-3",style:{padding:"0 8px",height:34},children:[t.jsx("span",{className:"w-skel",style:{width:22,height:22}}),t.jsx("span",{className:"w-skel",style:{width:V===2?"60%":"80%",height:11}})]},V))}):t.jsxs(t.Fragment,{children:[e&&t.jsxs("button",{className:"w-menu-item",onClick:()=>{M||W()},disabled:n||M,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:(le=(qe=L==null?void 0:L.active_signin)==null?void 0:qe.user)!=null&&le.profile_picture_url?t.jsx("img",{src:L.active_signin.user.profile_picture_url,alt:"Personal"}):t.jsx(ps,{size:12})}),t.jsx("span",{className:"w-grow w-truncate",children:"Personal account"}),M&&t.jsx(Ge,{size:13,className:"w-text-primary w-none"})]}),t.jsx("hr",{className:"w-hr"}),t.jsx("div",{className:"w-menu-label",children:"Organizations"}),v==null?void 0:v.map(V=>{var me,st;const Y=V.organization,q=Y.id===(j==null?void 0:j.id),G=l.has(Y.id),de=Z?(A==null?void 0:A.filter(Oe=>Oe.organization.id===Y.id))||[]:[],z=!!((me=V.eligibility_restriction)!=null&&me.type)&&V.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs("button",{className:"w-menu-item",onClick:()=>{z||(Z?ee(Y.id):q||W(Y.id))},disabled:n,style:z?{opacity:.55,cursor:"not-allowed"}:void 0,title:(st=V.eligibility_restriction)==null?void 0:st.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:Y.image_url?t.jsx("img",{src:Y.image_url,alt:Y.name}):D(Y.name)}),t.jsx("span",{className:"w-grow w-truncate",children:Y.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[z&&t.jsx(Aa,{size:12,className:"w-text-error"}),q&&U&&t.jsx("span",{className:"w-rowact",role:"button",title:"Organization settings","aria-label":"Organization settings",onClick:Oe=>{Oe.stopPropagation(),ce()},children:t.jsx(Sa,{size:13})}),q&&!z&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave organization","aria-label":"Leave organization",onClick:Oe=>{Oe.stopPropagation(),Q()},children:t.jsx(Ea,{size:13})}),q&&!Z&&t.jsx(Ge,{size:13,className:"w-text-primary"}),Z&&t.jsx(Dt,{size:11,className:"w-text-muted",style:{transition:"transform 0.2s ease",transform:G?"rotate(0deg)":"rotate(-90deg)"}})]})]}),Z&&G&&!z&&t.jsxs("div",{className:"w-switch-nest",children:[de.map(Oe=>{var J,re;const Ze=q&&(E==null?void 0:E.id)===Oe.id,mt=((J=Oe.eligibility_restriction)==null?void 0:J.type)&&Oe.eligibility_restriction.type!=="none";return t.jsxs("button",{className:"w-menu-item",onClick:()=>{!Ze&&!mt&&K(Oe.id)},disabled:n,style:mt?{opacity:.55,cursor:"not-allowed"}:void 0,title:(re=Oe.eligibility_restriction)==null?void 0:re.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:Oe.image_url?t.jsx("img",{src:Oe.image_url,alt:Oe.name}):D(Oe.name).charAt(0)}),t.jsx("span",{className:"w-grow w-truncate",children:Oe.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[mt&&t.jsx(Aa,{size:12,className:"w-text-error"}),Ze&&Qe&&t.jsx("span",{className:"w-rowact",role:"button",title:"Workspace settings","aria-label":"Workspace settings",onClick:ue=>{ue.stopPropagation(),be()},children:t.jsx(Sa,{size:13})}),Ze&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave workspace","aria-label":"Leave workspace",onClick:ue=>{ue.stopPropagation(),ie()},children:t.jsx(Ea,{size:13})}),Ze&&t.jsx(Ge,{size:12,className:"w-text-primary"})]})]},Oe.id)}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>{w(Y.id),f.open()},disabled:n,children:[t.jsx(Nt,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New workspace"})]})]})]},Y.id)}),H&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>u.open(),disabled:n,children:[t.jsx(Nt,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New organization"})]})]})]})})]}),document.body),$&&H&&t.jsx(Wc,{isOpen:u.isOpen,onClose:u.close,onCreated:N}),t.jsx(Yc,{isOpen:h.isOpen,onClose:h.close}),Z&&t.jsxs(t.Fragment,{children:[t.jsx($r,{isOpen:g.isOpen,onClose:g.close}),t.jsx(Lr,{isOpen:f.isOpen,onClose:()=>{f.close(),w(null)},organizationId:x||void 0})]})]})})},n0=o.createContext(void 0),ta=()=>{const e=o.useContext(n0);if(!e)throw new Error("useScreenContext must be used within a ScreenProvider");return e},he=(...e)=>e.filter(Boolean).join(" "),r0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-contents",e),...a}));r0.displayName="TypographyProvider";const ur=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card","w-flex-col","w-full","w-minh-full",e),...a}));ur.displayName="Container";const i0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-tabsbar",e),...a}));i0.displayName="TabsContainer";const o0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}));o0.displayName="TabsList";const _a=o.forwardRef(({$isActive:e,className:a,...s},n)=>t.jsx("button",{ref:n,className:he("w-tab",e&&"w-tab--active",a),...s}));_a.displayName="Tab";const ka=o.forwardRef(({className:e,...a},s)=>t.jsx("span",{ref:s,className:he("w-inline","w-gap-1",e),...a}));ka.displayName="TabIcon";const l0=o.forwardRef(({className:e,children:a,...s},n)=>t.jsx("div",{ref:n,className:he("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}));l0.displayName="TabContent";const A4=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:he("w-btn","w-btn--icon",e),...a}));A4.displayName="IconButton";const c0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-between","w-wrap","w-gap-3",e),...a}));c0.displayName="HeaderCTAContainer";const M4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-start","w-gap-6",e),...a}));M4.displayName="ProfileSectionLayout";const R4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-none",e),...a}));R4.displayName="ProfileImageContainer";const d0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));d0.displayName="SecurityItemRow";const u0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grow",e),...a}));u0.displayName="SecurityItemContent";const m0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-none",e),...a}));m0.displayName="SecurityItemActions";const Tr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sechead",e),...a}));Tr.displayName="ResponsiveHeaderContainer";const pn=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-full",e),...a}));pn.displayName="DesktopTableContainer";const p0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-gap-3",e),...a}));p0.displayName="FormRow";const L4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));L4.displayName="ConnectionItemRow";const P4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-grow",e),...a}));P4.displayName="ConnectionLeft";const $4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-end","w-gap-1","w-none",e),...a}));$4.displayName="ConnectionRight";const Ir=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-iconbox",e),...a}));Ir.displayName="IconWrapper";const O4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-wrap","w-gap-2",e),...a}));O4.displayName="ButtonActions";const h0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-page-head",e),...a}));h0.displayName="PageHeader";const Z4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-avatar",e),...a}));Z4.displayName="PageHeaderAvatar";const f0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));f0.displayName="PageHeaderInfo";const w0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec","w-truncate",e),...a}));w0.displayName="PageHeaderName";const g0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub","w-truncate",e),...a}));g0.displayName="PageHeaderSub";const H4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-none",e),...a}));H4.displayName="PageHeaderActions";const F4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-4",e),...a}));F4.displayName="PageContent";const T4=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card",e),...a}));T4.displayName="Card";const I4=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card","w-danger",e),...a}));I4.displayName="DangerCard";const V4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-head",e),...a}));V4.displayName="CardHeader";const z4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));z4.displayName="CardTitleBlock";const D4=o.forwardRef(({className:e,...a},s)=>t.jsx("h3",{ref:s,className:he("w-sec",e),...a}));D4.displayName="CardTitle";const U4=o.forwardRef(({className:e,...a},s)=>t.jsx("p",{ref:s,className:he("w-secsub",e),...a}));U4.displayName="CardSubtitle";const W4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));W4.displayName="CardActions";const B4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-hr",e),...a}));B4.displayName="CardDivider";const G4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-body",e),...a}));G4.displayName="CardBody";const q4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-foot",e),...a}));q4.displayName="CardFooter";const K4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));K4.displayName="RowList";const Y4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-rowitem",e),...a}));Y4.displayName="RowItem";const Q4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));Q4.displayName="RowInfo";const J4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec",e),...a}));J4.displayName="RowTitle";const X4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub",e),...a}));X4.displayName="RowSub";const e6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));e6.displayName="RowActions";const t6={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},Ga=({$variant:e="neutral",className:a,children:s,...n})=>t.jsxs("span",{className:he("w-pill",t6[e],a),...n,children:[t.jsx("span",{className:"w-dot"}),s]}),a6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));a6.displayName="Table";const s6=o.forwardRef(({$cols:e,className:a,style:s,...n},i)=>t.jsx("div",{ref:i,className:he("w-listhead","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...n}));s6.displayName="TableHead";const n6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:e,...a}));n6.displayName="Th";const r6=o.forwardRef(({$cols:e,className:a,style:s,...n},i)=>t.jsx("div",{ref:i,className:he("w-row","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...n}));r6.displayName="Tr";const i6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-truncate","w-text-secondary",e),...a}));i6.displayName="Td";const o6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grid-2",e),...a}));o6.displayName="FieldGrid";const l6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-field",e),...a}));l6.displayName="Field";const c6=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:he("w-label",e),...a}));c6.displayName="FieldLabel";const d6=()=>{var I,L;const{deployment:e}=_e(),{refetch:a}=ot(),{user:s,updateProfile:n,deleteAccount:i}=ga(),{toast:l}=ta(),[m,c]=o.useState(""),[d,p]=o.useState(""),[u,h]=o.useState(""),[f,g]=o.useState(!1),[x,w]=o.useState(!1),[b,_]=o.useState(!1),[v,k]=o.useState("");o.useEffect(()=>{s&&!f&&(c(s.first_name||""),p(s.last_name||""),h(s.username||""),g(!0))},[s,f]);const N=o.useCallback(async()=>{if(s)try{const S={};m!==s.first_name&&(S.first_name=m),d!==s.last_name&&(S.last_name=d),u!==s.username&&(S.username=u),Object.keys(S).length>0&&await n(S)}catch(S){l(S.message||"Failed to save profile changes","error")}},[s,n,m,d,u,l]),j=S=>{c(S.target.value)},C=S=>{p(S.target.value)},y=S=>{h(S.target.value)},E=()=>{N()},R=()=>{N()},F=()=>{N()};if(!s)return t.jsx("div",{className:"w-loading",children:t.jsx(ye,{})});const A=async()=>{if(!(!s||v!=="delete this account")){_(!0);try{await i(""),l("Account deleted successfully","info"),await a()}catch(S){l(S.message||"Failed to delete account","error")}finally{_(!1),k(""),w(!1)}}};return t.jsxs("div",{className:"w-flex-col w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx("p",{className:"w-secsub",children:"Basic information about your profile"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs(p0,{children:[t.jsxs(We,{className:"w-grow",children:[t.jsx(Ve,{htmlFor:"firstName",children:"First Name"}),t.jsx(xe,{id:"firstName",type:"text",value:m,onChange:j,onBlur:E,placeholder:"Enter your first name",required:!0})]}),t.jsxs(We,{className:"w-grow",children:[t.jsx(Ve,{htmlFor:"lastName",children:"Last Name"}),t.jsx(xe,{id:"lastName",type:"text",value:d,onChange:C,onBlur:R,placeholder:"Enter your last name",required:!0})]})]}),((L=(I=e==null?void 0:e.auth_settings)==null?void 0:I.username)==null?void 0:L.enabled)&&t.jsxs(We,{children:[t.jsx(Ve,{htmlFor:"username",children:"Username"}),t.jsx(xe,{id:"username",type:"text",value:u,onChange:y,onBlur:F,placeholder:"Enter your username",required:!0})]})]})]}),t.jsx("div",{className:"w-hr"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-sec",children:"Danger Zone"}),t.jsx("p",{className:"w-secsub",children:"Irreversible and destructive actions"})]}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-full",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete Account"}),t.jsx("div",{className:"w-secsub",children:"Once you delete your account, there is no going back. Please be certain."})]}),t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>{x?(w(!1),k("")):w(!0)},children:x?"Cancel":"Delete"})]}),x&&t.jsxs("div",{className:"w-full w-flex-col w-gap-3",children:[t.jsxs(We,{children:[t.jsx(Ve,{htmlFor:"confirm_username",children:'Type "delete this account" to confirm'}),t.jsx(xe,{id:"confirm_username",type:"text",value:v,onChange:S=>k(S.target.value),placeholder:"delete this account"})]}),t.jsx(se,{$destructive:!0,$fullWidth:!0,onClick:A,disabled:v!=="delete this account"||b,children:b?t.jsx(ye,{size:12}):"Delete Forever"})]})]})]})]})},Di=({onClose:e,onAddEmail:a,onAttemptVerification:s,onPrepareVerification:n,existingEmail:i,triggerRef:l})=>{const m=o.useRef(null),[c,d]=o.useState(!1),{toast:p}=ta(),u=xt({contentRef:m,triggerRef:l??{current:null},isOpen:c,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{d(!0);const j=y=>{m.current&&!m.current.contains(y.target)&&e()},C=y=>{y.key==="Escape"&&e()};return document.addEventListener("mousedown",j),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("keydown",C)}},[e]);const[h,f]=o.useState(i?"otp":"email"),[g,x]=o.useState(i||""),[w,b]=o.useState(""),[_,v]=o.useState(!1),k=async()=>{if(!(!g||_)){v(!0);try{await a(g),f("otp")}catch(j){p(j.message||"Failed to add email. Please try again.","error")}finally{v(!1)}}},N=async()=>{v(!0);try{await s(w),e()}catch(j){p(j.message||"Failed to verify email. Check the code and try again.","error")}finally{v(!1)}};return c?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:j=>j.stopPropagation(),children:h==="email"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add email address"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx(xe,{id:"email-input",type:"email",placeholder:"you@company.com",value:g,onChange:j=>x(j.target.value),onKeyDown:j=>{j.key==="Enter"&&k()},autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:!g||_,children:_?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!i&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>f("email"),children:[t.jsx(sn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify your email"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:g})]})]}),t.jsx(xa,{onComplete:async j=>b(j),onResend:n,isSubmitting:_})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:w.length<6||_,children:_?"Verifying…":"Verify"})]})]})}):null},u6=()=>{var R,F,A,I;const{deployment:e}=_e(),{toast:a}=ta(),[s,n]=o.useState(""),[i,l]=o.useState(!1),[m,c]=o.useState(null),[d,p]=o.useState(new Set),u=o.useRef(null),h=o.useRef({}),{user:f,createEmailAddress:g,deleteEmailAddress:x,prepareEmailVerification:w,attemptEmailVerification:b,makeEmailPrimary:_}=ga();if(!((F=(R=e==null?void 0:e.auth_settings)==null?void 0:R.email_address)!=null&&F.enabled))return null;const v=(L,S)=>{p(O=>{const P=new Set(O);return S?P.add(L):P.delete(L),P})},k=async L=>{v(L,!0);try{await _(L),await f.refetch(),a("Primary email updated","info")}catch(S){a(S.message||"Failed to update primary email","error")}finally{v(L,!1)}},N=async L=>{if(L===(f==null?void 0:f.primary_email_address_id)){a("Cannot delete primary email. Set another email as primary first.","error");return}v(L,!0);try{await x(L),await f.refetch(),a("Email removed","info")}catch(S){a(S.message||"Failed to delete email address. Please try again.","error")}finally{v(L,!1)}},j=async L=>{v(L,!0);try{await w(L),await f.refetch(),c(L)}catch(S){a(S.message||"Failed to send verification","error")}finally{v(L,!1)}},C=(f==null?void 0:f.user_email_addresses)||[],y=L=>L.id===(f==null?void 0:f.primary_email_address_id)?t.jsx(Ga,{$variant:"success",children:"Primary"}):L.verified?t.jsx(Ga,{$variant:"neutral",children:"Backup"}):t.jsx(Ga,{$variant:"warning",children:"Pending verification"}),E=L=>{const S=L.id===(f==null?void 0:f.primary_email_address_id),O=d.has(L.id);return S?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[L.verified&&t.jsx(se,{$size:"sm",$outline:!0,disabled:O,onClick:()=>k(L.id),children:"Make primary"}),!L.verified&&t.jsx(se,{ref:P=>{P&&(h.current[L.id]=P)},$size:"sm",$outline:!0,disabled:O,onClick:()=>j(L.id),children:"Resend"}),t.jsx(se,{$size:"sm",$destructive:!0,disabled:O,onClick:()=>N(L.id),children:O?t.jsx(ye,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(Tr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Email addresses"}),t.jsx("div",{className:"w-secsub",children:"Sign in and receive notifications at these addresses."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(se,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add email"}),i&&t.jsx(Di,{triggerRef:u,onClose:()=>l(!1),onAddEmail:async L=>{const S=await g(L);n(S.data.id),await w(S.data.id),f.refetch()},onPrepareVerification:async()=>{await w(s),f.refetch()},onAttemptVerification:async L=>{await b(s,L),f.refetch(),l(!1),n(""),a("Email added and verified","info")}})]})]}),C.length?t.jsx(t.Fragment,{children:t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Email address"}),t.jsx($e,{children:"Status"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:C.map(L=>t.jsxs(it,{children:[t.jsx(Ke,{children:L.email}),t.jsx(Ke,{children:y(L)}),t.jsx(Ht,{children:E(L)})]},L.id))})]})})}):t.jsx(Ct,{title:"No email addresses",description:"Add an email address to get started."}),m&&t.jsx(Di,{existingEmail:(I=(A=f==null?void 0:f.user_email_addresses)==null?void 0:A.find(L=>L.id===m))==null?void 0:I.email,triggerRef:{current:h.current[m]},onClose:()=>c(null),onAddEmail:async()=>{},onPrepareVerification:async()=>{await w(m),f.refetch()},onAttemptVerification:async L=>{await b(m,L),f.refetch(),c(null),a("Email verified","info")}})]})},Ui=({onClose:e,onAddPhone:a,onAttemptVerification:s,existingPhone:n,onPrepareVerification:i,triggerRef:l})=>{var y;const m=o.useRef(null),[c,d]=o.useState(!1),{toast:p}=ta(),u=xt({contentRef:m,triggerRef:l??{current:null},isOpen:c,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{d(!0);const E=F=>{m.current&&!m.current.contains(F.target)&&e()},R=F=>{F.key==="Escape"&&e()};return document.addEventListener("mousedown",E),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",R)}},[e]);const[h,f]=o.useState(n?"otp":"phone"),[g,x]=o.useState((n==null?void 0:n.replace(/^\+\d+/,""))||""),[w,b]=o.useState((y=Intl.DateTimeFormat().resolvedOptions().locale.split("-"))==null?void 0:y.pop()),[_,v]=o.useState(""),[k,N]=o.useState(!1),j=async()=>{if(!(!g||k)){N(!0);try{await a(g,w||""),f("otp")}catch(E){p(E.message||"Failed to add phone number. Please try again.","error")}finally{N(!1)}}},C=async()=>{N(!0);try{await s(_),e()}catch(E){p(E.message||"Failed to verify phone. Check the code and try again.","error")}finally{N(!1)}};return c?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:E=>E.stopPropagation(),children:h==="phone"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add phone number"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(bs,{value:g,onChange:E=>x(E.target.value),error:"",countryCode:w,setCountryCode:b})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:j,disabled:!g||k,children:k?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!n&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>f("phone"),children:[t.jsx(sn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify phone number"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:n||g})]})]}),t.jsx(xa,{onComplete:E=>v(E),onResend:async()=>i(),isSubmitting:k})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:C,disabled:_.length!==6||k,children:k?"Verifying…":"Verify"})]})]})}):null},m6=()=>{var F,A,I,L;const{deployment:e}=_e(),{toast:a}=ta(),[s,n]=o.useState(""),[i,l]=o.useState(!1),[m,c]=o.useState(null),[d,p]=o.useState(new Set),u=o.useRef(null),h=o.useRef({}),{user:f,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:_}=ga();if(!((A=(F=e==null?void 0:e.auth_settings)==null?void 0:F.phone_number)!=null&&A.enabled))return null;const v=(S,O)=>{p(P=>{const $=new Set(P);return O?$.add(S):$.delete(S),$})},k=S=>{const O=Bs.find(P=>P.dialCode===S);return(O==null?void 0:O.flag)||"🌍"},N=async S=>{v(S,!0);try{await _(S),await f.refetch(),a("Primary phone updated","info")}catch(O){a(O.message||"Failed to update primary phone","error")}finally{v(S,!1)}},j=async S=>{if(S===(f==null?void 0:f.primary_phone_number_id)){a("Cannot delete primary phone. Set another phone as primary first.","error");return}v(S,!0);try{await x(S),await f.refetch(),a("Phone removed","info")}catch(O){a(O.message||"Failed to delete phone. Please try again.","error")}finally{v(S,!1)}},C=async S=>{v(S,!0);try{await w(S),await f.refetch(),c(S)}catch(O){a(O.message||"Failed to send verification","error")}finally{v(S,!1)}},y=(f==null?void 0:f.user_phone_numbers)||[],E=S=>S.id===(f==null?void 0:f.primary_phone_number_id)?t.jsx(Ga,{$variant:"success",children:"Primary"}):S.verified?t.jsx(Ga,{$variant:"neutral",children:"Backup"}):t.jsx(Ga,{$variant:"warning",children:"Pending verification"}),R=S=>{const O=S.id===(f==null?void 0:f.primary_phone_number_id),P=d.has(S.id);return O?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[S.verified&&t.jsx(se,{$size:"sm",$outline:!0,disabled:P,onClick:()=>N(S.id),children:"Make primary"}),!S.verified&&t.jsx(se,{ref:$=>{$&&(h.current[S.id]=$)},$size:"sm",$outline:!0,disabled:P,onClick:()=>C(S.id),children:"Resend"}),t.jsx(se,{$size:"sm",$destructive:!0,disabled:P,onClick:()=>j(S.id),children:P?t.jsx(ye,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(Tr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Phone numbers"}),t.jsx("div",{className:"w-secsub",children:"Used for sign-in and two-factor authentication."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(se,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add phone"}),i&&t.jsx(Ui,{triggerRef:u,onClose:()=>l(!1),onAddPhone:async(S,O)=>{const P=await g(S,O);n(P.data.id),await w(P.data.id)},onPrepareVerification:async()=>{await w(s),f.refetch()},onAttemptVerification:async S=>{await b(s,S),f.refetch(),l(!1),n(""),a("Phone added and verified","info")}}),m&&t.jsx(Ui,{existingPhone:(L=(I=f==null?void 0:f.user_phone_numbers)==null?void 0:I.find(S=>S.id===m))==null?void 0:L.phone_number,triggerRef:{current:h.current[m]},onClose:()=>c(null),onAddPhone:async()=>{},onPrepareVerification:async()=>{await w(m),f.refetch()},onAttemptVerification:async S=>{await b(m,S),f.refetch(),c(null),a("Phone verified","info")}})]})]}),y.length?t.jsx(t.Fragment,{children:t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Phone number"}),t.jsx($e,{children:"Status"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:y.map(S=>t.jsxs(it,{children:[t.jsx(Ke,{children:t.jsxs("span",{className:"w-inline w-gap-2",children:[t.jsx("span",{children:k(S.country_code)}),t.jsx("span",{className:"w-text-secondary",children:S.country_code}),t.jsx("span",{children:S.phone_number})]})}),t.jsx(Ke,{children:E(S)}),t.jsx(Ht,{children:R(S)})]},S.id))})]})})}):t.jsx(Ct,{title:"No phone numbers",description:"Add a phone number to get started."})]})},p6=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#F35325",d:"M1 1h6.5v6.5H1V1z"}),t.jsx("path",{fill:"#81BC06",d:"M8.5 1H15v6.5H8.5V1z"}),t.jsx("path",{fill:"#05A6F0",d:"M1 8.5h6.5V15H1V8.5z"}),t.jsx("path",{fill:"#FFBA08",d:"M8.5 8.5H15V15H8.5V8.5z"})]}),h6={google_oauth:{icon:t.jsx(bc,{}),label:"Google"},microsoft_oauth:{icon:t.jsx(p6,{}),label:"Microsoft"},github_oauth:{icon:t.jsx(vc,{}),label:"GitHub"},gitlab_oauth:{icon:t.jsx(_c,{}),label:"GitLab"},linkedin_oauth:{icon:t.jsx(jc,{}),label:"LinkedIn"},discord_oauth:{icon:t.jsx(kc,{}),label:"Discord"},x_oauth:{icon:t.jsx(yc,{}),label:"X"}},f6=()=>{const{user:e,disconnectSocialConnection:a,connectSocialAccount:s}=ga(),{deployment:n}=_e(),i=(n==null?void 0:n.social_connections.filter(c=>c.enabled))||[],l=c=>{s({provider:c,redirectUri:window.location.href})},m=async c=>{await a(c.toString()),e.refetch()};return i.length===0?t.jsx(Ct,{title:"No providers available",description:"Social sign-in providers have not been configured for this app."}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-gap-3",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Connected accounts"}),t.jsx("div",{className:"w-secsub",children:"Sign in faster by linking third-party accounts."})]})}),t.jsx("div",{className:"w-list",children:i.map(c=>{var h;const d=h6[c.provider];if(!d)return null;const p=((h=e==null?void 0:e.social_connections)==null?void 0:h.filter(f=>f.provider===c.provider))||[],u=p.length>0;return t.jsxs("div",{className:"w-vrow",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx(Ir,{children:d.icon}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-grow",children:[t.jsx("div",{className:"w-sec",children:d.label}),u?t.jsx("div",{className:"w-flex w-wrap w-gap-1",children:p.map(f=>t.jsxs("span",{className:"w-chip",children:[t.jsx("span",{className:"w-truncate",children:f.email_address}),t.jsx("span",{className:"w-chip-x",role:"button",onClick:()=>m(f.id),title:"Remove connection","aria-label":"Remove connection",children:t.jsx(Ra,{size:10,weight:"bold"})})]},f.id))}):t.jsx("span",{className:"w-secsub",children:"Not linked"})]})]}),t.jsx("div",{className:`w-flex w-justify-end w-none${u?" w-row-act-top":""}`,children:t.jsx(se,{$size:"sm",$outline:!0,onClick:()=>l(c.provider),children:u?"Link another":"Link"})})]},c.provider)})})]})};var w6=Object.defineProperty,Js=Object.getOwnPropertySymbols,x0=Object.prototype.hasOwnProperty,v0=Object.prototype.propertyIsEnumerable,Wi=(e,a,s)=>a in e?w6(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,mr=(e,a)=>{for(var s in a||(a={}))x0.call(a,s)&&Wi(e,s,a[s]);if(Js)for(var s of Js(a))v0.call(a,s)&&Wi(e,s,a[s]);return e},pr=(e,a)=>{var s={};for(var n in e)x0.call(e,n)&&a.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&Js)for(var n of Js(e))a.indexOf(n)<0&&v0.call(e,n)&&(s[n]=e[n]);return s};/**
|
|
107
|
+
`).filter(F=>F.trim())}),l("Changes saved","info")}catch(F){l(F.message||"Failed to save changes","error")}finally{g(!1)}},k=async()=>{if(!(!e||x!==e.name))try{j(!0),await n(e),l("Workspace deleted","info")}catch{l("Failed to delete workspace","error")}finally{j(!1),w("")}};if(a&&!e)return t.jsx(je,{});if(!e)return null;const C=(E=i==null?void 0:i.b2b_settings)==null?void 0:E.enforce_mfa_per_workspace_enabled,y=(M=i==null?void 0:i.b2b_settings)==null?void 0:M.ip_allowlist_per_workspace_enabled;return t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"name",children:"Workspace name"}),t.jsx(be,{id:"name",value:m,onChange:F=>c(F.target.value),onBlur:N,placeholder:"Workspace name",required:!0})]}),t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"description",children:"Description"}),t.jsx(be,{id:"description",as:"textarea",value:d,onChange:F=>p(F.target.value),onBlur:N,placeholder:"Optional description",className:"w-input--area"})]})]}),(C||y)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(zi,{children:"Security"}),C&&t.jsxs(Ti,{children:[t.jsxs(Ii,{children:[t.jsx("div",{className:"w-sec",children:"Multi-factor authentication"}),t.jsx("p",{className:"w-secsub",children:"Require all workspace members to set up MFA."})]}),t.jsx(Vi,{children:t.jsx(Za,{checked:u.mfa_required,onChange:()=>{h(F=>({...F,mfa_required:!F.mfa_required})),setTimeout(N,0)}})})]}),y&&t.jsxs(t.Fragment,{children:[t.jsxs(Ti,{children:[t.jsxs(Ii,{children:[t.jsx("div",{className:"w-sec",children:"IP restrictions"}),t.jsx("p",{className:"w-secsub",children:"Only allow access from specific IP addresses."})]}),t.jsx(Vi,{children:t.jsx(Za,{checked:u.ip_restrictions,onChange:()=>{h(F=>({...F,ip_restrictions:!F.ip_restrictions})),setTimeout(N,0)}})})]}),u.ip_restrictions&&t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"allowed_ips",children:"Allowed IP addresses"}),t.jsx(be,{id:"allowed_ips",as:"textarea",value:u.allowed_ips,onChange:F=>h(A=>({...A,allowed_ips:F.target.value})),onBlur:N,placeholder:`192.168.1.1
|
|
108
|
+
10.0.0.0/24`,className:"w-input--area w-mono-sm"})]})]})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(zi,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger",children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Delete workspace"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this workspace, there is no going back."})]}),t.jsx(ne,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{_(!v),w("")},children:v?"Cancel":"Delete workspace"})]}),v&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ue,{children:[t.jsxs(Te,{htmlFor:"confirm_workspace_name",children:["Type ",t.jsx("strong",{children:e.name})," to confirm"]}),t.jsx(be,{id:"confirm_workspace_name",type:"text",value:x,onChange:F=>w(F.target.value),placeholder:e.name})]}),t.jsx(ne,{$size:"sm",$destructive:!0,onClick:k,disabled:x!==e.name||b,children:b?t.jsx(je,{size:12}):"Delete forever"})]})]})]})},x4=({onClose:e,onSuccess:a,roles:s,triggerRef:n})=>{const i=o.useRef(null),[l,m]=o.useState(""),[c,d]=o.useState(null),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{toast:g}=kt(),{inviteMember:x}=zt(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:360,defaultMaxHeight:320}),b=s.map(_=>({value:_.id,label:_.name}));o.useEffect(()=>{f(!0);const _=C=>{i.current&&!i.current.contains(C.target)&&(e==null||e())},N=C=>{C.key==="Escape"&&(e==null||e())},k=setTimeout(()=>{document.addEventListener("mousedown",_),document.addEventListener("keydown",N)},100);return()=>{clearTimeout(k),document.removeEventListener("mousedown",_),document.removeEventListener("keydown",N)}},[e]);const j=_=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_),v=async()=>{const _=l.trim().toLowerCase();if(!(!_||!c)){if(!j(_)){g("Please enter a valid email address","error");return}if(_.length>320){g("Email address is too long","error");return}u(!0);try{await x({email:_,workspaceRoleId:c.id}),a==null||a()}catch(N){const k=N.message||"Failed to send invitation. Please try again.";g(k,"error")}finally{u(!1)}}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,maxHeight:w!=null&&w.maxHeight?`${w.maxHeight}px`:void 0,visibility:w?"visible":"hidden"},onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"invite-workspace-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-workspace-member-title",children:"Invite member"}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Email Address"}),t.jsx(be,{type:"email",placeholder:"colleague@company.com",value:l,onChange:_=>m(_.target.value),autoFocus:!0,"aria-label":"Email address for workspace invitation","aria-describedby":"workspace-email-help"})]}),t.jsxs(Ue,{children:[t.jsx(Te,{children:"Role"}),t.jsx(un,{options:b,value:c==null?void 0:c.id,onChange:_=>d(s.find(N=>N.id===_)),placeholder:"Select a role","aria-label":"Select role for invited workspace member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!c||p,children:p?t.jsx(je,{size:14}):"Send invite"})]})]}):null},v4=()=>{const{activeWorkspace:e,getMembers:a,getRoles:s,removeMember:n,addMemberRole:i,removeMemberRole:l}=zt(),{session:m}=rt(),{toast:c}=kt(),[d,p]=o.useState(""),[u,h]=o.useState(1),[f]=o.useState(10),[g,x]=o.useState(""),[w,b]=o.useState(!1),j=o.useRef(null);o.useEffect(()=>{const A=setTimeout(()=>{x(d),h(1)},500);return()=>clearTimeout(A)},[d]);const{data:v,mutate:_}=Ce(e?`wacht-api-workspaces:${e.id}:members:${u}:${f}:${g}`:null,()=>a==null?void 0:a({page:u,limit:f,search:g}),{keepPreviousData:!0}),N=(v==null?void 0:v.data)||[],k=(v==null?void 0:v.meta)||{total:0,limit:10},C=Math.ceil(k.total/(k.limit||10)),{data:y=[]}=Ce(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),E=y,M=async(A,I,$)=>{try{$?(await l(A,I),c("Role removed","info")):(await i(A,I),c("Role added","info")),_()}catch{c("Failed to update role","error")}},F=async A=>{try{await n(A),c("Member removed","info"),_()}catch{c("Failed to remove member","error")}};return v?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Vc,{value:d,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[k.total>0&&t.jsxs("div",{className:"w-text-muted w-secsub",children:[k.total," member",k.total!==1?"s":""]}),t.jsx(ne,{ref:j,onClick:()=>b(!0),$size:"sm",children:"Invite"})]})]}),w&&t.jsx(x4,{onClose:()=>b(!1),onSuccess:()=>{_(),b(!1)},roles:E,triggerRef:j}),N.length===0?t.jsx(Ct,{title:d?"No members match":"No members yet",description:"Members added to the organization can be invited here."}):t.jsx(t.Fragment,{children:t.jsx($r,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Member"}),t.jsx(He,{children:"Joined"}),t.jsx(He,{children:"Role"})]})}),t.jsx(Zt,{children:N.map(A=>t.jsxs(nt,{children:[t.jsx(Ke,{children:t.jsx(b4,{member:A,session:m})}),t.jsx(Ke,{children:new Date(A.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsx(y4,{member:A,roles:E,onToggle:(I,$)=>M(A.id,I,$),onRemove:()=>F(A.id)})})]},A.id))})]})})}),C>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4",children:[t.jsx(ne,{onClick:()=>h(A=>Math.max(1,A-1)),disabled:u===1,$size:"sm",children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",C]}),t.jsx(ne,{onClick:()=>h(A=>Math.min(C,A+1)),disabled:u===C,$size:"sm",children:"Next"})]})]}):t.jsx(je,{})},b4=({member:e,session:a,subtitle:s})=>{var m,c,d;const n=e.public_user_data||e.user,i=(n==null?void 0:n.id)===((m=a==null?void 0:a.active_signin)==null?void 0:m.user_id),l=(p="",u="")=>`${p[0]||""}${u[0]||""} `.toUpperCase();return t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx("div",{className:"w-avatar",children:n!=null&&n.profile_picture_url?t.jsx("img",{src:n.profile_picture_url,alt:"Avatar"}):l(n==null?void 0:n.first_name,n==null?void 0:n.last_name)||"?"}),t.jsxs("div",{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:n?`${n.first_name||""} ${n.last_name||""} `.trim()||((c=n.primary_email_address)==null?void 0:c.email):"Unknown"}),i&&t.jsx("span",{className:"w-pill",children:"You"})]}),t.jsxs("div",{className:"w-flex w-wrap w-gap-2 w-secsub",children:[t.jsx("span",{children:(d=n==null?void 0:n.primary_email_address)==null?void 0:d.email}),s&&t.jsxs("span",{className:"w-text-muted",children:["• ",s]})]})]})]})},y4=({member:e,roles:a,onToggle:s,onRemove:n})=>{var m;const i=e.roles||[],l=c=>i.some(d=>d.id===c);return t.jsxs(_s,{children:[t.jsx(Cs,{children:t.jsxs(ne,{$outline:!0,$size:"sm",className:"w-justify-between w-rolepick-btn",children:[i.length>0?(m=i==null?void 0:i[0])==null?void 0:m.name:"No role"," ",t.jsx(Dt,{size:14})]})}),t.jsxs(ks,{children:[a.map(c=>{const d=l(c.id);return t.jsx(ea,{onClick:()=>s(c.id,d),children:t.jsxs("div",{className:"w-flex w-justify-between w-full w-gap-3",children:[t.jsx("span",{children:c.name}),d&&t.jsx(Be,{size:14,className:"w-text-success"})]})},c.id)}),t.jsx(Tc,{}),t.jsx(ea,{$destructive:!0,onClick:n,children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(xr,{size:14})," Remove Member"]})})]})]})},j4=({onClose:e,onSuccess:a,roles:s,createInvitation:n,triggerRef:i})=>{const l=o.useRef(null),[m,c]=o.useState(""),[d,p]=o.useState(s[0]||null),[u,h]=o.useState(!1),[f,g]=o.useState(!1),{toast:x}=kt(),w=xt({contentRef:l,triggerRef:i,isOpen:f,minWidth:360,defaultMaxHeight:320}),b=s.map(_=>({value:_.id,label:_.name})),j=_=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_),v=async()=>{const _=m.trim().toLowerCase();if(!(!_||!d)){if(!j(_)){x("Please enter a valid email address","error");return}if(_.length>320){x("Email address is too long","error");return}h(!0);try{await n({email:_,role_id:d.id}),a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{h(!1)}}};return o.useEffect(()=>{g(!0);const _=k=>{l.current&&!l.current.contains(k.target)&&(e==null||e())},N=k=>{k.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",_),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",N)}},[e]),f?t.jsxs("div",{ref:l,className:"w-pop w-pop--wide w-pop-body",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Email"}),t.jsx(be,{type:"email",placeholder:"colleague@company.com",value:m,onChange:_=>c(_.target.value),onKeyDown:_=>{_.key==="Enter"&&m&&d&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Role"}),t.jsx(un,{options:b,value:d==null?void 0:d.id,onChange:_=>p(s.find(N=>N.id===_)),placeholder:"Select a role","aria-label":"Select role for invited member"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(ne,{$size:"sm",$outline:!0,$fullWidth:!0,onClick:e,children:"Cancel"}),t.jsx(ne,{$size:"sm",$fullWidth:!0,onClick:v,disabled:!m||!d||u,children:u?t.jsx(je,{size:12}):"Send invite"})]})]}):null},_4=()=>{const{activeWorkspace:e,loading:a,getRoles:s,getInvitations:n,inviteMember:i,discardInvitation:l,resendInvitation:m}=zt(),{toast:c}=kt(),[d,p]=o.useState(!0),[u,h]=o.useState(!0),[f,g]=o.useState([]),[x,w]=o.useState([]),[b,j]=o.useState(!1),v=o.useRef(null),_=async()=>{if(e){p(!0),h(!0);try{const[C,y]=await Promise.all([s(),n()]);w(C),g(y)}catch{}finally{p(!1),h(!1)}}};o.useEffect(()=>{_()},[e==null?void 0:e.id]);const N=async C=>{try{await l(C),_(),c("Invitation cancelled","info")}catch{c("Failed to cancel invitation","error")}},k=async C=>{try{await m(C),_(),c("Invitation resent","info")}catch{c("Failed to resend invitation","error")}};return a||d||u?t.jsx(je,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Jc,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this workspace."})]}),t.jsx(ne,{ref:v,onClick:()=>j(!0),$size:"sm",children:"Invite"})]}),b&&t.jsx(j4,{onClose:()=>j(!1),onSuccess:()=>{_(),j(!1),c("Invitation sent","info")},roles:x,createInvitation:C=>i({email:C.email,workspaceRoleId:C.role_id}),triggerRef:v}),f.length===0?t.jsx(Ct,{title:"No pending invitations",description:"Invite members to your workspace."}):t.jsx(t.Fragment,{children:t.jsx($r,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Email"}),t.jsx(He,{children:"Role"}),t.jsx(He,{children:"Invited"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:f.map(C=>{var y,E;return t.jsxs(nt,{children:[t.jsx(Ke,{children:C.email}),t.jsx(Ke,{children:((y=C.initial_workspace_role)==null?void 0:y.name)||((E=C.initial_organization_role)==null?void 0:E.name)||"No role"}),t.jsx(Ke,{children:new Date(C.created_at).toLocaleDateString()}),t.jsx(Ht,{children:t.jsx(k4,{onResend:()=>k(C.id),onCancel:()=>N(C.id)})})]},C.id)})})]})})})]})},k4=({onResend:e,onCancel:a})=>t.jsxs(_s,{children:[t.jsx(Cs,{children:t.jsx(Js,{children:"•••"})}),t.jsxs(ks,{children:[t.jsxs(ea,{onClick:e,children:[t.jsx(Sl,{size:16})," Resend"]}),t.jsxs(ea,{$destructive:!0,onClick:a,children:[t.jsx(xr,{size:16})," Cancel"]})]})]}),Di=({onClose:e,onSuccess:a,role:s,triggerRef:n})=>{var C,y;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[c,d]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{deployment:g}=ke(),{toast:x}=kt(),w=xt({contentRef:i,triggerRef:n??{current:null},isOpen:h,minWidth:400,defaultMaxHeight:500}),b=!!s,j=((C=g==null?void 0:g.b2b_settings)==null?void 0:C.workspace_permissions)||((y=g==null?void 0:g.b2b_settings)==null?void 0:y.organization_permissions)||[],v=Array.isArray(j)?j.map(E=>({value:E,label:E})):[];o.useEffect(()=>{f(!0);const E=A=>{i.current&&!i.current.contains(A.target)&&(e==null||e())},M=A=>{A.key==="Escape"&&(e==null||e())},F=setTimeout(()=>{document.addEventListener("mousedown",E),document.addEventListener("keydown",M)},100);return()=>{clearTimeout(F),document.removeEventListener("mousedown",E),document.removeEventListener("keydown",M)}},[e]);const _=E=>E.trim().replace(/[<>"'&]/g,""),N=E=>E.length>=2&&E.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(E),k=async()=>{const E=_(l);if(!E){x("Please enter a role name","error");return}if(!N(E)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(c.length===0){x("Please select at least one permission","error");return}u(!0);try{const M={id:s==null?void 0:s.id,name:E,permissions:c};a==null||a(M)}catch(M){x(M.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:E=>E.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(be,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:E=>m(E.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Uc,{options:v,value:c,onChange:d,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:!l||p,children:p?t.jsx(je,{size:12}):b?"Update":"Create"})]})]}):null},C4=()=>{var N;const{activeWorkspace:e,loading:a,getRoles:s,createRole:n,deleteRole:i}=zt(),{deployment:l}=ke(),{toast:m}=kt(),[c,d]=o.useState({isOpen:!1}),[p,u]=o.useState(null),[h,f]=o.useState(null),g=o.useRef(null),x=o.useRef(new Map),{data:w=[],isLoading:b,mutate:j}=Ce(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),v=async k=>{try{await n(k.name,k.permissions||[]),m("Role saved successfully","info"),d({isOpen:!1}),j()}catch{m("Failed to save role","error")}},_=async k=>{try{await i(k),m("Role deleted","info"),u(null),j()}catch{m("Failed to delete role","error")}};return a||b?t.jsx(je,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Jc,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for this workspace."})]}),((N=l==null?void 0:l.b2b_settings)==null?void 0:N.custom_workspace_role_enabled)&&t.jsx(ne,{ref:g,onClick:()=>d({isOpen:!0,triggerElement:g.current}),$size:"sm",children:"Add role"})]}),c.isOpen&&!c.role&&t.jsx(Di,{triggerRef:{current:c.triggerElement||null},onClose:()=>d({isOpen:!1}),onSuccess:v}),w.length===0?t.jsx(Ct,{title:"No roles yet",description:"Create workspace-specific roles to manage access."}):t.jsx(t.Fragment,{children:t.jsx($r,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Role"}),t.jsx(He,{children:"Permissions"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:w.map(k=>{var C;return t.jsxs(nt,{children:[t.jsx(Ke,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2 w-wrap",children:[t.jsx("span",{className:"w-sec",children:k.name}),!ur(k)&&t.jsx("span",{className:"w-pill",children:"Default"})]})}),t.jsx(Ke,{children:t.jsxs("span",{className:"w-text-secondary",children:[(C=k.permissions)==null?void 0:C.join(", "),!ur(k)&&" • Cannot be edited or deleted"]})}),t.jsx(Ht,{children:t.jsx(N4,{role:k,onEdit:y=>d({isOpen:!0,role:k,triggerElement:y}),onDelete:()=>u(k.id),open:h===k.id,onOpenChange:y=>f(y?k.id:null),dropdownButtonRefs:x})})]},k.id)})})]})})}),p&&t.jsx(Qa,{title:"Delete role?",description:"Are you sure? This will remove the role from all workspace members.",onConfirm:()=>{const k=w.find(C=>C.id===p);k&&_(k)},onCancel:()=>u(null)}),c.isOpen&&c.role&&t.jsx(Di,{role:c.role,triggerRef:{current:c.triggerElement||null},onClose:()=>d({isOpen:!1}),onSuccess:v})]})},N4=({role:e,onEdit:a,onDelete:s,open:n,onOpenChange:i,dropdownButtonRefs:l})=>ur(e)?t.jsxs(_s,{open:n,openChange:i,children:[t.jsx(Cs,{children:t.jsx(Js,{ref:c=>{c&&l.current.set(e.id,c)},children:"•••"})}),t.jsxs(ks,{children:[t.jsx(ea,{onClick:()=>a(l.current.get(e.id)??null),children:"Edit Role"}),t.jsxs(ea,{$destructive:!0,onClick:s,children:[t.jsx(xr,{size:16})," Remove Role"]})]})]}):t.jsx(Js,{disabled:!0,title:"Deployment roles cannot be edited","aria-label":"Deployment roles cannot be edited",children:"•••"}),S4=e=>(e||"").slice(0,2).toUpperCase()||"W",Xc=()=>{var b,j;const{activeWorkspace:e,loading:a,updateWorkspace:s}=zt(),{deployment:n}=ke(),[i,l]=o.useState("general"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((v,_="info")=>{c(v),p(_),setTimeout(()=>c(null),3e3)},[]),x=async v=>{var N;const _=(N=v.target.files)==null?void 0:N[0];if(_){if(_.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!_.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s({image:_}),g("Logo updated","info")}catch(k){g((k==null?void 0:k.message)||"Failed to update logo","error")}finally{h(!1),f.current&&(f.current.value="")}}};if(a&&!e)return t.jsx(Pe,{children:t.jsx(Fi,{className:"w-items-center w-justify-center",children:t.jsx(je,{})})});if(!e)return null;const w=(b=e.organization)==null?void 0:b.name;return t.jsx(Pe,{children:t.jsx(c4,{children:t.jsx(Er.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(Fi,{className:"w-relative",children:[t.jsxs(p4,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit",onClick:()=>{var v;return(v=f.current)==null?void 0:v.click()},disabled:u,"data-busy":u?"":void 0,title:"Change logo","aria-label":"Change workspace logo",children:[e.image_url?t.jsx("img",{src:e.image_url,alt:e.name}):S4(e.name),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(je,{size:14}):t.jsx(sn,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",className:"w-none",hidden:!0,onChange:x}),t.jsxs(h4,{children:[t.jsx(f4,{children:e.name}),t.jsx(w4,{children:w?`${w} · Workspace settings`:"Workspace settings"})]})]}),t.jsx(d4,{children:t.jsxs(u4,{children:[t.jsx(Zs,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Hs,{children:[t.jsx(Ea,{size:14})," General"]})}),t.jsx(Zs,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Hs,{children:[t.jsx(cs,{size:14})," Members"]})}),t.jsx(Zs,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Hs,{children:[t.jsx(Sl,{size:14})," Invitations"]})}),((j=n==null?void 0:n.b2b_settings)==null?void 0:j.custom_workspace_role_enabled)&&t.jsx(Zs,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Hs,{children:[t.jsx(Xt,{size:14})," Roles"]})})]})}),t.jsxs(m4,{children:[i==="general"&&t.jsx(g4,{}),i==="members"&&t.jsx(v4,{}),i==="invitations"&&t.jsx(_4,{}),i==="roles"&&t.jsx(C4,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Fa,{size:14}):t.jsx(Be,{size:14})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},Or=({isOpen:e,onClose:a,title:s,showHeader:n,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{className:"w-dialog--panel",children:[n&&t.jsx(ze.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(Xc,{}),l&&t.jsx(ze.Footer,{children:l})]})})}),e0=["organization:admin"],t0=["organization:admin","organization:manage"],a0=["workspace:admin"],s0=["workspace:admin","workspace:manage"];function Zr(e,a){return e!=null&&e.roles?e.roles.some(s=>{var n;return(n=s.permissions)==null?void 0:n.some(i=>a.includes(i))}):!1}function Hr(e){return Zr(e,t0)}function E4(e){return Zr(e,e0)}function Fr(e,a){return e!=null&&e.roles?e.roles.some(s=>{var n;return(n=s.permissions)==null?void 0:n.some(i=>a.includes(i))}):!1}function Tr(e){return Fr(e,s0)}function A4(e){return Fr(e,a0)}const n0=({showPersonal:e=!0})=>{var Ae,ce,D;const[a,s]=o.useState(!1),[n,i]=o.useState(!1),[l,m]=o.useState(new Set),c=o.useRef(null),d=o.useRef(null),p=xt({triggerRef:c,isOpen:a,minWidth:300}),u=Kt(!1),h=Kt(!1),f=Kt(!1),g=Kt(!1),[x,w]=o.useState(null),[b,j]=o.useState(null),v=ts(),{organizationMemberships:_,loading:N,refetch:k}=wa(),{activeOrganization:C,activeMembership:y,leave:E}=fa(),{activeWorkspace:M,activeMembership:F,leave:A}=zt(),{workspaces:I,loading:$}=ga(),{session:S,switchOrganization:Z,switchWorkspace:P}=rt(),{deployment:L}=ke(),H=L==null?void 0:L.b2b_settings.organizations_enabled,O=H&&(L==null?void 0:L.b2b_settings.workspaces_enabled),R=L==null?void 0:L.b2b_settings.allow_users_to_create_orgs,U=!y,W=o.useMemo(()=>{var q,V;return U?{name:"Personal account",image_url:(V=(q=S==null?void 0:S.active_signin)==null?void 0:q.user)==null?void 0:V.profile_picture_url,isPersonal:!0}:{name:O&&M?`${C==null?void 0:C.name} / ${M.name}`:(C==null?void 0:C.name)||"",image_url:C==null?void 0:C.image_url,isPersonal:!1}},[U,C,M,S,O]);if(o.useEffect(()=>{C&&O&&m(G=>{if(G.has(C.id))return G;const q=new Set(G);return q.add(C.id),q})},[C,O]),o.useEffect(()=>{if(!a)return;let G=null;const q=setTimeout(()=>{const V=de=>{var le,Je;const z=de.target;(le=c.current)!=null&&le.contains(z)||(Je=d.current)!=null&&Je.contains(z)||(s(!1),j(null))};document.addEventListener("mousedown",V),G=()=>document.removeEventListener("mousedown",V)},50);return()=>{clearTimeout(q),G==null||G()}},[a]),o.useEffect(()=>{if(!b)return;const G=setTimeout(()=>j(null),5e3);return()=>clearTimeout(G)},[b]),!H)return null;const Y=G=>G.split(" ").map(q=>q[0]).join("").toUpperCase().slice(0,2),B=G=>{i(!0),Z(G).finally(()=>i(!1))},Q=G=>{i(!0),P(G).finally(()=>i(!1))},ue=G=>{m(q=>{const V=new Set(q);return V.has(G)?V.delete(G):V.add(G),V})},we=()=>{h.open(),s(!1)},se=()=>{g.open(),s(!1)},te=async()=>{if(E){j(null);try{await E(),await k(),s(!1)}catch(G){j(G instanceof Error?G.message:"Failed to leave organization")}}},oe=async()=>{if(A){j(null);try{await A(),s(!1)}catch(G){j(G instanceof Error?G.message:"Failed to leave workspace")}}},Ee=!!((Ae=y==null?void 0:y.eligibility_restriction)!=null&&Ae.type)&&y.eligibility_restriction.type!=="none",K=!!C&&!Ee&&Hr(y),Ge=!!O&&!!M&&!Ee&&Tr(F);return!!!S||N||O&&$?t.jsx(Pe,{children:t.jsx("div",{className:"w-full w-relative",children:t.jsxs("div",{className:"w-combo",children:[t.jsx("span",{className:"w-skel",style:{width:20,height:20}}),t.jsx("span",{className:"w-skel w-grow",style:{height:12}})]})})}):t.jsx(Pe,{children:t.jsxs("div",{className:"w-full w-relative",children:[t.jsxs("button",{ref:c,className:"w-orgtrigger","data-open":a?"":void 0,onClick:()=>{s(!a),a||j(null)},disabled:n,children:[t.jsx("span",{className:`w-avatar w-avatar--sm${W.isPersonal,""}`,children:W.image_url?t.jsx("img",{src:W.image_url,alt:W.name}):W.isPersonal?t.jsx(hs,{size:11}):Y(W.name)}),t.jsx("span",{className:"w-grow w-truncate",children:W.name}),t.jsx(ju,{size:13})]}),typeof window<"u"&&en.createPortal(t.jsxs("div",{ref:d,className:"wacht-root w-menu w-flex-col",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 16px)",maxHeight:p!=null&&p.maxHeight?`${p.maxHeight}px`:420,padding:0,zIndex:99999,top:(p==null?void 0:p.top)!==void 0?`${p.top}px`:void 0,bottom:(p==null?void 0:p.bottom)!==void 0?`${p.bottom}px`:void 0,left:(p==null?void 0:p.left)!==void 0?`${p.left}px`:void 0,right:(p==null?void 0:p.right)!==void 0?`${p.right}px`:void 0,visibility:p&&a?"visible":"hidden",opacity:a&&p?1:0,transform:a?"translateY(0)":"translateY(-4px)",pointerEvents:a?"auto":"none",transition:`opacity 0.15s ease, transform 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,...v},children:[b&&t.jsxs("div",{className:"w-banner w-banner--error w-switch-banner",children:[t.jsx(Ma,{size:13}),t.jsx("span",{className:"w-banner-txt w-text-error",children:b})]}),t.jsx("div",{className:"w-grow w-switch-body",children:N||$?t.jsx(t.Fragment,{children:[1,2,3].map(G=>t.jsxs("div",{className:"w-flex w-items-center w-gap-3",style:{padding:"0 8px",height:34},children:[t.jsx("span",{className:"w-skel",style:{width:22,height:22}}),t.jsx("span",{className:"w-skel",style:{width:G===2?"60%":"80%",height:11}})]},G))}):t.jsxs(t.Fragment,{children:[e&&t.jsxs("button",{className:"w-menu-item",onClick:()=>{U||B()},disabled:n||U,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:(D=(ce=S==null?void 0:S.active_signin)==null?void 0:ce.user)!=null&&D.profile_picture_url?t.jsx("img",{src:S.active_signin.user.profile_picture_url,alt:"Personal"}):t.jsx(hs,{size:12})}),t.jsx("span",{className:"w-grow w-truncate",children:"Personal account"}),U&&t.jsx(Be,{size:13,className:"w-text-primary w-none"})]}),((_==null?void 0:_.length)??0)>0&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsx("div",{className:"w-menu-label",children:"Organizations"})]}),_==null?void 0:_.map(G=>{var Je,it;const q=G.organization,V=q.id===(C==null?void 0:C.id),de=l.has(q.id),z=O?(I==null?void 0:I.filter(ge=>ge.organization.id===q.id))||[]:[],le=!!((Je=G.eligibility_restriction)!=null&&Je.type)&&G.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs("button",{className:"w-menu-item",onClick:()=>{le||(O?ue(q.id):V||B(q.id))},disabled:n,style:le?{opacity:.55,cursor:"not-allowed"}:void 0,title:(it=G.eligibility_restriction)==null?void 0:it.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:q.image_url?t.jsx("img",{src:q.image_url,alt:q.name}):Y(q.name)}),t.jsx("span",{className:"w-grow w-truncate",children:q.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[le&&t.jsx(Ma,{size:12,className:"w-text-error"}),V&&K&&t.jsx("span",{className:"w-rowact",role:"button",title:"Organization settings","aria-label":"Organization settings",onClick:ge=>{ge.stopPropagation(),we()},children:t.jsx(Ea,{size:13})}),V&&!le&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave organization","aria-label":"Leave organization",onClick:ge=>{ge.stopPropagation(),te()},children:t.jsx(Aa,{size:13})}),V&&!O&&t.jsx(Be,{size:13,className:"w-text-primary"}),O&&t.jsx(Dt,{size:11,className:"w-text-muted",style:{transition:"transform 0.2s ease",transform:de?"rotate(0deg)":"rotate(-90deg)"}})]})]}),O&&de&&!le&&t.jsxs("div",{className:"w-switch-nest",children:[z.map(ge=>{var re,me;const ot=V&&(M==null?void 0:M.id)===ge.id,X=((re=ge.eligibility_restriction)==null?void 0:re.type)&&ge.eligibility_restriction.type!=="none";return t.jsxs("button",{className:"w-menu-item",onClick:()=>{!ot&&!X&&Q(ge.id)},disabled:n,style:X?{opacity:.55,cursor:"not-allowed"}:void 0,title:(me=ge.eligibility_restriction)==null?void 0:me.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:ge.image_url?t.jsx("img",{src:ge.image_url,alt:ge.name}):Y(ge.name).charAt(0)}),t.jsx("span",{className:"w-grow w-truncate",children:ge.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[X&&t.jsx(Ma,{size:12,className:"w-text-error"}),ot&&Ge&&t.jsx("span",{className:"w-rowact",role:"button",title:"Workspace settings","aria-label":"Workspace settings",onClick:Le=>{Le.stopPropagation(),se()},children:t.jsx(Ea,{size:13})}),ot&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave workspace","aria-label":"Leave workspace",onClick:Le=>{Le.stopPropagation(),oe()},children:t.jsx(Aa,{size:13})}),ot&&t.jsx(Be,{size:12,className:"w-text-primary"})]})]},ge.id)}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>{w(q.id),f.open()},disabled:n,children:[t.jsx(Nt,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New workspace"})]})]})]},q.id)}),R&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>u.open(),disabled:n,children:[t.jsx(Nt,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New organization"})]})]})]})})]}),document.body),H&&R&&t.jsx(Bc,{isOpen:u.isOpen,onClose:u.close,onCreated:k}),t.jsx(Qc,{isOpen:h.isOpen,onClose:h.close}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Or,{isOpen:g.isOpen,onClose:g.close}),t.jsx(Pr,{isOpen:f.isOpen,onClose:()=>{f.close(),w(null)},organizationId:x||void 0})]})]})})},r0=o.createContext(void 0),ta=()=>{const e=o.useContext(r0);if(!e)throw new Error("useScreenContext must be used within a ScreenProvider");return e},he=(...e)=>e.filter(Boolean).join(" "),i0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-contents",e),...a}));i0.displayName="TypographyProvider";const mr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card","w-flex-col","w-full","w-minh-full",e),...a}));mr.displayName="Container";const o0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-tabsbar",e),...a}));o0.displayName="TabsContainer";const l0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}));l0.displayName="TabsList";const ka=o.forwardRef(({$isActive:e,className:a,...s},n)=>t.jsx("button",{ref:n,className:he("w-tab",e&&"w-tab--active",a),...s}));ka.displayName="Tab";const Ca=o.forwardRef(({className:e,...a},s)=>t.jsx("span",{ref:s,className:he("w-inline","w-gap-1",e),...a}));Ca.displayName="TabIcon";const c0=o.forwardRef(({className:e,children:a,...s},n)=>t.jsx("div",{ref:n,className:he("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}));c0.displayName="TabContent";const M4=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:he("w-btn","w-btn--icon",e),...a}));M4.displayName="IconButton";const d0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-between","w-wrap","w-gap-3",e),...a}));d0.displayName="HeaderCTAContainer";const R4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-start","w-gap-6",e),...a}));R4.displayName="ProfileSectionLayout";const L4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-none",e),...a}));L4.displayName="ProfileImageContainer";const u0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));u0.displayName="SecurityItemRow";const m0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grow",e),...a}));m0.displayName="SecurityItemContent";const p0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-none",e),...a}));p0.displayName="SecurityItemActions";const Ir=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sechead",e),...a}));Ir.displayName="ResponsiveHeaderContainer";const hn=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-full",e),...a}));hn.displayName="DesktopTableContainer";const h0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-gap-3",e),...a}));h0.displayName="FormRow";const P4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));P4.displayName="ConnectionItemRow";const $4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-grow",e),...a}));$4.displayName="ConnectionLeft";const O4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-end","w-gap-1","w-none",e),...a}));O4.displayName="ConnectionRight";const Vr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-iconbox",e),...a}));Vr.displayName="IconWrapper";const Z4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-wrap","w-gap-2",e),...a}));Z4.displayName="ButtonActions";const f0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-page-head",e),...a}));f0.displayName="PageHeader";const H4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-avatar",e),...a}));H4.displayName="PageHeaderAvatar";const w0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));w0.displayName="PageHeaderInfo";const g0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec","w-truncate",e),...a}));g0.displayName="PageHeaderName";const x0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub","w-truncate",e),...a}));x0.displayName="PageHeaderSub";const F4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-none",e),...a}));F4.displayName="PageHeaderActions";const T4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-4",e),...a}));T4.displayName="PageContent";const I4=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card",e),...a}));I4.displayName="Card";const V4=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card","w-danger",e),...a}));V4.displayName="DangerCard";const z4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-head",e),...a}));z4.displayName="CardHeader";const D4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));D4.displayName="CardTitleBlock";const U4=o.forwardRef(({className:e,...a},s)=>t.jsx("h3",{ref:s,className:he("w-sec",e),...a}));U4.displayName="CardTitle";const W4=o.forwardRef(({className:e,...a},s)=>t.jsx("p",{ref:s,className:he("w-secsub",e),...a}));W4.displayName="CardSubtitle";const B4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));B4.displayName="CardActions";const G4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-hr",e),...a}));G4.displayName="CardDivider";const q4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-body",e),...a}));q4.displayName="CardBody";const K4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-foot",e),...a}));K4.displayName="CardFooter";const Y4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));Y4.displayName="RowList";const Q4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-rowitem",e),...a}));Q4.displayName="RowItem";const J4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));J4.displayName="RowInfo";const X4=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec",e),...a}));X4.displayName="RowTitle";const e6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub",e),...a}));e6.displayName="RowSub";const t6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));t6.displayName="RowActions";const a6={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},qa=({$variant:e="neutral",className:a,children:s,...n})=>t.jsxs("span",{className:he("w-pill",a6[e],a),...n,children:[t.jsx("span",{className:"w-dot"}),s]}),s6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));s6.displayName="Table";const n6=o.forwardRef(({$cols:e,className:a,style:s,...n},i)=>t.jsx("div",{ref:i,className:he("w-listhead","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...n}));n6.displayName="TableHead";const r6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:e,...a}));r6.displayName="Th";const i6=o.forwardRef(({$cols:e,className:a,style:s,...n},i)=>t.jsx("div",{ref:i,className:he("w-row","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...n}));i6.displayName="Tr";const o6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-truncate","w-text-secondary",e),...a}));o6.displayName="Td";const l6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grid-2",e),...a}));l6.displayName="FieldGrid";const c6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-field",e),...a}));c6.displayName="Field";const d6=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:he("w-label",e),...a}));d6.displayName="FieldLabel";const u6=()=>{var I,$;const{deployment:e}=ke(),{refetch:a}=rt(),{user:s,updateProfile:n,deleteAccount:i}=xa(),{toast:l}=ta(),[m,c]=o.useState(""),[d,p]=o.useState(""),[u,h]=o.useState(""),[f,g]=o.useState(!1),[x,w]=o.useState(!1),[b,j]=o.useState(!1),[v,_]=o.useState("");o.useEffect(()=>{s&&!f&&(c(s.first_name||""),p(s.last_name||""),h(s.username||""),g(!0))},[s,f]);const N=o.useCallback(async()=>{if(s)try{const S={};m!==s.first_name&&(S.first_name=m),d!==s.last_name&&(S.last_name=d),u!==s.username&&(S.username=u),Object.keys(S).length>0&&await n(S)}catch(S){l(S.message||"Failed to save profile changes","error")}},[s,n,m,d,u,l]),k=S=>{c(S.target.value)},C=S=>{p(S.target.value)},y=S=>{h(S.target.value)},E=()=>{N()},M=()=>{N()},F=()=>{N()};if(!s)return t.jsx("div",{className:"w-loading",children:t.jsx(je,{})});const A=async()=>{if(!(!s||v!=="delete this account")){j(!0);try{await i(""),l("Account deleted successfully","info"),await a()}catch(S){l(S.message||"Failed to delete account","error")}finally{j(!1),_(""),w(!1)}}};return t.jsxs("div",{className:"w-flex-col w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx("p",{className:"w-secsub",children:"Basic information about your profile"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs(h0,{children:[t.jsxs(Ue,{className:"w-grow",children:[t.jsx(Te,{htmlFor:"firstName",children:"First Name"}),t.jsx(be,{id:"firstName",type:"text",value:m,onChange:k,onBlur:E,placeholder:"Enter your first name",required:!0})]}),t.jsxs(Ue,{className:"w-grow",children:[t.jsx(Te,{htmlFor:"lastName",children:"Last Name"}),t.jsx(be,{id:"lastName",type:"text",value:d,onChange:C,onBlur:M,placeholder:"Enter your last name",required:!0})]})]}),(($=(I=e==null?void 0:e.auth_settings)==null?void 0:I.username)==null?void 0:$.enabled)&&t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"username",children:"Username"}),t.jsx(be,{id:"username",type:"text",value:u,onChange:y,onBlur:F,placeholder:"Enter your username",required:!0})]})]})]}),t.jsx("div",{className:"w-hr"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-sec",children:"Danger Zone"}),t.jsx("p",{className:"w-secsub",children:"Irreversible and destructive actions"})]}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-full",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete Account"}),t.jsx("div",{className:"w-secsub",children:"Once you delete your account, there is no going back. Please be certain."})]}),t.jsx(ne,{$destructive:!0,$size:"sm",onClick:()=>{x?(w(!1),_("")):w(!0)},children:x?"Cancel":"Delete"})]}),x&&t.jsxs("div",{className:"w-full w-flex-col w-gap-3",children:[t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"confirm_username",children:'Type "delete this account" to confirm'}),t.jsx(be,{id:"confirm_username",type:"text",value:v,onChange:S=>_(S.target.value),placeholder:"delete this account"})]}),t.jsx(ne,{$destructive:!0,$fullWidth:!0,onClick:A,disabled:v!=="delete this account"||b,children:b?t.jsx(je,{size:12}):"Delete Forever"})]})]})]})]})},Ui=({onClose:e,onAddEmail:a,onAttemptVerification:s,onPrepareVerification:n,existingEmail:i,triggerRef:l})=>{const m=o.useRef(null),[c,d]=o.useState(!1),{toast:p}=ta(),u=xt({contentRef:m,triggerRef:l??{current:null},isOpen:c,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{d(!0);const k=y=>{m.current&&!m.current.contains(y.target)&&e()},C=y=>{y.key==="Escape"&&e()};return document.addEventListener("mousedown",k),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",C)}},[e]);const[h,f]=o.useState(i?"otp":"email"),[g,x]=o.useState(i||""),[w,b]=o.useState(""),[j,v]=o.useState(!1),_=async()=>{if(!(!g||j)){v(!0);try{await a(g),f("otp")}catch(k){p(k.message||"Failed to add email. Please try again.","error")}finally{v(!1)}}},N=async()=>{v(!0);try{await s(w),e()}catch(k){p(k.message||"Failed to verify email. Check the code and try again.","error")}finally{v(!1)}};return c?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:k=>k.stopPropagation(),children:h==="email"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add email address"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx(be,{id:"email-input",type:"email",placeholder:"you@company.com",value:g,onChange:k=>x(k.target.value),onKeyDown:k=>{k.key==="Enter"&&_()},autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:_,disabled:!g||j,children:j?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!i&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>f("email"),children:[t.jsx(nn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify your email"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:g})]})]}),t.jsx(va,{onComplete:async k=>b(k),onResend:n,isSubmitting:j})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:w.length<6||j,children:j?"Verifying…":"Verify"})]})]})}):null},m6=()=>{var M,F,A,I;const{deployment:e}=ke(),{toast:a}=ta(),[s,n]=o.useState(""),[i,l]=o.useState(!1),[m,c]=o.useState(null),[d,p]=o.useState(new Set),u=o.useRef(null),h=o.useRef({}),{user:f,createEmailAddress:g,deleteEmailAddress:x,prepareEmailVerification:w,attemptEmailVerification:b,makeEmailPrimary:j}=xa();if(!((F=(M=e==null?void 0:e.auth_settings)==null?void 0:M.email_address)!=null&&F.enabled))return null;const v=($,S)=>{p(Z=>{const P=new Set(Z);return S?P.add($):P.delete($),P})},_=async $=>{v($,!0);try{await j($),await f.refetch(),a("Primary email updated","info")}catch(S){a(S.message||"Failed to update primary email","error")}finally{v($,!1)}},N=async $=>{if($===(f==null?void 0:f.primary_email_address_id)){a("Cannot delete primary email. Set another email as primary first.","error");return}v($,!0);try{await x($),await f.refetch(),a("Email removed","info")}catch(S){a(S.message||"Failed to delete email address. Please try again.","error")}finally{v($,!1)}},k=async $=>{v($,!0);try{await w($),await f.refetch(),c($)}catch(S){a(S.message||"Failed to send verification","error")}finally{v($,!1)}},C=(f==null?void 0:f.user_email_addresses)||[],y=$=>$.id===(f==null?void 0:f.primary_email_address_id)?t.jsx(qa,{$variant:"success",children:"Primary"}):$.verified?t.jsx(qa,{$variant:"neutral",children:"Backup"}):t.jsx(qa,{$variant:"warning",children:"Pending verification"}),E=$=>{const S=$.id===(f==null?void 0:f.primary_email_address_id),Z=d.has($.id);return S?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[$.verified&&t.jsx(ne,{$size:"sm",$outline:!0,disabled:Z,onClick:()=>_($.id),children:"Make primary"}),!$.verified&&t.jsx(ne,{ref:P=>{P&&(h.current[$.id]=P)},$size:"sm",$outline:!0,disabled:Z,onClick:()=>k($.id),children:"Resend"}),t.jsx(ne,{$size:"sm",$destructive:!0,disabled:Z,onClick:()=>N($.id),children:Z?t.jsx(je,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(Ir,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Email addresses"}),t.jsx("div",{className:"w-secsub",children:"Sign in and receive notifications at these addresses."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(ne,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add email"}),i&&t.jsx(Ui,{triggerRef:u,onClose:()=>l(!1),onAddEmail:async $=>{const S=await g($);n(S.data.id),await w(S.data.id),f.refetch()},onPrepareVerification:async()=>{await w(s),f.refetch()},onAttemptVerification:async $=>{await b(s,$),f.refetch(),l(!1),n(""),a("Email added and verified","info")}})]})]}),C.length?t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Email address"}),t.jsx(He,{children:"Status"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:C.map($=>t.jsxs(nt,{children:[t.jsx(Ke,{children:$.email}),t.jsx(Ke,{children:y($)}),t.jsx(Ht,{children:E($)})]},$.id))})]})})}):t.jsx(Ct,{title:"No email addresses",description:"Add an email address to get started."}),m&&t.jsx(Ui,{existingEmail:(I=(A=f==null?void 0:f.user_email_addresses)==null?void 0:A.find($=>$.id===m))==null?void 0:I.email,triggerRef:{current:h.current[m]},onClose:()=>c(null),onAddEmail:async()=>{},onPrepareVerification:async()=>{await w(m),f.refetch()},onAttemptVerification:async $=>{await b(m,$),f.refetch(),c(null),a("Email verified","info")}})]})},Wi=({onClose:e,onAddPhone:a,onAttemptVerification:s,existingPhone:n,onPrepareVerification:i,triggerRef:l})=>{var y;const m=o.useRef(null),[c,d]=o.useState(!1),{toast:p}=ta(),u=xt({contentRef:m,triggerRef:l??{current:null},isOpen:c,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{d(!0);const E=F=>{m.current&&!m.current.contains(F.target)&&e()},M=F=>{F.key==="Escape"&&e()};return document.addEventListener("mousedown",E),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",M)}},[e]);const[h,f]=o.useState(n?"otp":"phone"),[g,x]=o.useState((n==null?void 0:n.replace(/^\+\d+/,""))||""),[w,b]=o.useState((y=Intl.DateTimeFormat().resolvedOptions().locale.split("-"))==null?void 0:y.pop()),[j,v]=o.useState(""),[_,N]=o.useState(!1),k=async()=>{if(!(!g||_)){N(!0);try{await a(g,w||""),f("otp")}catch(E){p(E.message||"Failed to add phone number. Please try again.","error")}finally{N(!1)}}},C=async()=>{N(!0);try{await s(j),e()}catch(E){p(E.message||"Failed to verify phone. Check the code and try again.","error")}finally{N(!1)}};return c?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:E=>E.stopPropagation(),children:h==="phone"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add phone number"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(ys,{value:g,onChange:E=>x(E.target.value),error:"",countryCode:w,setCountryCode:b})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:!g||_,children:_?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!n&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>f("phone"),children:[t.jsx(nn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify phone number"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:n||g})]})]}),t.jsx(va,{onComplete:E=>v(E),onResend:async()=>i(),isSubmitting:_})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:C,disabled:j.length!==6||_,children:_?"Verifying…":"Verify"})]})]})}):null},p6=()=>{var F,A,I,$;const{deployment:e}=ke(),{toast:a}=ta(),[s,n]=o.useState(""),[i,l]=o.useState(!1),[m,c]=o.useState(null),[d,p]=o.useState(new Set),u=o.useRef(null),h=o.useRef({}),{user:f,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:j}=xa();if(!((A=(F=e==null?void 0:e.auth_settings)==null?void 0:F.phone_number)!=null&&A.enabled))return null;const v=(S,Z)=>{p(P=>{const L=new Set(P);return Z?L.add(S):L.delete(S),L})},_=S=>{const Z=Gs.find(P=>P.dialCode===S);return(Z==null?void 0:Z.flag)||"🌍"},N=async S=>{v(S,!0);try{await j(S),await f.refetch(),a("Primary phone updated","info")}catch(Z){a(Z.message||"Failed to update primary phone","error")}finally{v(S,!1)}},k=async S=>{if(S===(f==null?void 0:f.primary_phone_number_id)){a("Cannot delete primary phone. Set another phone as primary first.","error");return}v(S,!0);try{await x(S),await f.refetch(),a("Phone removed","info")}catch(Z){a(Z.message||"Failed to delete phone. Please try again.","error")}finally{v(S,!1)}},C=async S=>{v(S,!0);try{await w(S),await f.refetch(),c(S)}catch(Z){a(Z.message||"Failed to send verification","error")}finally{v(S,!1)}},y=(f==null?void 0:f.user_phone_numbers)||[],E=S=>S.id===(f==null?void 0:f.primary_phone_number_id)?t.jsx(qa,{$variant:"success",children:"Primary"}):S.verified?t.jsx(qa,{$variant:"neutral",children:"Backup"}):t.jsx(qa,{$variant:"warning",children:"Pending verification"}),M=S=>{const Z=S.id===(f==null?void 0:f.primary_phone_number_id),P=d.has(S.id);return Z?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[S.verified&&t.jsx(ne,{$size:"sm",$outline:!0,disabled:P,onClick:()=>N(S.id),children:"Make primary"}),!S.verified&&t.jsx(ne,{ref:L=>{L&&(h.current[S.id]=L)},$size:"sm",$outline:!0,disabled:P,onClick:()=>C(S.id),children:"Resend"}),t.jsx(ne,{$size:"sm",$destructive:!0,disabled:P,onClick:()=>k(S.id),children:P?t.jsx(je,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(Ir,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Phone numbers"}),t.jsx("div",{className:"w-secsub",children:"Used for sign-in and two-factor authentication."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(ne,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add phone"}),i&&t.jsx(Wi,{triggerRef:u,onClose:()=>l(!1),onAddPhone:async(S,Z)=>{const P=await g(S,Z);n(P.data.id),await w(P.data.id)},onPrepareVerification:async()=>{await w(s),f.refetch()},onAttemptVerification:async S=>{await b(s,S),f.refetch(),l(!1),n(""),a("Phone added and verified","info")}}),m&&t.jsx(Wi,{existingPhone:($=(I=f==null?void 0:f.user_phone_numbers)==null?void 0:I.find(S=>S.id===m))==null?void 0:$.phone_number,triggerRef:{current:h.current[m]},onClose:()=>c(null),onAddPhone:async()=>{},onPrepareVerification:async()=>{await w(m),f.refetch()},onAttemptVerification:async S=>{await b(m,S),f.refetch(),c(null),a("Phone verified","info")}})]})]}),y.length?t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Phone number"}),t.jsx(He,{children:"Status"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:y.map(S=>t.jsxs(nt,{children:[t.jsx(Ke,{children:t.jsxs("span",{className:"w-inline w-gap-2",children:[t.jsx("span",{children:_(S.country_code)}),t.jsx("span",{className:"w-text-secondary",children:S.country_code}),t.jsx("span",{children:S.phone_number})]})}),t.jsx(Ke,{children:E(S)}),t.jsx(Ht,{children:M(S)})]},S.id))})]})})}):t.jsx(Ct,{title:"No phone numbers",description:"Add a phone number to get started."})]})},h6=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#F35325",d:"M1 1h6.5v6.5H1V1z"}),t.jsx("path",{fill:"#81BC06",d:"M8.5 1H15v6.5H8.5V1z"}),t.jsx("path",{fill:"#05A6F0",d:"M1 8.5h6.5V15H1V8.5z"}),t.jsx("path",{fill:"#FFBA08",d:"M8.5 8.5H15V15H8.5V8.5z"})]}),f6={google_oauth:{icon:t.jsx(yc,{}),label:"Google"},microsoft_oauth:{icon:t.jsx(h6,{}),label:"Microsoft"},github_oauth:{icon:t.jsx(bc,{}),label:"GitHub"},gitlab_oauth:{icon:t.jsx(kc,{}),label:"GitLab"},linkedin_oauth:{icon:t.jsx(_c,{}),label:"LinkedIn"},discord_oauth:{icon:t.jsx(Cc,{}),label:"Discord"},x_oauth:{icon:t.jsx(jc,{}),label:"X"}},w6=()=>{const{user:e,disconnectSocialConnection:a,connectSocialAccount:s}=xa(),{deployment:n}=ke(),i=(n==null?void 0:n.social_connections.filter(c=>c.enabled))||[],l=c=>{s({provider:c,redirectUri:window.location.href})},m=async c=>{await a(c.toString()),e.refetch()};return i.length===0?t.jsx(Ct,{title:"No providers available",description:"Social sign-in providers have not been configured for this app."}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-gap-3",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Connected accounts"}),t.jsx("div",{className:"w-secsub",children:"Sign in faster by linking third-party accounts."})]})}),t.jsx("div",{className:"w-list",children:i.map(c=>{var h;const d=f6[c.provider];if(!d)return null;const p=((h=e==null?void 0:e.social_connections)==null?void 0:h.filter(f=>f.provider===c.provider))||[],u=p.length>0;return t.jsxs("div",{className:"w-vrow",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx(Vr,{children:d.icon}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-grow",children:[t.jsx("div",{className:"w-sec",children:d.label}),u?t.jsx("div",{className:"w-flex w-wrap w-gap-1",children:p.map(f=>t.jsxs("span",{className:"w-chip",children:[t.jsx("span",{className:"w-truncate",children:f.email_address}),t.jsx("span",{className:"w-chip-x",role:"button",onClick:()=>m(f.id),title:"Remove connection","aria-label":"Remove connection",children:t.jsx(La,{size:10,weight:"bold"})})]},f.id))}):t.jsx("span",{className:"w-secsub",children:"Not linked"})]})]}),t.jsx("div",{className:`w-flex w-justify-end w-none${u?" w-row-act-top":""}`,children:t.jsx(ne,{$size:"sm",$outline:!0,onClick:()=>l(c.provider),children:u?"Link another":"Link"})})]},c.provider)})})]})};var g6=Object.defineProperty,Xs=Object.getOwnPropertySymbols,v0=Object.prototype.hasOwnProperty,b0=Object.prototype.propertyIsEnumerable,Bi=(e,a,s)=>a in e?g6(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,pr=(e,a)=>{for(var s in a||(a={}))v0.call(a,s)&&Bi(e,s,a[s]);if(Xs)for(var s of Xs(a))b0.call(a,s)&&Bi(e,s,a[s]);return e},hr=(e,a)=>{var s={};for(var n in e)v0.call(e,n)&&a.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&Xs)for(var n of Xs(e))a.indexOf(n)<0&&b0.call(e,n)&&(s[n]=e[n]);return s};/**
|
|
109
109
|
* @license QR Code generator library (TypeScript)
|
|
110
110
|
* Copyright (c) Project Nayuki.
|
|
111
111
|
* SPDX-License-Identifier: MIT
|
|
112
|
-
*/var Za;(e=>{const a=class Pe{constructor(d,p,u,h){if(this.version=d,this.errorCorrectionLevel=p,this.modules=[],this.isFunction=[],d<Pe.MIN_VERSION||d>Pe.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=d*4+17;let f=[];for(let x=0;x<this.size;x++)f.push(!1);for(let x=0;x<this.size;x++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();const g=this.addEccAndInterleave(u);if(this.drawCodewords(g),h==-1){let x=1e9;for(let w=0;w<8;w++){this.applyMask(w),this.drawFormatBits(w);const b=this.getPenaltyScore();b<x&&(h=w,x=b),this.applyMask(w)}}i(0<=h&&h<=7),this.mask=h,this.applyMask(h),this.drawFormatBits(h),this.isFunction=[]}static encodeText(d,p){const u=e.QrSegment.makeSegments(d);return Pe.encodeSegments(u,p)}static encodeBinary(d,p){const u=e.QrSegment.makeBytes(d);return Pe.encodeSegments([u],p)}static encodeSegments(d,p,u=1,h=40,f=-1,g=!0){if(!(Pe.MIN_VERSION<=u&&u<=h&&h<=Pe.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let x,w;for(x=u;;x++){const k=Pe.getNumDataCodewords(x,p)*8,N=m.getTotalBits(d,x);if(N<=k){w=N;break}if(x>=h)throw new RangeError("Data too long")}for(const k of[Pe.Ecc.MEDIUM,Pe.Ecc.QUARTILE,Pe.Ecc.HIGH])g&&w<=Pe.getNumDataCodewords(x,k)*8&&(p=k);let b=[];for(const k of d){s(k.mode.modeBits,4,b),s(k.numChars,k.mode.numCharCountBits(x),b);for(const N of k.getData())b.push(N)}i(b.length==w);const _=Pe.getNumDataCodewords(x,p)*8;i(b.length<=_),s(0,Math.min(4,_-b.length),b),s(0,(8-b.length%8)%8,b),i(b.length%8==0);for(let k=236;b.length<_;k^=253)s(k,8,b);let v=[];for(;v.length*8<b.length;)v.push(0);return b.forEach((k,N)=>v[N>>>3]|=k<<7-(N&7)),new Pe(x,p,v,f)}getModule(d,p){return 0<=d&&d<this.size&&0<=p&&p<this.size&&this.modules[p][d]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const d=this.getAlignmentPatternPositions(),p=d.length;for(let u=0;u<p;u++)for(let h=0;h<p;h++)u==0&&h==0||u==0&&h==p-1||u==p-1&&h==0||this.drawAlignmentPattern(d[u],d[h]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(d){const p=this.errorCorrectionLevel.formatBits<<3|d;let u=p;for(let f=0;f<10;f++)u=u<<1^(u>>>9)*1335;const h=(p<<10|u)^21522;i(h>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,n(h,f));this.setFunctionModule(8,7,n(h,6)),this.setFunctionModule(8,8,n(h,7)),this.setFunctionModule(7,8,n(h,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,n(h,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,n(h,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,n(h,f));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let d=this.version;for(let u=0;u<12;u++)d=d<<1^(d>>>11)*7973;const p=this.version<<12|d;i(p>>>18==0);for(let u=0;u<18;u++){const h=n(p,u),f=this.size-11+u%3,g=Math.floor(u/3);this.setFunctionModule(f,g,h),this.setFunctionModule(g,f,h)}}drawFinderPattern(d,p){for(let u=-4;u<=4;u++)for(let h=-4;h<=4;h++){const f=Math.max(Math.abs(h),Math.abs(u)),g=d+h,x=p+u;0<=g&&g<this.size&&0<=x&&x<this.size&&this.setFunctionModule(g,x,f!=2&&f!=4)}}drawAlignmentPattern(d,p){for(let u=-2;u<=2;u++)for(let h=-2;h<=2;h++)this.setFunctionModule(d+h,p+u,Math.max(Math.abs(h),Math.abs(u))!=1)}setFunctionModule(d,p,u){this.modules[p][d]=u,this.isFunction[p][d]=!0}addEccAndInterleave(d){const p=this.version,u=this.errorCorrectionLevel;if(d.length!=Pe.getNumDataCodewords(p,u))throw new RangeError("Invalid argument");const h=Pe.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][p],f=Pe.ECC_CODEWORDS_PER_BLOCK[u.ordinal][p],g=Math.floor(Pe.getNumRawDataModules(p)/8),x=h-g%h,w=Math.floor(g/h);let b=[];const _=Pe.reedSolomonComputeDivisor(f);for(let k=0,N=0;k<h;k++){let j=d.slice(N,N+w-f+(k<x?0:1));N+=j.length;const C=Pe.reedSolomonComputeRemainder(j,_);k<x&&j.push(0),b.push(j.concat(C))}let v=[];for(let k=0;k<b[0].length;k++)b.forEach((N,j)=>{(k!=w-f||j>=x)&&v.push(N[k])});return i(v.length==g),v}drawCodewords(d){if(d.length!=Math.floor(Pe.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let p=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let h=0;h<this.size;h++)for(let f=0;f<2;f++){const g=u-f,w=(u+1&2)==0?this.size-1-h:h;!this.isFunction[w][g]&&p<d.length*8&&(this.modules[w][g]=n(d[p>>>3],7-(p&7)),p++)}}i(p==d.length*8)}applyMask(d){if(d<0||d>7)throw new RangeError("Mask value out of range");for(let p=0;p<this.size;p++)for(let u=0;u<this.size;u++){let h;switch(d){case 0:h=(u+p)%2==0;break;case 1:h=p%2==0;break;case 2:h=u%3==0;break;case 3:h=(u+p)%3==0;break;case 4:h=(Math.floor(u/3)+Math.floor(p/2))%2==0;break;case 5:h=u*p%2+u*p%3==0;break;case 6:h=(u*p%2+u*p%3)%2==0;break;case 7:h=((u+p)%2+u*p%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[p][u]&&h&&(this.modules[p][u]=!this.modules[p][u])}}getPenaltyScore(){let d=0;for(let f=0;f<this.size;f++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[f][b]==g?(x++,x==5?d+=Pe.PENALTY_N1:x>5&&d++):(this.finderPenaltyAddHistory(x,w),g||(d+=this.finderPenaltyCountPatterns(w)*Pe.PENALTY_N3),g=this.modules[f][b],x=1);d+=this.finderPenaltyTerminateAndCount(g,x,w)*Pe.PENALTY_N3}for(let f=0;f<this.size;f++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[b][f]==g?(x++,x==5?d+=Pe.PENALTY_N1:x>5&&d++):(this.finderPenaltyAddHistory(x,w),g||(d+=this.finderPenaltyCountPatterns(w)*Pe.PENALTY_N3),g=this.modules[b][f],x=1);d+=this.finderPenaltyTerminateAndCount(g,x,w)*Pe.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let g=0;g<this.size-1;g++){const x=this.modules[f][g];x==this.modules[f][g+1]&&x==this.modules[f+1][g]&&x==this.modules[f+1][g+1]&&(d+=Pe.PENALTY_N2)}let p=0;for(const f of this.modules)p=f.reduce((g,x)=>g+(x?1:0),p);const u=this.size*this.size,h=Math.ceil(Math.abs(p*20-u*10)/u)-1;return i(0<=h&&h<=9),d+=h*Pe.PENALTY_N4,i(0<=d&&d<=2568888),d}getAlignmentPatternPositions(){if(this.version==1)return[];{const d=Math.floor(this.version/7)+2,p=this.version==32?26:Math.ceil((this.version*4+4)/(d*2-2))*2;let u=[6];for(let h=this.size-7;u.length<d;h-=p)u.splice(1,0,h);return u}}static getNumRawDataModules(d){if(d<Pe.MIN_VERSION||d>Pe.MAX_VERSION)throw new RangeError("Version number out of range");let p=(16*d+128)*d+64;if(d>=2){const u=Math.floor(d/7)+2;p-=(25*u-10)*u-55,d>=7&&(p-=36)}return i(208<=p&&p<=29648),p}static getNumDataCodewords(d,p){return Math.floor(Pe.getNumRawDataModules(d)/8)-Pe.ECC_CODEWORDS_PER_BLOCK[p.ordinal][d]*Pe.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][d]}static reedSolomonComputeDivisor(d){if(d<1||d>255)throw new RangeError("Degree out of range");let p=[];for(let h=0;h<d-1;h++)p.push(0);p.push(1);let u=1;for(let h=0;h<d;h++){for(let f=0;f<p.length;f++)p[f]=Pe.reedSolomonMultiply(p[f],u),f+1<p.length&&(p[f]^=p[f+1]);u=Pe.reedSolomonMultiply(u,2)}return p}static reedSolomonComputeRemainder(d,p){let u=p.map(h=>0);for(const h of d){const f=h^u.shift();u.push(0),p.forEach((g,x)=>u[x]^=Pe.reedSolomonMultiply(g,f))}return u}static reedSolomonMultiply(d,p){if(d>>>8||p>>>8)throw new RangeError("Byte out of range");let u=0;for(let h=7;h>=0;h--)u=u<<1^(u>>>7)*285,u^=(p>>>h&1)*d;return i(u>>>8==0),u}finderPenaltyCountPatterns(d){const p=d[1];i(p<=this.size*3);const u=p>0&&d[2]==p&&d[3]==p*3&&d[4]==p&&d[5]==p;return(u&&d[0]>=p*4&&d[6]>=p?1:0)+(u&&d[6]>=p*4&&d[0]>=p?1:0)}finderPenaltyTerminateAndCount(d,p,u){return d&&(this.finderPenaltyAddHistory(p,u),p=0),p+=this.size,this.finderPenaltyAddHistory(p,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(d,p){p[0]==0&&(d+=this.size),p.pop(),p.unshift(d)}};a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=a;function s(c,d,p){if(d<0||d>31||c>>>d)throw new RangeError("Value out of range");for(let u=d-1;u>=0;u--)p.push(c>>>u&1)}function n(c,d){return(c>>>d&1)!=0}function i(c){if(!c)throw new Error("Assertion error")}const l=class at{constructor(d,p,u){if(this.mode=d,this.numChars=p,this.bitData=u,p<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(d){let p=[];for(const u of d)s(u,8,p);return new at(at.Mode.BYTE,d.length,p)}static makeNumeric(d){if(!at.isNumeric(d))throw new RangeError("String contains non-numeric characters");let p=[];for(let u=0;u<d.length;){const h=Math.min(d.length-u,3);s(parseInt(d.substring(u,u+h),10),h*3+1,p),u+=h}return new at(at.Mode.NUMERIC,d.length,p)}static makeAlphanumeric(d){if(!at.isAlphanumeric(d))throw new RangeError("String contains unencodable characters in alphanumeric mode");let p=[],u;for(u=0;u+2<=d.length;u+=2){let h=at.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u))*45;h+=at.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u+1)),s(h,11,p)}return u<d.length&&s(at.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u)),6,p),new at(at.Mode.ALPHANUMERIC,d.length,p)}static makeSegments(d){return d==""?[]:at.isNumeric(d)?[at.makeNumeric(d)]:at.isAlphanumeric(d)?[at.makeAlphanumeric(d)]:[at.makeBytes(at.toUtf8ByteArray(d))]}static makeEci(d){let p=[];if(d<0)throw new RangeError("ECI assignment value out of range");if(d<128)s(d,8,p);else if(d<16384)s(2,2,p),s(d,14,p);else if(d<1e6)s(6,3,p),s(d,21,p);else throw new RangeError("ECI assignment value out of range");return new at(at.Mode.ECI,0,p)}static isNumeric(d){return at.NUMERIC_REGEX.test(d)}static isAlphanumeric(d){return at.ALPHANUMERIC_REGEX.test(d)}getData(){return this.bitData.slice()}static getTotalBits(d,p){let u=0;for(const h of d){const f=h.mode.numCharCountBits(p);if(h.numChars>=1<<f)return 1/0;u+=4+f+h.bitData.length}return u}static toUtf8ByteArray(d){d=encodeURI(d);let p=[];for(let u=0;u<d.length;u++)d.charAt(u)!="%"?p.push(d.charCodeAt(u)):(p.push(parseInt(d.substring(u+1,u+3),16)),u+=2);return p}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let m=l;e.QrSegment=l})(Za||(Za={}));(e=>{(a=>{const s=class{constructor(i,l){this.ordinal=i,this.formatBits=l}};s.LOW=new s(0,1),s.MEDIUM=new s(1,0),s.QUARTILE=new s(2,3),s.HIGH=new s(3,2),a.Ecc=s})(e.QrCode||(e.QrCode={}))})(Za||(Za={}));(e=>{(a=>{const s=class{constructor(i,l){this.modeBits=i,this.numBitsCharCount=l}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};s.NUMERIC=new s(1,[10,12,14]),s.ALPHANUMERIC=new s(2,[9,11,13]),s.BYTE=new s(4,[8,16,16]),s.KANJI=new s(8,[8,10,12]),s.ECI=new s(7,[0,0,0]),a.Mode=s})(e.QrSegment||(e.QrSegment={}))})(Za||(Za={}));var Ua=Za;/**
|
|
112
|
+
*/var Ha;(e=>{const a=class Ze{constructor(d,p,u,h){if(this.version=d,this.errorCorrectionLevel=p,this.modules=[],this.isFunction=[],d<Ze.MIN_VERSION||d>Ze.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=d*4+17;let f=[];for(let x=0;x<this.size;x++)f.push(!1);for(let x=0;x<this.size;x++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();const g=this.addEccAndInterleave(u);if(this.drawCodewords(g),h==-1){let x=1e9;for(let w=0;w<8;w++){this.applyMask(w),this.drawFormatBits(w);const b=this.getPenaltyScore();b<x&&(h=w,x=b),this.applyMask(w)}}i(0<=h&&h<=7),this.mask=h,this.applyMask(h),this.drawFormatBits(h),this.isFunction=[]}static encodeText(d,p){const u=e.QrSegment.makeSegments(d);return Ze.encodeSegments(u,p)}static encodeBinary(d,p){const u=e.QrSegment.makeBytes(d);return Ze.encodeSegments([u],p)}static encodeSegments(d,p,u=1,h=40,f=-1,g=!0){if(!(Ze.MIN_VERSION<=u&&u<=h&&h<=Ze.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let x,w;for(x=u;;x++){const _=Ze.getNumDataCodewords(x,p)*8,N=m.getTotalBits(d,x);if(N<=_){w=N;break}if(x>=h)throw new RangeError("Data too long")}for(const _ of[Ze.Ecc.MEDIUM,Ze.Ecc.QUARTILE,Ze.Ecc.HIGH])g&&w<=Ze.getNumDataCodewords(x,_)*8&&(p=_);let b=[];for(const _ of d){s(_.mode.modeBits,4,b),s(_.numChars,_.mode.numCharCountBits(x),b);for(const N of _.getData())b.push(N)}i(b.length==w);const j=Ze.getNumDataCodewords(x,p)*8;i(b.length<=j),s(0,Math.min(4,j-b.length),b),s(0,(8-b.length%8)%8,b),i(b.length%8==0);for(let _=236;b.length<j;_^=253)s(_,8,b);let v=[];for(;v.length*8<b.length;)v.push(0);return b.forEach((_,N)=>v[N>>>3]|=_<<7-(N&7)),new Ze(x,p,v,f)}getModule(d,p){return 0<=d&&d<this.size&&0<=p&&p<this.size&&this.modules[p][d]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const d=this.getAlignmentPatternPositions(),p=d.length;for(let u=0;u<p;u++)for(let h=0;h<p;h++)u==0&&h==0||u==0&&h==p-1||u==p-1&&h==0||this.drawAlignmentPattern(d[u],d[h]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(d){const p=this.errorCorrectionLevel.formatBits<<3|d;let u=p;for(let f=0;f<10;f++)u=u<<1^(u>>>9)*1335;const h=(p<<10|u)^21522;i(h>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,n(h,f));this.setFunctionModule(8,7,n(h,6)),this.setFunctionModule(8,8,n(h,7)),this.setFunctionModule(7,8,n(h,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,n(h,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,n(h,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,n(h,f));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let d=this.version;for(let u=0;u<12;u++)d=d<<1^(d>>>11)*7973;const p=this.version<<12|d;i(p>>>18==0);for(let u=0;u<18;u++){const h=n(p,u),f=this.size-11+u%3,g=Math.floor(u/3);this.setFunctionModule(f,g,h),this.setFunctionModule(g,f,h)}}drawFinderPattern(d,p){for(let u=-4;u<=4;u++)for(let h=-4;h<=4;h++){const f=Math.max(Math.abs(h),Math.abs(u)),g=d+h,x=p+u;0<=g&&g<this.size&&0<=x&&x<this.size&&this.setFunctionModule(g,x,f!=2&&f!=4)}}drawAlignmentPattern(d,p){for(let u=-2;u<=2;u++)for(let h=-2;h<=2;h++)this.setFunctionModule(d+h,p+u,Math.max(Math.abs(h),Math.abs(u))!=1)}setFunctionModule(d,p,u){this.modules[p][d]=u,this.isFunction[p][d]=!0}addEccAndInterleave(d){const p=this.version,u=this.errorCorrectionLevel;if(d.length!=Ze.getNumDataCodewords(p,u))throw new RangeError("Invalid argument");const h=Ze.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][p],f=Ze.ECC_CODEWORDS_PER_BLOCK[u.ordinal][p],g=Math.floor(Ze.getNumRawDataModules(p)/8),x=h-g%h,w=Math.floor(g/h);let b=[];const j=Ze.reedSolomonComputeDivisor(f);for(let _=0,N=0;_<h;_++){let k=d.slice(N,N+w-f+(_<x?0:1));N+=k.length;const C=Ze.reedSolomonComputeRemainder(k,j);_<x&&k.push(0),b.push(k.concat(C))}let v=[];for(let _=0;_<b[0].length;_++)b.forEach((N,k)=>{(_!=w-f||k>=x)&&v.push(N[_])});return i(v.length==g),v}drawCodewords(d){if(d.length!=Math.floor(Ze.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let p=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let h=0;h<this.size;h++)for(let f=0;f<2;f++){const g=u-f,w=(u+1&2)==0?this.size-1-h:h;!this.isFunction[w][g]&&p<d.length*8&&(this.modules[w][g]=n(d[p>>>3],7-(p&7)),p++)}}i(p==d.length*8)}applyMask(d){if(d<0||d>7)throw new RangeError("Mask value out of range");for(let p=0;p<this.size;p++)for(let u=0;u<this.size;u++){let h;switch(d){case 0:h=(u+p)%2==0;break;case 1:h=p%2==0;break;case 2:h=u%3==0;break;case 3:h=(u+p)%3==0;break;case 4:h=(Math.floor(u/3)+Math.floor(p/2))%2==0;break;case 5:h=u*p%2+u*p%3==0;break;case 6:h=(u*p%2+u*p%3)%2==0;break;case 7:h=((u+p)%2+u*p%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[p][u]&&h&&(this.modules[p][u]=!this.modules[p][u])}}getPenaltyScore(){let d=0;for(let f=0;f<this.size;f++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[f][b]==g?(x++,x==5?d+=Ze.PENALTY_N1:x>5&&d++):(this.finderPenaltyAddHistory(x,w),g||(d+=this.finderPenaltyCountPatterns(w)*Ze.PENALTY_N3),g=this.modules[f][b],x=1);d+=this.finderPenaltyTerminateAndCount(g,x,w)*Ze.PENALTY_N3}for(let f=0;f<this.size;f++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[b][f]==g?(x++,x==5?d+=Ze.PENALTY_N1:x>5&&d++):(this.finderPenaltyAddHistory(x,w),g||(d+=this.finderPenaltyCountPatterns(w)*Ze.PENALTY_N3),g=this.modules[b][f],x=1);d+=this.finderPenaltyTerminateAndCount(g,x,w)*Ze.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let g=0;g<this.size-1;g++){const x=this.modules[f][g];x==this.modules[f][g+1]&&x==this.modules[f+1][g]&&x==this.modules[f+1][g+1]&&(d+=Ze.PENALTY_N2)}let p=0;for(const f of this.modules)p=f.reduce((g,x)=>g+(x?1:0),p);const u=this.size*this.size,h=Math.ceil(Math.abs(p*20-u*10)/u)-1;return i(0<=h&&h<=9),d+=h*Ze.PENALTY_N4,i(0<=d&&d<=2568888),d}getAlignmentPatternPositions(){if(this.version==1)return[];{const d=Math.floor(this.version/7)+2,p=this.version==32?26:Math.ceil((this.version*4+4)/(d*2-2))*2;let u=[6];for(let h=this.size-7;u.length<d;h-=p)u.splice(1,0,h);return u}}static getNumRawDataModules(d){if(d<Ze.MIN_VERSION||d>Ze.MAX_VERSION)throw new RangeError("Version number out of range");let p=(16*d+128)*d+64;if(d>=2){const u=Math.floor(d/7)+2;p-=(25*u-10)*u-55,d>=7&&(p-=36)}return i(208<=p&&p<=29648),p}static getNumDataCodewords(d,p){return Math.floor(Ze.getNumRawDataModules(d)/8)-Ze.ECC_CODEWORDS_PER_BLOCK[p.ordinal][d]*Ze.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][d]}static reedSolomonComputeDivisor(d){if(d<1||d>255)throw new RangeError("Degree out of range");let p=[];for(let h=0;h<d-1;h++)p.push(0);p.push(1);let u=1;for(let h=0;h<d;h++){for(let f=0;f<p.length;f++)p[f]=Ze.reedSolomonMultiply(p[f],u),f+1<p.length&&(p[f]^=p[f+1]);u=Ze.reedSolomonMultiply(u,2)}return p}static reedSolomonComputeRemainder(d,p){let u=p.map(h=>0);for(const h of d){const f=h^u.shift();u.push(0),p.forEach((g,x)=>u[x]^=Ze.reedSolomonMultiply(g,f))}return u}static reedSolomonMultiply(d,p){if(d>>>8||p>>>8)throw new RangeError("Byte out of range");let u=0;for(let h=7;h>=0;h--)u=u<<1^(u>>>7)*285,u^=(p>>>h&1)*d;return i(u>>>8==0),u}finderPenaltyCountPatterns(d){const p=d[1];i(p<=this.size*3);const u=p>0&&d[2]==p&&d[3]==p*3&&d[4]==p&&d[5]==p;return(u&&d[0]>=p*4&&d[6]>=p?1:0)+(u&&d[6]>=p*4&&d[0]>=p?1:0)}finderPenaltyTerminateAndCount(d,p,u){return d&&(this.finderPenaltyAddHistory(p,u),p=0),p+=this.size,this.finderPenaltyAddHistory(p,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(d,p){p[0]==0&&(d+=this.size),p.pop(),p.unshift(d)}};a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=a;function s(c,d,p){if(d<0||d>31||c>>>d)throw new RangeError("Value out of range");for(let u=d-1;u>=0;u--)p.push(c>>>u&1)}function n(c,d){return(c>>>d&1)!=0}function i(c){if(!c)throw new Error("Assertion error")}const l=class tt{constructor(d,p,u){if(this.mode=d,this.numChars=p,this.bitData=u,p<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(d){let p=[];for(const u of d)s(u,8,p);return new tt(tt.Mode.BYTE,d.length,p)}static makeNumeric(d){if(!tt.isNumeric(d))throw new RangeError("String contains non-numeric characters");let p=[];for(let u=0;u<d.length;){const h=Math.min(d.length-u,3);s(parseInt(d.substring(u,u+h),10),h*3+1,p),u+=h}return new tt(tt.Mode.NUMERIC,d.length,p)}static makeAlphanumeric(d){if(!tt.isAlphanumeric(d))throw new RangeError("String contains unencodable characters in alphanumeric mode");let p=[],u;for(u=0;u+2<=d.length;u+=2){let h=tt.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u))*45;h+=tt.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u+1)),s(h,11,p)}return u<d.length&&s(tt.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u)),6,p),new tt(tt.Mode.ALPHANUMERIC,d.length,p)}static makeSegments(d){return d==""?[]:tt.isNumeric(d)?[tt.makeNumeric(d)]:tt.isAlphanumeric(d)?[tt.makeAlphanumeric(d)]:[tt.makeBytes(tt.toUtf8ByteArray(d))]}static makeEci(d){let p=[];if(d<0)throw new RangeError("ECI assignment value out of range");if(d<128)s(d,8,p);else if(d<16384)s(2,2,p),s(d,14,p);else if(d<1e6)s(6,3,p),s(d,21,p);else throw new RangeError("ECI assignment value out of range");return new tt(tt.Mode.ECI,0,p)}static isNumeric(d){return tt.NUMERIC_REGEX.test(d)}static isAlphanumeric(d){return tt.ALPHANUMERIC_REGEX.test(d)}getData(){return this.bitData.slice()}static getTotalBits(d,p){let u=0;for(const h of d){const f=h.mode.numCharCountBits(p);if(h.numChars>=1<<f)return 1/0;u+=4+f+h.bitData.length}return u}static toUtf8ByteArray(d){d=encodeURI(d);let p=[];for(let u=0;u<d.length;u++)d.charAt(u)!="%"?p.push(d.charCodeAt(u)):(p.push(parseInt(d.substring(u+1,u+3),16)),u+=2);return p}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let m=l;e.QrSegment=l})(Ha||(Ha={}));(e=>{(a=>{const s=class{constructor(i,l){this.ordinal=i,this.formatBits=l}};s.LOW=new s(0,1),s.MEDIUM=new s(1,0),s.QUARTILE=new s(2,3),s.HIGH=new s(3,2),a.Ecc=s})(e.QrCode||(e.QrCode={}))})(Ha||(Ha={}));(e=>{(a=>{const s=class{constructor(i,l){this.modeBits=i,this.numBitsCharCount=l}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};s.NUMERIC=new s(1,[10,12,14]),s.ALPHANUMERIC=new s(2,[9,11,13]),s.BYTE=new s(4,[8,16,16]),s.KANJI=new s(8,[8,10,12]),s.ECI=new s(7,[0,0,0]),a.Mode=s})(e.QrSegment||(e.QrSegment={}))})(Ha||(Ha={}));var Wa=Ha;/**
|
|
113
113
|
* @license qrcode.react
|
|
114
114
|
* Copyright (c) Paul O'Shannessy
|
|
115
115
|
* SPDX-License-Identifier: ISC
|
|
116
|
-
*/var g6={L:Ua.QrCode.Ecc.LOW,M:Ua.QrCode.Ecc.MEDIUM,Q:Ua.QrCode.Ecc.QUARTILE,H:Ua.QrCode.Ecc.HIGH},b0=128,y0="L",j0="#FFFFFF",_0="#000000",k0=!1,C0=1,x6=4,v6=0,b6=.1;function N0(e,a=0){const s=[];return e.forEach(function(n,i){let l=null;n.forEach(function(m,c){if(!m&&l!==null){s.push(`M${l+a} ${i+a}h${c-l}v1H${l+a}z`),l=null;return}if(c===n.length-1){if(!m)return;l===null?s.push(`M${c+a},${i+a} h1v1H${c+a}z`):s.push(`M${l+a},${i+a} h${c+1-l}v1H${l+a}z`);return}m&&l===null&&(l=c)})}),s.join("")}function S0(e,a){return e.slice().map((s,n)=>n<a.y||n>=a.y+a.h?s:s.map((i,l)=>l<a.x||l>=a.x+a.w?i:!1))}function y6(e,a,s,n){if(n==null)return null;const i=e.length+s*2,l=Math.floor(a*b6),m=i/a,c=(n.width||l)*m,d=(n.height||l)*m,p=n.x==null?e.length/2-c/2:n.x*m,u=n.y==null?e.length/2-d/2:n.y*m,h=n.opacity==null?1:n.opacity;let f=null;if(n.excavate){let x=Math.floor(p),w=Math.floor(u),b=Math.ceil(c+p-x),_=Math.ceil(d+u-w);f={x,y:w,w:b,h:_}}const g=n.crossOrigin;return{x:p,y:u,h:d,w:c,excavation:f,opacity:h,crossOrigin:g}}function j6(e,a){return a!=null?Math.max(Math.floor(a),0):e?x6:v6}function E0({value:e,level:a,minVersion:s,includeMargin:n,marginSize:i,imageSettings:l,size:m,boostLevel:c}){let d=o.useMemo(()=>{const x=(Array.isArray(e)?e:[e]).reduce((w,b)=>(w.push(...Ua.QrSegment.makeSegments(b)),w),[]);return Ua.QrCode.encodeSegments(x,g6[a],s,void 0,void 0,c)},[e,a,s,c]);const{cells:p,margin:u,numCells:h,calculatedImageSettings:f}=o.useMemo(()=>{let g=d.getModules();const x=j6(n,i),w=g.length+x*2,b=y6(g,m,x,l);return{cells:g,margin:x,numCells:w,calculatedImageSettings:b}},[d,m,l,n,i]);return{qrcode:d,margin:u,cells:p,numCells:h,calculatedImageSettings:f}}var _6=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),k6=o.forwardRef(function(a,s){const n=a,{value:i,size:l=b0,level:m=y0,bgColor:c=j0,fgColor:d=_0,includeMargin:p=k0,minVersion:u=C0,boostLevel:h,marginSize:f,imageSettings:g}=n,w=pr(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:b}=w,_=pr(w,["style"]),v=g==null?void 0:g.src,k=o.useRef(null),N=o.useRef(null),j=o.useCallback(S=>{k.current=S,typeof s=="function"?s(S):s&&(s.current=S)},[s]),[C,y]=o.useState(!1),{margin:E,cells:R,numCells:F,calculatedImageSettings:A}=E0({value:i,level:m,minVersion:u,boostLevel:h,includeMargin:p,marginSize:f,imageSettings:g,size:l});o.useEffect(()=>{if(k.current!=null){const S=k.current,O=S.getContext("2d");if(!O)return;let P=R;const $=N.current,Z=A!=null&&$!==null&&$.complete&&$.naturalHeight!==0&&$.naturalWidth!==0;Z&&A.excavation!=null&&(P=S0(R,A.excavation));const H=window.devicePixelRatio||1;S.height=S.width=l*H;const M=l/F*H;O.scale(M,M),O.fillStyle=c,O.fillRect(0,0,F,F),O.fillStyle=d,_6?O.fill(new Path2D(N0(P,E))):R.forEach(function(B,D){B.forEach(function(W,K){W&&O.fillRect(K+E,D+E,1,1)})}),A&&(O.globalAlpha=A.opacity),Z&&O.drawImage($,A.x+E,A.y+E,A.w,A.h)}}),o.useEffect(()=>{y(!1)},[v]);const I=mr({height:l,width:l},b);let L=null;return v!=null&&(L=o.createElement("img",{src:v,key:v,style:{display:"none"},onLoad:()=>{y(!0)},ref:N,crossOrigin:A==null?void 0:A.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",mr({style:I,height:l,width:l,ref:j,role:"img"},_)),L)});k6.displayName="QRCodeCanvas";var Vr=o.forwardRef(function(a,s){const n=a,{value:i,size:l=b0,level:m=y0,bgColor:c=j0,fgColor:d=_0,includeMargin:p=k0,minVersion:u=C0,boostLevel:h,title:f,marginSize:g,imageSettings:x}=n,w=pr(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:b,cells:_,numCells:v,calculatedImageSettings:k}=E0({value:i,level:m,minVersion:u,boostLevel:h,includeMargin:p,marginSize:g,imageSettings:x,size:l});let N=_,j=null;x!=null&&k!=null&&(k.excavation!=null&&(N=S0(_,k.excavation)),j=o.createElement("image",{href:x.src,height:k.h,width:k.w,x:k.x+b,y:k.y+b,preserveAspectRatio:"none",opacity:k.opacity,crossOrigin:k.crossOrigin}));const C=N0(N,b);return o.createElement("svg",mr({height:l,width:l,viewBox:`0 0 ${v} ${v}`,ref:s,role:"img"},w),!!f&&o.createElement("title",null,f),o.createElement("path",{fill:c,d:`M0,0 h${v}v${v}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:d,d:C,shapeRendering:"crispEdges"}),j)});Vr.displayName="QRCodeSVG";const Bi=({onClose:e,onChangePassword:a,triggerRef:s,isSetup:n=!1})=>{const i=o.useRef(null),[l,m]=o.useState(!1),[c,d]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(""),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[_,v]=o.useState(!1),[k,N]=o.useState(!1),[j,C]=o.useState({}),y=xt({contentRef:i,triggerRef:s??{current:null},isOpen:l,minWidth:380,defaultMaxHeight:420});o.useEffect(()=>{m(!0);const R=A=>{i.current&&!i.current.contains(A.target)&&e()},F=A=>{A.key==="Escape"&&e()};return document.addEventListener("mousedown",R),document.addEventListener("keydown",F),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",F)}},[e]);const E=async()=>{if(k)return;const R={};if(!n&&!c&&(R.currentPassword="Current password is required"),p?p.length<8&&(R.newPassword="Password must be at least 8 characters"):R.newPassword="New password is required",p!==h&&(R.confirmPassword="Passwords do not match"),Object.keys(R).length>0){C(R);return}N(!0);try{await a(n?"":c,p),e()}catch(F){C({form:F.message||"Failed to update password"})}finally{N(!1)}};return l?t.jsxs("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(y==null?void 0:y.top)!==void 0?`${y.top}px`:void 0,bottom:(y==null?void 0:y.bottom)!==void 0?`${y.bottom}px`:void 0,left:(y==null?void 0:y.left)!==void 0?`${y.left}px`:void 0,right:(y==null?void 0:y.right)!==void 0?`${y.right}px`:void 0,maxHeight:y!=null&&y.maxHeight?`${y.maxHeight}px`:void 0,visibility:y?"visible":"hidden"},onClick:R=>R.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:n?"Set Password":"Change Password"}),t.jsx("p",{className:"w-pop-sub",children:n?"Set a password for your account to enable password authentication.":"Update your account password to keep it secure."})]}),!n&&t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:"Current Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(xe,{type:g?"text":"password",placeholder:"Enter your current password",value:c,onChange:R=>d(R.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>x(!g),"aria-label":g?"Hide current password":"Show current password",children:g?t.jsx(Nn,{size:16}):t.jsx(Cn,{size:16})})]}),j.currentPassword&&t.jsx("span",{className:"w-input-err",children:j.currentPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:n?"Password":"New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(xe,{type:w?"text":"password",placeholder:n?"Enter your password":"Enter your new password",value:p,onChange:R=>u(R.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>b(!w),"aria-label":w?"Hide new password":"Show new password",children:w?t.jsx(Nn,{size:16}):t.jsx(Cn,{size:16})})]}),j.newPassword&&t.jsx("span",{className:"w-input-err",children:j.newPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:"Confirm New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(xe,{type:_?"text":"password",placeholder:"Confirm your new password",value:h,onChange:R=>f(R.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>v(!_),"aria-label":_?"Hide confirm password":"Show confirm password",children:_?t.jsx(Nn,{size:16}):t.jsx(Cn,{size:16})})]}),j.confirmPassword&&t.jsx("span",{className:"w-input-err",children:j.confirmPassword})]}),j.form&&t.jsx("span",{className:"w-input-err",children:j.form})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:E,disabled:k,children:k?n?"Setting...":"Updating...":n?"Set Password":"Update Password"})]})]}):null},C6=({onClose:e,onRemovePassword:a,triggerRef:s})=>{const n=o.useRef(null),[i,l]=o.useState(!1),[m,c]=o.useState(""),[d,p]=o.useState(!1),{toast:u}=ta(),h=xt({contentRef:n,triggerRef:s??{current:null},isOpen:i,minWidth:400,defaultMaxHeight:360});o.useEffect(()=>{l(!0);const g=w=>{n.current&&!n.current.contains(w.target)&&e()},x=w=>{w.key==="Escape"&&e()};return document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[e]);const f=async()=>{if(!(!m||d)){p(!0);try{await a(m),e()}catch(g){const x=g.message||"Failed to remove password. Please try again.";u(x,"error")}finally{p(!1)}}};return i?t.jsxs("div",{ref:n,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(h==null?void 0:h.top)!==void 0?`${h.top}px`:void 0,bottom:(h==null?void 0:h.bottom)!==void 0?`${h.bottom}px`:void 0,left:(h==null?void 0:h.left)!==void 0?`${h.left}px`:void 0,right:(h==null?void 0:h.right)!==void 0?`${h.right}px`:void 0,maxHeight:h!=null&&h.maxHeight?`${h.maxHeight}px`:void 0,visibility:h?"visible":"hidden"},onClick:g=>g.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Remove Password"}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx(Ha,{size:16}),t.jsx("span",{className:"w-banner-txt",children:"You're about to remove password authentication from your account. Make sure you have another way to sign in (email, phone, social login, or passkey) before continuing."})]}),t.jsxs(We,{children:[t.jsx(Ve,{htmlFor:"current-password",children:"Confirm your current password"}),t.jsx(xe,{id:"current-password",type:"password",placeholder:"Enter current password",value:m,onChange:g=>c(g.target.value),autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:f,disabled:!m||d,children:d?"Removing...":"Remove Password"})]})]}):null},N6=({onClose:e,onSetupTOTP:a,onVerifyTOTP:s,triggerRef:n})=>{const i=o.useRef(null),[l,m]=o.useState("qr"),[c,d]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(["",""]),[g,x]=o.useState(!1),[w,b]=o.useState(!1),{toast:_}=ta(),v=xt({contentRef:i,triggerRef:n??{current:null},isOpen:w,minWidth:380,defaultMaxHeight:460});o.useEffect(()=>{b(!0);const N=C=>{i.current&&!i.current.contains(C.target)&&e()},j=C=>{C.key==="Escape"&&e()};return document.addEventListener("mousedown",N),document.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",j)}},[e]),o.useEffect(()=>{(async()=>{x(!0);try{const j=await a();d(j.otp_url||""),u(j.totp_secret||"")}catch(j){const C=j.message||"Failed to setup two-factor authentication. Please try again.";_(C,"error")}finally{x(!1)}})()},[]);const k=async()=>{if(!h.some(N=>N.length!==6)){x(!0);try{await s(h),e()}catch(N){const j=N.message||"Failed to verify codes. Please check your authenticator app and try again.";_(j,"error")}finally{x(!1)}}};return w?t.jsx("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:340,maxWidth:"calc(100vw - 24px)",top:(v==null?void 0:v.top)!==void 0?`${v.top}px`:void 0,bottom:(v==null?void 0:v.bottom)!==void 0?`${v.bottom}px`:void 0,left:(v==null?void 0:v.left)!==void 0?`${v.left}px`:void 0,right:(v==null?void 0:v.right)!==void 0?`${v.right}px`:void 0,maxHeight:v!=null&&v.maxHeight?`${v.maxHeight}px`:void 0,visibility:v?"visible":"hidden"},onClick:N=>N.stopPropagation(),children:l==="qr"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Setup Two-Factor Authentication"}),t.jsx("p",{className:"w-pop-sub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"})]}),t.jsx("div",{className:"w-flex w-justify-center",children:g?t.jsx("div",{className:"w-qr w-text-muted",children:"Loading..."}):c?t.jsx("div",{className:"w-qr",style:{background:"#fff",padding:8},children:t.jsx(Vr,{value:c,size:130,title:"QR Code for Two-Factor Authentication Setup","aria-label":"Scan this QR code with your authenticator app to set up two-factor authentication"})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),p&&t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-secsub",children:"Or enter manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{style:{wordBreak:"break-all"},children:p})})]})]}),t.jsx("div",{className:"w-pop-foot",children:t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:()=>m("verify"),disabled:g||!c,children:"I've Scanned the Code"})})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify Your Authenticator"}),t.jsx("p",{className:"w-pop-sub",children:"Enter two consecutive codes from your authenticator app"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(xe,{id:"totp-code-1",type:"text",placeholder:"000000",value:h[0],onChange:N=>{const j=N.target.value.replace(/[^0-9]/g,"").substring(0,6);f([j,h[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"First verification code from authenticator app"}),t.jsx(xe,{id:"totp-code-2",type:"text",placeholder:"000000",value:h[1],onChange:N=>{const j=N.target.value.replace(/[^0-9]/g,"").substring(0,6);f([h[0],j])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"Second verification code from authenticator app"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>m("qr"),children:"Back"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:k,disabled:g||h.some(N=>N.length!==6),children:g?"Verifying...":"Verify"})]})]})}):null},S6=({codes:e,onClose:a,onCopy:s,onDownload:n,triggerRef:i})=>{const l=o.useRef(null),[m,c]=o.useState(!1),d=xt({contentRef:l,triggerRef:i??{current:null},isOpen:m,minWidth:380,defaultMaxHeight:360});return o.useEffect(()=>{c(!0);const p=h=>{l.current&&!l.current.contains(h.target)&&a()},u=h=>{h.key==="Escape"&&a()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",u)}},[a]),m?t.jsx("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(d==null?void 0:d.top)!==void 0?`${d.top}px`:void 0,bottom:(d==null?void 0:d.bottom)!==void 0?`${d.bottom}px`:void 0,left:(d==null?void 0:d.left)!==void 0?`${d.left}px`:void 0,right:(d==null?void 0:d.right)!==void 0?`${d.right}px`:void 0,maxHeight:d!=null&&d.maxHeight?`${d.maxHeight}px`:void 0,visibility:d?"visible":"hidden"},onClick:p=>p.stopPropagation(),children:t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2",children:[t.jsx("div",{className:"w-pop-title",children:"Backup Codes"}),t.jsxs("div",{className:"w-flex w-gap-2 w-none",children:[t.jsxs(se,{$outline:!0,$size:"sm",onClick:s,children:[t.jsx(Ba,{size:14}),"Copy"]}),t.jsxs(se,{$outline:!0,$size:"sm",onClick:n,children:[t.jsx(ol,{size:14}),"DownloadSimple"]})]})]}),t.jsx("p",{className:"w-pop-sub",children:"Save these backup codes in a secure location. Each code can only be used once."}),t.jsx("div",{className:"w-codes",children:e.map((p,u)=>t.jsx("span",{role:"button",style:{cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(p)},title:"Click to copy",children:p},u))}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx("span",{style:{fontSize:13.5},children:"⚠️"}),t.jsx("span",{className:"w-banner-txt",children:"Keep these codes safe! They won't be shown again."})]})]})}):null},E6=({onClose:e,onAddPasskey:a,triggerRef:s})=>{const n=o.useRef(null),[i,l]=o.useState(!1),[m,c]=o.useState(""),[d,p]=o.useState(!1),[u,h]=o.useState(""),f=xt({contentRef:n,triggerRef:s??{current:null},isOpen:i,minWidth:320,defaultMaxHeight:260});o.useEffect(()=>{l(!0);const x=b=>{n.current&&!n.current.contains(b.target)&&e()},w=b=>{b.key==="Escape"&&e()};return document.addEventListener("mousedown",x),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",w)}},[e]);const g=async()=>{if(!d){p(!0),h("");try{await a(m.trim()),e()}catch(x){h(x.message||"Failed to register passkey"),p(!1)}}};return i?t.jsxs("div",{ref:n,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(f==null?void 0:f.top)!==void 0?`${f.top}px`:void 0,bottom:(f==null?void 0:f.bottom)!==void 0?`${f.bottom}px`:void 0,left:(f==null?void 0:f.left)!==void 0?`${f.left}px`:void 0,right:(f==null?void 0:f.right)!==void 0?`${f.right}px`:void 0,maxHeight:f!=null&&f.maxHeight?`${f.maxHeight}px`:void 0,visibility:f?"visible":"hidden"},onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add Passkey"}),t.jsx(xe,{type:"text",placeholder:"e.g., MacBook Pro, iPhone",value:m,onChange:x=>c(x.target.value),autoFocus:!0}),u&&t.jsx("span",{className:"w-input-err",children:u})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:g,disabled:d,children:d?"Registering...":"Continue"})]})]}):null},A6=({children:e})=>t.jsx("div",{className:"w-eyebrow",children:e}),M6=()=>{var aa,sa,na,oe,ge,Ce,De;const{deployment:e}=_e(),{user:a,updatePassword:s,removePassword:n,setupAuthenticator:i,verifyAuthenticator:l,deleteAuthenticator:m,generateBackupCodes:c,regenerateBackupCodes:d,updateProfile:p,getPasskeys:u,registerPasskey:h,deletePasskey:f}=ga(),{toast:g}=ta(),[x,w]=o.useState((a==null?void 0:a.second_factor_policy)||"none"),[b,_]=o.useState(!1),v=async ae=>{try{await p({second_factor_policy:ae}),w(ae),g("2FA requirement updated successfully","info")}catch(we){g(we.message||"Failed to update 2FA requirement","error")}},[k,N]=o.useState(!1),[j,C]=o.useState(!1),[y,E]=o.useState(!1),[R,F]=o.useState(!1),A=o.useRef(null),I=o.useRef(null),L=o.useRef(null),S=o.useRef(null),[O,P]=o.useState([]),[$,Z]=o.useState(!1),[H,M]=o.useState(!1),[B,D]=o.useState(!1),[W,K]=o.useState(!1),[ee,ce]=o.useState(null),be=o.useRef(null),[Q,ie]=o.useState("table"),[ne,U]=o.useState(""),[Qe,Je]=o.useState(""),[Te,Se]=o.useState(""),[qe,le]=o.useState(["",""]),[V,Y]=o.useState([]),[q,G]=o.useState(!1),[de,z]=o.useState(!1),[me]=o.useState(!1),[st,Oe]=o.useState(!1),Ze=(aa=e==null?void 0:e.auth_settings)==null?void 0:aa.auth_factors_enabled,mt=(na=(sa=e==null?void 0:e.auth_settings)==null?void 0:sa.password)==null?void 0:na.enabled;if(!(Ze!=null&&Ze.authenticator)&&!(Ze!=null&&Ze.backup_code)&&!mt)return null;const J=async(ae,we)=>{await s(ae,we),await a.refetch(),g("Password updated successfully","info")},re=async ae=>{await n(ae),await a.refetch(),g("Password removed successfully","info")},ue=()=>{var yt,Fe,Bt,ra,ia,es;if(!a)return!1;const ae=(yt=a.user_email_addresses)==null?void 0:yt.some(oa=>oa.verified),we=(Fe=a.user_phone_numbers)==null?void 0:Fe.some(oa=>oa.verified),tt=a.social_connections&&a.social_connections.length>0,Be=e==null?void 0:e.auth_settings;return(Be==null?void 0:Be.first_factor)==="email_otp"&&ae||((Bt=Be==null?void 0:Be.magic_link)==null?void 0:Bt.enabled)&&ae||((ra=Be==null?void 0:Be.passkey)==null?void 0:ra.enabled)||((ia=Be==null?void 0:Be.auth_factors_enabled)==null?void 0:ia.phone_otp)&&we||tt&&((es=e==null?void 0:e.social_connections)==null?void 0:es.some(oa=>oa.enabled))},He=async()=>{if(qe.some(ae=>ae.length!==6)){g("Please enter both 6-digit verification codes","error");return}try{if(z(!0),await l(Te,qe),await a.refetch(),Ze!=null&&Ze.backup_code){const ae=await c();Y(ae),await a.refetch(),ie("backup")}else ie("success")}catch(ae){g(ae.message||"Invalid verification codes","error")}finally{z(!1)}},Ee=()=>{ie("table"),U(""),Je(""),Se(""),le(["",""]),Y([]),g("Two-factor authentication setup completed successfully!","info")},Ye=async()=>{var ae;if((ae=a==null?void 0:a.user_authenticator)!=null&&ae.id)try{Oe(!0),await m(a.user_authenticator.id),await a.refetch(),_(!1),g("Two-factor authentication removed successfully","info")}catch(we){g(we.message||"Failed to remove authenticator","error")}finally{Oe(!1)}},vt=async()=>{if(!q)try{G(!0);const ae=await d();Y(ae),await a.refetch(),F(!0),g("New backup codes generated","info")}catch(ae){g(ae.message||"Failed to generate backup codes","error")}finally{G(!1)}},Ut=()=>{const ae=V.join(`
|
|
117
|
-
`);navigator.clipboard.writeText(
|
|
118
|
-
`),we=new Blob([ae],{type:"text/plain"}),tt=URL.createObjectURL(we),Be=document.createElement("a");Be.href=tt,Be.download="wacht-backup-codes.txt",Be.click(),URL.revokeObjectURL(tt),g("Backup codes downloaded","info")},Wt=async()=>{var ae,we;if((we=(ae=e==null?void 0:e.auth_settings)==null?void 0:ae.passkey)!=null&&we.enabled)try{Z(!0);const tt=await u();P(tt.data||[])}catch{g("Failed to load passkeys","error")}finally{Z(!1)}},va=async ae=>{try{M(!0),await h(ae||void 0),await Wt(),g("Passkey registered successfully!","info")}catch(we){throw g(we.message||"Failed to register passkey","error"),we}finally{M(!1)}},ba=async ae=>{try{await f(ae),await Wt(),g("Passkey removed","info")}catch(we){g(we.message||"Failed to remove passkey","error")}};o.useEffect(()=>{Wt()},[(ge=(oe=e==null?void 0:e.auth_settings)==null?void 0:oe.passkey)==null?void 0:ge.enabled]);const bt=[];return mt&&bt.push({id:"password",name:"Password",description:"Secure your account with a strong password",status:a!=null&&a.has_password?"Enabled":"Disabled",actions:a!=null&&a.has_password?["change"]:["setup"],group:"sign-in"}),(De=(Ce=e==null?void 0:e.auth_settings)==null?void 0:Ce.passkey)!=null&&De.enabled&&bt.push({id:"passkey",name:"Passkeys",description:"Sign in faster with fingerprint, face, or screen lock",status:O.length>0?`${O.length} registered`:"",actions:O.length>0?["manage","add"]:["add"],group:"sign-in"}),Ze!=null&&Ze.authenticator&&bt.push({id:"authenticator",name:"Authenticator App",description:"Use an authenticator app for extra security",status:a!=null&&a.user_authenticator?"Enabled":"Disabled",actions:a!=null&&a.user_authenticator?["remove"]:["setup"],group:"sign-in"}),a!=null&&a.user_authenticator&&bt.push({id:"backup_codes",name:"Backup Codes",description:"Recovery codes if you lose your authenticator",status:a!=null&&a.backup_codes_generated?"Generated":"Not Generated",actions:["generate"],group:"recovery"}),a!=null&&a.user_authenticator&&bt.push({id:"second_factor_policy",name:"Require 2FA",description:"Require a second factor for all sign-ins",status:x==="enforced"?"Enforced":"Optional",actions:["toggle"],group:"recovery"}),Q!=="table"?t.jsxs(t.Fragment,{children:[t.jsxs(c0,{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Xt,{size:16}),t.jsxs("span",{className:"w-sec",children:[Q==="qr"&&"Setup Two-Factor Authentication",Q==="verify"&&"Verify Your Authenticator",Q==="backup"&&"Save Your Backup Codes",Q==="success"&&"Setup Complete!"]})]}),t.jsx(se,{$outline:!0,$size:"sm",onClick:()=>ie("table"),children:"← Back"})]}),t.jsxs("div",{className:"w-narrow w-flex-col w-items-center w-gap-5",style:{textAlign:"center"},children:[Q==="qr"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"}),t.jsx("div",{className:"w-flex w-justify-center",children:me?t.jsxs("div",{className:"w-qr w-flex-col w-items-center w-gap-3",children:[t.jsx("span",{className:"w-spin"}),t.jsx("div",{className:"w-secsub",children:"Loading QR Code..."})]}):ne?t.jsx("div",{className:"w-tile w-flex w-items-center w-justify-center",children:t.jsx(Vr,{value:ne,size:200,level:"M",marginSize:0})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),t.jsxs("div",{className:"w-flex-col w-gap-2 w-full",children:[t.jsx("p",{className:"w-secsub",children:"Or enter this code manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{children:Qe||"Loading..."})})]}),t.jsx(se,{$fullWidth:!0,onClick:()=>ie("verify"),disabled:!ne||!Qe,children:"I've Scanned the Code"})]}),Q==="verify"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Enter two consecutive codes from your authenticator app to verify setup"}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(xe,{type:"text",placeholder:"000000",value:qe[0],onChange:ae=>{const we=ae.target.value.replace(/[^0-9]/g,"").substring(0,6);le([we,qe[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}}),t.jsx(xe,{type:"text",placeholder:"000000",value:qe[1],onChange:ae=>{const we=ae.target.value.replace(/[^0-9]/g,"").substring(0,6);le([qe[0],we])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}})]}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(se,{$outline:!0,$size:"sm",onClick:()=>ie("qr"),children:"Back"}),t.jsx(se,{$size:"sm",onClick:He,disabled:de||qe.some(ae=>ae.length!==6),children:de?"Verifying...":"Verify & Continue"})]})]}),Q==="backup"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-banner w-banner--warn",style:{textAlign:"left"},children:[t.jsx(Ha,{size:16}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Important!"}),t.jsx("div",{className:"w-banner-txt",children:"Store these codes safely. Each code can only be used once if you lose access to your authenticator device."})]})]}),t.jsx("div",{className:"w-codes w-full",children:V.map((ae,we)=>t.jsx("span",{onClick:()=>navigator.clipboard.writeText(ae),style:{cursor:"pointer"},children:ae},we))}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(se,{$outline:!0,$size:"sm",onClick:Ut,children:"Copy All"}),t.jsxs(se,{$outline:!0,$size:"sm",onClick:Ft,children:[t.jsx(ol,{size:16}),"DownloadSimple"]})]}),t.jsx(se,{$fullWidth:!0,onClick:Ee,children:"Complete Setup"})]}),Q==="success"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ge,{size:26})})]}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-items-center",children:[t.jsx("h3",{className:"w-title",children:"All Set!"}),t.jsx("p",{className:"w-secsub",children:"Your account is now protected with two-factor authentication."})]}),t.jsx(se,{$fullWidth:!0,onClick:Ee,children:"Continue to Security"})]})]})]}):t.jsx(t.Fragment,{children:bt.length?t.jsx("div",{children:bt.map((ae,we)=>{const tt=we>0?bt[we-1].group:null,Be=ae.group!==tt,kt=bt[we+1],yt=kt&&kt.group===ae.group;return t.jsxs("div",{children:[Be&&t.jsx(A6,{$first:we===0,children:ae.group==="sign-in"?"Sign-in methods":"Recovery"}),t.jsxs(d0,{children:[t.jsxs(u0,{children:[t.jsx("div",{className:"w-flex w-items-center w-wrap w-gap-2 w-sec",children:t.jsx("span",{children:ae.name})}),t.jsx("div",{className:"w-secsub",children:ae.description})]}),t.jsx(m0,{children:t.jsxs("div",{className:"w-relative",children:[ae.id==="password"&&t.jsx(t.Fragment,{children:a!=null&&a.has_password?t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:I,onClick:()=>C(!0),children:"Change"}),j&&t.jsx(Bi,{triggerRef:I,onClose:()=>C(!1),onChangePassword:J})]}),ue()&&t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",ref:L,onClick:()=>E(!0),children:"Remove"}),y&&t.jsx(C6,{triggerRef:L,onClose:()=>E(!1),onRemovePassword:re})]})]}):t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:I,onClick:()=>C(!0),children:"Setup"}),j&&t.jsx(Bi,{triggerRef:I,onClose:()=>C(!1),onChangePassword:J,isSetup:!0})]})}),ae.id==="authenticator"&&!(a!=null&&a.user_authenticator)&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:A,onClick:()=>N(!0),disabled:me,children:me?"Setting up...":"Setup"}),k&&t.jsx(N6,{triggerRef:A,onClose:()=>N(!1),onSetupTOTP:async()=>{const Fe=await i();return Se(Fe.id),Fe},onVerifyTOTP:async Fe=>{await l(Te,Fe),await a.refetch(),g("Two-factor authentication enabled successfully!","info")}})]})}),ae.id==="authenticator"&&(a==null?void 0:a.user_authenticator)&&t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>_(!0),disabled:st,children:st?"Removing...":"Remove"}),b&&t.jsx(Ya,{title:"Remove MFA and reset policy to default?",onConfirm:Ye,onCancel:()=>_(!1)})]}),ae.id==="backup_codes"&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:S,onClick:vt,disabled:q,children:q?"Generating...":a!=null&&a.backup_codes_generated?"Regenerate":"Generate"}),R&&t.jsx(S6,{triggerRef:S,codes:V,onClose:()=>F(!1),onCopy:Ut,onDownload:Ft})]})}),ae.id==="second_factor_policy"&&t.jsx(Oa,{checked:x==="enforced",onChange:Fe=>{v(Fe?"enforced":"none")}}),ae.id==="passkey"&&t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsxs(se,{$outline:!0,$size:"sm",onClick:()=>D(!B),children:[B?"Hide":"Manage"," ","(",O.length,")",t.jsx(Dt,{size:14,style:{transform:B?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:be,onClick:()=>K(!0),disabled:H,children:H?"Adding...":"Add"}),W&&t.jsx(E6,{triggerRef:be,onClose:()=>K(!1),onAddPasskey:va})]})]})]})})]}),ae.id==="passkey"&&B&&t.jsx("div",{className:"w-flex-col w-gap-2",children:$?t.jsx("div",{className:"w-loading",children:t.jsx(ye,{})}):O.length===0?t.jsx("div",{className:"w-empty",children:t.jsx("p",{children:"No passkeys registered yet"})}):t.jsx("div",{className:"w-flex-col w-gap-2",children:O.map(Fe=>t.jsxs("div",{className:"w-locked w-flex w-items-center w-justify-between",style:{height:"auto",padding:"10px 12px"},children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:Fe.name||"Unnamed Passkey"}),t.jsxs("span",{className:"w-secsub",children:[Fe.device_type==="platform"?"This device":"Security key",Fe.last_used_at&&` • Last used ${new Date(Fe.last_used_at).toLocaleDateString()}`]})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>ce(Fe.id),children:"Remove"}),ee===Fe.id&&t.jsx(Ya,{title:`Remove "${Fe.name||"Unnamed Passkey"}"?`,onConfirm:()=>{ba(Fe.id),ce(null)},onCancel:()=>ce(null)})]})]},Fe.id))})}),yt&&t.jsx("div",{className:"w-hr"})]},ae.id)})}):t.jsx(Ct,{title:"No security features available",description:"Contact your administrator to enable security features."})})},R6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#d93025"}),t.jsx("stop",{offset:1,stopColor:"#ea4335"})]}),t.jsxs("linearGradient",{id:"b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#fcc934"}),t.jsx("stop",{offset:1,stopColor:"#fbbc04"})]}),t.jsxs("linearGradient",{id:"c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1e8e3e"}),t.jsx("stop",{offset:1,stopColor:"#34a853"})]})]}),t.jsx("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),t.jsx("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36Zm31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18Z",style:{fill:"none"}}),t.jsx("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12Z",style:{fill:"url(#a)"}}),t.jsx("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),t.jsx("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99Z",style:{fill:"url(#b)"}}),t.jsx("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007Z",style:{fill:"url(#c)"}})]}),L6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:512,height:512,viewBox:"0 0 512 512",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"g",cx:"210%",cy:"-100%",r:"290%",children:[t.jsx("stop",{offset:.1,stopColor:"#ffe226"}),t.jsx("stop",{offset:.79,stopColor:"#ff7139"})]}),t.jsxs("radialGradient",{id:"c",cx:"49%",cy:"40%",r:"128%",gradientTransform:"matrix(.82 0 0 1 .088 0)",children:[t.jsx("stop",{offset:.3,stopColor:"#960e18"}),t.jsx("stop",{offset:.35,stopColor:"#b11927",stopOpacity:.74}),t.jsx("stop",{offset:.43,stopColor:"#db293d",stopOpacity:.34}),t.jsx("stop",{offset:.5,stopColor:"#f5334b",stopOpacity:.09}),t.jsx("stop",{offset:.53,stopColor:"#ff3750",stopOpacity:0})]}),t.jsxs("radialGradient",{id:"d",cx:"48%",cy:"-12%",r:"140%",children:[t.jsx("stop",{offset:.13,stopColor:"#fff44f"}),t.jsx("stop",{offset:.53,stopColor:"#ff980e"})]}),t.jsxs("radialGradient",{id:"e",cx:"22.76%",cy:"110.11%",r:"100%",children:[t.jsx("stop",{offset:.35,stopColor:"#3a8ee6"}),t.jsx("stop",{offset:.67,stopColor:"#9059ff"}),t.jsx("stop",{offset:1,stopColor:"#c139e6"})]}),t.jsxs("radialGradient",{id:"f",cx:"52%",cy:"33%",r:"59%",gradientTransform:"scale(.9 1)",children:[t.jsx("stop",{offset:.21,stopColor:"#9059ff",stopOpacity:0}),t.jsx("stop",{offset:.97,stopColor:"#6e008b",stopOpacity:.6})]}),t.jsxs("radialGradient",{id:"b",cx:"87.4%",cy:"-12.9%",r:"128%",gradientTransform:"matrix(.8 0 0 1 .178 .129)",children:[t.jsx("stop",{offset:.13,stopColor:"#ffbd4f"}),t.jsx("stop",{offset:.28,stopColor:"#ff980e"}),t.jsx("stop",{offset:.47,stopColor:"#ff3750"}),t.jsx("stop",{offset:.78,stopColor:"#eb0878"}),t.jsx("stop",{offset:.86,stopColor:"#e50080"})]}),t.jsxs("radialGradient",{id:"h",cx:"84%",cy:"-41%",r:"180%",children:[t.jsx("stop",{offset:.11,stopColor:"#fff44f"}),t.jsx("stop",{offset:.46,stopColor:"#ff980e"}),t.jsx("stop",{offset:.72,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"i",cx:"16.1%",cy:"-18.6%",r:"348.8%",gradientTransform:"scale(1 .47) rotate(84 .279 -.297)",children:[t.jsx("stop",{offset:0,stopColor:"#fff44f"}),t.jsx("stop",{offset:.3,stopColor:"#ff980e"}),t.jsx("stop",{offset:.57,stopColor:"#ff3647"}),t.jsx("stop",{offset:.74,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"j",cx:"18.9%",cy:"-42.5%",r:"238.4%",children:[t.jsx("stop",{offset:.14,stopColor:"#fff44f"}),t.jsx("stop",{offset:.48,stopColor:"#ff980e"}),t.jsx("stop",{offset:.66,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"k",cx:"159.3%",cy:"-44.72%",r:"313.1%",children:[t.jsx("stop",{offset:.09,stopColor:"#fff44f"}),t.jsx("stop",{offset:.63,stopColor:"#ff980e"})]}),t.jsxs("linearGradient",{id:"a",x1:"87.25%",x2:"9.4%",y1:"15.5%",y2:"93.1%",children:[t.jsx("stop",{offset:.05,stopColor:"#fff44f"}),t.jsx("stop",{offset:.37,stopColor:"#ff980e"}),t.jsx("stop",{offset:.53,stopColor:"#ff3647"}),t.jsx("stop",{offset:.7,stopColor:"#e31587"})]}),t.jsxs("linearGradient",{id:"l",x1:"80%",x2:"18%",y1:"14%",y2:"84%",children:[t.jsx("stop",{offset:.17,stopColor:"#fff44f",stopOpacity:.8}),t.jsx("stop",{offset:.6,stopColor:"#fff44f",stopOpacity:0})]})]}),t.jsx("path",{fill:"url(#a)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484a120.249 120.249 0 0 0-66.142 25.488 71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.913c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.08 12.7-2.365 15-.022.177-.032.347-.053.524a229.066 229.066 0 0 0-3.9 33.157c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zM201.716 354.447c1.124.537 2.18 1.124 3.334 1.639.048.033.114.07.163.1a126.191 126.191 0 0 1-3.497-1.739zm55.053-144.93zm198.131-30.59-.032-.233c.012.085.027.174.04.259z"}),t.jsx("path",{fill:"url(#b)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#c)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#d)",d:"M361.922 194.6c.524.368 1 .734 1.493 1.1a130.706 130.706 0 0 0-22.31-29.112C266.4 91.892 321.516 4.626 330.811.194c.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.051 0 84.289 24.77 105.301 61.487z"}),t.jsx("path",{fill:"url(#e)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#f)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#g)",d:"M170.829 151.036a244.042 244.042 0 0 1 4.981 3.3 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7 1.155-.033 36.014-.66 53.543 10.732z"}),t.jsx("path",{fill:"url(#h)",d:"M18.223 261.41C36.766 370.988 136.1 454.651 248.855 457.844c104.361 2.954 171.037-57.62 198.576-116.716 17.8-38.2 30.154-100.7 7.479-162.175l-.008-.026-.032-.233c-.025-.178-.04-.284-.036-.226 0 .039.015.136.047.4 8.524 55.661-19.79 109.584-64.051 146.044l-.133.313c-86.245 70.223-168.774 42.368-185.484 30.966a144.108 144.108 0 0 1-3.5-1.743c-50.282-24.029-71.054-69.838-66.6-109.124-42.457 0-56.934-35.809-56.934-35.809s38.119-27.179 88.358-3.541c46.53 21.893 90.228 3.543 90.233 3.541-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 282.929 282.929 0 0 0-4.981-3.3c-17.528-11.392-52.388-10.765-53.543-10.735h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.919c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-8.65 37.842-4.44 57.199z"}),t.jsx("path",{fill:"url(#i)",d:"M341.105 166.587a130.706 130.706 0 0 1 22.31 29.112c1.323.994 2.559 1.985 3.608 2.952 54.482 50.2 25.936 121.2 23.807 126.26 44.261-36.46 72.575-90.383 64.051-146.044C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1-9.291 4.428-64.407 91.694 10.298 166.389z"}),t.jsx("path",{fill:"url(#j)",d:"M367.023 198.651c-1.049-.967-2.285-1.958-3.608-2.952-.489-.368-.969-.734-1.493-1.1-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1 16.71 11.4 99.239 39.257 185.484-30.966l.133-.313c2.129-5.054 30.675-76.057-23.807-126.258z"}),t.jsx("path",{fill:"url(#k)",d:"M148.439 277.443s11.093-41.335 79.432-41.335c7.388 0 28.509-20.615 28.9-26.593s-43.7 18.352-90.233-3.541c-50.239-23.638-88.358 3.541-88.358 3.541s14.477 35.809 56.934 35.809c-4.453 39.286 16.319 85.1 66.6 109.124 1.124.537 2.18 1.124 3.334 1.639-29.348-15.169-53.582-43.834-56.609-78.644z"}),t.jsx("path",{fill:"url(#l)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.053 0 84.291 24.77 105.3 61.484-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1a144.108 144.108 0 0 1-3.5-1.743c1.124.537 2.18 1.124 3.334 1.639-29.35-15.168-53.584-43.833-56.611-78.643 0 0 11.093-41.335 79.432-41.335 7.388 0 28.509-20.615 28.9-26.593-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.435 26.916c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.486 12.853-2.77 15.156-.022.177.021-.176 0 0a279.565 279.565 0 0 0-3.544 33.53c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zm-23.841 12.341c.012.085.027.174.04.259l-.008-.026-.032-.233z"})]}),P6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:250.076,height:248.707,viewBox:"0 0 66.166 65.804",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"b",children:[t.jsx("stop",{offset:0,stopColor:"#06c2e7"}),t.jsx("stop",{offset:.25,stopColor:"#0db8ec"}),t.jsx("stop",{offset:.5,stopColor:"#12aef1"}),t.jsx("stop",{offset:.75,stopColor:"#1f86f9"}),t.jsx("stop",{offset:1,stopColor:"#107ddd"})]}),t.jsxs("linearGradient",{id:"a",children:[t.jsx("stop",{offset:0,stopColor:"#bdbdbd"}),t.jsx("stop",{offset:1,stopColor:"#fff"})]}),t.jsx("linearGradient",{xlinkHref:"#a",id:"d",x1:412.975,x2:412.975,y1:237.608,y2:59.392,gradientTransform:"translate(206.79 159.773) scale(.35154)",gradientUnits:"userSpaceOnUse"}),t.jsx("filter",{id:"f",width:1.042,height:1.045,x:-.021,y:-.022,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:.958})}),t.jsx("filter",{id:"c",width:1.096,height:1.096,x:-.048,y:-.048,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:3.564})}),t.jsx("radialGradient",{xlinkHref:"#b",id:"e",cx:413.061,cy:136.818,r:82.125,fx:413.061,fy:136.818,gradientTransform:"translate(194.545 155.58) scale(.38143)",gradientUnits:"userSpaceOnUse"})]}),t.jsx("path",{d:"M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z",filter:"url(#c)",opacity:.53,paintOrder:"markers stroke fill",transform:"matrix(.33865 0 0 .3261 -106.77 -14.478)"}),t.jsx("path",{fill:"url(#d)",stroke:"#cdcdcd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:.093,d:"M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"url(#e)",d:"M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"#f4f2f3",d:"M33.083 4.017a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .842 0V4.438a.42.42 0 0 0-.421-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.527.002a.42.42 0 0 0-.377.375l-.214 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zM27.5 4.6a.42.42 0 0 0-.41.508l1.005 4.75a.42.42 0 1 0 .824-.174l-1.005-4.75A.42.42 0 0 0 27.5 4.6zm11.183.004a.42.42 0 0 0-.414.333l-1.009 4.75a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.632 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm16.568.001a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.436-.55zM22.13 6.34a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm21.937.015a.42.42 0 0 0-.392.25l-1.978 4.434a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.593zM19.654 7.65a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.421L19.989 7.86a.42.42 0 0 0-.335-.21zm26.858 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .73.42l1.02-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.85-3.93a.42.42 0 0 0-.356-.174zm31.702.022a.42.42 0 0 0-.356.174l-2.856 3.926a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.14zm35.975.003a.421.421 0 0 0-.29.139l-1.367 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.61 3.249a.42.42 0 1 0 .563-.626l-3.609-3.248a.42.42 0 0 0-.304-.108zm40.109.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm-41.823 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.681l1.653-1.2a.42.42 0 0 0-.262-.76zM9.72 17.49a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729L9.96 17.546a.42.42 0 0 0-.24-.056zm46.728 0a.417.417 0 0 0-.24.056l-4.205 2.427a.42.42 0 1 0 .42.73l4.206-2.428a.42.42 0 0 0-.181-.785zM8.508 19.996a.42.42 0 0 0-.18.806l1.866.832a.42.42 0 1 0 .343-.77l-1.866-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.865.83a.42.42 0 1 0 .342.77l1.866-.831a.42.42 0 0 0-.179-.806zM7.429 22.615a.42.42 0 0 0-.094.82l4.615 1.504a.42.42 0 1 0 .261-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm51.314.018a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zM6.756 25.365a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.823l-1.998-.425a.413.413 0 0 0-.085-.009zm52.655.004a.518.518 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zM6.247 28.13a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.837l4.83-.504a.42.42 0 0 0-.003-.837zM6.165 30.96a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.838l4.83-.504a.42.42 0 0 0-.003-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.828-.51a.434.434 0 0 0-.086-.001zM8.748 36.13a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.67.004a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zM12.111 37.79a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zM10.35 41.08a.42.42 0 0 0-.163.036l-1.866.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.179-.806zm45.459.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.769l-1.865-.832a.42.42 0 0 0-.163-.036zm-41.826.912a.417.417 0 0 0-.24.056L9.538 44.49a.42.42 0 1 0 .421.73l4.205-2.428a.42.42 0 0 0-.181-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.249 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.682l1.653-1.2a.42.42 0 0 0-.262-.762zm40.288.015a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm32.8.011a.421.421 0 0 0-.26.734l3.609 3.248a.42.42 0 1 0 .563-.625l-3.608-3.249a.42.42 0 0 0-.304-.107zm-29.375 3.084a.42.42 0 0 0-.355.173l-2.856 3.927a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm25.936.018a.421.421 0 0 0-.326.668l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.29.14l-1.367 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.331.002a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.139zm-25.655 1.684a.419.419 0 0 0-.393.25l-1.978 4.433a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.592zm17.955.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm-21.431 1.359a.419.419 0 0 0-.335.21l-1.021 1.768a.42.42 0 1 0 .729.421l1.02-1.769a.42.42 0 0 0-.393-.63zm24.934 0a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.422l-1.022-1.769a.42.42 0 0 0-.335-.21zm-17.054.063a.42.42 0 0 0-.415.334l-1.009 4.749a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .823-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.573.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .842 0v-4.855a.42.42 0 0 0-.421-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm15.45 0a.42.42 0 0 0-.437.55l.632 1.943a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm-10.365 1.083a.42.42 0 0 0-.378.375l-.213 2.03a.42.42 0 1 0 .837.088l.214-2.03a.42.42 0 0 0-.46-.463zm5.267.002a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.088l-.212-2.03a.42.42 0 0 0-.377-.375z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z",filter:"url(#f)",opacity:.409,paintOrder:"markers stroke fill",transform:"translate(-112.095 -20.822) scale(.35154)"}),t.jsx("path",{fill:"#ff5150",d:"m36.383 34.838-6.6-6.913 23.416-15.752z",paintOrder:"markers stroke fill"}),t.jsx("path",{fill:"#f1f1f1",d:"m36.383 34.838-6.6-6.913L12.966 50.59z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m12.967 50.59 23.416-15.752L53.2 12.173z",opacity:.243})]}),$6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"b",cx:161.8,cy:68.9,r:95.4,gradientTransform:"matrix(1 0 0 -.95 0 248.8)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.7,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"d",cx:-340.3,cy:63,r:143.2,gradientTransform:"matrix(.15 -.99 -.8 -.12 176.6 -125.4)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.8,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"e",cx:113.4,cy:570.2,r:202.4,gradientTransform:"matrix(-.04 1 2.13 .08 -1179.5 -106.7)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#35c1f1"}),t.jsx("stop",{offset:.1,stopColor:"#34c1ed"}),t.jsx("stop",{offset:.2,stopColor:"#2fc2df"}),t.jsx("stop",{offset:.3,stopColor:"#2bc3d2"}),t.jsx("stop",{offset:.7,stopColor:"#36c752"})]}),t.jsxs("radialGradient",{id:"f",cx:376.5,cy:568,r:97.3,gradientTransform:"matrix(.28 .96 .78 -.23 -303.8 -148.5)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#66eb6e"}),t.jsx("stop",{offset:1,stopColor:"#66eb6e",stopOpacity:0})]}),t.jsxs("linearGradient",{id:"a",x1:63.3,x2:241.7,y1:84,y2:84,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#0c59a4"}),t.jsx("stop",{offset:1,stopColor:"#114a8b"})]}),t.jsxs("linearGradient",{id:"c",x1:157.3,x2:46,y1:161.4,y2:40.1,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1b9de2"}),t.jsx("stop",{offset:.2,stopColor:"#1595df"}),t.jsx("stop",{offset:.7,stopColor:"#0680d7"}),t.jsx("stop",{offset:1,stopColor:"#0078d4"})]})]}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{fill:"url(#a)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{isolation:"isolate",opacity:.35,fill:"url(#b)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{fill:"url(#c)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{opacity:.41,fill:"url(#d)",isolation:"isolate"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#e)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#f)"},transform:"translate(-4.6 -5)"})]}),O6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Opera",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"opera-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FF1B2D"}),t.jsx("stop",{offset:"50%",stopColor:"#CC0000"}),t.jsx("stop",{offset:"100%",stopColor:"#A02128"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#opera-gradient)"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"6.5",ry:"8.5",fill:"none",stroke:"#fff",strokeWidth:"1.2",opacity:"0.9"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"3.5",ry:"5.5",fill:"#fff"}),t.jsx("path",{d:"M12 8.5c-1.4 0-2.5 1.6-2.5 3.5s1.1 3.5 2.5 3.5 2.5-1.6 2.5-3.5-1.1-3.5-2.5-3.5z",fill:"url(#opera-gradient)"})]}),Z6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Brave",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"brave-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FB542B"}),t.jsx("stop",{offset:"50%",stopColor:"#FF6B35"}),t.jsx("stop",{offset:"100%",stopColor:"#FF4500"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#brave-gradient)"}),t.jsx("path",{d:"M12 3.5l1.5 2h2.5l-.8 3 1.3 2.5-2.5.8v2.7l-2-.7-2 .7v-2.7l-2.5-.8L8.8 8.5 8 5.5h2.5L12 3.5z",fill:"#fff"}),t.jsx("path",{d:"M12 6.5c-.8 0-1.5.7-1.5 1.5v3c0 .8.7 1.5 1.5 1.5s1.5-.7 1.5-1.5V8c0-.8-.7-1.5-1.5-1.5z",fill:"url(#brave-gradient)"}),t.jsx("circle",{cx:"12",cy:"16",r:"1",fill:"url(#brave-gradient)"})]}),H6=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"w-text-secondary",children:[t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.6"}),t.jsx("circle",{cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.3"}),t.jsx("path",{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor",opacity:"0.5"}),t.jsx("circle",{cx:"12",cy:"12",r:"1",fill:"currentColor"}),t.jsx("text",{x:"12",y:"16.5",textAnchor:"middle",fill:"currentColor",fontSize:"6",opacity:"0.7",children:"?"})]}),F6=({browser:e})=>{const a=(e==null?void 0:e.toLowerCase())||"",s={width:20,height:20};return a.includes("chrome")?t.jsx(R6,{...s}):a.includes("firefox")?t.jsx(L6,{...s}):a.includes("safari")?t.jsx(P6,{...s}):a.includes("edge")?t.jsx($6,{...s}):a.includes("opera")?t.jsx(O6,{...s}):a.includes("brave")?t.jsx(Z6,{...s}):t.jsx(H6,{})},T6=()=>{const{signins:e,removeSignin:a,refetch:s,loading:n}=_o(),{refetch:i}=ot(),{toast:l}=ta(),m=e,c=async p=>{try{await a(p),await Promise.all([s(),i()]),l("Session ended successfully","info")}catch(u){l(u.message||"Failed to end session. Please try again.","error")}},d=p=>{if(!p||p.trim()==="")return"Unknown";const u=new Date(p);if(isNaN(u.getTime()))return"Unknown";const f=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return f<1?"Just now":f<60?`${f}m ago`:f<1440?`${Math.floor(f/60)}h ago`:u.toLocaleDateString()};return n?t.jsx("div",{className:"w-loading",children:t.jsx(ye,{})}):t.jsx("div",{children:m&&m.length>0?t.jsx(t.Fragment,{children:t.jsx(pn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(it,{children:[t.jsx($e,{children:"Browser & Device"}),t.jsx($e,{children:"Location"}),t.jsx($e,{children:"Last Active"}),t.jsx($e,{})]})}),t.jsx(Zt,{children:m.map(p=>t.jsxs(it,{children:[t.jsx(Ke,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Ir,{children:t.jsx(F6,{browser:p.browser||"Unknown"})}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.browser||"Unknown Browser"}),p.device&&t.jsx("div",{className:"w-text-muted",children:p.device})]})]})}),t.jsx(Ke,{children:t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.city&&p.country?`${p.city}, ${p.country}`:"Unknown location"}),p.ip_address&&t.jsx("div",{className:"w-text-muted",children:p.ip_address})]})}),t.jsx(Ke,{children:d(p.last_active_at)}),t.jsx(Ht,{children:t.jsxs(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>c(p.id),children:[t.jsx(Ea,{size:12}),"Sign out"]})})]},p.id))})]})})}):t.jsx(Ct,{title:"No active sessions",description:"You don't have any active sessions at the moment."})})},I6=(e,a)=>`${(e==null?void 0:e[0])||""}${(a==null?void 0:a[0])||""}`.toUpperCase()||"U",A0=()=>{var N,j,C,y,E,R,F,A;const{loading:e,user:a,updateProfilePicture:s}=ga(),{deployment:n}=_e(),[i,l]=o.useState("profile"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((I,L="info")=>{c(I),p(L),setTimeout(()=>c(null),3e3)},[c]),x=async I=>{var S;const L=(S=I.target.files)==null?void 0:S[0];if(L){if(L.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!L.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s(L),await(a==null?void 0:a.refetch()),g("Profile picture updated","info")}catch(O){g((O==null?void 0:O.message)||"Failed to update profile picture","error")}finally{h(!1),f.current&&(f.current.value="")}}};if(e)return t.jsx(Me,{children:t.jsx(ur,{className:"w-flex w-items-center w-justify-center",children:t.jsx(ye,{})})});const w=n==null?void 0:n.auth_settings,b=(N=w==null?void 0:w.email_address)==null?void 0:N.enabled,_=(j=w==null?void 0:w.phone_number)==null?void 0:j.enabled,v=((C=n==null?void 0:n.social_connections)==null?void 0:C.some(I=>I.enabled))||!1,k=((y=w==null?void 0:w.password)==null?void 0:y.enabled)||((E=w==null?void 0:w.auth_factors_enabled)==null?void 0:E.authenticator)||((R=w==null?void 0:w.auth_factors_enabled)==null?void 0:R.phone_otp)||((F=w==null?void 0:w.auth_factors_enabled)==null?void 0:F.backup_code);return t.jsx(Me,{children:t.jsx(r0,{children:t.jsx(n0.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(ur,{className:"w-relative",children:[a&&t.jsxs(h0,{className:"mac-page-header",children:[t.jsxs("button",{type:"button",className:"w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var I;return(I=f.current)==null?void 0:I.click()},disabled:u,title:"Change profile picture","aria-label":"Change profile picture",children:[t.jsx("span",{className:"w-avatar w-avatar--lg",children:a.profile_picture_url?t.jsx("img",{src:a.profile_picture_url,alt:""}):I6(a.first_name,a.last_name)}),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(ye,{size:14}):t.jsx(an,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(f0,{children:[t.jsx(w0,{children:`${a.first_name||""} ${a.last_name||""}`.trim()||a.username||"Account"}),((A=a.primary_email_address)==null?void 0:A.email)&&t.jsx(g0,{children:a.primary_email_address.email})]})]}),t.jsx(i0,{children:t.jsxs(o0,{children:[t.jsx(_a,{$isActive:i==="profile",onClick:()=>l("profile"),children:t.jsxs(ka,{children:[t.jsx(ps,{size:16}),"Profile"]})}),b&&t.jsx(_a,{$isActive:i==="email",onClick:()=>l("email"),children:t.jsxs(ka,{children:[t.jsx(cl,{size:16}),"Email"]})}),_&&t.jsx(_a,{$isActive:i==="phone",onClick:()=>l("phone"),children:t.jsxs(ka,{children:[t.jsx(Lu,{size:16}),"Phone"]})}),v&&t.jsx(_a,{$isActive:i==="social",onClick:()=>l("social"),children:t.jsxs(ka,{children:[t.jsx(Ru,{size:16}),"Connections"]})}),k&&t.jsx(_a,{$isActive:i==="security",onClick:()=>l("security"),children:t.jsxs(ka,{children:[t.jsx(Xt,{size:16}),"Security"]})}),t.jsx(_a,{$isActive:i==="sessions",onClick:()=>l("sessions"),children:t.jsxs(ka,{children:[t.jsx(Pu,{size:16}),"Sessions"]})})]})}),t.jsxs(l0,{children:[i==="profile"&&t.jsx(d6,{}),i==="email"&&b&&t.jsx(u6,{}),i==="phone"&&_&&t.jsx(m6,{}),i==="social"&&v&&t.jsx(f6,{}),i==="security"&&k&&t.jsx(M6,{}),i==="sessions"&&t.jsx(T6,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,style:{minWidth:0},children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Ha,{size:12}):t.jsx(Ge,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},M0=({isOpen:e,onClose:a,title:s,showHeader:n,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{className:"w-dialog--panel",children:[n&&t.jsx(ze.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(A0,{}),l&&t.jsx(ze.Footer,{children:l})]})})}),Re=(...e)=>e.filter(Boolean).join(" "),V6=e=>t.jsx("div",{...e,className:Re("w-relative",e.className)}),R0=o.forwardRef((e,a)=>t.jsx("button",{...e,ref:a,className:Re("w-acct",e.className),style:{width:"auto",margin:0,padding:4,gap:8,...e.style}}));R0.displayName="AccountButton";const z6=({children:e,...a})=>t.jsx("div",{...a,className:Re("w-avatar","w-avatar--md",a.className),children:e}),D6=e=>t.jsx("div",{...e,className:Re("w-sec","w-text-secondary",e.className)}),L0=o.forwardRef(({$position:e,$isOpen:a,$maxHeight:s,children:n,...i},l)=>t.jsx("div",{...i,ref:l,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:s?`${s}px`:"calc(100vh - 48px)",overflowY:"auto",zIndex:99999,top:(e==null?void 0:e.top)!==void 0?`${e.top}px`:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?`${e.bottom}px`:void 0,left:(e==null?void 0:e.left)!==void 0?`${e.left}px`:void 0,right:(e==null?void 0:e.right)!==void 0?`${e.right}px`:void 0,visibility:e&&a?"visible":"hidden",opacity:a&&e?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,padding:0},children:n}));L0.displayName="DropdownContainer";const P0=o.forwardRef(({$top:e,$left:a,$isOpen:s,$maxHeight:n,children:i,...l},m)=>t.jsx("div",{...l,ref:m,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:`${n}px`,overflowY:"auto",zIndex:99999,display:"flex",flexDirection:"column",top:`${e}px`,left:`${a}px`,visibility:s?"visible":"hidden",opacity:s?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${s?"0s":"0.15s"}`,padding:0},children:i}));P0.displayName="SidePanel";const Gi=e=>t.jsx("hr",{...e,className:Re("w-hr",e.className)}),U6=e=>t.jsx("div",{...e,style:{padding:"16px 14px 8px",...e.style}}),W6=e=>t.jsx("div",{...e,className:Re("w-flex","w-items-center","w-gap-3",e.className)}),B6=({children:e,...a})=>t.jsx("div",{...a,className:Re("w-avatar","w-avatar--lg",a.className),children:e}),G6=e=>t.jsx("div",{...e,className:Re("w-flex-col","w-grow",e.className),style:{gap:2,...e.style}}),q6=e=>t.jsx("div",{...e,className:Re("w-sec","w-truncate",e.className)}),K6=e=>t.jsx("div",{...e,className:Re("w-secsub","w-truncate",e.className)}),Y6=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{border:"0.5px solid var(--wa-border)",background:e?"var(--wa-surface-subtle)":void 0,...a.style}}),Q6=({children:e,...a})=>t.jsx("div",{...a,className:"w-avatar w-avatar--sm",children:e}),J6=e=>t.jsx("div",{...e,className:Re("w-sec","w-grow","w-truncate",e.className)}),X6=e=>t.jsx("div",{...e,className:Re("w-secsub","w-none",e.className)}),ep=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),tp=e=>t.jsx("button",{...e,className:Re("w-menu-item",e.className)}),ap=e=>t.jsx("span",{...e,className:Re("w-grow",e.className)}),sp=e=>t.jsx("span",{...e,className:Re("w-menu-trail",e.className)}),np=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),rp=e=>t.jsx("div",{...e,className:Re("w-menu-label",e.className)}),Zn=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{cursor:e?"default":"pointer",...a.style}}),Hn=({children:e,...a})=>t.jsx("div",{...a,className:Re("w-flex","w-items-center","w-justify-center","w-none",a.className),style:{width:14,height:14,color:"var(--wa-primary)",...a.style},children:e}),ip=e=>t.jsx("div",{...e,className:"w-none",style:{width:14,...e.style}}),Fn=e=>t.jsx("div",{...e,className:Re("w-sec","w-grow","w-truncate",e.className)}),qi=e=>t.jsx("div",{...e,className:Re("w-secsub","w-none",e.className)}),op=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),lp=e=>t.jsx("button",{...e,className:Re("w-menu-item","w-menu-item--danger",e.className)}),cp=e=>t.jsx("button",{...e,className:Re("w-menu-item",e.className),style:{borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,flex:"none",...e.style}}),dp=e=>t.jsx("div",{...e,style:{flex:"1 1 auto",overflowY:"auto",padding:5,...e.style}}),Ki=({$active:e,...a})=>t.jsx("button",{...a,className:Re("w-menu-item","sp-row",e&&"sp-row--active",a.className),style:{height:30,...a.style}}),Yi=({$active:e,...a})=>t.jsx("button",{...a,className:Re("w-menu-item","sp-row","sp-ws-row",e&&"sp-row--active",a.className),style:{height:30,paddingLeft:30,position:"relative",...a.style},children:a.children}),Qi=({$personal:e,children:a,...s})=>t.jsx("div",{...s,className:Re("w-avatar","w-avatar--sm",!e&&"",s.className),children:a}),Ji=({children:e,...a})=>t.jsx("div",{...a,className:Re("w-avatar","","w-avatar--sm",a.className),children:e}),Xi=e=>t.jsx("span",{...e,className:Re("w-sec","w-grow","w-truncate",e.className)}),eo=e=>t.jsx("span",{...e,className:Re("w-secsub","w-grow","w-truncate",e.className)}),Tn=e=>t.jsx("div",{...e,className:Re("w-flex","w-items-center","w-none",e.className),style:{gap:4,...e.style}}),up=({$open:e,...a})=>t.jsx(Dt,{...a,className:"w-text-muted",style:{flexShrink:0,transition:"transform 0.2s ease",transform:e?"rotate(0deg)":"rotate(-90deg)"}}),In=e=>t.jsx(Ge,{...e,className:"w-text-primary",style:{flexShrink:0}}),mp=e=>t.jsx("div",{...e,className:Re("w-flex-col","w-gap-3","w-none",e.className),style:{padding:"12px 12px 16px",borderBottom:"0.5px solid var(--wa-border)",...e.style}}),pp=e=>t.jsx("button",{...e,className:Re("w-btn","w-btn--icon",e.className),style:{width:24,height:24,...e.style}}),to=e=>t.jsx("div",{...e,className:Re("w-flex","w-items-center","w-gap-3",e.className),style:{padding:"4px 4px 0",minWidth:0,...e.style}}),ao=({children:e,...a})=>t.jsx("div",{...a,className:Re("w-avatar","","w-avatar--md",a.className),children:e}),so=e=>t.jsx("div",{...e,className:Re("w-flex-col","w-grow",e.className),style:{gap:1,minWidth:0,...e.style}}),no=e=>t.jsx("div",{...e,className:Re("w-sec","w-truncate",e.className)}),ro=e=>t.jsx("div",{...e,className:Re("w-flex","w-items-center","w-none",e.className),style:{gap:2,...e.style}}),Hs=({$destructive:e,...a})=>t.jsx("button",{...a,className:Re("w-btn","w-btn--icon",e&&"w-btn--danger",a.className),style:{width:24,height:24,...a.style}}),io=e=>t.jsx("div",{...e,className:"w-none",style:{borderTop:"0.5px solid var(--wa-border)",padding:5,...e.style}}),oo=e=>t.jsx("button",{...e,className:Re("w-menu-item",e.className),style:{height:30,color:"var(--wa-text-muted)",...e.style}}),lo=e=>t.jsx("div",{...e,className:Re("w-flex","w-items-center","w-justify-center","w-none",e.className),style:{width:20,height:20,...e.style}}),zr=({showName:e=!0,onCreateOrg:a,showOrgSwitcher:s=!0,narrowBreakpoint:n=640})=>{var Ee,Ye,vt,Ut,Ft,Wt,va,ba,bt,aa,sa,na;const[i,l]=o.useState(!1),[m,c]=o.useState(!1),[d,p]=o.useState(typeof window<"u"&&window.innerWidth<n),[u,h]=o.useState(!1),[f,g]=o.useState("org"),[x,w]=o.useState(null),[b,_]=o.useState({top:0,left:0,maxHeight:400}),[v,k]=o.useState(new Set),[N,j]=o.useState(null),C=o.useRef(null),y=o.useRef(null),E=o.useRef(null),R=xt({triggerRef:C,isOpen:i,minWidth:300}),F=Kt(!1),A=Kt(!1),I=Kt(!1),L=Kt(!1),S=Kt(!1),{session:O,signOut:P,switchSignIn:$,switchOrganization:Z,switchWorkspace:H,refetch:M}=ot(),{navigateToSignIn:B}=jt(),{deployment:D}=_e(),{activeOrganization:W,activeMembership:K,leave:ee}=ha(),{organizationMemberships:ce}=fa(),{workspaces:be}=wa(),{activeWorkspace:Q,activeMembership:ie,leave:ne}=zt(),U=(Ee=O==null?void 0:O.active_signin)==null?void 0:Ee.user,Qe=((vt=(Ye=D==null?void 0:D.auth_settings)==null?void 0:Ye.multi_session_support)==null?void 0:vt.enabled)??!1,Je=((Ut=D==null?void 0:D.b2b_settings)==null?void 0:Ut.allow_users_to_create_orgs)??!1,Te=((Ft=D==null?void 0:D.b2b_settings)==null?void 0:Ft.organizations_enabled)??!1,Se=Te&&(((Wt=D==null?void 0:D.b2b_settings)==null?void 0:Wt.workspaces_enabled)??!1),qe=s&&Te,le=!W,V=o.useMemo(()=>{var ge;const oe={};for(const Ce of be||[]){const De=(ge=Ce.organization)==null?void 0:ge.id;De&&(oe[De]||(oe[De]=[]),oe[De].push(Ce))}return oe},[be]),Y=ce||[],q=o.useCallback(()=>{if(!y.current)return;const oe=y.current.getBoundingClientRect(),ge=300,Ce=8,De=window.innerWidth<n;if(p(De),De){_({top:oe.top,left:oe.left,maxHeight:oe.height});return}const ae=Math.min(Math.max(oe.height,520),window.innerHeight-oe.top-16),we=oe.right+Ce+ge<=window.innerWidth-8;_({top:oe.top,left:we?oe.right+Ce:oe.left-Ce-ge,maxHeight:ae})},[n]),G=o.useCallback(()=>{q(),c(!0)},[q]),de=o.useCallback(oe=>{k(ge=>{const Ce=new Set(ge);return Ce.has(oe)?Ce.delete(oe):Ce.add(oe),Ce})},[]);o.useEffect(()=>{W&&Se&&k(oe=>{if(oe.has(W.id))return oe;const ge=new Set(oe);return ge.add(W.id),ge})},[W,Se]),o.useEffect(()=>{g(Se&&Q?"ws":"org")},[Se,Q==null?void 0:Q.id]),o.useEffect(()=>{const oe=()=>{p(window.innerWidth<n),m&&q()};return window.addEventListener("resize",oe),()=>window.removeEventListener("resize",oe)},[n,m,q]),o.useEffect(()=>{i||(c(!1),h(!1))},[i]),o.useEffect(()=>{if(!i)return;const oe=setTimeout(()=>{const ge=Ce=>{var ae,we,tt;const De=Ce.target;(ae=C.current)!=null&&ae.contains(De)||(we=y.current)!=null&&we.contains(De)||(tt=E.current)!=null&&tt.contains(De)||l(!1)};return document.addEventListener("mousedown",ge),()=>document.removeEventListener("mousedown",ge)},50);return()=>clearTimeout(oe)},[i]);const z=oe=>oe.split(" ").filter(Boolean).map(ge=>ge[0]).join("").toUpperCase().slice(0,2),me=(oe,ge,Ce,De,ae)=>t.jsx(ae,{children:oe?t.jsx("img",{src:ge,alt:Ce}):z(`${Ce||""} ${De||""}`)}),st=async oe=>{try{await P(oe),await M(),l(!1)}catch{}},Oe=async oe=>{try{await $(oe),await M(),l(!1)}catch{}},Ze=async oe=>{if(!u){h(!0);try{await Z(oe),await M(),c(!1)}catch{}finally{h(!1)}}},mt=async oe=>{if(!u){h(!0);try{await H(oe),await M(),c(!1)}catch{}finally{h(!1)}}},J=()=>{F.open(),l(!1)},re=[...(O==null?void 0:O.signins)||[]].sort((oe,ge)=>{const Ce=oe.user.id===(U==null?void 0:U.id),De=ge.user.id===(U==null?void 0:U.id);return Ce===De?0:Ce?-1:1}),ue=((va=re.find(oe=>oe.user.id===(U==null?void 0:U.id)))==null?void 0:va.id)||"",He=((bt=(ba=K==null?void 0:K.roles)==null?void 0:ba[0])==null?void 0:bt.name)??null;return t.jsx(Me,{children:t.jsxs(V6,{children:[t.jsxs(R0,{ref:C,onClick:()=>l(!i),children:[me(U==null?void 0:U.has_profile_picture,U==null?void 0:U.profile_picture_url,U==null?void 0:U.first_name,U==null?void 0:U.last_name,z6),e&&t.jsx(D6,{children:`${(U==null?void 0:U.first_name)||""} ${(U==null?void 0:U.last_name)||""}`.trim()})]}),typeof window<"u"&&Xs.createPortal(t.jsxs("div",{className:"wacht-root",children:[t.jsxs(L0,{ref:y,$position:R,$isOpen:i&&!(d&&m),$maxHeight:R==null?void 0:R.maxHeight,children:[t.jsx(U6,{children:t.jsxs(W6,{children:[me(U==null?void 0:U.has_profile_picture,U==null?void 0:U.profile_picture_url,U==null?void 0:U.first_name,U==null?void 0:U.last_name,B6),t.jsxs(G6,{children:[t.jsx(q6,{children:`${(U==null?void 0:U.first_name)||""} ${(U==null?void 0:U.last_name)||""}`.trim()}),t.jsx(K6,{children:(aa=U==null?void 0:U.primary_email_address)==null?void 0:aa.email})]})]})}),t.jsxs(ep,{children:[qe&&t.jsxs(Y6,{$active:m,onClick:G,style:{marginBottom:8},children:[t.jsx(Q6,{children:W?W.image_url?t.jsx("img",{src:W.image_url,alt:W.name}):(sa=W.name)==null?void 0:sa.charAt(0).toUpperCase():U!=null&&U.has_profile_picture?t.jsx("img",{src:U.profile_picture_url,alt:U.first_name}):z(`${(U==null?void 0:U.first_name)||""} ${(U==null?void 0:U.last_name)||""}`)}),t.jsx(J6,{children:(W==null?void 0:W.name)??"Personal account"}),He&&t.jsx(X6,{children:He})]}),t.jsxs(tp,{onClick:J,children:[t.jsx(Sa,{}),t.jsx(ap,{children:"Manage account"}),t.jsx(sp,{children:"⌘,"})]})]}),t.jsx(Gi,{}),t.jsxs(np,{children:[t.jsx(rp,{children:"Accounts"}),Qe?re.map(({user:oe,id:ge})=>{var De;const Ce=oe.id===(U==null?void 0:U.id);return t.jsxs(Zn,{$active:Ce,onClick:Ce?void 0:()=>Oe(ge),children:[Ce?t.jsx(Hn,{children:t.jsx(Ge,{})}):t.jsx(ip,{}),t.jsx(Fn,{children:(De=oe.primary_email_address)==null?void 0:De.email}),Ce&&t.jsx(qi,{children:"Current"})]},oe.id)}):U&&t.jsxs(Zn,{$active:!0,children:[t.jsx(Hn,{children:t.jsx(Ge,{})}),t.jsx(Fn,{children:(na=U.primary_email_address)==null?void 0:na.email}),t.jsx(qi,{children:"Current"})]}),Qe&&t.jsxs(Zn,{onClick:()=>{B(),l(!1)},children:[t.jsx(Hn,{style:{color:"var(--wa-text-muted)"},children:t.jsx(Nt,{})}),t.jsx(Fn,{style:{color:"var(--wa-text-muted)"},children:"Add account"})]})]}),t.jsx(Gi,{}),t.jsx(op,{children:t.jsxs(lp,{onClick:()=>st(ue),children:[t.jsx(Ea,{}),"Sign out"]})})]}),t.jsxs(P0,{ref:E,$top:b.top,$left:b.left,$isOpen:i&&m,$maxHeight:b.maxHeight,children:[d&&t.jsxs(cp,{onClick:()=>c(!1),children:[t.jsx(sn,{size:13}),"Back"]}),(()=>{var kt;if(le)return null;const oe=Se&&!!Q,ge=!!((kt=K==null?void 0:K.eligibility_restriction)!=null&&kt.type)&&K.eligibility_restriction.type!=="none",Ce=!!W&&!ge&&Zr(K),De=oe&&!ge&&Fr(ie),ae=oe?f:"org",we=async()=>{if(ee){w("org");try{await ee(),await M(),c(!1)}catch{}finally{w(null)}}},tt=async()=>{if(ne){w("ws");try{await ne(),c(!1)}catch{}finally{w(null)}}},Be=()=>{if(!oe)return null;const yt=ae==="org"?"ws":"org",Fe=yt==="ws"?"Switch to workspace context":"Switch to organization context";return t.jsx(pp,{type:"button",onClick:()=>g(yt),title:Fe,"aria-label":Fe,children:t.jsx(vu,{size:12})})};return t.jsxs(mp,{children:[ae==="org"&&W&&t.jsxs(to,{children:[Be(),t.jsx(ao,{children:W.image_url?t.jsx("img",{src:W.image_url,alt:W.name}):z(W.name)}),t.jsx(so,{children:t.jsx(no,{children:W.name})}),t.jsxs(ro,{children:[Ce&&t.jsx(Hs,{onClick:()=>{I.open(),l(!1)},title:"Organization settings","aria-label":"Organization settings",children:t.jsx(Sa,{size:14})}),t.jsx(Hs,{$destructive:!0,onClick:we,disabled:x==="org",title:"Leave organization","aria-label":"Leave organization",children:t.jsx(Ea,{size:14})})]})]}),ae==="ws"&&oe&&t.jsxs(to,{children:[Be(),t.jsx(ao,{children:Q.image_url?t.jsx("img",{src:Q.image_url,alt:Q.name}):z(Q.name)}),t.jsx(so,{children:t.jsx(no,{children:Q.name})}),t.jsxs(ro,{children:[De&&t.jsx(Hs,{onClick:()=>{S.open(),l(!1)},title:"Workspace settings","aria-label":"Workspace settings",children:t.jsx(Sa,{size:14})}),t.jsx(Hs,{$destructive:!0,onClick:tt,disabled:x==="ws",title:"Leave workspace","aria-label":"Leave workspace",children:t.jsx(Ea,{size:14})})]})]})]})})(),t.jsxs(dp,{children:[t.jsxs(Ki,{$active:le,onClick:()=>{le||Ze(void 0)},disabled:u,style:le?{cursor:"default"}:void 0,children:[t.jsx(Qi,{$personal:!0,children:U!=null&&U.has_profile_picture?t.jsx("img",{src:U.profile_picture_url,alt:U.first_name}):t.jsx(ps,{size:12})}),t.jsx(Xi,{children:"Personal account"}),le&&t.jsx(Tn,{children:t.jsx("span",{className:"sp-check",style:{display:"inline-flex"},children:t.jsx(In,{size:13})})})]}),Y.map(oe=>{var tt,Be;const ge=oe.organization,Ce=ge.id===(W==null?void 0:W.id),De=v.has(ge.id),ae=Se?V[ge.id]||[]:[],we=!!((tt=oe.eligibility_restriction)!=null&&tt.type)&&oe.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs(Ki,{$active:Ce,onClick:()=>{we||(Se?de(ge.id):Ce||Ze(ge.id))},disabled:u,style:we?{opacity:.55,cursor:"not-allowed"}:Ce&&!Se?{cursor:"default"}:void 0,title:(Be=oe.eligibility_restriction)==null?void 0:Be.message,children:[t.jsx(Qi,{children:ge.image_url?t.jsx("img",{src:ge.image_url,alt:ge.name}):z(ge.name)}),t.jsx(Xi,{children:ge.name}),t.jsxs(Tn,{children:[we&&t.jsx(Aa,{size:12,color:"var(--wa-error)"}),Ce&&!Se&&t.jsx(In,{size:13}),Se&&t.jsx(up,{size:11,$open:De})]})]}),Se&&De&&t.jsxs(t.Fragment,{children:[ae.map(kt=>{var ra,ia;const yt=Ce&&(Q==null?void 0:Q.id)===kt.id,Fe=kt,Bt=((ra=Fe.eligibility_restriction)==null?void 0:ra.type)&&Fe.eligibility_restriction.type!=="none";return t.jsxs(Yi,{$active:yt,onClick:()=>{!yt&&!Bt&&mt(kt.id)},disabled:u,style:Bt||we?{opacity:.55,cursor:"not-allowed"}:yt?{cursor:"default"}:void 0,title:(ia=Fe.eligibility_restriction)==null?void 0:ia.message,children:[t.jsx(Ji,{children:Fe.image_url?t.jsx("img",{src:Fe.image_url,alt:Fe.name}):z(Fe.name).charAt(0)}),t.jsx(eo,{children:Fe.name}),t.jsxs(Tn,{children:[Bt&&t.jsx(Aa,{size:12,color:"var(--wa-error)"}),yt&&t.jsx(In,{size:12})]})]},kt.id)}),!we&&t.jsxs(Yi,{onClick:()=>{j(ge.id),L.open()},disabled:u,children:[t.jsx(Ji,{style:{background:"transparent",border:"1px dashed var(--wa-border-strong)"},children:t.jsx(Nt,{size:10})}),t.jsx(eo,{children:"New workspace"})]})]})]},ge.id)})]}),(()=>{var we,tt,Be;const oe=((ce==null?void 0:ce.length)??0)>0,ge=()=>Je&&t.jsx(io,{children:t.jsxs(oo,{onClick:()=>{a?(a(),l(!1)):A.open()},disabled:u,children:[t.jsx(lo,{children:t.jsx(Nt,{size:12})}),"New organization"]})});if(!Se||!oe)return ge();const Ce=!!((we=K==null?void 0:K.eligibility_restriction)!=null&&we.type)&&K.eligibility_restriction.type!=="none",De=((Be=(tt=ce==null?void 0:ce[0])==null?void 0:tt.organization)==null?void 0:Be.id)??null,ae=W&&!Ce?W.id:De;return t.jsx(io,{children:t.jsxs(oo,{onClick:()=>{j(ae),L.open()},disabled:u,children:[t.jsx(lo,{children:t.jsx(Nt,{size:12})}),"New workspace"]})})})()]})]}),document.body),t.jsx(M0,{isOpen:F.isOpen,onClose:F.close}),qe&&t.jsxs(t.Fragment,{children:[t.jsx(Wc,{isOpen:A.isOpen,onClose:A.close}),t.jsx(Yc,{isOpen:I.isOpen,onClose:I.close}),Se&&t.jsxs(t.Fragment,{children:[t.jsx(Lr,{isOpen:L.isOpen,onClose:()=>{L.close(),j(null)},organizationId:N||void 0}),t.jsx($r,{isOpen:S.isOpen,onClose:S.close})]})]})]})})};function $0({notification:e,onAction:a}){const[s,n]=o.useState(!1),i=c=>{c.target.closest("button")||(n(!s),e.is_read||a({type:"read",id:e.id}))},l=c=>{a({type:"custom",payload:c.payload})},m=c=>{const d=new Date(c),u=new Date().getTime()-d.getTime();if(u<6e4)return"Just now";const h=Math.floor(u/6e4);if(h<60)return`${h}m`;const f=Math.floor(h/60);if(f<24)return`${f}h`;const g=Math.floor(f/24);return g<7?`${g}d`:d.toLocaleDateString(void 0,{month:"short",day:"numeric"})};return t.jsxs("div",{className:"w-flex w-gap-3 w-row--hover w-notif-row",onClick:i,"data-unread":e.is_read?void 0:"",children:[t.jsxs("div",{className:"w-grow w-flex-col w-justify-center",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:2},children:[!e.is_read&&t.jsx("span",{className:"w-notif-dot"}),t.jsx("h4",{className:"w-sec w-truncate",style:{margin:0},children:e.title})]}),t.jsx("p",{className:`w-secsub${s?"":" w-truncate"}`,style:{margin:0,wordWrap:s?"break-word":void 0},children:e.body}),e.ctas&&e.ctas.length>0&&t.jsx("div",{className:"w-flex w-wrap w-gap-2",style:{marginTop:10},children:e.ctas.map((c,d)=>t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>l(c),children:c.label},d))})]}),t.jsxs("div",{className:"w-flex-col w-items-end w-gap-2 w-none",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-1",children:[e.is_read&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"unread",id:e.id})},title:"Mark as unread",children:t.jsx(_u,{size:14})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"star",id:e.id})},title:e.is_starred?"Unstar":"Star","data-on":e.is_starred?"":void 0,children:t.jsx($u,{size:14,fill:e.is_starred?"currentColor":"none"})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"archive",id:e.id})},title:e.is_archived?"Unarchive":"Archive",children:e.is_archived?t.jsx(Io,{size:14}):t.jsx(Fo,{size:14})})]}),t.jsx("span",{className:"w-secsub",style:{whiteSpace:"nowrap"},children:m(e.created_at)})]})]})}const O0=o.forwardRef(({scope:e="all",onAction:a,fullWidth:s,maxHeight:n,className:i},l)=>{const[m,c]=o.useState("inbox"),[d,p]=o.useState(!1),[u,h]=o.useState(!1),f=o.useRef(null),g={scope:e,limit:20,is_archived:m==="archive",is_starred:m==="starred",is_read:d?!1:void 0},{notifications:x,loading:w,error:b,hasMore:_,loadMore:v,markAsRead:k,markAsUnread:N,markAllAsRead:j,archiveAllRead:C,archiveNotification:y,starNotification:E}=Mo(g);o.useEffect(()=>{if(!u)return;const I=L=>{f.current&&!f.current.contains(L.target)&&h(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[u]);const R=async I=>{switch(I.type){case"read":await k(I.id);break;case"unread":await N(I.id);break;case"archive":await y(I.id);break;case"star":await E(I.id);break;case"custom":a==null||a(I.payload);break}},F=()=>{j(),h(!1)},A=()=>{C(),h(!1)};return t.jsxs("div",{ref:l,className:`w-flex-col w-relative w-notif-panel${s?" w-notif-panel--fill":""}${i?` ${i}`:""}`,style:{maxHeight:n||"100%"},children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-3 w-none w-notif-head",children:[t.jsxs("div",{className:"w-tabs w-grow",children:[t.jsx("button",{className:`w-tab${m==="inbox"?" w-tab--active":""}`,onClick:()=>c("inbox"),children:"Inbox"}),t.jsx("button",{className:`w-tab${m==="archive"?" w-tab--active":""}`,onClick:()=>c("archive"),children:"Archive"}),t.jsx("button",{className:`w-tab${m==="starred"?" w-tab--active":""}`,onClick:()=>c("starred"),children:"Starred"})]}),t.jsxs("label",{className:"w-switch w-none","data-on":d?"":void 0,onClick:()=>p(!d),children:[t.jsx("span",{className:"w-switch-track",children:t.jsx("span",{className:"w-switch-knob"})}),t.jsx("span",{className:"w-switch-label",children:"Unread Only"})]}),t.jsx("button",{className:"w-btn w-btn--icon w-none",onClick:()=>h(!u),children:t.jsx(Nu,{size:16})}),u&&t.jsxs("div",{ref:f,className:"w-menu w-notif-menu",children:[m==="inbox"&&t.jsxs("button",{className:"w-menu-item",onClick:F,children:[t.jsx(ju,{})," Mark all as read"]}),t.jsxs("button",{className:"w-menu-item",onClick:A,children:[t.jsx(Fo,{})," Archive all read"]})]})]}),t.jsx("div",{className:"w-grow w-notif-body",children:w?t.jsx("div",{className:"w-loading",children:t.jsx(ye,{})}):b?t.jsx(Ct,{icon:t.jsx(li,{size:20,className:"w-text-error"}),title:"Failed to load notifications",description:b.message||"An unexpected error occurred."}):x.length===0?t.jsx(Ct,{icon:t.jsx(li,{size:20}),title:"No notifications",description:"You're all caught up!"}):t.jsxs(t.Fragment,{children:[x.map(I=>t.jsx($0,{notification:I,onAction:R},I.id)),_&&t.jsx("div",{className:"w-flex w-justify-center",style:{padding:12},children:t.jsx("button",{className:"w-btn w-btn--ghost w-btn--sm",onClick:v,children:"Load more"})})]})})]})}),Z0=o.forwardRef(({position:e,scope:a,onAction:s,className:n},i)=>t.jsx("div",{ref:i,className:`w-card w-flex-col w-notif-pop${n?` ${n}`:""}`,style:{top:(e==null?void 0:e.top)!==void 0?e.top:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?e.bottom:void 0,left:(e==null?void 0:e.left)!==void 0?e.left:void 0,right:(e==null?void 0:e.right)!==void 0?e.right:void 0,maxHeight:e!=null&&e.maxHeight?e.maxHeight:"90vh"},children:t.jsx(O0,{scope:a,onAction:s,fullWidth:!0,maxHeight:e!=null&&e.maxHeight?`${e.maxHeight}px`:"100%"})}));function H0({className:e,showBadge:a=!0,scope:s="all",onAction:n}){const[i,l]=o.useState(!1),m=o.useRef(null),c=o.useRef(null),d=o.useRef(null),{count:p,refetch:u}=Ro({scope:s}),h=async g=>{await u(),n==null||n(g.payload)},f=xt({triggerRef:d,isOpen:i,minWidth:Math.min(450,typeof window<"u"?window.innerWidth-32:300),defaultMaxHeight:550});return o.useEffect(()=>{if(!i)return;const g=setTimeout(()=>{const x=w=>{var _,v;const b=w.target;(_=m.current)!=null&&_.contains(b)||(v=c.current)!=null&&v.contains(b)||l(!1)};return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},50);return()=>{clearTimeout(g)}},[i]),t.jsx(Me,{children:t.jsxs("div",{ref:m,className:`w-inline w-relative${e?` ${e}`:""}`,children:[t.jsxs("button",{ref:d,className:"w-btn w-btn--icon",onClick:()=>l(!i),"aria-label":p>0?`${p} unread notifications`:"Notifications",children:[t.jsx(bu,{strokeWidth:1}),a&&p>0&&t.jsx("span",{className:"w-notif-badge","data-dot":p<=9?"":void 0,children:p>9?"9+":""})]}),typeof window<"u"&&i&&Xs.createPortal(t.jsx("div",{className:"wacht-root",children:t.jsx(Z0,{ref:c,position:f,scope:s,onAction:h,onClose:()=>l(!1)})}),document.body)]})})}const hp=({showName:e=!0,showNotifications:a=!0})=>t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[a&&t.jsx(H0,{}),t.jsx(zr,{showName:e})]}),fp=({children:e})=>{var n;const{session:a,loading:s}=ot();return s||!((n=a.signins)!=null&&n.length)||!a.active_signin?null:t.jsx(t.Fragment,{children:e})},wp=({children:e})=>{var n;const{loading:a,session:s}=ot();return a||(n=s.signins)!=null&&n.length&&s.active_signin?null:t.jsx(t.Fragment,{children:e})},gp=({onAccountSelect:e,showAddAccount:a=!0})=>{var j,C,y,E;const{session:s,loading:n,switchSignIn:i,signOut:l}=ot(),{deployment:m}=_e(),{navigateToSignIn:c,navigate:d}=jt(),[p,u]=o.useState(null),[h,f]=o.useState(null),g=s==null?void 0:s.active_signin,x=(s==null?void 0:s.signins)||[],w=((C=(j=m==null?void 0:m.auth_settings)==null?void 0:j.multi_session_support)==null?void 0:C.enabled)??!1,b=(y=m==null?void 0:m.ui_settings)==null?void 0:y.app_name;o.useEffect(()=>{n||x.length||c()},[n,x,c]);const _=R=>R.split(" ").map(F=>F[0]).join("").toUpperCase().slice(0,2),v=async R=>{var F;f(R);try{if(await i(R),e)e(R),f(null);else{let A=ft(m,new URLSearchParams(window.location.search).get("redirect_uri"));if(A||(A=(F=m.ui_settings)==null?void 0:F.after_signin_redirect_url),A){let I;try{I=new URL(A)}catch{I=new URL(A,window.location.origin)}(m==null?void 0:m.mode)==="staging"&&I.searchParams.set("__dev_session__",wt(m.backend_host)??""),d(I.toString())}else f(null)}}catch{f(null)}},k=async(R,F)=>{R.stopPropagation(),u(F);try{await l(F)}catch{}finally{u(null)}},N=()=>{var F;let R=ft(m,new URLSearchParams(window.location.search).get("redirect_uri"));R||(R=(F=m.ui_settings)==null?void 0:F.after_signin_redirect_url),c(R)};return n?t.jsx(ys,{}):x.length?t.jsx(Me,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-sub",style:{fontSize:12.5},children:["Don't have an account?"," ",t.jsx(St,{to:`${(E=m.ui_settings)==null?void 0:E.sign_up_page_url}${window.location.search}`,className:"w-link",children:"Sign up"})]}),children:[t.jsx(rt,{title:"Choose an account",sub:`Select an account to continue${b?` to ${b}`:""}`}),t.jsx("div",{className:"w-flex-col",children:x.map(({user:R,id:F})=>{var $,Z;if(!R)return null;const A=F===(g==null?void 0:g.id),I=h===F,L=p===F,S=`${R.first_name||""} ${R.last_name||""}`.trim(),O=S||(($=R.primary_email_address)==null?void 0:$.email)||R.username||"User",P=((Z=R.primary_email_address)==null?void 0:Z.email)||R.username;return t.jsxs("button",{className:"w-acct","data-active":A?"":void 0,"data-busy":I?"":void 0,onClick:()=>v(F),children:[t.jsx("div",{className:"w-avatar",children:I?t.jsx(gt,{onAccent:!0}):R.has_profile_picture?t.jsx("img",{src:R.profile_picture_url,alt:S}):_(O)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:O}),P&&P!==O&&t.jsx("div",{className:"w-secsub w-truncate",children:P})]}),A&&t.jsxs("span",{className:"w-pill w-pill--current",children:[t.jsx(Ge,{size:11,weight:"bold"}),"current"]}),t.jsx("span",{className:"w-kebab w-acct-out",role:"button","aria-disabled":L,title:"Sign out",onClick:H=>k(H,F),children:L?t.jsx(gt,{}):t.jsx(Ea,{size:15})})]},F)})}),a&&w&&t.jsx("div",{className:"w-acct-foot",children:t.jsxs("button",{className:"w-acct-add",onClick:N,children:[t.jsx(Nt,{size:15}),"Add another account"]})})]})}):null},xp=()=>{const{navigateToSignIn:e}=jt();return o.useEffect(()=>{e()},[e]),null},vp=()=>{const{navigateToSignUp:e}=jt();return o.useEffect(()=>{e()},[e]),null},bp=()=>{var A,I;const{organizationMemberships:e,refetch:a,loading:s}=fa(),{workspaces:n}=wa(),{switchOrganization:i,switchWorkspace:l}=ot(),{deployment:m}=_e(),[c,d]=o.useState(null),[p,u]=o.useState("orgList"),[h,f]=o.useState(null),g=((m==null?void 0:m.b2b_settings.organizations_enabled)??!1)&&((m==null?void 0:m.b2b_settings.workspaces_enabled)??!1),x=(m==null?void 0:m.b2b_settings.allow_users_to_create_orgs)??!1,w=o.useRef(!1);o.useEffect(()=>{if(!(w.current||!e)){if(w.current=!0,e.length===0){u("createOrg");return}if(!g){u("orgList");return}if(!n||n.length===0){const L=e.find(S=>{var O,P;return!((O=S.eligibility_restriction)!=null&&O.type)||((P=S.eligibility_restriction)==null?void 0:P.type)==="none"});if(L){f(L.organization.id),u("createWorkspace");return}}u("orgList")}},[e,n,g]);const b=L=>L.split(" ").map(S=>S[0]).join("").toUpperCase().slice(0,2),_=async L=>{if(g){f(L.id),u("workspaceList");return}d(L.id);try{await i(L.id)}finally{d(null)}},v=async L=>{d(L.id);try{await l(L.id)}finally{d(null)}},k=async L=>{var O;await a();const S=((O=L==null?void 0:L.data)==null?void 0:O.organization)||(L==null?void 0:L.organization)||L;if(!g){u("orgList");return}S!=null&&S.id?(f(S.id),u("createWorkspace")):u("orgList")},N=async L=>{var O;const S=(L==null?void 0:L.id)??((O=L==null?void 0:L.workspace)==null?void 0:O.id);if(S){d(S);try{await l(S)}finally{d(null)}}},j=async()=>{f(null),u("orgList")},C=(A=e==null?void 0:e.find(L=>L.organization.id===h))==null?void 0:A.organization,y=h?n==null?void 0:n.filter(L=>L.organization.id===h):[];if(s)return null;if(p==="createOrg")return t.jsx(ze.Body,{style:{padding:0},children:t.jsx(un,{onSuccess:k,onCancel:()=>u("orgList")})});if(p==="createWorkspace"&&h)return t.jsx(ze.Body,{style:{padding:0},children:t.jsx(Rr,{organizationId:h,onSuccess:N,onCancel:()=>u("workspaceList"),onCreateOrganization:()=>u("createOrg")})});const E=p==="workspaceList",R=E?"Select a workspace":"Select an organization",F=E?`Choose a workspace in ${(C==null?void 0:C.name)||""}`:`to continue to ${((I=m==null?void 0:m.ui_settings)==null?void 0:I.app_name)||"App"}`;return t.jsxs("div",{className:"w-split",children:[t.jsxs("div",{className:"w-split-aside w-flex-col w-justify-between w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx(Nr,{placement:"left"}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-title",children:R}),t.jsx("p",{className:"w-sub",children:F})]})]}),t.jsx(zr,{showName:!0})]}),t.jsxs("div",{className:"w-split-main",children:[t.jsxs("div",{className:"w-grow w-flex-col",style:{overflow:"hidden",marginBottom:24},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:8},children:[E&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:j,"aria-label":"Go back",title:"Go back",children:t.jsx(sn,{})}),t.jsx("h2",{className:"w-sec",children:E?"Workspaces":"Your organizations"})]}),t.jsx("div",{className:"w-grow w-flex-col",style:{overflowY:"auto"},children:E?t.jsx(t.Fragment,{children:y&&y.length>0?y.map(L=>{var O,P,$;const S=((O=L.eligibility_restriction)==null?void 0:O.type)!=="none"&&((P=L.eligibility_restriction)==null?void 0:P.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!S&&v(L),disabled:c===L.id||S,title:S?($=L.eligibility_restriction)==null?void 0:$.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:L.image_url?t.jsx("img",{src:L.image_url,alt:L.name}):b(L.name).charAt(0)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:L.name}),t.jsxs("div",{className:"w-secsub w-inline w-gap-1",children:[t.jsx(ls,{}),"Workspace"]})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[S&&t.jsx(Aa,{size:16,className:"w-text-error"}),t.jsx(Qt,{})]})]},L.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(ls,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No workspaces yet"}),t.jsxs("p",{children:["Create your first workspace for"," ",(C==null?void 0:C.name)||"this organization"]})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{$size:"sm",onClick:()=>u("createWorkspace"),children:[t.jsx(Nt,{}),"Create workspace"]})})]})}):e&&e.length>0?e.map(L=>{var D,W,K,ee,ce;const S=L.organization,O=n==null?void 0:n.filter(be=>be.organization.id===S.id),P=(O==null?void 0:O.length)||0,$=S.member_count,Z=((W=(D=L.roles)==null?void 0:D[0])==null?void 0:W.name)||"No role",H=L.roles.length-1,M=H>0?`${Z.charAt(0).toUpperCase()+Z.slice(1)} +${H}`:Z.charAt(0).toUpperCase()+Z.slice(1),B=((K=L.eligibility_restriction)==null?void 0:K.type)!=="none"&&((ee=L.eligibility_restriction)==null?void 0:ee.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!B&&_(S),disabled:c===S.id||B,title:B?(ce=L.eligibility_restriction)==null?void 0:ce.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:S.image_url?t.jsx("img",{src:S.image_url,alt:S.name}):b(S.name)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:S.name}),t.jsx("div",{className:"w-secsub w-inline w-gap-1",children:g?t.jsxs(t.Fragment,{children:[t.jsx(ls,{}),P," ","workspace",P!==1?"s":""]}):t.jsxs(t.Fragment,{children:[t.jsx(ms,{}),M," •"," ",$," member",$!==1?"s":""]})})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[B&&t.jsx(Aa,{size:16,className:"w-text-error"}),t.jsx(Qt,{})]})]},S.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(ms,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No organizations yet"}),t.jsx("p",{children:x?"Create your first organization to get started":"You don't have access to any organizations yet"})]}),x&&t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{$size:"sm",onClick:()=>u("createOrg"),children:[t.jsx(Nt,{}),"Create organization"]})})]})})]}),E&&h&&t.jsxs(se,{$outline:!0,onClick:()=>u("createWorkspace"),disabled:c!==null,children:[t.jsx(Nt,{size:12}),"Create workspace"]}),!E&&e&&e.length>0&&x&&t.jsxs(se,{$outline:!0,onClick:()=>u("createOrg"),disabled:c!==null,children:[t.jsx(Nt,{size:12}),"Create new organization"]})]})]})},yp=({children:e})=>{var h,f,g,x;const{activeOrganization:a}=ha(),{activeWorkspace:s}=zt(),{deployment:n}=_e(),{loading:i,orgMembership:l,workspaceMembership:m}=ko(),c=((n==null?void 0:n.b2b_settings.organizations_enabled)??!1)&&((n==null?void 0:n.b2b_settings.workspaces_enabled)??!1),d=((h=l==null?void 0:l.eligibility_restriction)==null?void 0:h.type)!=="none"&&((f=l==null?void 0:l.eligibility_restriction)==null?void 0:f.type)!==void 0,p=((g=m==null?void 0:m.eligibility_restriction)==null?void 0:g.type)!=="none"&&((x=m==null?void 0:m.eligibility_restriction)==null?void 0:x.type)!==void 0;return i?null:(d||p||!a?!1:c?s?(m==null?void 0:m.workspace.id)===s.id&&m.organization_id===a.id:!1:!0)?t.jsx(t.Fragment,{children:e}):t.jsx(Me,{children:t.jsx(ze,{isOpen:!0,children:t.jsx(ze.Overlay,{children:t.jsx(ze.Content,{className:"w-flex w-justify-center",style:{padding:0,width:900,maxWidth:"90vw"},children:t.jsx(bp,{})})})})})},jp=e=>{const a=e.toLowerCase().trim();return["javascript:","data:","vbscript:"].some(i=>a.startsWith(i))?!0:["http://","https://","//","ftp://","ftps://","mailto:","tel:","sms:","file:","blob:"].some(i=>a.startsWith(i))},_p=e=>{const a=e.toLowerCase().trim();return!["javascript:","data:","vbscript:"].some(n=>a.startsWith(n))};exports.AcceptInvite=Nm;exports.AuthFormImage=Nr;exports.CreateOrganizationForm=un;exports.CreateWorkspaceDialog=Lr;exports.CreateWorkspaceForm=Rr;exports.DefaultStylesProvider=Me;exports.DeploymentInitialized=x2;exports.DeploymentInitializing=v2;exports.DeploymentProvider=U0;exports.Dialog=ze;exports.DialogTrigger=$m;exports.Dropdown=js;exports.DropdownDivider=Fc;exports.DropdownItem=ea;exports.DropdownItems=_s;exports.DropdownTrigger=ks;exports.Form=Tc;exports.FormGroup=We;exports.Input=xe;exports.Label=Ve;exports.MagicLinkVerification=_m;exports.ManageAccount=A0;exports.ManageAccountDialog=M0;exports.ManageOrganization=Kc;exports.ManageWorkspace=Jc;exports.ManageWorkspaceDialog=$r;exports.NavigateToSignIn=xp;exports.NavigateToSignUp=vp;exports.NavigationLink=St;exports.NotificationBell=H0;exports.NotificationItem=$0;exports.NotificationPanel=O0;exports.NotificationPopover=Z0;exports.OAuthProvider=uo;exports.ORG_ADMIN_PERMISSIONS=Xc;exports.ORG_MANAGEMENT_PERMISSIONS=e0;exports.OTPInput=xa;exports.OrganizationSwitcher=s0;exports.PhoneNumberInput=bs;exports.PhoneVerification=Mc;exports.ProfileCompletion=Lc;exports.RequireActiveTenancy=yp;exports.SSOCallback=jm;exports.SignInForm=vm;exports.SignUpForm=um;exports.SignedIn=fp;exports.SignedInAccounts=gp;exports.SignedOut=wp;exports.SimpleDialog=Pm;exports.Spinner=ye;exports.Switch=Oa;exports.TwoFactorMethodSelector=Ac;exports.TwoFactorVerification=Rc;exports.UserButton=zr;exports.UserControls=hp;exports.WORKSPACE_ADMIN_PERMISSIONS=t0;exports.WORKSPACE_MANAGEMENT_PERMISSIONS=a0;exports.WaitlistForm=ym;exports.canManageOrganization=Zr;exports.canManageWorkspace=Fr;exports.clearTokenCache=Lt;exports.hasIncompleteProfile=km;exports.hasOrgPermission=Or;exports.hasWorkspacePermission=Hr;exports.isExternalUrl=jp;exports.isOrgAdmin=S4;exports.isSafeUrl=_p;exports.isWorkspaceAdmin=E4;exports.redirectToProfileCompletion=Cm;exports.useActiveOrganization=ha;exports.useActiveTenancy=ko;exports.useActiveWorkspace=zt;exports.useActorMcpServers=Vd;exports.useActorProjectSearch=Ad;exports.useActorProjects=Ed;exports.useActorThreadSearch=Ld;exports.useAgentSession=jd;exports.useAgentThread=Pd;exports.useAgentThreadAssignments=Od;exports.useAgentThreadConversation=yd;exports.useAgentThreadFilesystem=$d;exports.useAgentThreadTaskGraphs=Td;exports.useApiAuthAppSession=p2;exports.useApiAuthAuditAnalytics=w2;exports.useApiAuthAuditLogs=f2;exports.useApiAuthAuditTimeseries=g2;exports.useApiAuthKeys=h2;exports.useClient=ve;exports.useCreateWebhookEndpoint=l2;exports.useDeployment=_e;exports.useExternalAgentConnections=zd;exports.useForgotPassword=Eo;exports.useInvitation=Zo;exports.useMagicLinkVerification=So;exports.useNavigation=jt;exports.useNotificationStream=Ao;exports.useNotificationUnreadCount=Ro;exports.useNotifications=Mo;exports.useOrganizationList=Vt;exports.useOrganizationMemberships=fa;exports.useProjectTaskBoardItem=Fd;exports.useProjectTaskBoardItemComments=Id;exports.useProjectTasks=Hd;exports.useProjectThreadFeed=Rd;exports.useProjectThreads=Md;exports.useSSOCallback=No;exports.useSession=ot;exports.useSignIn=mo;exports.useSignUp=po;exports.useUser=ga;exports.useUserSignins=_o;exports.useWaitlist=Co;exports.useWebhookAnalytics=u2;exports.useWebhookAppSession=r2;exports.useWebhookDeliveries=d2;exports.useWebhookEndpoints=o2;exports.useWebhookEvents=c2;exports.useWebhookStats=i2;exports.useWebhookTimeseries=m2;exports.useWorkspaceList=wa;exports.useWorkspaceMemberships=en;Object.keys(Dr).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Dr[e]})});
|
|
116
|
+
*/var x6={L:Wa.QrCode.Ecc.LOW,M:Wa.QrCode.Ecc.MEDIUM,Q:Wa.QrCode.Ecc.QUARTILE,H:Wa.QrCode.Ecc.HIGH},y0=128,j0="L",_0="#FFFFFF",k0="#000000",C0=!1,N0=1,v6=4,b6=0,y6=.1;function S0(e,a=0){const s=[];return e.forEach(function(n,i){let l=null;n.forEach(function(m,c){if(!m&&l!==null){s.push(`M${l+a} ${i+a}h${c-l}v1H${l+a}z`),l=null;return}if(c===n.length-1){if(!m)return;l===null?s.push(`M${c+a},${i+a} h1v1H${c+a}z`):s.push(`M${l+a},${i+a} h${c+1-l}v1H${l+a}z`);return}m&&l===null&&(l=c)})}),s.join("")}function E0(e,a){return e.slice().map((s,n)=>n<a.y||n>=a.y+a.h?s:s.map((i,l)=>l<a.x||l>=a.x+a.w?i:!1))}function j6(e,a,s,n){if(n==null)return null;const i=e.length+s*2,l=Math.floor(a*y6),m=i/a,c=(n.width||l)*m,d=(n.height||l)*m,p=n.x==null?e.length/2-c/2:n.x*m,u=n.y==null?e.length/2-d/2:n.y*m,h=n.opacity==null?1:n.opacity;let f=null;if(n.excavate){let x=Math.floor(p),w=Math.floor(u),b=Math.ceil(c+p-x),j=Math.ceil(d+u-w);f={x,y:w,w:b,h:j}}const g=n.crossOrigin;return{x:p,y:u,h:d,w:c,excavation:f,opacity:h,crossOrigin:g}}function _6(e,a){return a!=null?Math.max(Math.floor(a),0):e?v6:b6}function A0({value:e,level:a,minVersion:s,includeMargin:n,marginSize:i,imageSettings:l,size:m,boostLevel:c}){let d=o.useMemo(()=>{const x=(Array.isArray(e)?e:[e]).reduce((w,b)=>(w.push(...Wa.QrSegment.makeSegments(b)),w),[]);return Wa.QrCode.encodeSegments(x,x6[a],s,void 0,void 0,c)},[e,a,s,c]);const{cells:p,margin:u,numCells:h,calculatedImageSettings:f}=o.useMemo(()=>{let g=d.getModules();const x=_6(n,i),w=g.length+x*2,b=j6(g,m,x,l);return{cells:g,margin:x,numCells:w,calculatedImageSettings:b}},[d,m,l,n,i]);return{qrcode:d,margin:u,cells:p,numCells:h,calculatedImageSettings:f}}var k6=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),C6=o.forwardRef(function(a,s){const n=a,{value:i,size:l=y0,level:m=j0,bgColor:c=_0,fgColor:d=k0,includeMargin:p=C0,minVersion:u=N0,boostLevel:h,marginSize:f,imageSettings:g}=n,w=hr(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:b}=w,j=hr(w,["style"]),v=g==null?void 0:g.src,_=o.useRef(null),N=o.useRef(null),k=o.useCallback(S=>{_.current=S,typeof s=="function"?s(S):s&&(s.current=S)},[s]),[C,y]=o.useState(!1),{margin:E,cells:M,numCells:F,calculatedImageSettings:A}=A0({value:i,level:m,minVersion:u,boostLevel:h,includeMargin:p,marginSize:f,imageSettings:g,size:l});o.useEffect(()=>{if(_.current!=null){const S=_.current,Z=S.getContext("2d");if(!Z)return;let P=M;const L=N.current,H=A!=null&&L!==null&&L.complete&&L.naturalHeight!==0&&L.naturalWidth!==0;H&&A.excavation!=null&&(P=E0(M,A.excavation));const O=window.devicePixelRatio||1;S.height=S.width=l*O;const R=l/F*O;Z.scale(R,R),Z.fillStyle=c,Z.fillRect(0,0,F,F),Z.fillStyle=d,k6?Z.fill(new Path2D(S0(P,E))):M.forEach(function(U,W){U.forEach(function(Y,B){Y&&Z.fillRect(B+E,W+E,1,1)})}),A&&(Z.globalAlpha=A.opacity),H&&Z.drawImage(L,A.x+E,A.y+E,A.w,A.h)}}),o.useEffect(()=>{y(!1)},[v]);const I=pr({height:l,width:l},b);let $=null;return v!=null&&($=o.createElement("img",{src:v,key:v,style:{display:"none"},onLoad:()=>{y(!0)},ref:N,crossOrigin:A==null?void 0:A.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",pr({style:I,height:l,width:l,ref:k,role:"img"},j)),$)});C6.displayName="QRCodeCanvas";var zr=o.forwardRef(function(a,s){const n=a,{value:i,size:l=y0,level:m=j0,bgColor:c=_0,fgColor:d=k0,includeMargin:p=C0,minVersion:u=N0,boostLevel:h,title:f,marginSize:g,imageSettings:x}=n,w=hr(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:b,cells:j,numCells:v,calculatedImageSettings:_}=A0({value:i,level:m,minVersion:u,boostLevel:h,includeMargin:p,marginSize:g,imageSettings:x,size:l});let N=j,k=null;x!=null&&_!=null&&(_.excavation!=null&&(N=E0(j,_.excavation)),k=o.createElement("image",{href:x.src,height:_.h,width:_.w,x:_.x+b,y:_.y+b,preserveAspectRatio:"none",opacity:_.opacity,crossOrigin:_.crossOrigin}));const C=S0(N,b);return o.createElement("svg",pr({height:l,width:l,viewBox:`0 0 ${v} ${v}`,ref:s,role:"img"},w),!!f&&o.createElement("title",null,f),o.createElement("path",{fill:c,d:`M0,0 h${v}v${v}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:d,d:C,shapeRendering:"crispEdges"}),k)});zr.displayName="QRCodeSVG";const Gi=({onClose:e,onChangePassword:a,triggerRef:s,isSetup:n=!1})=>{const i=o.useRef(null),[l,m]=o.useState(!1),[c,d]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(""),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[j,v]=o.useState(!1),[_,N]=o.useState(!1),[k,C]=o.useState({}),y=xt({contentRef:i,triggerRef:s??{current:null},isOpen:l,minWidth:380,defaultMaxHeight:420});o.useEffect(()=>{m(!0);const M=A=>{i.current&&!i.current.contains(A.target)&&e()},F=A=>{A.key==="Escape"&&e()};return document.addEventListener("mousedown",M),document.addEventListener("keydown",F),()=>{document.removeEventListener("mousedown",M),document.removeEventListener("keydown",F)}},[e]);const E=async()=>{if(_)return;const M={};if(!n&&!c&&(M.currentPassword="Current password is required"),p?p.length<8&&(M.newPassword="Password must be at least 8 characters"):M.newPassword="New password is required",p!==h&&(M.confirmPassword="Passwords do not match"),Object.keys(M).length>0){C(M);return}N(!0);try{await a(n?"":c,p),e()}catch(F){C({form:F.message||"Failed to update password"})}finally{N(!1)}};return l?t.jsxs("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(y==null?void 0:y.top)!==void 0?`${y.top}px`:void 0,bottom:(y==null?void 0:y.bottom)!==void 0?`${y.bottom}px`:void 0,left:(y==null?void 0:y.left)!==void 0?`${y.left}px`:void 0,right:(y==null?void 0:y.right)!==void 0?`${y.right}px`:void 0,maxHeight:y!=null&&y.maxHeight?`${y.maxHeight}px`:void 0,visibility:y?"visible":"hidden"},onClick:M=>M.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:n?"Set Password":"Change Password"}),t.jsx("p",{className:"w-pop-sub",children:n?"Set a password for your account to enable password authentication.":"Update your account password to keep it secure."})]}),!n&&t.jsxs("div",{className:"w-field",children:[t.jsx(Te,{children:"Current Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(be,{type:g?"text":"password",placeholder:"Enter your current password",value:c,onChange:M=>d(M.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>x(!g),"aria-label":g?"Hide current password":"Show current password",children:g?t.jsx(Sn,{size:16}):t.jsx(Nn,{size:16})})]}),k.currentPassword&&t.jsx("span",{className:"w-input-err",children:k.currentPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Te,{children:n?"Password":"New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(be,{type:w?"text":"password",placeholder:n?"Enter your password":"Enter your new password",value:p,onChange:M=>u(M.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>b(!w),"aria-label":w?"Hide new password":"Show new password",children:w?t.jsx(Sn,{size:16}):t.jsx(Nn,{size:16})})]}),k.newPassword&&t.jsx("span",{className:"w-input-err",children:k.newPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Te,{children:"Confirm New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(be,{type:j?"text":"password",placeholder:"Confirm your new password",value:h,onChange:M=>f(M.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>v(!j),"aria-label":j?"Hide confirm password":"Show confirm password",children:j?t.jsx(Sn,{size:16}):t.jsx(Nn,{size:16})})]}),k.confirmPassword&&t.jsx("span",{className:"w-input-err",children:k.confirmPassword})]}),k.form&&t.jsx("span",{className:"w-input-err",children:k.form})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:E,disabled:_,children:_?n?"Setting...":"Updating...":n?"Set Password":"Update Password"})]})]}):null},N6=({onClose:e,onRemovePassword:a,triggerRef:s})=>{const n=o.useRef(null),[i,l]=o.useState(!1),[m,c]=o.useState(""),[d,p]=o.useState(!1),{toast:u}=ta(),h=xt({contentRef:n,triggerRef:s??{current:null},isOpen:i,minWidth:400,defaultMaxHeight:360});o.useEffect(()=>{l(!0);const g=w=>{n.current&&!n.current.contains(w.target)&&e()},x=w=>{w.key==="Escape"&&e()};return document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[e]);const f=async()=>{if(!(!m||d)){p(!0);try{await a(m),e()}catch(g){const x=g.message||"Failed to remove password. Please try again.";u(x,"error")}finally{p(!1)}}};return i?t.jsxs("div",{ref:n,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(h==null?void 0:h.top)!==void 0?`${h.top}px`:void 0,bottom:(h==null?void 0:h.bottom)!==void 0?`${h.bottom}px`:void 0,left:(h==null?void 0:h.left)!==void 0?`${h.left}px`:void 0,right:(h==null?void 0:h.right)!==void 0?`${h.right}px`:void 0,maxHeight:h!=null&&h.maxHeight?`${h.maxHeight}px`:void 0,visibility:h?"visible":"hidden"},onClick:g=>g.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Remove Password"}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx(Fa,{size:16}),t.jsx("span",{className:"w-banner-txt",children:"You're about to remove password authentication from your account. Make sure you have another way to sign in (email, phone, social login, or passkey) before continuing."})]}),t.jsxs(Ue,{children:[t.jsx(Te,{htmlFor:"current-password",children:"Confirm your current password"}),t.jsx(be,{id:"current-password",type:"password",placeholder:"Enter current password",value:m,onChange:g=>c(g.target.value),autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:f,disabled:!m||d,children:d?"Removing...":"Remove Password"})]})]}):null},S6=({onClose:e,onSetupTOTP:a,onVerifyTOTP:s,triggerRef:n})=>{const i=o.useRef(null),[l,m]=o.useState("qr"),[c,d]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(["",""]),[g,x]=o.useState(!1),[w,b]=o.useState(!1),{toast:j}=ta(),v=xt({contentRef:i,triggerRef:n??{current:null},isOpen:w,minWidth:380,defaultMaxHeight:460});o.useEffect(()=>{b(!0);const N=C=>{i.current&&!i.current.contains(C.target)&&e()},k=C=>{C.key==="Escape"&&e()};return document.addEventListener("mousedown",N),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",k)}},[e]),o.useEffect(()=>{(async()=>{x(!0);try{const k=await a();d(k.otp_url||""),u(k.totp_secret||"")}catch(k){const C=k.message||"Failed to setup two-factor authentication. Please try again.";j(C,"error")}finally{x(!1)}})()},[]);const _=async()=>{if(!h.some(N=>N.length!==6)){x(!0);try{await s(h),e()}catch(N){const k=N.message||"Failed to verify codes. Please check your authenticator app and try again.";j(k,"error")}finally{x(!1)}}};return w?t.jsx("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:340,maxWidth:"calc(100vw - 24px)",top:(v==null?void 0:v.top)!==void 0?`${v.top}px`:void 0,bottom:(v==null?void 0:v.bottom)!==void 0?`${v.bottom}px`:void 0,left:(v==null?void 0:v.left)!==void 0?`${v.left}px`:void 0,right:(v==null?void 0:v.right)!==void 0?`${v.right}px`:void 0,maxHeight:v!=null&&v.maxHeight?`${v.maxHeight}px`:void 0,visibility:v?"visible":"hidden"},onClick:N=>N.stopPropagation(),children:l==="qr"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Setup Two-Factor Authentication"}),t.jsx("p",{className:"w-pop-sub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"})]}),t.jsx("div",{className:"w-flex w-justify-center",children:g?t.jsx("div",{className:"w-qr w-text-muted",children:"Loading..."}):c?t.jsx("div",{className:"w-qr",style:{background:"#fff",padding:8},children:t.jsx(zr,{value:c,size:130,title:"QR Code for Two-Factor Authentication Setup","aria-label":"Scan this QR code with your authenticator app to set up two-factor authentication"})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),p&&t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-secsub",children:"Or enter manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{style:{wordBreak:"break-all"},children:p})})]})]}),t.jsx("div",{className:"w-pop-foot",children:t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:()=>m("verify"),disabled:g||!c,children:"I've Scanned the Code"})})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify Your Authenticator"}),t.jsx("p",{className:"w-pop-sub",children:"Enter two consecutive codes from your authenticator app"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(be,{id:"totp-code-1",type:"text",placeholder:"000000",value:h[0],onChange:N=>{const k=N.target.value.replace(/[^0-9]/g,"").substring(0,6);f([k,h[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"First verification code from authenticator app"}),t.jsx(be,{id:"totp-code-2",type:"text",placeholder:"000000",value:h[1],onChange:N=>{const k=N.target.value.replace(/[^0-9]/g,"").substring(0,6);f([h[0],k])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"Second verification code from authenticator app"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>m("qr"),children:"Back"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:_,disabled:g||h.some(N=>N.length!==6),children:g?"Verifying...":"Verify"})]})]})}):null},E6=({codes:e,onClose:a,onCopy:s,onDownload:n,triggerRef:i})=>{const l=o.useRef(null),[m,c]=o.useState(!1),d=xt({contentRef:l,triggerRef:i??{current:null},isOpen:m,minWidth:380,defaultMaxHeight:360});return o.useEffect(()=>{c(!0);const p=h=>{l.current&&!l.current.contains(h.target)&&a()},u=h=>{h.key==="Escape"&&a()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",u)}},[a]),m?t.jsx("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(d==null?void 0:d.top)!==void 0?`${d.top}px`:void 0,bottom:(d==null?void 0:d.bottom)!==void 0?`${d.bottom}px`:void 0,left:(d==null?void 0:d.left)!==void 0?`${d.left}px`:void 0,right:(d==null?void 0:d.right)!==void 0?`${d.right}px`:void 0,maxHeight:d!=null&&d.maxHeight?`${d.maxHeight}px`:void 0,visibility:d?"visible":"hidden"},onClick:p=>p.stopPropagation(),children:t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2",children:[t.jsx("div",{className:"w-pop-title",children:"Backup Codes"}),t.jsxs("div",{className:"w-flex w-gap-2 w-none",children:[t.jsxs(ne,{$outline:!0,$size:"sm",onClick:s,children:[t.jsx(Ga,{size:14}),"Copy"]}),t.jsxs(ne,{$outline:!0,$size:"sm",onClick:n,children:[t.jsx(ll,{size:14}),"DownloadSimple"]})]})]}),t.jsx("p",{className:"w-pop-sub",children:"Save these backup codes in a secure location. Each code can only be used once."}),t.jsx("div",{className:"w-codes",children:e.map((p,u)=>t.jsx("span",{role:"button",style:{cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(p)},title:"Click to copy",children:p},u))}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx("span",{style:{fontSize:13.5},children:"⚠️"}),t.jsx("span",{className:"w-banner-txt",children:"Keep these codes safe! They won't be shown again."})]})]})}):null},A6=({onClose:e,onAddPasskey:a,triggerRef:s})=>{const n=o.useRef(null),[i,l]=o.useState(!1),[m,c]=o.useState(""),[d,p]=o.useState(!1),[u,h]=o.useState(""),f=xt({contentRef:n,triggerRef:s??{current:null},isOpen:i,minWidth:320,defaultMaxHeight:260});o.useEffect(()=>{l(!0);const x=b=>{n.current&&!n.current.contains(b.target)&&e()},w=b=>{b.key==="Escape"&&e()};return document.addEventListener("mousedown",x),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",w)}},[e]);const g=async()=>{if(!d){p(!0),h("");try{await a(m.trim()),e()}catch(x){h(x.message||"Failed to register passkey"),p(!1)}}};return i?t.jsxs("div",{ref:n,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(f==null?void 0:f.top)!==void 0?`${f.top}px`:void 0,bottom:(f==null?void 0:f.bottom)!==void 0?`${f.bottom}px`:void 0,left:(f==null?void 0:f.left)!==void 0?`${f.left}px`:void 0,right:(f==null?void 0:f.right)!==void 0?`${f.right}px`:void 0,maxHeight:f!=null&&f.maxHeight?`${f.maxHeight}px`:void 0,visibility:f?"visible":"hidden"},onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add Passkey"}),t.jsx(be,{type:"text",placeholder:"e.g., MacBook Pro, iPhone",value:m,onChange:x=>c(x.target.value),autoFocus:!0}),u&&t.jsx("span",{className:"w-input-err",children:u})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:g,disabled:d,children:d?"Registering...":"Continue"})]})]}):null},M6=({children:e})=>t.jsx("div",{className:"w-eyebrow",children:e}),R6=()=>{var aa,sa,na,ra,ie,xe,Ne;const{deployment:e}=ke(),{user:a,updatePassword:s,removePassword:n,setupAuthenticator:i,verifyAuthenticator:l,deleteAuthenticator:m,generateBackupCodes:c,regenerateBackupCodes:d,updateProfile:p,getPasskeys:u,registerPasskey:h,deletePasskey:f}=xa(),{toast:g}=ta(),[x,w]=o.useState((a==null?void 0:a.second_factor_policy)||"none"),[b,j]=o.useState(!1),v=async J=>{try{await p({second_factor_policy:J}),w(J),g("2FA requirement updated successfully","info")}catch(ve){g(ve.message||"Failed to update 2FA requirement","error")}},[_,N]=o.useState(!1),[k,C]=o.useState(!1),[y,E]=o.useState(!1),[M,F]=o.useState(!1),A=o.useRef(null),I=o.useRef(null),$=o.useRef(null),S=o.useRef(null),[Z,P]=o.useState([]),[L,H]=o.useState(!1),[O,R]=o.useState(!1),[U,W]=o.useState(!1),[Y,B]=o.useState(!1),[Q,ue]=o.useState(null),we=o.useRef(null),[se,te]=o.useState("table"),[oe,Ee]=o.useState(""),[K,Ge]=o.useState(""),[Ie,Ye]=o.useState(""),[Ae,ce]=o.useState(["",""]),[D,G]=o.useState([]),[q,V]=o.useState(!1),[de,z]=o.useState(!1),[le]=o.useState(!1),[Je,it]=o.useState(!1),ge=(aa=e==null?void 0:e.auth_settings)==null?void 0:aa.auth_factors_enabled,ot=(na=(sa=e==null?void 0:e.auth_settings)==null?void 0:sa.password)==null?void 0:na.enabled;if(!(ge!=null&&ge.authenticator)&&!(ge!=null&&ge.backup_code)&&!ot)return null;const X=async(J,ve)=>{await s(J,ve),await a.refetch(),g("Password updated successfully","info")},re=async J=>{await n(J),await a.refetch(),g("Password removed successfully","info")},me=()=>{var jt,We,ht,Bt,ia,oa;if(!a)return!1;const J=(jt=a.user_email_addresses)==null?void 0:jt.some(la=>la.verified),ve=(We=a.user_phone_numbers)==null?void 0:We.some(la=>la.verified),qe=a.social_connections&&a.social_connections.length>0,Ve=e==null?void 0:e.auth_settings;return(Ve==null?void 0:Ve.first_factor)==="email_otp"&&J||((ht=Ve==null?void 0:Ve.magic_link)==null?void 0:ht.enabled)&&J||((Bt=Ve==null?void 0:Ve.passkey)==null?void 0:Bt.enabled)||((ia=Ve==null?void 0:Ve.auth_factors_enabled)==null?void 0:ia.phone_otp)&&ve||qe&&((oa=e==null?void 0:e.social_connections)==null?void 0:oa.some(la=>la.enabled))},Le=async()=>{if(Ae.some(J=>J.length!==6)){g("Please enter both 6-digit verification codes","error");return}try{if(z(!0),await l(Ie,Ae),await a.refetch(),ge!=null&&ge.backup_code){const J=await c();G(J),await a.refetch(),te("backup")}else te("success")}catch(J){g(J.message||"Invalid verification codes","error")}finally{z(!1)}},Me=()=>{te("table"),Ee(""),Ge(""),Ye(""),ce(["",""]),G([]),g("Two-factor authentication setup completed successfully!","info")},Qe=async()=>{var J;if((J=a==null?void 0:a.user_authenticator)!=null&&J.id)try{it(!0),await m(a.user_authenticator.id),await a.refetch(),j(!1),g("Two-factor authentication removed successfully","info")}catch(ve){g(ve.message||"Failed to remove authenticator","error")}finally{it(!1)}},vt=async()=>{if(!q)try{V(!0);const J=await d();G(J),await a.refetch(),F(!0),g("New backup codes generated","info")}catch(J){g(J.message||"Failed to generate backup codes","error")}finally{V(!1)}},Ut=()=>{const J=D.join(`
|
|
117
|
+
`);navigator.clipboard.writeText(J).then(()=>{g("Backup codes copied to clipboard","info")}).catch(()=>{g("Failed to copy backup codes","error")})},Ft=()=>{const J=D.join(`
|
|
118
|
+
`),ve=new Blob([J],{type:"text/plain"}),qe=URL.createObjectURL(ve),Ve=document.createElement("a");Ve.href=qe,Ve.download="wacht-backup-codes.txt",Ve.click(),URL.revokeObjectURL(qe),g("Backup codes downloaded","info")},Wt=async()=>{var J,ve;if((ve=(J=e==null?void 0:e.auth_settings)==null?void 0:J.passkey)!=null&&ve.enabled)try{H(!0);const qe=await u();P(qe.data||[])}catch{g("Failed to load passkeys","error")}finally{H(!1)}},ba=async J=>{try{R(!0),await h(J||void 0),await Wt(),g("Passkey registered successfully!","info")}catch(ve){throw g(ve.message||"Failed to register passkey","error"),ve}finally{R(!1)}},ya=async J=>{try{await f(J),await Wt(),g("Passkey removed","info")}catch(ve){g(ve.message||"Failed to remove passkey","error")}};o.useEffect(()=>{Wt()},[(ie=(ra=e==null?void 0:e.auth_settings)==null?void 0:ra.passkey)==null?void 0:ie.enabled]);const bt=[];return ot&&bt.push({id:"password",name:"Password",description:"Secure your account with a strong password",status:a!=null&&a.has_password?"Enabled":"Disabled",actions:a!=null&&a.has_password?["change"]:["setup"],group:"sign-in"}),(Ne=(xe=e==null?void 0:e.auth_settings)==null?void 0:xe.passkey)!=null&&Ne.enabled&&bt.push({id:"passkey",name:"Passkeys",description:"Sign in faster with fingerprint, face, or screen lock",status:Z.length>0?`${Z.length} registered`:"",actions:Z.length>0?["manage","add"]:["add"],group:"sign-in"}),ge!=null&&ge.authenticator&&bt.push({id:"authenticator",name:"Authenticator App",description:"Use an authenticator app for extra security",status:a!=null&&a.user_authenticator?"Enabled":"Disabled",actions:a!=null&&a.user_authenticator?["remove"]:["setup"],group:"sign-in"}),a!=null&&a.user_authenticator&&bt.push({id:"backup_codes",name:"Backup Codes",description:"Recovery codes if you lose your authenticator",status:a!=null&&a.backup_codes_generated?"Generated":"Not Generated",actions:["generate"],group:"recovery"}),a!=null&&a.user_authenticator&&bt.push({id:"second_factor_policy",name:"Require 2FA",description:"Require a second factor for all sign-ins",status:x==="enforced"?"Enforced":"Optional",actions:["toggle"],group:"recovery"}),se!=="table"?t.jsxs(t.Fragment,{children:[t.jsxs(d0,{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Xt,{size:16}),t.jsxs("span",{className:"w-sec",children:[se==="qr"&&"Setup Two-Factor Authentication",se==="verify"&&"Verify Your Authenticator",se==="backup"&&"Save Your Backup Codes",se==="success"&&"Setup Complete!"]})]}),t.jsx(ne,{$outline:!0,$size:"sm",onClick:()=>te("table"),children:"← Back"})]}),t.jsxs("div",{className:"w-narrow w-flex-col w-items-center w-gap-5",style:{textAlign:"center"},children:[se==="qr"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"}),t.jsx("div",{className:"w-flex w-justify-center",children:le?t.jsxs("div",{className:"w-qr w-flex-col w-items-center w-gap-3",children:[t.jsx("span",{className:"w-spin"}),t.jsx("div",{className:"w-secsub",children:"Loading QR Code..."})]}):oe?t.jsx("div",{className:"w-tile w-flex w-items-center w-justify-center",children:t.jsx(zr,{value:oe,size:200,level:"M",marginSize:0})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),t.jsxs("div",{className:"w-flex-col w-gap-2 w-full",children:[t.jsx("p",{className:"w-secsub",children:"Or enter this code manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{children:K||"Loading..."})})]}),t.jsx(ne,{$fullWidth:!0,onClick:()=>te("verify"),disabled:!oe||!K,children:"I've Scanned the Code"})]}),se==="verify"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Enter two consecutive codes from your authenticator app to verify setup"}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(be,{type:"text",placeholder:"000000",value:Ae[0],onChange:J=>{const ve=J.target.value.replace(/[^0-9]/g,"").substring(0,6);ce([ve,Ae[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}}),t.jsx(be,{type:"text",placeholder:"000000",value:Ae[1],onChange:J=>{const ve=J.target.value.replace(/[^0-9]/g,"").substring(0,6);ce([Ae[0],ve])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}})]}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(ne,{$outline:!0,$size:"sm",onClick:()=>te("qr"),children:"Back"}),t.jsx(ne,{$size:"sm",onClick:Le,disabled:de||Ae.some(J=>J.length!==6),children:de?"Verifying...":"Verify & Continue"})]})]}),se==="backup"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-banner w-banner--warn",style:{textAlign:"left"},children:[t.jsx(Fa,{size:16}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Important!"}),t.jsx("div",{className:"w-banner-txt",children:"Store these codes safely. Each code can only be used once if you lose access to your authenticator device."})]})]}),t.jsx("div",{className:"w-codes w-full",children:D.map((J,ve)=>t.jsx("span",{onClick:()=>navigator.clipboard.writeText(J),style:{cursor:"pointer"},children:J},ve))}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(ne,{$outline:!0,$size:"sm",onClick:Ut,children:"Copy All"}),t.jsxs(ne,{$outline:!0,$size:"sm",onClick:Ft,children:[t.jsx(ll,{size:16}),"DownloadSimple"]})]}),t.jsx(ne,{$fullWidth:!0,onClick:Me,children:"Complete Setup"})]}),se==="success"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Be,{size:26})})]}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-items-center",children:[t.jsx("h3",{className:"w-title",children:"All Set!"}),t.jsx("p",{className:"w-secsub",children:"Your account is now protected with two-factor authentication."})]}),t.jsx(ne,{$fullWidth:!0,onClick:Me,children:"Continue to Security"})]})]})]}):t.jsx(t.Fragment,{children:bt.length?t.jsx("div",{children:bt.map((J,ve)=>{const qe=ve>0?bt[ve-1].group:null,Ve=J.group!==qe,yt=bt[ve+1],jt=yt&&yt.group===J.group;return t.jsxs("div",{children:[Ve&&t.jsx(M6,{$first:ve===0,children:J.group==="sign-in"?"Sign-in methods":"Recovery"}),t.jsxs(u0,{children:[t.jsxs(m0,{children:[t.jsx("div",{className:"w-flex w-items-center w-wrap w-gap-2 w-sec",children:t.jsx("span",{children:J.name})}),t.jsx("div",{className:"w-secsub",children:J.description})]}),t.jsx(p0,{children:t.jsxs("div",{className:"w-relative",children:[J.id==="password"&&t.jsx(t.Fragment,{children:a!=null&&a.has_password?t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$size:"sm",ref:I,onClick:()=>C(!0),children:"Change"}),k&&t.jsx(Gi,{triggerRef:I,onClose:()=>C(!1),onChangePassword:X})]}),me()&&t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$destructive:!0,$size:"sm",ref:$,onClick:()=>E(!0),children:"Remove"}),y&&t.jsx(N6,{triggerRef:$,onClose:()=>E(!1),onRemovePassword:re})]})]}):t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$size:"sm",ref:I,onClick:()=>C(!0),children:"Setup"}),k&&t.jsx(Gi,{triggerRef:I,onClose:()=>C(!1),onChangePassword:X,isSetup:!0})]})}),J.id==="authenticator"&&!(a!=null&&a.user_authenticator)&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$size:"sm",ref:A,onClick:()=>N(!0),disabled:le,children:le?"Setting up...":"Setup"}),_&&t.jsx(S6,{triggerRef:A,onClose:()=>N(!1),onSetupTOTP:async()=>{const We=await i();return Ye(We.id),We},onVerifyTOTP:async We=>{await l(Ie,We),await a.refetch(),g("Two-factor authentication enabled successfully!","info")}})]})}),J.id==="authenticator"&&(a==null?void 0:a.user_authenticator)&&t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$destructive:!0,$size:"sm",onClick:()=>j(!0),disabled:Je,children:Je?"Removing...":"Remove"}),b&&t.jsx(Qa,{title:"Remove MFA and reset policy to default?",onConfirm:Qe,onCancel:()=>j(!1)})]}),J.id==="backup_codes"&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$size:"sm",ref:S,onClick:vt,disabled:q,children:q?"Generating...":a!=null&&a.backup_codes_generated?"Regenerate":"Generate"}),M&&t.jsx(E6,{triggerRef:S,codes:D,onClose:()=>F(!1),onCopy:Ut,onDownload:Ft})]})}),J.id==="second_factor_policy"&&t.jsx(Za,{checked:x==="enforced",onChange:We=>{v(We?"enforced":"none")}}),J.id==="passkey"&&t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsxs(ne,{$outline:!0,$size:"sm",onClick:()=>W(!U),children:[U?"Hide":"Manage"," ","(",Z.length,")",t.jsx(Dt,{size:14,style:{transform:U?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$size:"sm",ref:we,onClick:()=>B(!0),disabled:O,children:O?"Adding...":"Add"}),Y&&t.jsx(A6,{triggerRef:we,onClose:()=>B(!1),onAddPasskey:ba})]})]})]})})]}),J.id==="passkey"&&U&&t.jsx("div",{className:"w-flex-col w-gap-2",children:L?t.jsx("div",{className:"w-loading",children:t.jsx(je,{})}):Z.length===0?t.jsx("div",{className:"w-empty",children:t.jsx("p",{children:"No passkeys registered yet"})}):t.jsx("div",{className:"w-flex-col w-gap-2",children:Z.map(We=>t.jsxs("div",{className:"w-locked w-flex w-items-center w-justify-between",style:{height:"auto",padding:"10px 12px"},children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:We.name||"Unnamed Passkey"}),t.jsxs("span",{className:"w-secsub",children:[We.device_type==="platform"?"This device":"Security key",We.last_used_at&&` • Last used ${new Date(We.last_used_at).toLocaleDateString()}`]})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(ne,{$destructive:!0,$size:"sm",onClick:()=>ue(We.id),children:"Remove"}),Q===We.id&&t.jsx(Qa,{title:`Remove "${We.name||"Unnamed Passkey"}"?`,onConfirm:()=>{ya(We.id),ue(null)},onCancel:()=>ue(null)})]})]},We.id))})}),jt&&t.jsx("div",{className:"w-hr"})]},J.id)})}):t.jsx(Ct,{title:"No security features available",description:"Contact your administrator to enable security features."})})},L6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#d93025"}),t.jsx("stop",{offset:1,stopColor:"#ea4335"})]}),t.jsxs("linearGradient",{id:"b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#fcc934"}),t.jsx("stop",{offset:1,stopColor:"#fbbc04"})]}),t.jsxs("linearGradient",{id:"c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1e8e3e"}),t.jsx("stop",{offset:1,stopColor:"#34a853"})]})]}),t.jsx("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),t.jsx("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36Zm31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18Z",style:{fill:"none"}}),t.jsx("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12Z",style:{fill:"url(#a)"}}),t.jsx("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),t.jsx("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99Z",style:{fill:"url(#b)"}}),t.jsx("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007Z",style:{fill:"url(#c)"}})]}),P6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:512,height:512,viewBox:"0 0 512 512",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"g",cx:"210%",cy:"-100%",r:"290%",children:[t.jsx("stop",{offset:.1,stopColor:"#ffe226"}),t.jsx("stop",{offset:.79,stopColor:"#ff7139"})]}),t.jsxs("radialGradient",{id:"c",cx:"49%",cy:"40%",r:"128%",gradientTransform:"matrix(.82 0 0 1 .088 0)",children:[t.jsx("stop",{offset:.3,stopColor:"#960e18"}),t.jsx("stop",{offset:.35,stopColor:"#b11927",stopOpacity:.74}),t.jsx("stop",{offset:.43,stopColor:"#db293d",stopOpacity:.34}),t.jsx("stop",{offset:.5,stopColor:"#f5334b",stopOpacity:.09}),t.jsx("stop",{offset:.53,stopColor:"#ff3750",stopOpacity:0})]}),t.jsxs("radialGradient",{id:"d",cx:"48%",cy:"-12%",r:"140%",children:[t.jsx("stop",{offset:.13,stopColor:"#fff44f"}),t.jsx("stop",{offset:.53,stopColor:"#ff980e"})]}),t.jsxs("radialGradient",{id:"e",cx:"22.76%",cy:"110.11%",r:"100%",children:[t.jsx("stop",{offset:.35,stopColor:"#3a8ee6"}),t.jsx("stop",{offset:.67,stopColor:"#9059ff"}),t.jsx("stop",{offset:1,stopColor:"#c139e6"})]}),t.jsxs("radialGradient",{id:"f",cx:"52%",cy:"33%",r:"59%",gradientTransform:"scale(.9 1)",children:[t.jsx("stop",{offset:.21,stopColor:"#9059ff",stopOpacity:0}),t.jsx("stop",{offset:.97,stopColor:"#6e008b",stopOpacity:.6})]}),t.jsxs("radialGradient",{id:"b",cx:"87.4%",cy:"-12.9%",r:"128%",gradientTransform:"matrix(.8 0 0 1 .178 .129)",children:[t.jsx("stop",{offset:.13,stopColor:"#ffbd4f"}),t.jsx("stop",{offset:.28,stopColor:"#ff980e"}),t.jsx("stop",{offset:.47,stopColor:"#ff3750"}),t.jsx("stop",{offset:.78,stopColor:"#eb0878"}),t.jsx("stop",{offset:.86,stopColor:"#e50080"})]}),t.jsxs("radialGradient",{id:"h",cx:"84%",cy:"-41%",r:"180%",children:[t.jsx("stop",{offset:.11,stopColor:"#fff44f"}),t.jsx("stop",{offset:.46,stopColor:"#ff980e"}),t.jsx("stop",{offset:.72,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"i",cx:"16.1%",cy:"-18.6%",r:"348.8%",gradientTransform:"scale(1 .47) rotate(84 .279 -.297)",children:[t.jsx("stop",{offset:0,stopColor:"#fff44f"}),t.jsx("stop",{offset:.3,stopColor:"#ff980e"}),t.jsx("stop",{offset:.57,stopColor:"#ff3647"}),t.jsx("stop",{offset:.74,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"j",cx:"18.9%",cy:"-42.5%",r:"238.4%",children:[t.jsx("stop",{offset:.14,stopColor:"#fff44f"}),t.jsx("stop",{offset:.48,stopColor:"#ff980e"}),t.jsx("stop",{offset:.66,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"k",cx:"159.3%",cy:"-44.72%",r:"313.1%",children:[t.jsx("stop",{offset:.09,stopColor:"#fff44f"}),t.jsx("stop",{offset:.63,stopColor:"#ff980e"})]}),t.jsxs("linearGradient",{id:"a",x1:"87.25%",x2:"9.4%",y1:"15.5%",y2:"93.1%",children:[t.jsx("stop",{offset:.05,stopColor:"#fff44f"}),t.jsx("stop",{offset:.37,stopColor:"#ff980e"}),t.jsx("stop",{offset:.53,stopColor:"#ff3647"}),t.jsx("stop",{offset:.7,stopColor:"#e31587"})]}),t.jsxs("linearGradient",{id:"l",x1:"80%",x2:"18%",y1:"14%",y2:"84%",children:[t.jsx("stop",{offset:.17,stopColor:"#fff44f",stopOpacity:.8}),t.jsx("stop",{offset:.6,stopColor:"#fff44f",stopOpacity:0})]})]}),t.jsx("path",{fill:"url(#a)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484a120.249 120.249 0 0 0-66.142 25.488 71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.913c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.08 12.7-2.365 15-.022.177-.032.347-.053.524a229.066 229.066 0 0 0-3.9 33.157c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zM201.716 354.447c1.124.537 2.18 1.124 3.334 1.639.048.033.114.07.163.1a126.191 126.191 0 0 1-3.497-1.739zm55.053-144.93zm198.131-30.59-.032-.233c.012.085.027.174.04.259z"}),t.jsx("path",{fill:"url(#b)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#c)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#d)",d:"M361.922 194.6c.524.368 1 .734 1.493 1.1a130.706 130.706 0 0 0-22.31-29.112C266.4 91.892 321.516 4.626 330.811.194c.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.051 0 84.289 24.77 105.301 61.487z"}),t.jsx("path",{fill:"url(#e)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#f)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#g)",d:"M170.829 151.036a244.042 244.042 0 0 1 4.981 3.3 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7 1.155-.033 36.014-.66 53.543 10.732z"}),t.jsx("path",{fill:"url(#h)",d:"M18.223 261.41C36.766 370.988 136.1 454.651 248.855 457.844c104.361 2.954 171.037-57.62 198.576-116.716 17.8-38.2 30.154-100.7 7.479-162.175l-.008-.026-.032-.233c-.025-.178-.04-.284-.036-.226 0 .039.015.136.047.4 8.524 55.661-19.79 109.584-64.051 146.044l-.133.313c-86.245 70.223-168.774 42.368-185.484 30.966a144.108 144.108 0 0 1-3.5-1.743c-50.282-24.029-71.054-69.838-66.6-109.124-42.457 0-56.934-35.809-56.934-35.809s38.119-27.179 88.358-3.541c46.53 21.893 90.228 3.543 90.233 3.541-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 282.929 282.929 0 0 0-4.981-3.3c-17.528-11.392-52.388-10.765-53.543-10.735h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.919c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-8.65 37.842-4.44 57.199z"}),t.jsx("path",{fill:"url(#i)",d:"M341.105 166.587a130.706 130.706 0 0 1 22.31 29.112c1.323.994 2.559 1.985 3.608 2.952 54.482 50.2 25.936 121.2 23.807 126.26 44.261-36.46 72.575-90.383 64.051-146.044C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1-9.291 4.428-64.407 91.694 10.298 166.389z"}),t.jsx("path",{fill:"url(#j)",d:"M367.023 198.651c-1.049-.967-2.285-1.958-3.608-2.952-.489-.368-.969-.734-1.493-1.1-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1 16.71 11.4 99.239 39.257 185.484-30.966l.133-.313c2.129-5.054 30.675-76.057-23.807-126.258z"}),t.jsx("path",{fill:"url(#k)",d:"M148.439 277.443s11.093-41.335 79.432-41.335c7.388 0 28.509-20.615 28.9-26.593s-43.7 18.352-90.233-3.541c-50.239-23.638-88.358 3.541-88.358 3.541s14.477 35.809 56.934 35.809c-4.453 39.286 16.319 85.1 66.6 109.124 1.124.537 2.18 1.124 3.334 1.639-29.348-15.169-53.582-43.834-56.609-78.644z"}),t.jsx("path",{fill:"url(#l)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.053 0 84.291 24.77 105.3 61.484-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1a144.108 144.108 0 0 1-3.5-1.743c1.124.537 2.18 1.124 3.334 1.639-29.35-15.168-53.584-43.833-56.611-78.643 0 0 11.093-41.335 79.432-41.335 7.388 0 28.509-20.615 28.9-26.593-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.435 26.916c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.486 12.853-2.77 15.156-.022.177.021-.176 0 0a279.565 279.565 0 0 0-3.544 33.53c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zm-23.841 12.341c.012.085.027.174.04.259l-.008-.026-.032-.233z"})]}),$6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:250.076,height:248.707,viewBox:"0 0 66.166 65.804",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"b",children:[t.jsx("stop",{offset:0,stopColor:"#06c2e7"}),t.jsx("stop",{offset:.25,stopColor:"#0db8ec"}),t.jsx("stop",{offset:.5,stopColor:"#12aef1"}),t.jsx("stop",{offset:.75,stopColor:"#1f86f9"}),t.jsx("stop",{offset:1,stopColor:"#107ddd"})]}),t.jsxs("linearGradient",{id:"a",children:[t.jsx("stop",{offset:0,stopColor:"#bdbdbd"}),t.jsx("stop",{offset:1,stopColor:"#fff"})]}),t.jsx("linearGradient",{xlinkHref:"#a",id:"d",x1:412.975,x2:412.975,y1:237.608,y2:59.392,gradientTransform:"translate(206.79 159.773) scale(.35154)",gradientUnits:"userSpaceOnUse"}),t.jsx("filter",{id:"f",width:1.042,height:1.045,x:-.021,y:-.022,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:.958})}),t.jsx("filter",{id:"c",width:1.096,height:1.096,x:-.048,y:-.048,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:3.564})}),t.jsx("radialGradient",{xlinkHref:"#b",id:"e",cx:413.061,cy:136.818,r:82.125,fx:413.061,fy:136.818,gradientTransform:"translate(194.545 155.58) scale(.38143)",gradientUnits:"userSpaceOnUse"})]}),t.jsx("path",{d:"M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z",filter:"url(#c)",opacity:.53,paintOrder:"markers stroke fill",transform:"matrix(.33865 0 0 .3261 -106.77 -14.478)"}),t.jsx("path",{fill:"url(#d)",stroke:"#cdcdcd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:.093,d:"M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"url(#e)",d:"M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"#f4f2f3",d:"M33.083 4.017a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .842 0V4.438a.42.42 0 0 0-.421-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.527.002a.42.42 0 0 0-.377.375l-.214 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zM27.5 4.6a.42.42 0 0 0-.41.508l1.005 4.75a.42.42 0 1 0 .824-.174l-1.005-4.75A.42.42 0 0 0 27.5 4.6zm11.183.004a.42.42 0 0 0-.414.333l-1.009 4.75a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.632 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm16.568.001a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.436-.55zM22.13 6.34a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm21.937.015a.42.42 0 0 0-.392.25l-1.978 4.434a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.593zM19.654 7.65a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.421L19.989 7.86a.42.42 0 0 0-.335-.21zm26.858 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .73.42l1.02-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.85-3.93a.42.42 0 0 0-.356-.174zm31.702.022a.42.42 0 0 0-.356.174l-2.856 3.926a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.14zm35.975.003a.421.421 0 0 0-.29.139l-1.367 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.61 3.249a.42.42 0 1 0 .563-.626l-3.609-3.248a.42.42 0 0 0-.304-.108zm40.109.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm-41.823 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.681l1.653-1.2a.42.42 0 0 0-.262-.76zM9.72 17.49a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729L9.96 17.546a.42.42 0 0 0-.24-.056zm46.728 0a.417.417 0 0 0-.24.056l-4.205 2.427a.42.42 0 1 0 .42.73l4.206-2.428a.42.42 0 0 0-.181-.785zM8.508 19.996a.42.42 0 0 0-.18.806l1.866.832a.42.42 0 1 0 .343-.77l-1.866-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.865.83a.42.42 0 1 0 .342.77l1.866-.831a.42.42 0 0 0-.179-.806zM7.429 22.615a.42.42 0 0 0-.094.82l4.615 1.504a.42.42 0 1 0 .261-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm51.314.018a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zM6.756 25.365a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.823l-1.998-.425a.413.413 0 0 0-.085-.009zm52.655.004a.518.518 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zM6.247 28.13a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.837l4.83-.504a.42.42 0 0 0-.003-.837zM6.165 30.96a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.838l4.83-.504a.42.42 0 0 0-.003-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.828-.51a.434.434 0 0 0-.086-.001zM8.748 36.13a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.67.004a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zM12.111 37.79a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zM10.35 41.08a.42.42 0 0 0-.163.036l-1.866.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.179-.806zm45.459.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.769l-1.865-.832a.42.42 0 0 0-.163-.036zm-41.826.912a.417.417 0 0 0-.24.056L9.538 44.49a.42.42 0 1 0 .421.73l4.205-2.428a.42.42 0 0 0-.181-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.249 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.682l1.653-1.2a.42.42 0 0 0-.262-.762zm40.288.015a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm32.8.011a.421.421 0 0 0-.26.734l3.609 3.248a.42.42 0 1 0 .563-.625l-3.608-3.249a.42.42 0 0 0-.304-.107zm-29.375 3.084a.42.42 0 0 0-.355.173l-2.856 3.927a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm25.936.018a.421.421 0 0 0-.326.668l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.29.14l-1.367 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.331.002a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.139zm-25.655 1.684a.419.419 0 0 0-.393.25l-1.978 4.433a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.592zm17.955.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm-21.431 1.359a.419.419 0 0 0-.335.21l-1.021 1.768a.42.42 0 1 0 .729.421l1.02-1.769a.42.42 0 0 0-.393-.63zm24.934 0a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.422l-1.022-1.769a.42.42 0 0 0-.335-.21zm-17.054.063a.42.42 0 0 0-.415.334l-1.009 4.749a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .823-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.573.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .842 0v-4.855a.42.42 0 0 0-.421-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm15.45 0a.42.42 0 0 0-.437.55l.632 1.943a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm-10.365 1.083a.42.42 0 0 0-.378.375l-.213 2.03a.42.42 0 1 0 .837.088l.214-2.03a.42.42 0 0 0-.46-.463zm5.267.002a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.088l-.212-2.03a.42.42 0 0 0-.377-.375z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z",filter:"url(#f)",opacity:.409,paintOrder:"markers stroke fill",transform:"translate(-112.095 -20.822) scale(.35154)"}),t.jsx("path",{fill:"#ff5150",d:"m36.383 34.838-6.6-6.913 23.416-15.752z",paintOrder:"markers stroke fill"}),t.jsx("path",{fill:"#f1f1f1",d:"m36.383 34.838-6.6-6.913L12.966 50.59z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m12.967 50.59 23.416-15.752L53.2 12.173z",opacity:.243})]}),O6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"b",cx:161.8,cy:68.9,r:95.4,gradientTransform:"matrix(1 0 0 -.95 0 248.8)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.7,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"d",cx:-340.3,cy:63,r:143.2,gradientTransform:"matrix(.15 -.99 -.8 -.12 176.6 -125.4)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.8,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"e",cx:113.4,cy:570.2,r:202.4,gradientTransform:"matrix(-.04 1 2.13 .08 -1179.5 -106.7)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#35c1f1"}),t.jsx("stop",{offset:.1,stopColor:"#34c1ed"}),t.jsx("stop",{offset:.2,stopColor:"#2fc2df"}),t.jsx("stop",{offset:.3,stopColor:"#2bc3d2"}),t.jsx("stop",{offset:.7,stopColor:"#36c752"})]}),t.jsxs("radialGradient",{id:"f",cx:376.5,cy:568,r:97.3,gradientTransform:"matrix(.28 .96 .78 -.23 -303.8 -148.5)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#66eb6e"}),t.jsx("stop",{offset:1,stopColor:"#66eb6e",stopOpacity:0})]}),t.jsxs("linearGradient",{id:"a",x1:63.3,x2:241.7,y1:84,y2:84,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#0c59a4"}),t.jsx("stop",{offset:1,stopColor:"#114a8b"})]}),t.jsxs("linearGradient",{id:"c",x1:157.3,x2:46,y1:161.4,y2:40.1,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1b9de2"}),t.jsx("stop",{offset:.2,stopColor:"#1595df"}),t.jsx("stop",{offset:.7,stopColor:"#0680d7"}),t.jsx("stop",{offset:1,stopColor:"#0078d4"})]})]}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{fill:"url(#a)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{isolation:"isolate",opacity:.35,fill:"url(#b)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{fill:"url(#c)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{opacity:.41,fill:"url(#d)",isolation:"isolate"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#e)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#f)"},transform:"translate(-4.6 -5)"})]}),Z6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Opera",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"opera-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FF1B2D"}),t.jsx("stop",{offset:"50%",stopColor:"#CC0000"}),t.jsx("stop",{offset:"100%",stopColor:"#A02128"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#opera-gradient)"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"6.5",ry:"8.5",fill:"none",stroke:"#fff",strokeWidth:"1.2",opacity:"0.9"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"3.5",ry:"5.5",fill:"#fff"}),t.jsx("path",{d:"M12 8.5c-1.4 0-2.5 1.6-2.5 3.5s1.1 3.5 2.5 3.5 2.5-1.6 2.5-3.5-1.1-3.5-2.5-3.5z",fill:"url(#opera-gradient)"})]}),H6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Brave",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"brave-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FB542B"}),t.jsx("stop",{offset:"50%",stopColor:"#FF6B35"}),t.jsx("stop",{offset:"100%",stopColor:"#FF4500"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#brave-gradient)"}),t.jsx("path",{d:"M12 3.5l1.5 2h2.5l-.8 3 1.3 2.5-2.5.8v2.7l-2-.7-2 .7v-2.7l-2.5-.8L8.8 8.5 8 5.5h2.5L12 3.5z",fill:"#fff"}),t.jsx("path",{d:"M12 6.5c-.8 0-1.5.7-1.5 1.5v3c0 .8.7 1.5 1.5 1.5s1.5-.7 1.5-1.5V8c0-.8-.7-1.5-1.5-1.5z",fill:"url(#brave-gradient)"}),t.jsx("circle",{cx:"12",cy:"16",r:"1",fill:"url(#brave-gradient)"})]}),F6=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"w-text-secondary",children:[t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.6"}),t.jsx("circle",{cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.3"}),t.jsx("path",{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor",opacity:"0.5"}),t.jsx("circle",{cx:"12",cy:"12",r:"1",fill:"currentColor"}),t.jsx("text",{x:"12",y:"16.5",textAnchor:"middle",fill:"currentColor",fontSize:"6",opacity:"0.7",children:"?"})]}),T6=({browser:e})=>{const a=(e==null?void 0:e.toLowerCase())||"",s={width:20,height:20};return a.includes("chrome")?t.jsx(L6,{...s}):a.includes("firefox")?t.jsx(P6,{...s}):a.includes("safari")?t.jsx($6,{...s}):a.includes("edge")?t.jsx(O6,{...s}):a.includes("opera")?t.jsx(Z6,{...s}):a.includes("brave")?t.jsx(H6,{...s}):t.jsx(F6,{})},I6=()=>{const{signins:e,removeSignin:a,refetch:s,loading:n}=ko(),{refetch:i}=rt(),{toast:l}=ta(),m=e,c=async p=>{try{await a(p),await Promise.all([s(),i()]),l("Session ended successfully","info")}catch(u){l(u.message||"Failed to end session. Please try again.","error")}},d=p=>{if(!p||p.trim()==="")return"Unknown";const u=new Date(p);if(isNaN(u.getTime()))return"Unknown";const f=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return f<1?"Just now":f<60?`${f}m ago`:f<1440?`${Math.floor(f/60)}h ago`:u.toLocaleDateString()};return n?t.jsx("div",{className:"w-loading",children:t.jsx(je,{})}):t.jsx("div",{children:m&&m.length>0?t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs($t,{children:[t.jsx(Ot,{children:t.jsxs(nt,{children:[t.jsx(He,{children:"Browser & Device"}),t.jsx(He,{children:"Location"}),t.jsx(He,{children:"Last Active"}),t.jsx(He,{})]})}),t.jsx(Zt,{children:m.map(p=>t.jsxs(nt,{children:[t.jsx(Ke,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Vr,{children:t.jsx(T6,{browser:p.browser||"Unknown"})}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.browser||"Unknown Browser"}),p.device&&t.jsx("div",{className:"w-text-muted",children:p.device})]})]})}),t.jsx(Ke,{children:t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.city&&p.country?`${p.city}, ${p.country}`:"Unknown location"}),p.ip_address&&t.jsx("div",{className:"w-text-muted",children:p.ip_address})]})}),t.jsx(Ke,{children:d(p.last_active_at)}),t.jsx(Ht,{children:t.jsxs(ne,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>c(p.id),children:[t.jsx(Aa,{size:12}),"Sign out"]})})]},p.id))})]})})}):t.jsx(Ct,{title:"No active sessions",description:"You don't have any active sessions at the moment."})})},V6=(e,a)=>`${(e==null?void 0:e[0])||""}${(a==null?void 0:a[0])||""}`.toUpperCase()||"U",M0=()=>{var N,k,C,y,E,M,F,A;const{loading:e,user:a,updateProfilePicture:s}=xa(),{deployment:n}=ke(),[i,l]=o.useState("profile"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((I,$="info")=>{c(I),p($),setTimeout(()=>c(null),3e3)},[c]),x=async I=>{var S;const $=(S=I.target.files)==null?void 0:S[0];if($){if($.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!$.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s($),await(a==null?void 0:a.refetch()),g("Profile picture updated","info")}catch(Z){g((Z==null?void 0:Z.message)||"Failed to update profile picture","error")}finally{h(!1),f.current&&(f.current.value="")}}};if(e)return t.jsx(Pe,{children:t.jsx(mr,{className:"w-flex w-items-center w-justify-center",children:t.jsx(je,{})})});const w=n==null?void 0:n.auth_settings,b=(N=w==null?void 0:w.email_address)==null?void 0:N.enabled,j=(k=w==null?void 0:w.phone_number)==null?void 0:k.enabled,v=((C=n==null?void 0:n.social_connections)==null?void 0:C.some(I=>I.enabled))||!1,_=((y=w==null?void 0:w.password)==null?void 0:y.enabled)||((E=w==null?void 0:w.auth_factors_enabled)==null?void 0:E.authenticator)||((M=w==null?void 0:w.auth_factors_enabled)==null?void 0:M.phone_otp)||((F=w==null?void 0:w.auth_factors_enabled)==null?void 0:F.backup_code);return t.jsx(Pe,{children:t.jsx(i0,{children:t.jsx(r0.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(mr,{className:"w-relative",children:[a&&t.jsxs(f0,{className:"mac-page-header",children:[t.jsxs("button",{type:"button",className:"w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var I;return(I=f.current)==null?void 0:I.click()},disabled:u,title:"Change profile picture","aria-label":"Change profile picture",children:[t.jsx("span",{className:"w-avatar w-avatar--lg",children:a.profile_picture_url?t.jsx("img",{src:a.profile_picture_url,alt:""}):V6(a.first_name,a.last_name)}),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(je,{size:14}):t.jsx(sn,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(w0,{children:[t.jsx(g0,{children:`${a.first_name||""} ${a.last_name||""}`.trim()||a.username||"Account"}),((A=a.primary_email_address)==null?void 0:A.email)&&t.jsx(x0,{children:a.primary_email_address.email})]})]}),t.jsx(o0,{children:t.jsxs(l0,{children:[t.jsx(ka,{$isActive:i==="profile",onClick:()=>l("profile"),children:t.jsxs(Ca,{children:[t.jsx(hs,{size:16}),"Profile"]})}),b&&t.jsx(ka,{$isActive:i==="email",onClick:()=>l("email"),children:t.jsxs(Ca,{children:[t.jsx(dl,{size:16}),"Email"]})}),j&&t.jsx(ka,{$isActive:i==="phone",onClick:()=>l("phone"),children:t.jsxs(Ca,{children:[t.jsx(Pu,{size:16}),"Phone"]})}),v&&t.jsx(ka,{$isActive:i==="social",onClick:()=>l("social"),children:t.jsxs(Ca,{children:[t.jsx(Lu,{size:16}),"Connections"]})}),_&&t.jsx(ka,{$isActive:i==="security",onClick:()=>l("security"),children:t.jsxs(Ca,{children:[t.jsx(Xt,{size:16}),"Security"]})}),t.jsx(ka,{$isActive:i==="sessions",onClick:()=>l("sessions"),children:t.jsxs(Ca,{children:[t.jsx($u,{size:16}),"Sessions"]})})]})}),t.jsxs(c0,{children:[i==="profile"&&t.jsx(u6,{}),i==="email"&&b&&t.jsx(m6,{}),i==="phone"&&j&&t.jsx(p6,{}),i==="social"&&v&&t.jsx(w6,{}),i==="security"&&_&&t.jsx(R6,{}),i==="sessions"&&t.jsx(I6,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,style:{minWidth:0},children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Fa,{size:12}):t.jsx(Be,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},R0=({isOpen:e,onClose:a,title:s,showHeader:n,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(ze,{isOpen:e,onClose:a,children:t.jsx(ze.Overlay,{children:t.jsxs(ze.Content,{className:"w-dialog--panel",children:[n&&t.jsx(ze.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(M0,{}),l&&t.jsx(ze.Footer,{children:l})]})})}),$e=(...e)=>e.filter(Boolean).join(" "),z6=e=>t.jsx("div",{...e,className:$e("w-relative",e.className)}),L0=o.forwardRef((e,a)=>t.jsx("button",{...e,ref:a,className:$e("w-acct",e.className),style:{width:"auto",margin:0,padding:4,gap:8,...e.style}}));L0.displayName="AccountButton";const D6=({children:e,...a})=>t.jsx("div",{...a,className:$e("w-avatar","w-avatar--md",a.className),children:e}),U6=e=>t.jsx("div",{...e,className:$e("w-sec","w-text-secondary",e.className)}),P0=o.forwardRef(({$position:e,$isOpen:a,$maxHeight:s,children:n,...i},l)=>t.jsx("div",{...i,ref:l,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:s?`${s}px`:"calc(100vh - 48px)",overflowY:"auto",zIndex:99999,top:(e==null?void 0:e.top)!==void 0?`${e.top}px`:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?`${e.bottom}px`:void 0,left:(e==null?void 0:e.left)!==void 0?`${e.left}px`:void 0,right:(e==null?void 0:e.right)!==void 0?`${e.right}px`:void 0,visibility:e&&a?"visible":"hidden",opacity:a&&e?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,padding:0},children:n}));P0.displayName="DropdownContainer";const $0=o.forwardRef(({$top:e,$left:a,$isOpen:s,$maxHeight:n,children:i,...l},m)=>t.jsx("div",{...l,ref:m,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:`${n}px`,overflowY:"auto",zIndex:99999,display:"flex",flexDirection:"column",top:`${e}px`,left:`${a}px`,visibility:s?"visible":"hidden",opacity:s?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${s?"0s":"0.15s"}`,padding:0},children:i}));$0.displayName="SidePanel";const qi=e=>t.jsx("hr",{...e,className:$e("w-hr",e.className)}),W6=e=>t.jsx("div",{...e,style:{padding:"16px 14px 8px",...e.style}}),B6=e=>t.jsx("div",{...e,className:$e("w-flex","w-items-center","w-gap-3",e.className)}),G6=({children:e,...a})=>t.jsx("div",{...a,className:$e("w-avatar","w-avatar--lg",a.className),children:e}),q6=e=>t.jsx("div",{...e,className:$e("w-flex-col","w-grow",e.className),style:{gap:2,...e.style}}),K6=e=>t.jsx("div",{...e,className:$e("w-sec","w-truncate",e.className)}),Y6=e=>t.jsx("div",{...e,className:$e("w-secsub","w-truncate",e.className)}),Q6=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{border:"0.5px solid var(--wa-border)",background:e?"var(--wa-surface-subtle)":void 0,...a.style}}),J6=({children:e,...a})=>t.jsx("div",{...a,className:"w-avatar w-avatar--sm",children:e}),X6=e=>t.jsx("div",{...e,className:$e("w-sec","w-grow","w-truncate",e.className)}),ep=e=>t.jsx("div",{...e,className:$e("w-secsub","w-none",e.className)}),tp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),ap=e=>t.jsx("button",{...e,className:$e("w-menu-item",e.className)}),sp=e=>t.jsx("span",{...e,className:$e("w-grow",e.className)}),np=e=>t.jsx("span",{...e,className:$e("w-menu-trail",e.className)}),rp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),ip=e=>t.jsx("div",{...e,className:$e("w-menu-label",e.className)}),Hn=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{cursor:e?"default":"pointer",...a.style}}),Fn=({children:e,...a})=>t.jsx("div",{...a,className:$e("w-flex","w-items-center","w-justify-center","w-none",a.className),style:{width:14,height:14,color:"var(--wa-primary)",...a.style},children:e}),op=e=>t.jsx("div",{...e,className:"w-none",style:{width:14,...e.style}}),Tn=e=>t.jsx("div",{...e,className:$e("w-sec","w-grow","w-truncate",e.className)}),Ki=e=>t.jsx("div",{...e,className:$e("w-secsub","w-none",e.className)}),lp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),cp=e=>t.jsx("button",{...e,className:$e("w-menu-item","w-menu-item--danger",e.className)}),dp=e=>t.jsx("button",{...e,className:$e("w-menu-item",e.className),style:{borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,flex:"none",...e.style}}),up=e=>t.jsx("div",{...e,style:{flex:"1 1 auto",overflowY:"auto",padding:5,...e.style}}),Yi=({$active:e,...a})=>t.jsx("button",{...a,className:$e("w-menu-item","sp-row",e&&"sp-row--active",a.className),style:{height:30,...a.style}}),Qi=({$active:e,...a})=>t.jsx("button",{...a,className:$e("w-menu-item","sp-row","sp-ws-row",e&&"sp-row--active",a.className),style:{height:30,paddingLeft:30,position:"relative",...a.style},children:a.children}),Ji=({$personal:e,children:a,...s})=>t.jsx("div",{...s,className:$e("w-avatar","w-avatar--sm",!e&&"",s.className),children:a}),Xi=({children:e,...a})=>t.jsx("div",{...a,className:$e("w-avatar","","w-avatar--sm",a.className),children:e}),eo=e=>t.jsx("span",{...e,className:$e("w-sec","w-grow","w-truncate",e.className)}),to=e=>t.jsx("span",{...e,className:$e("w-secsub","w-grow","w-truncate",e.className)}),In=e=>t.jsx("div",{...e,className:$e("w-flex","w-items-center","w-none",e.className),style:{gap:4,...e.style}}),mp=({$open:e,...a})=>t.jsx(Dt,{...a,className:"w-text-muted",style:{flexShrink:0,transition:"transform 0.2s ease",transform:e?"rotate(0deg)":"rotate(-90deg)"}}),Vn=e=>t.jsx(Be,{...e,className:"w-text-primary",style:{flexShrink:0}}),pp=e=>t.jsx("div",{...e,className:$e("w-flex-col","w-gap-3","w-none",e.className),style:{padding:"12px 12px 16px",borderBottom:"0.5px solid var(--wa-border)",...e.style}}),hp=e=>t.jsx("button",{...e,className:$e("w-btn","w-btn--icon",e.className),style:{width:24,height:24,...e.style}}),ao=e=>t.jsx("div",{...e,className:$e("w-flex","w-items-center","w-gap-3",e.className),style:{padding:"4px 4px 0",minWidth:0,...e.style}}),so=({children:e,...a})=>t.jsx("div",{...a,className:$e("w-avatar","","w-avatar--md",a.className),children:e}),no=e=>t.jsx("div",{...e,className:$e("w-flex-col","w-grow",e.className),style:{gap:1,minWidth:0,...e.style}}),ro=e=>t.jsx("div",{...e,className:$e("w-sec","w-truncate",e.className)}),io=e=>t.jsx("div",{...e,className:$e("w-flex","w-items-center","w-none",e.className),style:{gap:2,...e.style}}),Fs=({$destructive:e,...a})=>t.jsx("button",{...a,className:$e("w-btn","w-btn--icon",e&&"w-btn--danger",a.className),style:{width:24,height:24,...a.style}}),oo=e=>t.jsx("div",{...e,className:"w-none",style:{borderTop:"0.5px solid var(--wa-border)",padding:5,...e.style}}),lo=e=>t.jsx("button",{...e,className:$e("w-menu-item",e.className),style:{height:30,color:"var(--wa-text-muted)",...e.style}}),co=e=>t.jsx("div",{...e,className:$e("w-flex","w-items-center","w-justify-center","w-none",e.className),style:{width:20,height:20,...e.style}}),Dr=({showName:e=!0,onCreateOrg:a,showOrgSwitcher:s=!0,narrowBreakpoint:n=640})=>{var Qe,vt,Ut,Ft,Wt,ba,ya,bt,aa,sa,na,ra;const i=ts(),[l,m]=o.useState(!1),[c,d]=o.useState(!1),[p,u]=o.useState(typeof window<"u"&&window.innerWidth<n),[h,f]=o.useState(!1),[g,x]=o.useState("org"),[w,b]=o.useState(null),[j,v]=o.useState({top:0,left:0,maxHeight:400}),[_,N]=o.useState(new Set),[k,C]=o.useState(null),y=o.useRef(null),E=o.useRef(null),M=o.useRef(null),F=xt({triggerRef:y,isOpen:l,minWidth:300}),A=Kt(!1),I=Kt(!1),$=Kt(!1),S=Kt(!1),Z=Kt(!1),{session:P,signOut:L,switchSignIn:H,switchOrganization:O,switchWorkspace:R,refetch:U}=rt(),{navigateToSignIn:W}=_t(),{deployment:Y}=ke(),{activeOrganization:B,activeMembership:Q,leave:ue}=fa(),{organizationMemberships:we}=wa(),{workspaces:se}=ga(),{activeWorkspace:te,activeMembership:oe,leave:Ee}=zt(),K=(Qe=P==null?void 0:P.active_signin)==null?void 0:Qe.user,Ge=((Ut=(vt=Y==null?void 0:Y.auth_settings)==null?void 0:vt.multi_session_support)==null?void 0:Ut.enabled)??!1,Ie=((Ft=Y==null?void 0:Y.b2b_settings)==null?void 0:Ft.allow_users_to_create_orgs)??!1,Ye=((Wt=Y==null?void 0:Y.b2b_settings)==null?void 0:Wt.organizations_enabled)??!1,Ae=Ye&&(((ba=Y==null?void 0:Y.b2b_settings)==null?void 0:ba.workspaces_enabled)??!1),ce=s&&Ye,D=!B,G=o.useMemo(()=>{var xe;const ie={};for(const Ne of se||[]){const J=(xe=Ne.organization)==null?void 0:xe.id;J&&(ie[J]||(ie[J]=[]),ie[J].push(Ne))}return ie},[se]),q=we||[],V=o.useCallback(()=>{if(!E.current)return;const ie=E.current.getBoundingClientRect(),xe=300,Ne=8,J=window.innerWidth<n;if(u(J),J){v({top:ie.top,left:ie.left,maxHeight:ie.height});return}const ve=Math.min(Math.max(ie.height,520),window.innerHeight-ie.top-16),qe=ie.right+Ne+xe<=window.innerWidth-8;v({top:ie.top,left:qe?ie.right+Ne:ie.left-Ne-xe,maxHeight:ve})},[n]),de=o.useCallback(()=>{V(),d(!0)},[V]),z=o.useCallback(ie=>{N(xe=>{const Ne=new Set(xe);return Ne.has(ie)?Ne.delete(ie):Ne.add(ie),Ne})},[]);o.useEffect(()=>{B&&Ae&&N(ie=>{if(ie.has(B.id))return ie;const xe=new Set(ie);return xe.add(B.id),xe})},[B,Ae]),o.useEffect(()=>{x(Ae&&te?"ws":"org")},[Ae,te==null?void 0:te.id]),o.useEffect(()=>{const ie=()=>{u(window.innerWidth<n),c&&V()};return window.addEventListener("resize",ie),()=>window.removeEventListener("resize",ie)},[n,c,V]),o.useEffect(()=>{l||(d(!1),f(!1))},[l]),o.useEffect(()=>{if(!l)return;const ie=setTimeout(()=>{const xe=Ne=>{var ve,qe,Ve;const J=Ne.target;(ve=y.current)!=null&&ve.contains(J)||(qe=E.current)!=null&&qe.contains(J)||(Ve=M.current)!=null&&Ve.contains(J)||m(!1)};return document.addEventListener("mousedown",xe),()=>document.removeEventListener("mousedown",xe)},50);return()=>clearTimeout(ie)},[l]);const le=ie=>ie.split(" ").filter(Boolean).map(xe=>xe[0]).join("").toUpperCase().slice(0,2),Je=(ie,xe,Ne,J,ve)=>t.jsx(ve,{children:ie?t.jsx("img",{src:xe,alt:Ne}):le(`${Ne||""} ${J||""}`)}),it=async ie=>{try{await L(ie),await U(),m(!1)}catch{}},ge=async ie=>{try{await H(ie),await U(),m(!1)}catch{}},ot=async ie=>{if(!h){f(!0);try{await O(ie),await U(),d(!1)}catch{}finally{f(!1)}}},X=async ie=>{if(!h){f(!0);try{await R(ie),await U(),d(!1)}catch{}finally{f(!1)}}},re=()=>{A.open(),m(!1)},me=[...(P==null?void 0:P.signins)||[]].sort((ie,xe)=>{const Ne=ie.user.id===(K==null?void 0:K.id),J=xe.user.id===(K==null?void 0:K.id);return Ne===J?0:Ne?-1:1}),Le=((ya=me.find(ie=>ie.user.id===(K==null?void 0:K.id)))==null?void 0:ya.id)||"",Me=((aa=(bt=Q==null?void 0:Q.roles)==null?void 0:bt[0])==null?void 0:aa.name)??null;return t.jsx(Pe,{children:t.jsxs(z6,{children:[t.jsxs(L0,{ref:y,onClick:()=>m(!l),children:[Je(K==null?void 0:K.has_profile_picture,K==null?void 0:K.profile_picture_url,K==null?void 0:K.first_name,K==null?void 0:K.last_name,D6),e&&t.jsx(U6,{children:`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`.trim()})]}),typeof window<"u"&&en.createPortal(t.jsxs("div",{className:"wacht-root",style:i,children:[t.jsxs(P0,{ref:E,$position:F,$isOpen:l&&!(p&&c),$maxHeight:F==null?void 0:F.maxHeight,children:[t.jsx(W6,{children:t.jsxs(B6,{children:[Je(K==null?void 0:K.has_profile_picture,K==null?void 0:K.profile_picture_url,K==null?void 0:K.first_name,K==null?void 0:K.last_name,G6),t.jsxs(q6,{children:[t.jsx(K6,{children:`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`.trim()}),t.jsx(Y6,{children:(sa=K==null?void 0:K.primary_email_address)==null?void 0:sa.email})]})]})}),t.jsxs(tp,{children:[ce&&t.jsxs(Q6,{$active:c,onClick:de,style:{marginBottom:8},children:[t.jsx(J6,{children:B?B.image_url?t.jsx("img",{src:B.image_url,alt:B.name}):(na=B.name)==null?void 0:na.charAt(0).toUpperCase():K!=null&&K.has_profile_picture?t.jsx("img",{src:K.profile_picture_url,alt:K.first_name}):le(`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`)}),t.jsx(X6,{children:(B==null?void 0:B.name)??"Personal account"}),Me&&t.jsx(ep,{children:Me})]}),t.jsxs(ap,{onClick:re,children:[t.jsx(Ea,{}),t.jsx(sp,{children:"Manage account"}),t.jsx(np,{children:"⌘,"})]})]}),t.jsx(qi,{}),t.jsxs(rp,{children:[t.jsx(ip,{children:"Accounts"}),Ge?me.map(({user:ie,id:xe})=>{var J;const Ne=ie.id===(K==null?void 0:K.id);return t.jsxs(Hn,{$active:Ne,onClick:Ne?void 0:()=>ge(xe),children:[Ne?t.jsx(Fn,{children:t.jsx(Be,{})}):t.jsx(op,{}),t.jsx(Tn,{children:(J=ie.primary_email_address)==null?void 0:J.email}),Ne&&t.jsx(Ki,{children:"Current"})]},ie.id)}):K&&t.jsxs(Hn,{$active:!0,children:[t.jsx(Fn,{children:t.jsx(Be,{})}),t.jsx(Tn,{children:(ra=K.primary_email_address)==null?void 0:ra.email}),t.jsx(Ki,{children:"Current"})]}),Ge&&t.jsxs(Hn,{onClick:()=>{W(),m(!1)},children:[t.jsx(Fn,{style:{color:"var(--wa-text-muted)"},children:t.jsx(Nt,{})}),t.jsx(Tn,{style:{color:"var(--wa-text-muted)"},children:"Add account"})]})]}),t.jsx(qi,{}),t.jsx(lp,{children:t.jsxs(cp,{onClick:()=>it(Le),children:[t.jsx(Aa,{}),"Sign out"]})})]}),t.jsxs($0,{ref:M,$top:j.top,$left:j.left,$isOpen:l&&c,$maxHeight:j.maxHeight,children:[p&&t.jsxs(dp,{onClick:()=>d(!1),children:[t.jsx(nn,{size:13}),"Back"]}),(()=>{var jt;if(D)return null;const ie=Ae&&!!te,xe=!!((jt=Q==null?void 0:Q.eligibility_restriction)!=null&&jt.type)&&Q.eligibility_restriction.type!=="none",Ne=!!B&&!xe&&Hr(Q),J=ie&&!xe&&Tr(oe),ve=ie?g:"org",qe=async()=>{if(ue){b("org");try{await ue(),await U(),d(!1)}catch{}finally{b(null)}}},Ve=async()=>{if(Ee){b("ws");try{await Ee(),d(!1)}catch{}finally{b(null)}}},yt=()=>{if(!ie)return null;const We=ve==="org"?"ws":"org",ht=We==="ws"?"Switch to workspace context":"Switch to organization context";return t.jsx(hp,{type:"button",onClick:()=>x(We),title:ht,"aria-label":ht,children:t.jsx(bu,{size:12})})};return t.jsxs(pp,{children:[ve==="org"&&B&&t.jsxs(ao,{children:[yt(),t.jsx(so,{children:B.image_url?t.jsx("img",{src:B.image_url,alt:B.name}):le(B.name)}),t.jsx(no,{children:t.jsx(ro,{children:B.name})}),t.jsxs(io,{children:[Ne&&t.jsx(Fs,{onClick:()=>{$.open(),m(!1)},title:"Organization settings","aria-label":"Organization settings",children:t.jsx(Ea,{size:14})}),t.jsx(Fs,{$destructive:!0,onClick:qe,disabled:w==="org",title:"Leave organization","aria-label":"Leave organization",children:t.jsx(Aa,{size:14})})]})]}),ve==="ws"&&ie&&t.jsxs(ao,{children:[yt(),t.jsx(so,{children:te.image_url?t.jsx("img",{src:te.image_url,alt:te.name}):le(te.name)}),t.jsx(no,{children:t.jsx(ro,{children:te.name})}),t.jsxs(io,{children:[J&&t.jsx(Fs,{onClick:()=>{Z.open(),m(!1)},title:"Workspace settings","aria-label":"Workspace settings",children:t.jsx(Ea,{size:14})}),t.jsx(Fs,{$destructive:!0,onClick:Ve,disabled:w==="ws",title:"Leave workspace","aria-label":"Leave workspace",children:t.jsx(Aa,{size:14})})]})]})]})})(),t.jsxs(up,{children:[t.jsxs(Yi,{$active:D,onClick:()=>{D||ot(void 0)},disabled:h,style:D?{cursor:"default"}:void 0,children:[t.jsx(Ji,{$personal:!0,children:K!=null&&K.has_profile_picture?t.jsx("img",{src:K.profile_picture_url,alt:K.first_name}):t.jsx(hs,{size:12})}),t.jsx(eo,{children:"Personal account"}),D&&t.jsx(In,{children:t.jsx("span",{className:"sp-check",style:{display:"inline-flex"},children:t.jsx(Vn,{size:13})})})]}),q.map(ie=>{var Ve,yt;const xe=ie.organization,Ne=xe.id===(B==null?void 0:B.id),J=_.has(xe.id),ve=Ae?G[xe.id]||[]:[],qe=!!((Ve=ie.eligibility_restriction)!=null&&Ve.type)&&ie.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs(Yi,{$active:Ne,onClick:()=>{qe||(Ae?z(xe.id):Ne||ot(xe.id))},disabled:h,style:qe?{opacity:.55,cursor:"not-allowed"}:Ne&&!Ae?{cursor:"default"}:void 0,title:(yt=ie.eligibility_restriction)==null?void 0:yt.message,children:[t.jsx(Ji,{children:xe.image_url?t.jsx("img",{src:xe.image_url,alt:xe.name}):le(xe.name)}),t.jsx(eo,{children:xe.name}),t.jsxs(In,{children:[qe&&t.jsx(Ma,{size:12,color:"var(--wa-error)"}),Ne&&!Ae&&t.jsx(Vn,{size:13}),Ae&&t.jsx(mp,{size:11,$open:J})]})]}),Ae&&J&&t.jsxs(t.Fragment,{children:[ve.map(jt=>{var ia,oa;const We=Ne&&(te==null?void 0:te.id)===jt.id,ht=jt,Bt=((ia=ht.eligibility_restriction)==null?void 0:ia.type)&&ht.eligibility_restriction.type!=="none";return t.jsxs(Qi,{$active:We,onClick:()=>{!We&&!Bt&&X(jt.id)},disabled:h,style:Bt||qe?{opacity:.55,cursor:"not-allowed"}:We?{cursor:"default"}:void 0,title:(oa=ht.eligibility_restriction)==null?void 0:oa.message,children:[t.jsx(Xi,{children:ht.image_url?t.jsx("img",{src:ht.image_url,alt:ht.name}):le(ht.name).charAt(0)}),t.jsx(to,{children:ht.name}),t.jsxs(In,{children:[Bt&&t.jsx(Ma,{size:12,color:"var(--wa-error)"}),We&&t.jsx(Vn,{size:12})]})]},jt.id)}),!qe&&t.jsxs(Qi,{onClick:()=>{C(xe.id),S.open()},disabled:h,children:[t.jsx(Xi,{style:{background:"transparent",border:"1px dashed var(--wa-border-strong)"},children:t.jsx(Nt,{size:10})}),t.jsx(to,{children:"New workspace"})]})]})]},xe.id)})]}),(()=>{var qe,Ve,yt;const ie=((we==null?void 0:we.length)??0)>0,xe=()=>Ie&&t.jsx(oo,{children:t.jsxs(lo,{onClick:()=>{a?(a(),m(!1)):I.open()},disabled:h,children:[t.jsx(co,{children:t.jsx(Nt,{size:12})}),"New organization"]})});if(!Ae||!ie)return xe();const Ne=!!((qe=Q==null?void 0:Q.eligibility_restriction)!=null&&qe.type)&&Q.eligibility_restriction.type!=="none",J=((yt=(Ve=we==null?void 0:we[0])==null?void 0:Ve.organization)==null?void 0:yt.id)??null,ve=B&&!Ne?B.id:J;return t.jsx(oo,{children:t.jsxs(lo,{onClick:()=>{C(ve),S.open()},disabled:h,children:[t.jsx(co,{children:t.jsx(Nt,{size:12})}),"New workspace"]})})})()]})]}),document.body),t.jsx(R0,{isOpen:A.isOpen,onClose:A.close}),ce&&t.jsxs(t.Fragment,{children:[t.jsx(Bc,{isOpen:I.isOpen,onClose:I.close}),t.jsx(Qc,{isOpen:$.isOpen,onClose:$.close}),Ae&&t.jsxs(t.Fragment,{children:[t.jsx(Pr,{isOpen:S.isOpen,onClose:()=>{S.close(),C(null)},organizationId:k||void 0}),t.jsx(Or,{isOpen:Z.isOpen,onClose:Z.close})]})]})]})})};function O0({notification:e,onAction:a}){const[s,n]=o.useState(!1),i=c=>{c.target.closest("button")||(n(!s),e.is_read||a({type:"read",id:e.id}))},l=c=>{a({type:"custom",payload:c.payload})},m=c=>{const d=new Date(c),u=new Date().getTime()-d.getTime();if(u<6e4)return"Just now";const h=Math.floor(u/6e4);if(h<60)return`${h}m`;const f=Math.floor(h/60);if(f<24)return`${f}h`;const g=Math.floor(f/24);return g<7?`${g}d`:d.toLocaleDateString(void 0,{month:"short",day:"numeric"})};return t.jsxs("div",{className:"w-flex w-gap-3 w-row--hover w-notif-row",onClick:i,"data-unread":e.is_read?void 0:"",children:[t.jsxs("div",{className:"w-grow w-flex-col w-justify-center",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:2},children:[!e.is_read&&t.jsx("span",{className:"w-notif-dot"}),t.jsx("h4",{className:"w-sec w-truncate",style:{margin:0},children:e.title})]}),t.jsx("p",{className:`w-secsub${s?"":" w-truncate"}`,style:{margin:0,wordWrap:s?"break-word":void 0},children:e.body}),e.ctas&&e.ctas.length>0&&t.jsx("div",{className:"w-flex w-wrap w-gap-2",style:{marginTop:10},children:e.ctas.map((c,d)=>t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>l(c),children:c.label},d))})]}),t.jsxs("div",{className:"w-flex-col w-items-end w-gap-2 w-none",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-1",children:[e.is_read&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"unread",id:e.id})},title:"Mark as unread",children:t.jsx(ku,{size:14})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"star",id:e.id})},title:e.is_starred?"Unstar":"Star","data-on":e.is_starred?"":void 0,children:t.jsx(Ou,{size:14,fill:e.is_starred?"currentColor":"none"})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"archive",id:e.id})},title:e.is_archived?"Unarchive":"Archive",children:e.is_archived?t.jsx(Vo,{size:14}):t.jsx(To,{size:14})})]}),t.jsx("span",{className:"w-secsub",style:{whiteSpace:"nowrap"},children:m(e.created_at)})]})]})}const Z0=o.forwardRef(({scope:e="all",onAction:a,fullWidth:s,maxHeight:n,className:i},l)=>{const[m,c]=o.useState("inbox"),[d,p]=o.useState(!1),[u,h]=o.useState(!1),f=o.useRef(null),g={scope:e,limit:20,is_archived:m==="archive",is_starred:m==="starred",is_read:d?!1:void 0},{notifications:x,loading:w,error:b,hasMore:j,loadMore:v,markAsRead:_,markAsUnread:N,markAllAsRead:k,archiveAllRead:C,archiveNotification:y,starNotification:E}=Ro(g);o.useEffect(()=>{if(!u)return;const I=$=>{f.current&&!f.current.contains($.target)&&h(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[u]);const M=async I=>{switch(I.type){case"read":await _(I.id);break;case"unread":await N(I.id);break;case"archive":await y(I.id);break;case"star":await E(I.id);break;case"custom":a==null||a(I.payload);break}},F=()=>{k(),h(!1)},A=()=>{C(),h(!1)};return t.jsxs("div",{ref:l,className:`w-flex-col w-relative w-notif-panel${s?" w-notif-panel--fill":""}${i?` ${i}`:""}`,style:{maxHeight:n||"100%"},children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-3 w-none w-notif-head",children:[t.jsxs("div",{className:"w-tabs w-grow",children:[t.jsx("button",{className:`w-tab${m==="inbox"?" w-tab--active":""}`,onClick:()=>c("inbox"),children:"Inbox"}),t.jsx("button",{className:`w-tab${m==="archive"?" w-tab--active":""}`,onClick:()=>c("archive"),children:"Archive"}),t.jsx("button",{className:`w-tab${m==="starred"?" w-tab--active":""}`,onClick:()=>c("starred"),children:"Starred"})]}),t.jsxs("label",{className:"w-switch w-none","data-on":d?"":void 0,onClick:()=>p(!d),children:[t.jsx("span",{className:"w-switch-track",children:t.jsx("span",{className:"w-switch-knob"})}),t.jsx("span",{className:"w-switch-label",children:"Unread Only"})]}),t.jsx("button",{className:"w-btn w-btn--icon w-none",onClick:()=>h(!u),children:t.jsx(Su,{size:16})}),u&&t.jsxs("div",{ref:f,className:"w-menu w-notif-menu",children:[m==="inbox"&&t.jsxs("button",{className:"w-menu-item",onClick:F,children:[t.jsx(_u,{})," Mark all as read"]}),t.jsxs("button",{className:"w-menu-item",onClick:A,children:[t.jsx(To,{})," Archive all read"]})]})]}),t.jsx("div",{className:"w-grow w-notif-body",children:w?t.jsx("div",{className:"w-loading",children:t.jsx(je,{})}):b?t.jsx(Ct,{icon:t.jsx(ci,{size:20,className:"w-text-error"}),title:"Failed to load notifications",description:b.message||"An unexpected error occurred."}):x.length===0?t.jsx(Ct,{icon:t.jsx(ci,{size:20}),title:"No notifications",description:"You're all caught up!"}):t.jsxs(t.Fragment,{children:[x.map(I=>t.jsx(O0,{notification:I,onAction:M},I.id)),j&&t.jsx("div",{className:"w-flex w-justify-center",style:{padding:12},children:t.jsx("button",{className:"w-btn w-btn--ghost w-btn--sm",onClick:v,children:"Load more"})})]})})]})}),H0=o.forwardRef(({position:e,scope:a,onAction:s,className:n},i)=>t.jsx("div",{ref:i,className:`w-card w-flex-col w-notif-pop${n?` ${n}`:""}`,style:{top:(e==null?void 0:e.top)!==void 0?e.top:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?e.bottom:void 0,left:(e==null?void 0:e.left)!==void 0?e.left:void 0,right:(e==null?void 0:e.right)!==void 0?e.right:void 0,maxHeight:e!=null&&e.maxHeight?e.maxHeight:"90vh"},children:t.jsx(Z0,{scope:a,onAction:s,fullWidth:!0,maxHeight:e!=null&&e.maxHeight?`${e.maxHeight}px`:"100%"})}));function F0({className:e,showBadge:a=!0,scope:s="all",onAction:n}){const[i,l]=o.useState(!1),m=ts(),c=o.useRef(null),d=o.useRef(null),p=o.useRef(null),{count:u,refetch:h}=Lo({scope:s}),f=async x=>{await h(),n==null||n(x.payload)},g=xt({triggerRef:p,isOpen:i,minWidth:Math.min(450,typeof window<"u"?window.innerWidth-32:300),defaultMaxHeight:550});return o.useEffect(()=>{if(!i)return;const x=setTimeout(()=>{const w=b=>{var v,_;const j=b.target;(v=c.current)!=null&&v.contains(j)||(_=d.current)!=null&&_.contains(j)||l(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},50);return()=>{clearTimeout(x)}},[i]),t.jsx(Pe,{children:t.jsxs("div",{ref:c,className:`w-inline w-relative${e?` ${e}`:""}`,children:[t.jsxs("button",{ref:p,className:"w-btn w-btn--icon w-notif-bell",onClick:()=>l(!i),"aria-label":u>0?`${u} unread notifications`:"Notifications",children:[t.jsx(yu,{strokeWidth:1}),a&&u>0&&t.jsx("span",{className:"w-notif-badge","data-dot":u<=9?"":void 0,children:u>9?"9+":""})]}),typeof window<"u"&&i&&en.createPortal(t.jsx("div",{className:"wacht-root",style:m,children:t.jsx(H0,{ref:d,position:g,scope:s,onAction:f,onClose:()=>l(!1)})}),document.body)]})})}const fp=({showName:e=!0,showNotifications:a=!0})=>t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[a&&t.jsx(F0,{}),t.jsx(Dr,{showName:e})]}),wp=({children:e})=>{var n;const{session:a,loading:s}=rt();return s||!((n=a.signins)!=null&&n.length)||!a.active_signin?null:t.jsx(t.Fragment,{children:e})},gp=({children:e})=>{var n;const{loading:a,session:s}=rt();return a||(n=s.signins)!=null&&n.length&&s.active_signin?null:t.jsx(t.Fragment,{children:e})},xp=({onAccountSelect:e,showAddAccount:a=!0})=>{var k,C,y,E;const{session:s,loading:n,switchSignIn:i,signOut:l}=rt(),{deployment:m}=ke(),{navigateToSignIn:c,navigate:d}=_t(),[p,u]=o.useState(null),[h,f]=o.useState(null),g=s==null?void 0:s.active_signin,x=(s==null?void 0:s.signins)||[],w=((C=(k=m==null?void 0:m.auth_settings)==null?void 0:k.multi_session_support)==null?void 0:C.enabled)??!1,b=(y=m==null?void 0:m.ui_settings)==null?void 0:y.app_name;o.useEffect(()=>{n||x.length||c()},[n,x,c]);const j=M=>M.split(" ").map(F=>F[0]).join("").toUpperCase().slice(0,2),v=async M=>{var F;f(M);try{if(await i(M),e)e(M),f(null);else{let A=ft(m,new URLSearchParams(window.location.search).get("redirect_uri"));if(A||(A=(F=m.ui_settings)==null?void 0:F.after_signin_redirect_url),A){let I;try{I=new URL(A)}catch{I=new URL(A,window.location.origin)}(m==null?void 0:m.mode)==="staging"&&I.searchParams.set("__dev_session__",wt(m.backend_host)??""),d(I.toString())}else f(null)}}catch{f(null)}},_=async(M,F)=>{M.stopPropagation(),u(F);try{await l(F)}catch{}finally{u(null)}},N=()=>{var F;let M=ft(m,new URLSearchParams(window.location.search).get("redirect_uri"));M||(M=(F=m.ui_settings)==null?void 0:F.after_signin_redirect_url),c(M)};return n?t.jsx(js,{}):x.length?t.jsx(Pe,{children:t.jsxs(et,{footer:t.jsxs("span",{className:"w-sub",style:{fontSize:12.5},children:["Don't have an account?"," ",t.jsx(St,{to:`${(E=m.ui_settings)==null?void 0:E.sign_up_page_url}${window.location.search}`,className:"w-link",children:"Sign up"})]}),children:[t.jsx(st,{title:"Choose an account",sub:`Select an account to continue${b?` to ${b}`:""}`}),t.jsx("div",{className:"w-flex-col",children:x.map(({user:M,id:F})=>{var L,H;if(!M)return null;const A=F===(g==null?void 0:g.id),I=h===F,$=p===F,S=`${M.first_name||""} ${M.last_name||""}`.trim(),Z=S||((L=M.primary_email_address)==null?void 0:L.email)||M.username||"User",P=((H=M.primary_email_address)==null?void 0:H.email)||M.username;return t.jsxs("button",{className:"w-acct","data-active":A?"":void 0,"data-busy":I?"":void 0,onClick:()=>v(F),children:[t.jsx("div",{className:"w-avatar",children:I?t.jsx(gt,{onAccent:!0}):M.has_profile_picture?t.jsx("img",{src:M.profile_picture_url,alt:S}):j(Z)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:Z}),P&&P!==Z&&t.jsx("div",{className:"w-secsub w-truncate",children:P})]}),A&&t.jsxs("span",{className:"w-pill w-pill--current",children:[t.jsx(Be,{size:11,weight:"bold"}),"current"]}),t.jsx("span",{className:"w-kebab w-acct-out",role:"button","aria-disabled":$,title:"Sign out",onClick:O=>_(O,F),children:$?t.jsx(gt,{}):t.jsx(Aa,{size:15})})]},F)})}),a&&w&&t.jsx("div",{className:"w-acct-foot",children:t.jsxs("button",{className:"w-acct-add",onClick:N,children:[t.jsx(Nt,{size:15}),"Add another account"]})})]})}):null},vp=()=>{const{navigateToSignIn:e}=_t();return o.useEffect(()=>{e()},[e]),null},bp=()=>{const{navigateToSignUp:e}=_t();return o.useEffect(()=>{e()},[e]),null},yp=()=>{var A,I;const{organizationMemberships:e,refetch:a,loading:s}=wa(),{workspaces:n}=ga(),{switchOrganization:i,switchWorkspace:l}=rt(),{deployment:m}=ke(),[c,d]=o.useState(null),[p,u]=o.useState("orgList"),[h,f]=o.useState(null),g=((m==null?void 0:m.b2b_settings.organizations_enabled)??!1)&&((m==null?void 0:m.b2b_settings.workspaces_enabled)??!1),x=(m==null?void 0:m.b2b_settings.allow_users_to_create_orgs)??!1,w=o.useRef(!1);o.useEffect(()=>{if(!(w.current||!e)){if(w.current=!0,e.length===0){u("createOrg");return}if(!g){u("orgList");return}if(!n||n.length===0){const $=e.find(S=>{var Z,P;return!((Z=S.eligibility_restriction)!=null&&Z.type)||((P=S.eligibility_restriction)==null?void 0:P.type)==="none"});if($){f($.organization.id),u("createWorkspace");return}}u("orgList")}},[e,n,g]);const b=$=>$.split(" ").map(S=>S[0]).join("").toUpperCase().slice(0,2),j=async $=>{if(g){f($.id),u("workspaceList");return}d($.id);try{await i($.id)}finally{d(null)}},v=async $=>{d($.id);try{await l($.id)}finally{d(null)}},_=async $=>{var Z;await a();const S=((Z=$==null?void 0:$.data)==null?void 0:Z.organization)||($==null?void 0:$.organization)||$;if(!g){u("orgList");return}S!=null&&S.id?(f(S.id),u("createWorkspace")):u("orgList")},N=async $=>{var Z;const S=($==null?void 0:$.id)??((Z=$==null?void 0:$.workspace)==null?void 0:Z.id);if(S){d(S);try{await l(S)}finally{d(null)}}},k=async()=>{f(null),u("orgList")},C=(A=e==null?void 0:e.find($=>$.organization.id===h))==null?void 0:A.organization,y=h?n==null?void 0:n.filter($=>$.organization.id===h):[];if(s)return null;if(p==="createOrg")return t.jsx(ze.Body,{style:{padding:0},children:t.jsx(mn,{onSuccess:_,onCancel:()=>u("orgList")})});if(p==="createWorkspace"&&h)return t.jsx(ze.Body,{style:{padding:0},children:t.jsx(Lr,{organizationId:h,onSuccess:N,onCancel:()=>u("workspaceList"),onCreateOrganization:()=>u("createOrg")})});const E=p==="workspaceList",M=E?"Select a workspace":"Select an organization",F=E?`Choose a workspace in ${(C==null?void 0:C.name)||""}`:`to continue to ${((I=m==null?void 0:m.ui_settings)==null?void 0:I.app_name)||"App"}`;return t.jsxs("div",{className:"w-split",children:[t.jsxs("div",{className:"w-split-aside w-flex-col w-justify-between w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx(Sr,{placement:"left"}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-title",children:M}),t.jsx("p",{className:"w-sub",children:F})]})]}),t.jsx(Dr,{showName:!0})]}),t.jsxs("div",{className:"w-split-main",children:[t.jsxs("div",{className:"w-grow w-flex-col",style:{overflow:"hidden",marginBottom:24},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:8},children:[E&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:k,"aria-label":"Go back",title:"Go back",children:t.jsx(nn,{})}),t.jsx("h2",{className:"w-sec",children:E?"Workspaces":"Your organizations"})]}),t.jsx("div",{className:"w-grow w-flex-col",style:{overflowY:"auto"},children:E?t.jsx(t.Fragment,{children:y&&y.length>0?y.map($=>{var Z,P,L;const S=((Z=$.eligibility_restriction)==null?void 0:Z.type)!=="none"&&((P=$.eligibility_restriction)==null?void 0:P.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!S&&v($),disabled:c===$.id||S,title:S?(L=$.eligibility_restriction)==null?void 0:L.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:$.image_url?t.jsx("img",{src:$.image_url,alt:$.name}):b($.name).charAt(0)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:$.name}),t.jsxs("div",{className:"w-secsub w-inline w-gap-1",children:[t.jsx(cs,{}),"Workspace"]})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[S&&t.jsx(Ma,{size:16,className:"w-text-error"}),t.jsx(Qt,{})]})]},$.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(cs,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No workspaces yet"}),t.jsxs("p",{children:["Create your first workspace for"," ",(C==null?void 0:C.name)||"this organization"]})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(ne,{$size:"sm",onClick:()=>u("createWorkspace"),children:[t.jsx(Nt,{}),"Create workspace"]})})]})}):e&&e.length>0?e.map($=>{var W,Y,B,Q,ue;const S=$.organization,Z=n==null?void 0:n.filter(we=>we.organization.id===S.id),P=(Z==null?void 0:Z.length)||0,L=S.member_count,H=((Y=(W=$.roles)==null?void 0:W[0])==null?void 0:Y.name)||"No role",O=$.roles.length-1,R=O>0?`${H.charAt(0).toUpperCase()+H.slice(1)} +${O}`:H.charAt(0).toUpperCase()+H.slice(1),U=((B=$.eligibility_restriction)==null?void 0:B.type)!=="none"&&((Q=$.eligibility_restriction)==null?void 0:Q.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!U&&j(S),disabled:c===S.id||U,title:U?(ue=$.eligibility_restriction)==null?void 0:ue.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:S.image_url?t.jsx("img",{src:S.image_url,alt:S.name}):b(S.name)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:S.name}),t.jsx("div",{className:"w-secsub w-inline w-gap-1",children:g?t.jsxs(t.Fragment,{children:[t.jsx(cs,{}),P," ","workspace",P!==1?"s":""]}):t.jsxs(t.Fragment,{children:[t.jsx(ps,{}),R," •"," ",L," member",L!==1?"s":""]})})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[U&&t.jsx(Ma,{size:16,className:"w-text-error"}),t.jsx(Qt,{})]})]},S.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(ps,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No organizations yet"}),t.jsx("p",{children:x?"Create your first organization to get started":"You don't have access to any organizations yet"})]}),x&&t.jsx("div",{className:"w-empty-action",children:t.jsxs(ne,{$size:"sm",onClick:()=>u("createOrg"),children:[t.jsx(Nt,{}),"Create organization"]})})]})})]}),E&&h&&t.jsxs(ne,{$outline:!0,onClick:()=>u("createWorkspace"),disabled:c!==null,children:[t.jsx(Nt,{size:12}),"Create workspace"]}),!E&&e&&e.length>0&&x&&t.jsxs(ne,{$outline:!0,onClick:()=>u("createOrg"),disabled:c!==null,children:[t.jsx(Nt,{size:12}),"Create new organization"]})]})]})},jp=({children:e})=>{var h,f,g,x;const{activeOrganization:a}=fa(),{activeWorkspace:s}=zt(),{deployment:n}=ke(),{loading:i,orgMembership:l,workspaceMembership:m}=Co(),c=((n==null?void 0:n.b2b_settings.organizations_enabled)??!1)&&((n==null?void 0:n.b2b_settings.workspaces_enabled)??!1),d=((h=l==null?void 0:l.eligibility_restriction)==null?void 0:h.type)!=="none"&&((f=l==null?void 0:l.eligibility_restriction)==null?void 0:f.type)!==void 0,p=((g=m==null?void 0:m.eligibility_restriction)==null?void 0:g.type)!=="none"&&((x=m==null?void 0:m.eligibility_restriction)==null?void 0:x.type)!==void 0;return i?null:(d||p||!a?!1:c?s?(m==null?void 0:m.workspace.id)===s.id&&m.organization_id===a.id:!1:!0)?t.jsx(t.Fragment,{children:e}):t.jsx(Pe,{children:t.jsx(ze,{isOpen:!0,children:t.jsx(ze.Overlay,{children:t.jsx(ze.Content,{className:"w-flex w-justify-center",style:{padding:0,width:900,maxWidth:"90vw"},children:t.jsx(yp,{})})})})})},_p=e=>{const a=e.toLowerCase().trim();return["javascript:","data:","vbscript:"].some(i=>a.startsWith(i))?!0:["http://","https://","//","ftp://","ftps://","mailto:","tel:","sms:","file:","blob:"].some(i=>a.startsWith(i))},kp=e=>{const a=e.toLowerCase().trim();return!["javascript:","data:","vbscript:"].some(n=>a.startsWith(n))};exports.AcceptInvite=Sm;exports.AuthFormImage=Sr;exports.CreateOrganizationForm=mn;exports.CreateWorkspaceDialog=Pr;exports.CreateWorkspaceForm=Lr;exports.DefaultStylesProvider=Pe;exports.DeploymentInitialized=v2;exports.DeploymentInitializing=b2;exports.DeploymentProvider=W0;exports.Dialog=ze;exports.DialogTrigger=Om;exports.Dropdown=_s;exports.DropdownDivider=Tc;exports.DropdownItem=ea;exports.DropdownItems=ks;exports.DropdownTrigger=Cs;exports.Form=Ic;exports.FormGroup=Ue;exports.Input=be;exports.Label=Te;exports.MagicLinkVerification=km;exports.ManageAccount=M0;exports.ManageAccountDialog=R0;exports.ManageOrganization=Yc;exports.ManageWorkspace=Xc;exports.ManageWorkspaceDialog=Or;exports.NavigateToSignIn=vp;exports.NavigateToSignUp=bp;exports.NavigationLink=St;exports.NotificationBell=F0;exports.NotificationItem=O0;exports.NotificationPanel=Z0;exports.NotificationPopover=H0;exports.OAuthProvider=mo;exports.ORG_ADMIN_PERMISSIONS=e0;exports.ORG_MANAGEMENT_PERMISSIONS=t0;exports.OTPInput=va;exports.OrganizationSwitcher=n0;exports.PhoneNumberInput=ys;exports.PhoneVerification=Rc;exports.ProfileCompletion=Pc;exports.RequireActiveTenancy=jp;exports.SSOCallback=_m;exports.SignInForm=bm;exports.SignUpForm=mm;exports.SignedIn=wp;exports.SignedInAccounts=xp;exports.SignedOut=gp;exports.SimpleDialog=$m;exports.Spinner=je;exports.Switch=Za;exports.TwoFactorMethodSelector=Mc;exports.TwoFactorVerification=Lc;exports.UserButton=Dr;exports.UserControls=fp;exports.WORKSPACE_ADMIN_PERMISSIONS=a0;exports.WORKSPACE_MANAGEMENT_PERMISSIONS=s0;exports.WaitlistForm=jm;exports.canManageOrganization=Hr;exports.canManageWorkspace=Tr;exports.clearTokenCache=Lt;exports.hasIncompleteProfile=Cm;exports.hasOrgPermission=Zr;exports.hasWorkspacePermission=Fr;exports.isExternalUrl=_p;exports.isOrgAdmin=E4;exports.isSafeUrl=kp;exports.isWorkspaceAdmin=A4;exports.redirectToProfileCompletion=Nm;exports.useActiveOrganization=fa;exports.useActiveTenancy=Co;exports.useActiveWorkspace=zt;exports.useActorMcpServers=zd;exports.useActorProjectSearch=Md;exports.useActorProjects=Ad;exports.useActorThreadSearch=Pd;exports.useAgentSession=_d;exports.useAgentThread=$d;exports.useAgentThreadAssignments=Zd;exports.useAgentThreadConversation=jd;exports.useAgentThreadFilesystem=Od;exports.useAgentThreadTaskGraphs=Id;exports.useApiAuthAppSession=h2;exports.useApiAuthAuditAnalytics=g2;exports.useApiAuthAuditLogs=w2;exports.useApiAuthAuditTimeseries=x2;exports.useApiAuthKeys=f2;exports.useClient=ye;exports.useCreateWebhookEndpoint=c2;exports.useDeployment=ke;exports.useExternalAgentConnections=Dd;exports.useForgotPassword=Ao;exports.useInvitation=Ho;exports.useMagicLinkVerification=Eo;exports.useNavigation=_t;exports.useNotificationStream=Mo;exports.useNotificationUnreadCount=Lo;exports.useNotifications=Ro;exports.useOrganizationList=Vt;exports.useOrganizationMemberships=wa;exports.useProjectTaskBoardItem=Td;exports.useProjectTaskBoardItemComments=Vd;exports.useProjectTasks=Fd;exports.useProjectThreadFeed=Ld;exports.useProjectThreads=Rd;exports.useSSOCallback=So;exports.useSession=rt;exports.useSignIn=po;exports.useSignUp=ho;exports.useThemeOverrideVars=ts;exports.useUser=xa;exports.useUserSignins=ko;exports.useWaitlist=No;exports.useWebhookAnalytics=m2;exports.useWebhookAppSession=i2;exports.useWebhookDeliveries=u2;exports.useWebhookEndpoints=l2;exports.useWebhookEvents=d2;exports.useWebhookStats=o2;exports.useWebhookTimeseries=p2;exports.useWorkspaceList=ga;exports.useWorkspaceMemberships=tn;Object.keys(Ur).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Ur[e]})});
|
|
119
119
|
//# sourceMappingURL=index.cjs.js.map
|