"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82054],{82054:(t,a,e)=>{e.d(a,{L8:()=>l,Z2:()=>c,aI:()=>f,aU:()=>d,bS:()=>o,cH:()=>i,eh:()=>s,fetchTenantBranding:()=>u,nA:()=>p,sH:()=>w});var r=e(76541),n=e(97312);async function u(){return(await r.uE.get("/platform/tenant")).data.data}async function i(t){let a=t.split(":")[0].trim().toLowerCase();if(!a)return null;try{let t=await r.uE.get("/platform/resolve-host",{params:{host:a}});return t.data.data?.slug?.toLowerCase()??null}catch{return null}}async function s(){return(await r.uE.get("/platform/me/workspace")).data.data}async function o(t){return(await r.uE.patch("/platform/theme",t)).data.data}async function c(t){return(await r.uE.patch("/platform/footer",t)).data.data}async function l(t){return(await r.uE.patch("/platform/onboarding",t)).data.data}async function f(t){return(await r.uE.get("/platform/verify-email",{params:{token:t}})).data.data}async function p(t,a){await r.uE.post("/platform/resend-verification",{email:t,slug:a})}async function d(){let t=await r.uE.get("/platform/subscription/upgrade-request");return t.data.data?.request??null}async function w(t){return(await r.uE.post("/platform/subscription/upgrade-request",{...t,website:t.website?(0,n.i)(t.website):void 0})).data.data.request}},97312:(t,a,e)=>{e.d(a,{i:()=>r});function r(t){let a=String(t??"").trim();if(!a)return;let e=/^https?:\/\//i.test(a)?a:`https://${a.replace(/^\/+/,"")}`;try{let t=new URL(e);if(!t.hostname)return;return t.href.replace(/\/$/,"")}catch{return}}}}]);