var D=Object.defineProperty;var y=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var x=(a,e,t)=>e in a?D(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,w=(a,e)=>{for(var t in e||(e={}))H.call(e,t)&&x(a,t,e[t]);if(y)for(var t of y(e))V.call(e,t)&&x(a,t,e[t]);return a};var C=(a,e,t)=>new Promise((_,r)=>{var l=n=>{try{i(t.next(n))}catch(p){r(p)}},o=n=>{try{i(t.throw(n))}catch(p){r(p)}},i=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,o);i((t=t.apply(a,e)).next())});import{useRoute as W}from"./vue-router-BO40Wv73.js";import{q as I}from"./@vueuse-vmN9qs5b.js";import"./element-plus-XVJlWyfz.js";import"./vxe-CWcmrjam.js";import{h as J,p as N,o as U,a as j,t as E,D as z}from"./Editor-_84wgCQz-ClJHNWEl.js";import{E as G,a as P,n as v,l as K}from"./utils-D2Sd6tKP.js";import{d as L,e as M,ay as S,f as O,c as Q,o as X}from"./vue-BfodOvnP.js";import{_ as Y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CM-7yUXL.js";import"./shared-CzXu-bVE.js";import"./dayjs-DO-COJPZ.js";import"./monaco-editor-B5WqzYTl.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-Du5X89jz.js";import"./marked-BQZxLJfc.js";const Z=L({__name:"index",setup(a){return C(this,null,function*(){let e,t;const _=W(),r=M(),l=new J(N(v)),o=([e,t]=S(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),i=U({loading:K,notify:v,useTitle:I,alert:P,access:o==null?void 0:o.access}),n=j(w({alert:P},o==null?void 0:o.__ACCESS__)),p=o?([e,t]=S(()=>new G(o).load()),e=yield e,t(),e):{},{__BASE_PATH__:d="/",history:A="hash",base:h="/",pageRouteName:k="page",remote:B,auth:q,checkVersion:F=!0,enhance:R}=o||{},T=()=>A==="hash",b=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);E.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",c=location.pathname;let m=c===`${d}__vtj__/`?d:c;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const g=`${b(h)}${u?"pages":k}/${f.id}`;m=T()?`${m}#/${g}`:`${m}${g}`}window.open(m,"VTJProject")}}}),E.set("Previewer",{props:{path:(s,u)=>{const c=location.pathname;return u.platform==="uniapp"?`${c}uni/#/pages/${s.id}`:`${c}#/preview/${s.id}`}}});const $=new z(w({container:r,service:l,materialPath:d,pageBasePath:h==="/"?"":h,adapter:i,access:n,remote:B,auth:q,checkVersion:F,enhance:R},p));return $.ready(()=>{$.openFile(_.query.id)}),O(()=>_.query.id,s=>{$.openFile(s)}),(s,u)=>(X(),Q("div",{class:"designer",ref_key:"container",ref:r},null,512))})}}),$e=Y(Z,[["__scopeId","data-v-73bfd256"]]);export{$e as default};
