const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OidcLoginCallback-DLNLbnhk.js","assets/index-DjAbyHeM.js","assets/jwt-decode.esm-Dca5fHH5.js","assets/jwt-decode-CdnEfSZb.css","assets/OidcLogoutCallback-DTSU4jzq.js","assets/Login-swYlbgxx.js","assets/Login.vue_vue_type_script_setup_true_lang-BC_tHwoy.js","assets/CircularLoading-ohVkmYRk.js","assets/CircularLoading-C7OKHy4X.css","assets/Logo-DAfI0pPB.js","assets/Logo-ChdjWcE8.css","assets/string-BYR4BIXr.js","assets/index-BKOa5q_P.js","assets/userStore-C7NmNY8K.js","assets/Login-DwwH_1GN.css","assets/url-CoyBb3Dp.js","assets/colorHelpers-DW8ZpCiU.js","assets/Login-C-gEB-vF.css","assets/Main-CX8JXHyK.js","assets/PlayerNavbar-Cae7TVia.js","assets/metadata-CdAmAdig.js","assets/PhWebhooksLogo.vue-JOavTArk.js","assets/LoadingOutlined-DDGxAZbf.js","assets/PhSignOut.vue-XpGBgo63.js","assets/index-BLK1I0IS.js","assets/PlayerNavbar-CaKY6Obp.css","assets/Main-DqPmGmnC.css","assets/Home-D9ebzDGX.js","assets/Watermark-C95DBwfe.js","assets/constants-B1LrRAnj.js","assets/Watermark-D07ArHur.css","assets/PhArrowSquareOut.vue-ztkY6P_e.js","assets/index-mvr8okoq.js","assets/Home-Pqo2K58L.css","assets/Error-C6HVJzB1.js","assets/AbstraLogo.vue_vue_type_script_setup_true_lang-VbWqKJaf.js","assets/Error-CIbhyrKS.css","assets/Form-ChhRJJNs.js","assets/FormRunner-DTgWAGK3.js","assets/Steps-C6PdqcTg.js","assets/index-BFZHdHfr.js","assets/Steps-DvOTWjmf.css","assets/FormRunner-CxFEf-_U.css","assets/redirect-DfjkTFaH.js","assets/asyncComputed-IJY6wgme.js","assets/uuid-CK8Ke_G7.js","assets/Form-BGnbezvF.css"])))=>i.map(i=>d[i]);
import{bq as h,br as w,bs as r,bt as g,j as b,r as y}from"./jwt-decode.esm-Dca5fHH5.js";import{u as s}from"./userStore-C7NmNY8K.js";import{i as E}from"./url-CoyBb3Dp.js";import{i as k}from"./colorHelpers-DW8ZpCiU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="07b22f30-a012-4d90-816f-912cd07f08dc",e._sentryDebugIdIdentifier="sentry-dbid-07b22f30-a012-4d90-816f-912cd07f08dc")}catch{}})();const P=async()=>{try{const e=await fetch("/_editor/api/workspace/version");return e.ok&&(await e.json()).version||void 0}catch(e){console.error("Failed to fetch Abstra version:",e);return}};function o(e,a,t){return E(a)?a:t==="player"?`/_assets/${e}`:`/_editor/api/assets/${a}`}const c="#414a58",u="#FFFFFF",D="#000000",m="DM Sans",L="Untitled Project",_={value:"en"};function T(e){return{id:e.id,path:e.path,theme:e.workspace.theme??u,brandName:e.workspace.brand_name??null,title:e.title,isInitial:e.is_initial,isLocal:e.is_local??!1,startMessage:e.start_message??null,endMessage:e.end_message??null,errorMessage:e.error_message??null,timeoutMessage:e.timeout_message??null,startButtonText:e.start_button_text??null,restartButtonText:e.restart_button_text??null,logoUrl:e.workspace.logo_url,mainColor:e.workspace.main_color??c,fontFamily:e.workspace.font_family??m,autoStart:e.auto_start??!1,allowRestart:e.allow_restart,welcomeTitle:e.welcome_title??null,runtimeType:"form",language:e.workspace.language??_.value,sidebar:e.workspace?.sidebar??[]}}function i(e){const a=e.theme??u;return{name:e.name||L,fontColor:e.font_color||D,sidebar:e.sidebar||[],brandName:e.brand_name||"",fontFamily:e.font_family||m,logoUrl:e.logo_url?o("logo",e.logo_url,"player"):null,mainColor:e.main_color||c,theme:k(a)?a:o("background",a,"player"),language:e.language||_.value}}async function C(e){const a=s(),t=await fetch(`/_pages/${e}`,{headers:a.authHeaders});if(t.status===404)return null;if(!t.ok)throw new Error(await t.text());const{form:n}=await t.json();return n?T(n):null}async function A(){const e=s(),a=await fetch("/_workspace",{headers:e.authHeaders});if(a.status!=200)return i({});const t=await a.json();return i(t)}async function O(e){const a=s();return(await fetch(`/_access-control/allow${e}`,{headers:a.authHeaders})).json()}const F=[{path:"/oidc-login-callback",name:"oidcLoginCallback",component:()=>r(()=>import("./OidcLoginCallback-DLNLbnhk.js"),__vite__mapDeps([0,1,2,3])),meta:{allowUnauthenticated:!0}},{path:"/oidc-logout-callback",name:"oidcLogoutCallback",component:()=>r(()=>import("./OidcLogoutCallback-DTSU4jzq.js"),__vite__mapDeps([4,1,2,3])),meta:{allowUnauthenticated:!0}},{path:"/login",name:"playerLogin",component:()=>r(()=>import("./Login-swYlbgxx.js"),__vite__mapDeps([5,6,2,3,1,7,8,9,10,11,12,13,14,15,16,17])),meta:{allowUnauthenticated:!0}},{path:"/",name:"main",component:()=>r(()=>import("./Main-CX8JXHyK.js"),__vite__mapDeps([18,19,13,2,3,1,20,21,22,23,24,25,15,16,26])),redirect:{name:"main"},children:[{path:"",name:"playerHome",component:()=>r(()=>import("./Home-D9ebzDGX.js"),__vite__mapDeps([27,20,2,3,21,28,1,29,30,31,32,22,13,15,16,33])),meta:{title:"Home"}},{path:"_player/threads",redirect:{name:"playerThreads"}},{path:"error/:status",name:"error",component:()=>r(()=>import("./Error-C6HVJzB1.js"),__vite__mapDeps([34,35,9,2,3,10,29,32,13,15,16,36])),meta:{allowUnauthenticated:!0}},{path:":path(.*)*",name:"form",component:()=>r(()=>import("./Form-ChhRJJNs.js"),__vite__mapDeps([37,13,2,3,38,6,1,7,8,9,10,11,12,14,39,40,41,28,29,30,42,43,15,44,45,16,46])),meta:{hideLogin:!0}}]}],l=h({history:w("/"),routes:F,scrollBehavior(e){if(e.hash)return{el:e.hash}}}),v=e=>async(a,t)=>{if(g(a,t),a.meta.allowUnauthenticated)return;const p=await O(a.path),{redirect:f,...d}=a.query;switch(p.status){case"ALLOWED":break;case"UNAUTHORIZED":await e.push({name:"playerLogin",query:{...d,redirect:f||a.path},params:a.params});break;case"NOT_FOUND":await e.push({name:"error",params:{status:"404"}});break;default:await e.push({name:"error",params:{status:"403"}})}};l.beforeEach(v(l));const M=b("workspace",()=>{const e=y({workspace:null,loading:!1});return{state:e,actions:{async fetch(){e.value.loading=!0,e.value.workspace=await A(),e.value.loading=!1}}}});export{c as D,F as a,v as b,m as c,_ as d,u as e,C as f,P as g,o as m,l as r,M as u};
//# sourceMappingURL=workspaceStore-XJ3gN0Xg.js.map
