import{$ as s,k as r,a5 as k,r as R,j as U,o as N,w as t,d as e,l as g,q as _,t as o,z as C,K as B,y as p,P as G,Q as T,ap as D,aq as S,C as y,s as n}from"./index-BBhBboPS.js";import{k as K}from"./dataProvider-Df79D6P7.js";import{V as q,a as c}from"./VRow-DPRU2lkb.js";import{V as z}from"./VForm-DckkMnuU.js";import{V as d}from"./VTextField-B0ZitX9S.js";import{V as F}from"./VContainer-CvKHPctk.js";import"./axios-CvdON-CO.js";const I="kvinit.redirecting",H={__name:"debug-init",setup(P){const i=s(r("server.provider")||"kv-server"),v=s(r("server.kvToken")||""),m=s(r("device.uuid")||"00000000-0000-4000-8000-000000000000"),f=s(r("server.authDomain")||"https://cs.example.com"),w=()=>{n("server.provider",i.value),n("server.kvToken",v.value),n("device.uuid",m.value),n("server.authDomain",f.value),location.reload()},b=()=>{try{sessionStorage.removeItem(I)}catch(u){console.debug(u)}},x=()=>{K.loadNamespaceInfo=async()=>{throw new Error("模拟加载错误")},location.reload()},E=k(()=>{try{return sessionStorage.getItem(I)}catch(u){return String(u)}}),L=k(()=>JSON.stringify({provider:r("server.provider"),kvToken:r("server.kvToken"),uuid:r("device.uuid"),authDomain:r("server.authDomain")},null,2));return(u,l)=>{const V=R("v-list-item-content");return N(),U(F,null,{default:t(()=>[e(q,null,{default:t(()=>[e(c,{cols:"12",md:"6"},{default:t(()=>[e(g,null,{default:t(()=>[e(_,null,{default:t(()=>[...l[4]||(l[4]=[o("KvInitialize 调试面板",-1)])]),_:1}),e(C,null,{default:t(()=>[e(z,null,{default:t(()=>[e(d,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=a=>i.value=a),label:"server.provider (kv-server/classworkscloud/other)"},null,8,["modelValue"]),e(d,{modelValue:v.value,"onUpdate:modelValue":l[1]||(l[1]=a=>v.value=a),label:"server.kvToken (空表示未授权)"},null,8,["modelValue"]),e(d,{modelValue:m.value,"onUpdate:modelValue":l[2]||(l[2]=a=>m.value=a),label:"device.uuid"},null,8,["modelValue"]),e(d,{modelValue:f.value,"onUpdate:modelValue":l[3]||(l[3]=a=>f.value=a),label:"server.authDomain"},null,8,["modelValue"])]),_:1}),e(B,{class:"my-4"}),e(p,{class:"me-2",color:"primary",onClick:w},{default:t(()=>[...l[5]||(l[5]=[o(" 应用设置 ",-1)])]),_:1}),e(p,{class:"me-2",color:"secondary",onClick:b},{default:t(()=>[...l[6]||(l[6]=[o(" 清除重定向守卫 ",-1)])]),_:1}),e(p,{color:"error",onClick:x},{default:t(()=>[...l[7]||(l[7]=[o(" 模拟命名空间加载错误 ",-1)])]),_:1}),e(G,{"two-line":""},{default:t(()=>[e(T,null,{default:t(()=>[e(V,null,{default:t(()=>[e(D,null,{default:t(()=>[...l[8]||(l[8]=[o("当前 sessionGuard",-1)])]),_:1}),e(S,null,{default:t(()=>[o(y(E.value),1)]),_:1})]),_:1})]),_:1}),e(T,null,{default:t(()=>[e(V,null,{default:t(()=>[e(D,null,{default:t(()=>[...l[9]||(l[9]=[o("当前 settings",-1)])]),_:1}),e(S,null,{default:t(()=>[o(y(L.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(c,{cols:"12",md:"6"},{default:t(()=>[e(g,null,{default:t(()=>[e(_,null,{default:t(()=>[...l[10]||(l[10]=[o("初始化组件已替换",-1)])]),_:1}),e(C,null,{default:t(()=>[...l[11]||(l[11]=[o(" 已迁移为首页内联的 InitServiceChooser 组件。 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}};export{H as default};
