diff --git a/app/api/controller/Install.php b/app/api/controller/Install.php index 39fd2e2..a3a2650 100644 --- a/app/api/controller/Install.php +++ b/app/api/controller/Install.php @@ -668,7 +668,7 @@ class Install extends Api /** * 获取安装完成后的访问地址(根据请求来源区分 API 与前端开发模式) - * - 通过 API 访问(8787):index.html#/admin、index.html#/ + * - 通过 API 访问(8787):index#/admin、index#/(无 index 与 # 之间的斜杠) * - 通过前端开发服务访问(1818):/#/admin、/#/ */ public function accessUrls(Request $request): Response @@ -680,7 +680,8 @@ class Install extends Api $port = substr($host, strrpos($host, ':') + 1); } $scheme = $request->header('x-forwarded-proto', 'http'); - $base = rtrim($scheme . '://' . $host, '/'); + $basePath = $request instanceof \support\Request ? $request->publicBasePath() : ''; + $base = rtrim($scheme . '://' . $host, '/') . $basePath; if ($port === '1818') { $adminUrl = $base . '/#/admin'; diff --git a/database/migrations/20230620180916_install_data.php b/database/migrations/20230620180916_install_data.php index d46d809..6a62627 100644 --- a/database/migrations/20230620180916_install_data.php +++ b/database/migrations/20230620180916_install_data.php @@ -231,8 +231,17 @@ class InstallData extends AbstractMigration public function menuRule(): void { - if (!$this->hasTable('menu_rule')) return; - $table = $this->table('menu_rule'); + // Install 迁移在已存在 admin_rule(旧版表名)时会跳过创建 menu_rule,此处需与之一致 + $ruleTable = null; + if ($this->hasTable('menu_rule')) { + $ruleTable = 'menu_rule'; + } elseif ($this->hasTable('admin_rule')) { + $ruleTable = 'admin_rule'; + } + if ($ruleTable === null) { + return; + } + $table = $this->table($ruleTable); $rows = [ [ 'id' => '1', @@ -1155,7 +1164,7 @@ class InstallData extends AbstractMigration 'createtime' => $this->nowTime, ], ]; - $exist = Db::name('menu_rule')->where('id', 1)->value('id'); + $exist = Db::name($ruleTable)->where('id', 1)->value('id'); if (!$exist) { $table->insert($rows)->saveData(); } diff --git a/phinx-bootstrap.php b/phinx-bootstrap.php index f4de892..5295416 100644 --- a/phinx-bootstrap.php +++ b/phinx-bootstrap.php @@ -13,11 +13,7 @@ if (!defined('BASE_PATH')) { require $baseDir . '/vendor/autoload.php'; if (class_exists('Dotenv\Dotenv') && is_file($baseDir . '/.env')) { - if (method_exists('Dotenv\Dotenv', 'createUnsafeImmutable')) { - Dotenv\Dotenv::createUnsafeImmutable($baseDir)->load(); - } else { - Dotenv\Dotenv::createMutable($baseDir)->load(); - } + Dotenv\Dotenv::createMutable($baseDir)->load(); } if (!function_exists('env')) { diff --git a/phinx.php b/phinx.php index d35998c..700940c 100644 --- a/phinx.php +++ b/phinx.php @@ -10,11 +10,8 @@ $baseDir = __DIR__; require $baseDir . '/vendor/autoload.php'; if (class_exists('Dotenv\Dotenv') && is_file($baseDir . '/.env')) { - if (method_exists('Dotenv\Dotenv', 'createUnsafeImmutable')) { - Dotenv\Dotenv::createUnsafeImmutable($baseDir)->load(); - } else { - Dotenv\Dotenv::createMutable($baseDir)->load(); - } + // 必须用 Mutable:Webman Worker 已加载过时,Immutable 不会覆盖 $_ENV,会导致 Phinx 与 Db::name() 前缀/库名不一致 + Dotenv\Dotenv::createMutable($baseDir)->load(); } if (!function_exists('env')) { diff --git a/public/install/assets/index.js b/public/install/assets/index.js index c7c0c01..7a7d407 100644 --- a/public/install/assets/index.js +++ b/public/install/assets/index.js @@ -70,4 +70,4 @@ var _$=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var nue=_$((go,bo * vue-i18n v9.2.2 * (c) 2022 kazuya kawaguchi * Released under the MIT License. - */Object.defineProperty(Pr,"__esModule",{value:!0});var It=Zae,Rt=Qae,Me=Jg;const l$="9.2.2";let s$=It.CompileErrorCodes.__EXTEND_POINT__;const oo=()=>++s$,mn={UNEXPECTED_RETURN_TYPE:s$,INVALID_ARGUMENT:oo(),MUST_BE_CALL_SETUP_TOP:oo(),NOT_INSLALLED:oo(),NOT_AVAILABLE_IN_LEGACY_MODE:oo(),REQUIRED_VALUE:oo(),INVALID_VALUE:oo(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:oo(),NOT_INSLALLED_WITH_PROVIDE:oo(),UNEXPECTED_ERROR:oo(),NOT_COMPATIBLE_LEGACY_VUE_I18N:oo(),BRIDGE_SUPPORT_VUE_2_ONLY:oo(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:oo(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:oo(),__EXTEND_POINT__:oo()};function _n(e,...t){return It.createCompileError(e,null,void 0)}const $m=Me.makeSymbol("__transrateVNode"),Om=Me.makeSymbol("__datetimeParts"),Nm=Me.makeSymbol("__numberParts"),i$=Me.makeSymbol("__setPluralRules");Me.makeSymbol("__intlifyMeta");const u$=Me.makeSymbol("__injectWithOption"),ele="__VUE_I18N_BRIDGE__";function Im(e){if(!Me.isObject(e))return e;for(const t in e)if(Me.hasOwn(e,t))if(!t.includes("."))Me.isObject(e[t])&&Im(e[t]);else{const n=t.split("."),o=n.length-1;let r=e;for(let a=0;a{if("locale"in s&&"resource"in s){const{locale:u,resource:c}=s;u?(l[u]=l[u]||{},Hi(c,l[u])):Hi(c,l)}else Me.isString(s)&&Hi(JSON.parse(s),l)}),r==null&&a)for(const s in l)Me.hasOwn(l,s)&&Im(l[s]);return l}const kc=e=>!Me.isObject(e)||Me.isArray(e);function Hi(e,t){if(kc(e)||kc(t))throw _n(mn.INVALID_VALUE);for(const n in e)Me.hasOwn(e,n)&&(kc(e[n])||kc(t[n])?t[n]=e[n]:Hi(e[n],t[n]))}function tle(e){return e.type}function c$(e,t,n){let o=Me.isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(o=jf(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(a=>{e.mergeLocaleMessage(a,o[a])});{if(Me.isObject(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(l=>{e.mergeDateTimeFormat(l,t.datetimeFormats[l])})}if(Me.isObject(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(l=>{e.mergeNumberFormat(l,t.numberFormats[l])})}}}function aw(e){return Rt.createVNode(Rt.Text,null,e,0)}let lw=0;function sw(e){return(t,n,o,r)=>e(n,o,Rt.getCurrentInstance()||void 0,r)}function ub(e={},t){const{__root:n}=e,o=n===void 0;let r=Me.isBoolean(e.inheritLocale)?e.inheritLocale:!0;const a=Rt.ref(n&&r?n.locale.value:Me.isString(e.locale)?e.locale:It.DEFAULT_LOCALE),l=Rt.ref(n&&r?n.fallbackLocale.value:Me.isString(e.fallbackLocale)||Me.isArray(e.fallbackLocale)||Me.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),s=Rt.ref(jf(a.value,e)),u=Rt.ref(Me.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),c=Rt.ref(Me.isPlainObject(e.numberFormats)?e.numberFormats:{[a.value]:{}});let f=n?n.missingWarn:Me.isBoolean(e.missingWarn)||Me.isRegExp(e.missingWarn)?e.missingWarn:!0,d=n?n.fallbackWarn:Me.isBoolean(e.fallbackWarn)||Me.isRegExp(e.fallbackWarn)?e.fallbackWarn:!0,p=n?n.fallbackRoot:Me.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,v=Me.isFunction(e.missing)?e.missing:null,h=Me.isFunction(e.missing)?sw(e.missing):null,C=Me.isFunction(e.postTranslation)?e.postTranslation:null,g=n?n.warnHtmlMessage:Me.isBoolean(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter;const _=n?n.modifiers:Me.isPlainObject(e.modifiers)?e.modifiers:{};let b=e.pluralRules||n&&n.pluralRules,w;w=(()=>{o&&It.setFallbackContext(null);const ce={version:l$,locale:a.value,fallbackLocale:l.value,messages:s.value,modifiers:_,pluralRules:b,missing:h===null?void 0:h,missingWarn:f,fallbackWarn:d,fallbackFormat:m,unresolving:!0,postTranslation:C===null?void 0:C,warnHtmlMessage:g,escapeParameter:y,messageResolver:e.messageResolver,__meta:{framework:"vue"}};ce.datetimeFormats=u.value,ce.numberFormats=c.value,ce.__datetimeFormatters=Me.isPlainObject(w)?w.__datetimeFormatters:void 0,ce.__numberFormatters=Me.isPlainObject(w)?w.__numberFormatters:void 0;const de=It.createCoreContext(ce);return o&&It.setFallbackContext(de),de})(),It.updateFallbackLocale(w,a.value,l.value);function E(){return[a.value,l.value,s.value,u.value,c.value]}const $=Rt.computed({get:()=>a.value,set:ce=>{a.value=ce,w.locale=a.value}}),O=Rt.computed({get:()=>l.value,set:ce=>{l.value=ce,w.fallbackLocale=l.value,It.updateFallbackLocale(w,a.value,ce)}}),A=Rt.computed(()=>s.value),M=Rt.computed(()=>u.value),D=Rt.computed(()=>c.value);function U(){return Me.isFunction(C)?C:null}function j(ce){C=ce,w.postTranslation=ce}function W(){return v}function L(ce){ce!==null&&(h=sw(ce)),v=ce,w.missing=h}const P=(ce,de,xe,he,He,et)=>{E();let rt;if(rt=ce(w),Me.isNumber(rt)&&rt===It.NOT_REOSLVED){const[wt,Ze]=de();return n&&p?he(n):He(wt)}else{if(et(rt))return rt;throw _n(mn.UNEXPECTED_RETURN_TYPE)}};function x(...ce){return P(de=>Reflect.apply(It.translate,null,[de,...ce]),()=>It.parseTranslateArgs(...ce),"translate",de=>Reflect.apply(de.t,de,[...ce]),de=>de,de=>Me.isString(de))}function I(...ce){const[de,xe,he]=ce;if(he&&!Me.isObject(he))throw _n(mn.INVALID_ARGUMENT);return x(de,xe,Me.assign({resolvedMessage:!0},he||{}))}function H(...ce){return P(de=>Reflect.apply(It.datetime,null,[de,...ce]),()=>It.parseDateTimeArgs(...ce),"datetime format",de=>Reflect.apply(de.d,de,[...ce]),()=>It.MISSING_RESOLVE_VALUE,de=>Me.isString(de))}function G(...ce){return P(de=>Reflect.apply(It.number,null,[de,...ce]),()=>It.parseNumberArgs(...ce),"number format",de=>Reflect.apply(de.n,de,[...ce]),()=>It.MISSING_RESOLVE_VALUE,de=>Me.isString(de))}function J(ce){return ce.map(de=>Me.isString(de)||Me.isNumber(de)||Me.isBoolean(de)?aw(String(de)):de)}const fe={normalize:J,interpolate:ce=>ce,type:"vnode"};function Te(...ce){return P(de=>{let xe;const he=de;try{he.processor=fe,xe=Reflect.apply(It.translate,null,[he,...ce])}finally{he.processor=null}return xe},()=>It.parseTranslateArgs(...ce),"translate",de=>de[$m](...ce),de=>[aw(de)],de=>Me.isArray(de))}function oe(...ce){return P(de=>Reflect.apply(It.number,null,[de,...ce]),()=>It.parseNumberArgs(...ce),"number format",de=>de[Nm](...ce),()=>[],de=>Me.isString(de)||Me.isArray(de))}function ke(...ce){return P(de=>Reflect.apply(It.datetime,null,[de,...ce]),()=>It.parseDateTimeArgs(...ce),"datetime format",de=>de[Om](...ce),()=>[],de=>Me.isString(de)||Me.isArray(de))}function ae(ce){b=ce,w.pluralRules=b}function Oe(ce,de){const xe=Me.isString(de)?de:a.value,he=q(xe);return w.messageResolver(he,ce)!==null}function we(ce){let de=null;const xe=It.fallbackWithLocaleChain(w,l.value,a.value);for(let he=0;he{r&&(a.value=ce,w.locale=ce,It.updateFallbackLocale(w,a.value,l.value))}),Rt.watch(n.fallbackLocale,ce=>{r&&(l.value=ce,w.fallbackLocale=ce,It.updateFallbackLocale(w,a.value,l.value))}));const Ce={id:lw,locale:$,fallbackLocale:O,get inheritLocale(){return r},set inheritLocale(ce){r=ce,ce&&n&&(a.value=n.locale.value,l.value=n.fallbackLocale.value,It.updateFallbackLocale(w,a.value,l.value))},get availableLocales(){return Object.keys(s.value).sort()},messages:A,get modifiers(){return _},get pluralRules(){return b||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(ce){f=ce,w.missingWarn=f},get fallbackWarn(){return d},set fallbackWarn(ce){d=ce,w.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(ce){p=ce},get fallbackFormat(){return m},set fallbackFormat(ce){m=ce,w.fallbackFormat=m},get warnHtmlMessage(){return g},set warnHtmlMessage(ce){g=ce,w.warnHtmlMessage=ce},get escapeParameter(){return y},set escapeParameter(ce){y=ce,w.escapeParameter=ce},t:x,getLocaleMessage:q,setLocaleMessage:B,mergeLocaleMessage:z,getPostTranslationHandler:U,setPostTranslationHandler:j,getMissingHandler:W,setMissingHandler:L,[i$]:ae};return Ce.datetimeFormats=M,Ce.numberFormats=D,Ce.rt=I,Ce.te=Oe,Ce.tm=ge,Ce.d=H,Ce.n=G,Ce.getDateTimeFormat=Z,Ce.setDateTimeFormat=ue,Ce.mergeDateTimeFormat=se,Ce.getNumberFormat=me,Ce.setNumberFormat=_e,Ce.mergeNumberFormat=$e,Ce[u$]=e.__injectWithOption,Ce[$m]=Te,Ce[Om]=ke,Ce[Nm]=oe,Ce}function nle(e){const t=Me.isString(e.locale)?e.locale:It.DEFAULT_LOCALE,n=Me.isString(e.fallbackLocale)||Me.isArray(e.fallbackLocale)||Me.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Me.isFunction(e.missing)?e.missing:void 0,r=Me.isBoolean(e.silentTranslationWarn)||Me.isRegExp(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=Me.isBoolean(e.silentFallbackWarn)||Me.isRegExp(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=Me.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,u=Me.isPlainObject(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,f=Me.isFunction(e.postTranslation)?e.postTranslation:void 0,d=Me.isString(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,m=Me.isBoolean(e.sync)?e.sync:!0;let v=e.messages;if(Me.isPlainObject(e.sharedMessages)){const w=e.sharedMessages;v=Object.keys(w).reduce((E,$)=>{const O=E[$]||(E[$]={});return Me.assign(O,w[$]),E},v||{})}const{__i18n:h,__root:C,__injectWithOption:g}=e,y=e.datetimeFormats,_=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:v,flatJson:b,datetimeFormats:y,numberFormats:_,missing:o,missingWarn:r,fallbackWarn:a,fallbackRoot:l,fallbackFormat:s,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:d,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:m,__i18n:h,__root:C,__injectWithOption:g}}function Mm(e={},t){{const n=ub(nle(e)),o={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(r){},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return Me.isBoolean(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=Me.isBoolean(r)?!r:r},get silentFallbackWarn(){return Me.isBoolean(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=Me.isBoolean(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(r){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[a,l,s]=r,u={};let c=null,f=null;if(!Me.isString(a))throw _n(mn.INVALID_ARGUMENT);const d=a;return Me.isString(l)?u.locale=l:Me.isArray(l)?c=l:Me.isPlainObject(l)&&(f=l),Me.isArray(s)?c=s:Me.isPlainObject(s)&&(f=s),Reflect.apply(n.t,n,[d,c||f||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[a,l,s]=r,u={plural:1};let c=null,f=null;if(!Me.isString(a))throw _n(mn.INVALID_ARGUMENT);const d=a;return Me.isString(l)?u.locale=l:Me.isNumber(l)?u.plural=l:Me.isArray(l)?c=l:Me.isPlainObject(l)&&(f=l),Me.isString(s)?u.locale=s:Me.isArray(s)?c=s:Me.isPlainObject(s)&&(f=s),Reflect.apply(n.t,n,[d,c||f||{},u])},te(r,a){return n.te(r,a)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,a){n.setLocaleMessage(r,a)},mergeLocaleMessage(r,a){n.mergeLocaleMessage(r,a)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,a){n.setDateTimeFormat(r,a)},mergeDateTimeFormat(r,a){n.mergeDateTimeFormat(r,a)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,a){n.setNumberFormat(r,a)},mergeNumberFormat(r,a){n.mergeNumberFormat(r,a)},getChoiceIndex(r,a){return-1},__onComponentInstanceCreated(r){const{componentInstanceCreatedListener:a}=e;a&&a(r,o)}};return o}}const cb={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function ole({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>o=[...o,...Me.isArray(r.children)?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},{})}function d$(e){return Rt.Fragment}const Am={name:"i18n-t",props:Me.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Me.isNumber(e)||!isNaN(e)}},cb),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||Wf({useScope:e.scope,__useComponent:!0});return()=>{const a=Object.keys(n).filter(d=>d!=="_"),l={};e.locale&&(l.locale=e.locale),e.plural!==void 0&&(l.plural=Me.isString(e.plural)?+e.plural:e.plural);const s=ole(t,a),u=r[$m](e.keypath,s,l),c=Me.assign({},o),f=Me.isString(e.tag)||Me.isObject(e.tag)?e.tag:d$();return Rt.h(f,c,u)}}};function rle(e){return Me.isArray(e)&&!Me.isString(e[0])}function f$(e,t,n,o){const{slots:r,attrs:a}=t;return()=>{const l={part:!0};let s={};e.locale&&(l.locale=e.locale),Me.isString(e.format)?l.key=e.format:Me.isObject(e.format)&&(Me.isString(e.format.key)&&(l.key=e.format.key),s=Object.keys(e.format).reduce((p,m)=>n.includes(m)?Me.assign({},p,{[m]:e.format[m]}):p,{}));const u=o(e.value,l,s);let c=[l.key];Me.isArray(u)?c=u.map((p,m)=>{const v=r[p.type],h=v?v({[p.type]:p.value,index:m,parts:u}):[p.value];return rle(h)&&(h[0].key=`${p.type}-${m}`),h}):Me.isString(u)&&(c=[u]);const f=Me.assign({},a),d=Me.isString(e.tag)||Me.isObject(e.tag)?e.tag:d$();return Rt.h(d,f,c)}}const Pm={name:"i18n-n",props:Me.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},cb),setup(e,t){const n=e.i18n||Wf({useScope:"parent",__useComponent:!0});return f$(e,t,It.NUMBER_FORMAT_OPTIONS_KEYS,(...o)=>n[Nm](...o))}},Rm={name:"i18n-d",props:Me.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},cb),setup(e,t){const n=e.i18n||Wf({useScope:"parent",__useComponent:!0});return f$(e,t,It.DATETIME_FORMAT_OPTIONS_KEYS,(...o)=>n[Om](...o))}};function ale(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function p$(e){const t=l=>{const{instance:s,modifiers:u,value:c}=l;if(!s||!s.$)throw _n(mn.UNEXPECTED_ERROR);const f=ale(e,s.$),d=iw(c);return[Reflect.apply(f.t,f,[...uw(d)]),f]};return{created:(l,s)=>{const[u,c]=t(s);Me.inBrowser&&e.global===c&&(l.__i18nWatcher=Rt.watch(c.locale,()=>{s.instance&&s.instance.$forceUpdate()})),l.__composer=c,l.textContent=u},unmounted:l=>{Me.inBrowser&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:s})=>{if(l.__composer){const u=l.__composer,c=iw(s);l.textContent=Reflect.apply(u.t,u,[...uw(c)])}},getSSRProps:l=>{const[s]=t(l);return{textContent:s}}}}function iw(e){if(Me.isString(e))return{path:e};if(Me.isPlainObject(e)){if(!("path"in e))throw _n(mn.REQUIRED_VALUE,"path");return e}else throw _n(mn.INVALID_VALUE)}function uw(e){const{path:t,locale:n,args:o,choice:r,plural:a}=e,l={},s=o||{};return Me.isString(n)&&(l.locale=n),Me.isNumber(r)&&(l.plural=r),Me.isNumber(a)&&(l.plural=a),[t,s,l]}function lle(e,t,...n){const o=Me.isPlainObject(n[0])?n[0]:{},r=!!o.useI18nComponentName;(Me.isBoolean(o.globalInstall)?o.globalInstall:!0)&&(e.component(r?"i18n":Am.name,Am),e.component(Pm.name,Pm),e.component(Rm.name,Rm)),e.directive("t",p$(t))}function sle(e,t,n){return{beforeCreate(){const o=Rt.getCurrentInstance();if(!o)throw _n(mn.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const a=r.i18n;r.__i18n&&(a.__i18n=r.__i18n),a.__root=t,this===this.$root?this.$i18n=cw(e,a):(a.__injectWithOption=!0,this.$i18n=Mm(a))}else r.__i18n?this===this.$root?this.$i18n=cw(e,r):this.$i18n=Mm({__i18n:r.__i18n,__injectWithOption:!0,__root:t}):this.$i18n=e;r.__i18nGlobal&&c$(t,r,r),e.__onComponentInstanceCreated(this.$i18n),n.__setInstance(o,this.$i18n),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$tc=(...a)=>this.$i18n.tc(...a),this.$te=(a,l)=>this.$i18n.te(a,l),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a)},mounted(){},unmounted(){const o=Rt.getCurrentInstance();if(!o)throw _n(mn.UNEXPECTED_ERROR);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__deleteInstance(o),delete this.$i18n}}}function cw(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[i$](t.pluralizationRules||e.pluralizationRules);const n=jf(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const h$=Me.makeSymbol("global-vue-i18n");function ile(e={},t){const n=Me.isBoolean(e.legacy)?e.legacy:!0,o=Me.isBoolean(e.globalInjection)?e.globalInjection:!0,r=n?!!e.allowComposition:!0,a=new Map,[l,s]=cle(e,n),u=Me.makeSymbol("");function c(p){return a.get(p)||null}function f(p,m){a.set(p,m)}function d(p){a.delete(p)}{const p={get mode(){return n?"legacy":"composition"},get allowComposition(){return r},async install(m,...v){m.__VUE_I18N_SYMBOL__=u,m.provide(m.__VUE_I18N_SYMBOL__,p),!n&&o&&yle(m,p.global),lle(m,p,...v),n&&m.mixin(sle(s,s.__composer,p));const h=m.unmount;m.unmount=()=>{p.dispose(),h()}},get global(){return s},dispose(){l.stop()},__instances:a,__getInstance:c,__setInstance:f,__deleteInstance:d};return p}}function Wf(e={}){const t=Rt.getCurrentInstance();if(t==null)throw _n(mn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw _n(mn.NOT_INSLALLED);const n=dle(t),o=ple(n),r=tle(t),a=fle(e,r);if(n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw _n(mn.NOT_AVAILABLE_IN_LEGACY_MODE);return vle(t,a,o,e)}if(a==="global")return c$(o,e,r),o;if(a==="parent"){let u=hle(n,t,e.__useComponent);return u==null&&(u=o),u}const l=n;let s=l.__getInstance(t);if(s==null){const u=Me.assign({},e);"__i18n"in r&&(u.__i18n=r.__i18n),o&&(u.__root=o),s=ub(u),mle(l,t),l.__setInstance(t,s)}return s}const ule=e=>{if(!(ele in e))throw _n(mn.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function cle(e,t,n){const o=Rt.effectScope();{const r=t?o.run(()=>Mm(e)):o.run(()=>ub(e));if(r==null)throw _n(mn.UNEXPECTED_ERROR);return[o,r]}}function dle(e){{const t=Rt.inject(e.isCE?h$:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw _n(e.isCE?mn.NOT_INSLALLED_WITH_PROVIDE:mn.UNEXPECTED_ERROR);return t}}function fle(e,t){return Me.isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function ple(e){return e.mode==="composition"?e.global:e.global.__composer}function hle(e,t,n=!1){let o=null;const r=t.root;let a=t.parent;for(;a!=null;){const l=e;if(e.mode==="composition")o=l.__getInstance(a);else{const s=l.__getInstance(a);s!=null&&(o=s.__composer,n&&o&&!o[u$]&&(o=null))}if(o!=null||r===a)break;a=a.parent}return o}function mle(e,t,n){Rt.onMounted(()=>{},t),Rt.onUnmounted(()=>{e.__deleteInstance(t)},t)}function vle(e,t,n,o={}){const r=t==="local",a=Rt.shallowRef(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw _n(mn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const l=Me.isBoolean(o.inheritLocale)?o.inheritLocale:!0,s=Rt.ref(r&&l?n.locale.value:Me.isString(o.locale)?o.locale:It.DEFAULT_LOCALE),u=Rt.ref(r&&l?n.fallbackLocale.value:Me.isString(o.fallbackLocale)||Me.isArray(o.fallbackLocale)||Me.isPlainObject(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:s.value),c=Rt.ref(jf(s.value,o)),f=Rt.ref(Me.isPlainObject(o.datetimeFormats)?o.datetimeFormats:{[s.value]:{}}),d=Rt.ref(Me.isPlainObject(o.numberFormats)?o.numberFormats:{[s.value]:{}}),p=r?n.missingWarn:Me.isBoolean(o.missingWarn)||Me.isRegExp(o.missingWarn)?o.missingWarn:!0,m=r?n.fallbackWarn:Me.isBoolean(o.fallbackWarn)||Me.isRegExp(o.fallbackWarn)?o.fallbackWarn:!0,v=r?n.fallbackRoot:Me.isBoolean(o.fallbackRoot)?o.fallbackRoot:!0,h=!!o.fallbackFormat,C=Me.isFunction(o.missing)?o.missing:null,g=Me.isFunction(o.postTranslation)?o.postTranslation:null,y=r?n.warnHtmlMessage:Me.isBoolean(o.warnHtmlMessage)?o.warnHtmlMessage:!0,_=!!o.escapeParameter,b=r?n.modifiers:Me.isPlainObject(o.modifiers)?o.modifiers:{},w=o.pluralRules||r&&n.pluralRules;function S(){return[s.value,u.value,c.value,f.value,d.value]}const E=Rt.computed({get:()=>a.value?a.value.locale.value:s.value,set:z=>{a.value&&(a.value.locale.value=z),s.value=z}}),$=Rt.computed({get:()=>a.value?a.value.fallbackLocale.value:u.value,set:z=>{a.value&&(a.value.fallbackLocale.value=z),u.value=z}}),O=Rt.computed(()=>a.value?a.value.messages.value:c.value),A=Rt.computed(()=>f.value),M=Rt.computed(()=>d.value);function D(){return a.value?a.value.getPostTranslationHandler():g}function U(z){a.value&&a.value.setPostTranslationHandler(z)}function j(){return a.value?a.value.getMissingHandler():C}function W(z){a.value&&a.value.setMissingHandler(z)}function L(z){return S(),z()}function P(...z){return a.value?L(()=>Reflect.apply(a.value.t,null,[...z])):L(()=>"")}function x(...z){return a.value?Reflect.apply(a.value.rt,null,[...z]):""}function I(...z){return a.value?L(()=>Reflect.apply(a.value.d,null,[...z])):L(()=>"")}function H(...z){return a.value?L(()=>Reflect.apply(a.value.n,null,[...z])):L(()=>"")}function G(z){return a.value?a.value.tm(z):{}}function J(z,Z){return a.value?a.value.te(z,Z):!1}function ee(z){return a.value?a.value.getLocaleMessage(z):{}}function fe(z,Z){a.value&&(a.value.setLocaleMessage(z,Z),c.value[z]=Z)}function Te(z,Z){a.value&&a.value.mergeLocaleMessage(z,Z)}function oe(z){return a.value?a.value.getDateTimeFormat(z):{}}function ke(z,Z){a.value&&(a.value.setDateTimeFormat(z,Z),f.value[z]=Z)}function ae(z,Z){a.value&&a.value.mergeDateTimeFormat(z,Z)}function Oe(z){return a.value?a.value.getNumberFormat(z):{}}function we(z,Z){a.value&&(a.value.setNumberFormat(z,Z),d.value[z]=Z)}function ge(z,Z){a.value&&a.value.mergeNumberFormat(z,Z)}const q={get id(){return a.value?a.value.id:-1},locale:E,fallbackLocale:$,messages:O,datetimeFormats:A,numberFormats:M,get inheritLocale(){return a.value?a.value.inheritLocale:l},set inheritLocale(z){a.value&&(a.value.inheritLocale=z)},get availableLocales(){return a.value?a.value.availableLocales:Object.keys(c.value)},get modifiers(){return a.value?a.value.modifiers:b},get pluralRules(){return a.value?a.value.pluralRules:w},get isGlobal(){return a.value?a.value.isGlobal:!1},get missingWarn(){return a.value?a.value.missingWarn:p},set missingWarn(z){a.value&&(a.value.missingWarn=z)},get fallbackWarn(){return a.value?a.value.fallbackWarn:m},set fallbackWarn(z){a.value&&(a.value.missingWarn=z)},get fallbackRoot(){return a.value?a.value.fallbackRoot:v},set fallbackRoot(z){a.value&&(a.value.fallbackRoot=z)},get fallbackFormat(){return a.value?a.value.fallbackFormat:h},set fallbackFormat(z){a.value&&(a.value.fallbackFormat=z)},get warnHtmlMessage(){return a.value?a.value.warnHtmlMessage:y},set warnHtmlMessage(z){a.value&&(a.value.warnHtmlMessage=z)},get escapeParameter(){return a.value?a.value.escapeParameter:_},set escapeParameter(z){a.value&&(a.value.escapeParameter=z)},t:P,getPostTranslationHandler:D,setPostTranslationHandler:U,getMissingHandler:j,setMissingHandler:W,rt:x,d:I,n:H,tm:G,te:J,getLocaleMessage:ee,setLocaleMessage:fe,mergeLocaleMessage:Te,getDateTimeFormat:oe,setDateTimeFormat:ke,mergeDateTimeFormat:ae,getNumberFormat:Oe,setNumberFormat:we,mergeNumberFormat:ge};function B(z){z.locale.value=s.value,z.fallbackLocale.value=u.value,Object.keys(c.value).forEach(Z=>{z.mergeLocaleMessage(Z,c.value[Z])}),Object.keys(f.value).forEach(Z=>{z.mergeDateTimeFormat(Z,f.value[Z])}),Object.keys(d.value).forEach(Z=>{z.mergeNumberFormat(Z,d.value[Z])}),z.escapeParameter=_,z.fallbackFormat=h,z.fallbackRoot=v,z.fallbackWarn=m,z.missingWarn=p,z.warnHtmlMessage=y}return Rt.onBeforeMount(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw _n(mn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const z=a.value=e.proxy.$i18n.__composer;t==="global"?(s.value=z.locale.value,u.value=z.fallbackLocale.value,c.value=z.messages.value,f.value=z.datetimeFormats.value,d.value=z.numberFormats.value):r&&B(z)}),q}const gle=["locale","fallbackLocale","availableLocales"],ble=["t","rt","d","n","tm"];function yle(e,t){const n=Object.create(null);gle.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r)throw _n(mn.UNEXPECTED_ERROR);const a=Rt.isRef(r.value)?{get(){return r.value.value},set(l){r.value.value=l}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,o,a)}),e.config.globalProperties.$i18n=n,ble.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r||!r.value)throw _n(mn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,r)})}It.registerMessageCompiler(It.compileToFunction);It.registerMessageResolver(It.resolveValue);It.registerLocaleFallbacker(It.fallbackWithLocaleChain);Pr.DatetimeFormat=Rm;Pr.I18nInjectionKey=h$;Pr.NumberFormat=Pm;Pr.Translation=Am;Pr.VERSION=l$;Pr.castToVueI18n=ule;var wle=Pr.createI18n=ile,Bl=Pr.useI18n=Wf;Pr.vTDirective=p$;var _le={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const Cle={"Install BuildAdmin":"安装 BuildAdmin","Environmental inspection":"环境检查","Checking installation environment":"正在检查安装环境","Current execution to:":"当前执行到:","Step 2 site configuration":"第二步 站点配置","Environmental inspection passed":"环境检查通过","This environmental check failed":"此项环境检查未通过","The environment check failed, but the installation can continue":"环境检查为失败/未确认,但可以继续安装","Basic environment":"基础环境","NPM correlation":"NPM相关","Test npm install":"测试 npm install","Check complete":"检查完成","Congratulations, the installation can continue~":"恭喜,安装可以继续~","Sorry, the necessary installation environment conditions have not been met, please check the above form!":"抱歉,有必要的安装环境条件没有达成,请检查以上表格!","Network Timeout":"网络超时","Network connection error":"网络连接错误","The interface path cannot be found":"接口路径找不到了(404):{url}","unknown error":"未知错误",executing:"",php_version:"PHP 版本",config_is_writable:"配置目录是否可写",public_is_writable:"public 目录是否可写",php_pdo:"PHP pdo_mysql 扩展",php_safe_mode:"PHP安全模式",php_proc:"PHP 程序执行函数(proc)",php_gd2:"PHP gd2 或 freeType",npm_version:"NPM 版本",npm_package_manager:"包管理器",nodejs_version:"node.js 版本",error:"错误",success:"成功","test-npm-install":"测试 npm install","check npm install":"是否测试命令执行?","set-npm-registry":"设置NPM源","Set NPM source":"设置NPM源","Use current source":"使用当前源",recommend:"(推荐)",TaoBao:"淘宝",Tencent:"腾讯","Click to test":"点击进行测试","Can execute":"可以执行","Command execution test failed":"命令执行测试失败","PM is ready!":"npm包管理器已经准备好了!","already installed":"已安装","The installation can continue, and some operations need to be completed manually":"可以继续安装,部分操作需手动完成","Sorry, the automatic installation of package manager failed. Please complete the installation manually!":"抱歉,自动安装包管理器失败,请手动完成安装!","Click to see how to solve it":"点击查看如何解决","How to solve":"如何解决",terminal:"终端",narrow:"缩小",Connecting:"连接中...","No command":"无命令",executed:" 已执行","Waiting for execution":" 等待执行","Connection successful, executing":"连接成功 正在执行 ","Unfinished matters manually":"手动完成未尽事宜","Open terminal (windows PowerShell)":"打开您PC/服务器的终端(Windows PowerShell、cmd等)","Execute command":"执行命令","Execution failed?":"执行失败了?","Move the built file to the specified location of the system":"移动构建好的文件到系统指定位置","Click to try to automatically move the build file":"点击尝试自动移动构建文件","The build output directory is: site":"构建输出目录为:站点","root directory / dist":"根目录/web/dist","You can delete the build output directory directly":"您可以直接删除构建输出目录","Getting full path of root directory / Web":"正在获取 根目录/web 的完整路径","Moving automatically":"正在自动移动...","Please move 1":"请移动构建输出目录中的","Please move 2":"文件夹和","Please move 3":"文件到根目录的","Please move 4":"目录下","During construction, all files in the output directory will be overwritten, so the system is designed to build in the root directory first, and then move to the public directory to prevent other files in the public from being overwritten":"构建时,会覆盖输出目录的所有文件,所以系统设计为先构建,然后移动到public目录,以免public内的其他文件被覆盖掉","Thanks for using buildadmin":"感谢使用 BuildAdmin","Background URL":"后台地址","Access foreground":"访问前台","Access background":"访问后台","Install Tips Title 1":"安装环境检测并没有完全通过,但安装可以继续,只是您后续需要手动进行一些操作,建议您","Install Tips Title 2":",在所有检测通过后再安装,以便您体验到 BuildAdmin 的核心功能之一。","Back to previous page":"回到上一页","If you don't want to open the corresponding permission due to some security factors, please check ":"如果你考虑到一些安全因素而不愿开启相应权限,请查看","how installation services ensure system security":"安装服务如何保障系统安全","If you really can't adjust all the tests to pass, please ":"如果您确实无法将所有检测调整到通过状态,请","click to feed back to us":"点击向我们反馈","continue installation":",并继续安装,安装程序后续将引导您,如何手动完成未尽事宜。","Close the prompt of completing unfinished matters manually":"关闭手动完成未尽事宜提示","Test connection to data server":"测试连接数据服务器...","Install now":"立即安装","Mysql database address":"MySQL 数据库地址","MySQL connection user name":"MySQL 连接用户名","MySQL connection password":"MySQL 连接密码","MySQL connection port number":"MySQL 连接端口号","Mysql database name":"MySQL 数据库名","MySQL data table prefix":"MySQL 数据表前缀","Administrator user name":"管理员用户名","Administrator password":"管理员密码","Duplicate administrator password":"重复管理员密码","Site name":"站点名称","Site configuration":"站点配置","The entered database was not found!":"数据表不存在,安装时将自动建立!","Duplicate passwords do not match":"重复密码不匹配","Command execution failed":"命令执行失败",Installing:"正在安装...","After installation, please complete the unfinished matters manually":"安装完成,请手动完成未尽事宜","Automatically executing the build command on the web side":"正在自动执行 WEB端的 构建命令","Installation complete":"安装完成...","The table prefix can only contain alphanumeric characters and underscores, and starts with a letter":"表前缀只能包含字母数字和下划线,并以字母开头","Manual Install 1":"命令自动执行失败,请手动完成未尽事宜,","Manual Install 2":"{seconds}秒 后自动跳转到操作引导页面...",Retry:"重试",delete:"删除",Confirm:"确认",Cancel:"取消","Request timeout!":"请求超时!","Server internal error!":"服务器内部错误!","The service is temporarily unavailable. Please try again later!":"服务暂时无法访问,请稍后再试!","Abnormal problem, please contact the website administrator!":"异常问题,请联系网站管理员!","You're disconnected!":"您断网了!",Required:"必填","Please enter the correct password":`密码要求6到32位,不能包含 & < > " '`,"It is composed of letters, numbers and underscores, starting with letters (3-15 digits)":"由字母、数字、下划线组成,以字母开头(3-15位)","It is recommended to delete the root directory / public / install folder; This page is only visible on your device.":"建议删除: 根目录/public/install 文件夹;本页仅在您的设备上可见。","Switch package manager":"切换包管理器","Please select package manager":"请选择包管理器","Switch package manager title":"只读WEB终端,可以在CRUD等操作后方便的执行 npm install、npm build 等命令,请在下方选择一个已安装好或您喜欢的的 NPM 包管理器","I want to execute the command manually":"我想手动执行命令",Reminder:"温馨提醒","Ready to start":"准备开始",language:"语言","NPM package manager":"NPM包管理器","The system has a Web terminal. Please select an installed or your favorite NPM package manager":"系统拥有WEB终端,请选择一个已安装好或您喜欢的的NPM包管理器","Start installation":"开始安装","Setup will restart. Are you sure you want to switch package manager?":"将重新开始安装程序,请确定要切换包管理器吗?","None - manual execution":"无-手动执行","Previous step":"上一步","Hide index.html?":"隐藏 index.html?","Sorry, some operations could not be completed automatically You need to manually complete the outstanding matters according to the following guidance":"抱歉,一些操作未能自动完成,需要您根据以下引导手动完成未尽事宜。","Need to reinstall the system?":"需重新安装系统?","Please click on me":"请点击我","Backend login password":"后台登录密码","Port error prompt 1":"当前安装程序站点的端口不是8000,您可能以错误的方式启动了安装服务,请参考","Get started quickly":"快速上手文档","Port error prompt 3":"进行安装。","Table migration failed":"数据表迁移失败","We use Phinx to manage the data table, which can version the data table":"我们使用`Phinx`管理数据表,它可以对数据表进行版本化管理。","Data table automatic migration failed, please manually migrate as follows:":"数据表自动迁移失败了,请按以下方法手动迁移:","If the command fails to be executed, add sudo or press the error message":"若命令执行失败,请尝试加 sudo,或按报错解决即可","Migration check":"迁移检查","When the command is executed successfully, the output is similar to:":"命令执行成功时,输出类似于:","After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to ":"命令执行成功后,数据库内将自动建立多个数据表,然后请您点击下方的","continue install":"继续安装"},Sle={"Install BuildAdmin":"Install BuildAdmin","Environmental inspection":"Environmental inspection","Checking installation environment":"Checking the installation environment","Current execution to:":"Current execution to:","Step 2 site configuration":"Step 2 site configuration","Environmental inspection passed":"Environmental inspection passed","This environmental check failed":"This environmental inspection was not passed.","The environment check failed, but the installation can continue":"Environment check failed/unconfirmed, but you can continue to install.","Basic environment":"Basic Environment","NPM correlation":"NPM correlation","Test npm install":"Test npm install","Check complete":"Check complete","Congratulations, the installation can continue~":"Congratulations, the installation can continue~","Sorry, the necessary installation environment conditions have not been met, please check the above form!":"Sorry, the necessary installation environmental conditions have not been met, please check the above form!","Network Timeout":"Network timeout","Network connection error":"Network connection error","The interface path cannot be found":"The interface path cannot be found(404):{url}","unknown error":"Unknown error",executing:"",php_version:"PHP Version",config_is_writable:"Is the configuration directory writable?",public_is_writable:"Is the public directory writable?",php_pdo:"PHP pdo_mysql extension",php_safe_mode:"PHP security mode",php_proc:"PHP proc_open and proc_close permission",php_gd2:"PHP gd2 or freeType extensions",npm_version:"NPM Version",npm_package_manager:"NPM package manager",nodejs_version:"node.js Version",error:"error",success:"success","test-npm-install":"Test npm install","check npm install":"Whether to test command execution?","set-npm-registry":"Set NPM source","Set NPM source":"Set NPM source","Use current source":"Use the current source",recommend:"(Recommend)",TaoBao:"TaoBao","Click to test":"Click to test","Can execute":"Can be executed","Command execution test failed":"Command execution test failed","PM is ready!":"The NPM package manager is ready!","already installed":"Already installed","The installation can continue, and some operations need to be completed manually":"You can continue the installation, and some operations need to be completed manually.","Sorry, the automatic installation of package manager failed. Please complete the installation manually!":"Sorry, the automatic installation of the package manager failed. Please complete the installation manually!","Click to see how to solve it":"Click to see how to solve it","How to solve":"How to solve",terminal:"Terminal",narrow:"Narrow",Connecting:"Connecting...","No command":"No command",executed:" Executed","Waiting for execution":" Waiting for execution","Connection successful, executing":"Connection successful, executing ","Unfinished matters manually":"Complete unfinished matters manually","Open terminal (windows PowerShell)":"Open the terminal of your PC/Server (PowerShell, cmd)","Execute command":"Execute the command","Execution failed?":"Failed execution?","Move the built file to the specified location of the system":"Move the built file to the specified location on the system.","Click to try to automatically move the build file":"Click to try to move the build file automatically","The build output directory is: site":"Build the output directory as: site","root directory / dist":"root directory/web/dist","You can delete the build output directory directly":"You can delete the build output directory directly","Getting full path of root directory / Web":"Getting the full path to the root directory/web","Moving automatically":"Moving automatically","Please move 1":"Please move the ","Please move 2":" folder and ","Please move 3":" files from the build output directory to the ","Please move 4":" directory of the root directory.","During construction, all files in the output directory will be overwritten, so the system is designed to build in the root directory first, and then move to the public directory to prevent other files in the public from being overwritten":"When constructing the process, all files in the output directory are overwriting, so the system is designed to build first and then move to the public directory to prevent overwriting other files in the public directory","Thanks for using buildadmin":"Thanks for using BuildAdmin","Background URL":"Background URL","Access foreground":"Access to the foreground","Access background":"Access to the background","Install Tips Title 1":"The installation environment test does not completely passed, but the installation can continue, and you need to do some manual operations to see how to modify it.It is recommended that you go ","Install Tips Title 2":" and install it after all the tests have passed so that you can experience one of the core functions of BuildAdmin.","Back to previous page":"back to previous page","If you don't want to open the corresponding permission due to some security factors, please check ":"If you don't want to open the corresponding permission due to some security factors, please check ","how installation services ensure system security":"how installation services ensure system security","If you really can't adjust all the tests to pass, please ":"If you really can't adjust all the tests to pass, please ","click to feed back to us":"click to feed back to us","continue installation":" and continue the installation. The subsequent installation program will guide you on how to manually complete the outstanding matters.","Close the prompt of completing unfinished matters manually":"Close the prompt of completing unfinished matters manually","Test connection to data server":"Test connection to data server","Install now":"Install now","Mysql database address":"Mysql database address","MySQL connection user name":"MySQL connection username","MySQL connection password":"MySQL connection password","MySQL connection port number":"MySQL connection port number","Mysql database name":"Mysql database name","MySQL data table prefix":"MySQL data table prefix","Administrator user name":"Administrator username","Administrator password":"Administrator password","Duplicate administrator password":"Duplicate administrator password","Site name":"Site Name","Site configuration":"Site Configuration","The entered database was not found!":"The data table does not exist and will be created automatically during installation","Duplicate passwords do not match":"Duplicate passwords mismatch","Command execution failed":"Command execution failed",Installing:"Installing","After installation, please complete the unfinished matters manually":"Installation is complete, please complete the unfinished matters manually.","Automatically executing the build command on the web side":"Automatically executing the build command on the web side","Installation complete":"Installation completed","The table prefix can only contain alphanumeric characters and underscores, and starts with a letter":"The table prefix can only contain alphanumeric characters and underscores, and starts with letters","Manual Install 1":"Failed to execute Command automatically. Please complete the unfinished matters manually.","Manual Install 2":"Automatically jump to the operation boot page after {seconds} seconds...",Retry:"Retry",delete:"Delete",Confirm:"Confirm",Cancel:"Cancel","Request timeout!":"Request timeout!","Server internal error!":"Internal server error!","The service is temporarily unavailable. Please try again later!":"The service is temporarily unavailable. Please try again later!","Abnormal problem, please contact the website administrator!":"Abnormal problem, please contact the website administrator!","You're disconnected!":"You're disconnected!",Required:"Required","Please enter the correct password":`The password requires 6 to 32 bits and cannot contain & < > " '`,"It is composed of letters, numbers and underscores, starting with letters (3-15 digits)":"Composed of letters, numbers and underscores, start with letters (3-15 digits)","It is recommended to delete the root directory / public / install folder; This page is only visible on your device.":"It is recommended to delete the root directory / public / install folder; This page is only visible on your device.","Switch package manager":"Switch package manager","Please select package manager":"Please select the package manager","Switch package manager title":"Read-only Web terminal, you can easily execute NPM install, NPM builds, and other commands after crud and other operations. Please select an installed or your favorite NPM package manager below","I want to execute the command manually":"I want to execute the command manually",Reminder:"Reminder","Ready to start":"Ready to start",language:"Language","NPM package manager":"NPM package manager","The system has a Web terminal. Please select an installed or your favorite NPM package manager":"The system has a Web terminal. Please select an installed or your favorite NPM package manager","Start installation":"Start installation","Setup will restart. Are you sure you want to switch package manager?":"The install will restart. Are you sure you want to switch the package manager?","None - manual execution":"None - manual execution","Previous step":"Previous step","Hide index.html?":"Hide index.html?","Sorry, some operations could not be completed automatically You need to manually complete the outstanding matters according to the following guidance":"Sorry, some operations could not be completed automatically. You need to outstanding matters according to the following guidance manually.","Need to reinstall the system?":"Need to reinstall the system?","Please click on me":"Please click on me","Backend login password":"Backend login password","Port error prompt 1":"The current installation site port is not 8000. You may have started the installation service in the wrong way. Please refer to the","Get started quickly":" Quick Start documentation ","Port error prompt 3":" for installation.","Table migration failed":"Table migration failed","We use Phinx to manage the data table, which can version the data table":"We use 'Phinx' to manage the data table, which can version the data table","Data table automatic migration failed, please manually migrate as follows:":"Data table automatic migration failed, please manually migrate as follows:","If the command fails to be executed, add sudo or press the error message":"If the command fails to be executed, add sudo or press the error message","Migration check":"Migration check","When the command is executed successfully, the output is similar to:":"When the command is executed successfully, the output is similar to:","After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to ":"After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to ","continue install":"continue the installation"},dw={"zh-cn":fw(Object.assign({"./pages/zh-cn/terminal.ts":Joe}),"zh-cn"),en:fw(Object.assign({"./pages/en/terminal.ts":Qoe}),"en")},kle={"zh-cn":{...Cle,..._le,...dw["zh-cn"]},en:{...Sle,...oS,...dw.en}},$o=wle({locale:"zh-cn",legacy:!1,fallbackLocale:"en",messages:kle});function fw(e,t){const n={};for(const o in e)if(e[o].default){const r=o.slice(o.lastIndexOf(t)+(t.length+1),o.lastIndexOf("."));if(r.indexOf("/")>0){const a=r.split("/");for(const l in a)typeof n[a[l]]>"u"&&(n[a[l]]=[]);a.length==2?n[a[0]][a[1]]=Ec(e[o].default):a.length==3?n[a[0]][a[1]][a[2]]=Ec(e[o].default):n[r]=Ec(e[o].default)}else n[r]=Ec(e[o].default)}return n}function Ec(e){const t=[];for(const n in e)if(n.indexOf(".")>0){const o=n.split(".");typeof t[o[0]]>"u"?t[o[0]]=[]:t[o[0]][o[1]]=e[n]}else t[n]=e[n];return t}const Ele=window.localStorage.getItem("ba-lang")||"zh-cn",m$=()=>window.location.protocol+"//"+window.location.host,Rr=Nn.create({baseURL:m$(),timeout:1e3*10,headers:{"Content-Type":"application/json","think-lang":Ele}});Rr.interceptors.response.use(e=>e,e=>(Tle(e),Promise.reject(e)));function Tle(e){let t="";if(e&&e.response)switch(e.response.status){case 404:t=$o.global.t("The interface path cannot be found",{url:e.response.config.url});break;case 408:t=$o.global.t("Request timeout!");break;case 500:t=$o.global.t("Server internal error!");break;case 504:t=$o.global.t("The service is temporarily unavailable. Please try again later!");break;default:t=$o.global.t("Abnormal problem, please contact the website administrator!");break}e.message.includes("timeout")&&(t=$o.global.t("Network Timeout")),e.message.includes("Network Error")&&(t=$o.global.t("Network connection error")),e.message.includes("Network")&&(t=window.navigator.onLine?$o.global.t("Abnormal problem, please contact the website administrator!"):$o.global.t("You're disconnected!")),t||(t=$o.global.t("unknown error")),Cr({type:"error",message:t,center:!0})}const na="/index.php",$le=na+"/api/install/envBaseCheck",Ole=na+"/api/install/envNpmCheck",Nle=na+"/api/install/testDatabase",v$=na+"/api/install/baseConfig",Ile=na+"/api/install/commandExecComplete",Mle=na+"/api/install/mvDist",Ale=na+"/api/install/manualInstall",Ple=na+"/api/install/terminal",Rle=na+"/api/install/changePackageManager",Lle=()=>Rr.get($le),xle=()=>{const e=ii();return Rr.post(Ole,{manager:e.state.packageManager})},Dle=e=>Rr.post(Nle,e),Fle=()=>Rr.get(v$),Ble=e=>Rr.post(v$,e),pw=e=>Rr.post(Ile,e).then(t=>{t.data.code!=1&&Cr({type:"error",message:t.data.msg,center:!0})}),Ua=e=>{const t=ii();Rr.post(Rle,{manager:e}).then(n=>{n.data.code==1?t.changePackageManager(n.data.data.manager):n.data.msg&&Cr({type:"error",message:n.data.msg,center:!0})})},Vle=()=>Rr.post(Mle),Hle=()=>Rr.get(Ale),zle=(e,t,n)=>m$()+Ple+"?command="+e+"&uuid="+t+"&extend="+n,gt={Waiting:0,Connecting:1,Executing:2,Success:3,Failed:4,Unknown:5},ju=Y_("common",()=>{const e=Et({step:"check",showStartDialog:!0});function t(o){e.step=o}function n(o){e.showStartDialog=o}return{state:e,setStep:t,toggleStartDialog:n}},{persist:{key:AI}}),ii=Y_("terminal",()=>{const e=Et({show:!1,showDot:!1,taskList:[],packageManager:"pnpm",showPackageManagerDialog:!1});function t(){for(const b in e.taskList)(e.taskList[b].status==gt.Connecting||e.taskList[b].status==gt.Executing)&&(e.taskList[b].status=gt.Unknown)}function n(b=!e.show){e.show=b,b&&o(!1)}function o(b=!e.showDot){e.showDot=b}function r(b=!e.showPackageManagerDialog){n(!b),e.showPackageManagerDialog=b}function a(b){e.packageManager=b}function l(b,w){e.taskList[b]&&(e.taskList[b].status=w,(w==gt.Failed||w==gt.Unknown)&&e.taskList[b].blockOnFailure&&u(b,!0))}function s(b){if(!e.taskList[b]||typeof e.taskList[b].callback!="function")return;const w=e.taskList[b].status;if(w==gt.Failed||w==gt.Unknown)e.taskList[b].callback(gt.Failed,b);else if(w==gt.Success&&(e.taskList[b].callback(gt.Success,b),e.taskList[b].command=="web-build."+e.packageManager)){const S=ju();S.state.step=="manualInstall"&&(n(!1),S.setStep("done"))}}function u(b,w=!e.taskList[b].showMessage){e.taskList[b].showMessage=w}function c(b,w){e.show||o(!0),e.taskList[b].message=e.taskList[b].message.concat(w),We(()=>{_(e.taskList[b].uuid)})}function f(b,w=!0,S="",E=()=>{}){e.show||o(!0),e.taskList=e.taskList.concat({uuid:LI(),createtime:RI(),status:gt.Waiting,command:b,message:[],showMessage:!1,blockOnFailure:w,extend:S,callback:E}),m()}function d(b,w=!0,S="",E=()=>{}){f(b+"."+e.packageManager,w,S,E)}function p(b){e.taskList[b].status!=gt.Connecting&&e.taskList[b].status!=gt.Executing&&e.taskList.splice(b,1),m()}function m(){let b=null;for(const w in e.taskList){if(e.taskList[w].status==gt.Waiting){b=parseInt(w);break}if(e.taskList[w].status==gt.Connecting||e.taskList[w].status==gt.Executing)break;if(e.taskList[w].status!=gt.Success&&(e.taskList[w].status==gt.Failed||e.taskList[w].status==gt.Unknown)){if(e.taskList[w].blockOnFailure)break;continue}}b!==null&&(l(b,gt.Connecting),v(b))}function v(b){window.eventSource=new EventSource(zle(e.taskList[b].command,e.taskList[b].uuid,e.taskList[b].extend)),window.eventSource.onmessage=function(w){const S=JSON.parse(w.data);if(!S||!S.data)return;const E=g(S.uuid);E!==!1&&(S.data=="command-exec-error"?(l(E,gt.Failed),window.eventSource.close(),s(E),m()):S.data=="command-exec-completed"?(window.eventSource.close(),e.taskList[E].status!=gt.Success&&l(E,gt.Failed),s(E),m()):S.data=="command-link-success"?l(E,gt.Executing):S.data=="command-exec-success"?l(E,gt.Success):c(E,S.data))},window.eventSource.onerror=function(){window.eventSource.close();const w=y(b);w!==!1&&(l(w,gt.Failed),s(w))}}function h(b){e.taskList[b].message=[],l(b,gt.Waiting),m()}function C(){e.taskList=e.taskList.filter(b=>b.status!=gt.Success)}function g(b){for(const w in e.taskList)if(e.taskList[w].uuid==b)return parseInt(w);return!1}function y(b){if(e.taskList[b])return b;{let w=-1;for(const S in e.taskList)(e.taskList[S].status==gt.Connecting||e.taskList[S].status==gt.Executing)&&(w=parseInt(S));return w===-1?!1:w}}function _(b){const w=document.querySelector(".exec-message-"+b);w&&w.scrollHeight&&(w.scrollTop=w.scrollHeight)}return{state:e,init:t,toggle:n,toggleDot:o,setTaskStatus:l,setTaskShowMessage:u,addTaskMessage:c,addTask:f,addTaskPM:d,delTask:p,startTask:m,retryTask:h,clearSuccessTask:C,togglePackageManagerDialog:r,changePackageManager:a}},{persist:{key:PI}}),jle={class:"command"},Wle={class:"task-opt"},Kle=["onClick"],Ule={class:"indent-2"},qle={class:"package-manager-dialog-footer"},Yle=Y({__name:"index",setup(e){const{t}=Bl(),n=ii(),o=l=>{let s=t("terminal.unknown"),u="info";switch(l){case gt.Waiting:s=t("terminal.Waiting for execution"),u="info";break;case gt.Connecting:s=t("terminal.Connecting"),u="warning";break;case gt.Executing:s=t("terminal.Executing"),u="warning";break;case gt.Success:s=t("terminal.Successful execution"),u="success";break;case gt.Failed:s=t("terminal.Execution failed"),u="danger";break;case gt.Unknown:s=t("terminal.Unknown execution result"),u="danger";break}return{statusText:s,statusType:u}},r=()=>{bm.confirm(t("terminal.Are you sure you want to republish?"),t("Reminder"),{confirmButtonText:t("Confirm"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{n.addTaskPM("web-build")})},a=()=>{bm.confirm(t("Setup will restart. Are you sure you want to switch package manager?"),t("Reminder"),{confirmButtonText:t("Confirm"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{window.localStorage.clear(),location.reload()})};return(l,s)=>{const u=qe("el-tag"),c=qe("el-button"),f=qe("el-icon"),d=qe("el-card"),p=qe("el-timeline-item"),m=qe("el-timeline"),v=qe("el-empty"),h=qe("el-button-group"),C=qe("el-dialog"),g=qs("blur");return T(),V(Ve,null,[K(C,mt(l.$attrs,{modelValue:i(n).state.show,"onUpdate:modelValue":s[5]||(s[5]=y=>i(n).state.show=y),title:i(t)("terminal.Terminal")+" - "+i(n).state.packageManager,class:"ba-terminal-dialog","append-to-body":!0,"close-on-click-modal":!1}),{default:X(()=>[i(n).state.taskList.length?(T(),re(m,{key:0},{default:X(()=>[(T(!0),V(Ve,null,bt(i(n).state.taskList,(y,_)=>(T(),re(p,{key:_,class:N(["task-item","task-status-"+y.status]),type:o(y.status).statusType,center:"",timestamp:y.createtime,placement:"top"},{default:X(()=>[K(d,null,{default:X(()=>[F("div",null,[K(u,{type:o(y.status).statusType},{default:X(()=>[Ge(le(o(y.status).statusText),1)]),_:2},1032,["type"]),(y.status==i(gt).Failed||y.status==i(gt).Unknown)&&y.blockOnFailure?(T(),re(u,{key:0,class:"block-on-failure-tag",type:"warning"},{default:X(()=>[Ge(le(i(t)("terminal.Failure to execute this command will block the execution of the queue")),1)]),_:1})):te("",!0),y.status==i(gt).Connecting||y.status==i(gt).Executing?(T(),re(u,{key:1,class:"block-on-failure-tag",type:"danger"},{default:X(()=>[Ge(le(i(t)("terminal.Do not refresh the browser")),1)]),_:1})):te("",!0),F("span",jle,le(y.command),1),F("div",Wle,[y.status==i(gt).Failed||y.status==i(gt).Unknown?tt((T(),re(c,{key:0,title:i(t)("Retry"),size:"small",type:"warning",icon:i(XC),circle:"",onClick:b=>i(n).retryTask(_)},null,8,["title","icon","onClick"])),[[g]]):te("",!0),tt(K(c,{onClick:b=>i(n).delTask(_),title:i(t)("delete"),size:"small",type:"danger",icon:i(YC),circle:""},null,8,["onClick","title","icon"]),[[g]])])]),y.status!=i(gt).Waiting?(T(),V(Ve,{key:0},[y.status!=i(gt).Connecting&&y.status!=i(gt).Executing?(T(),V("div",{key:0,onClick:b=>i(n).setTaskShowMessage(_),class:"toggle-message-display"},[F("span",null,le(i(t)("terminal.Command run log")),1),K(f,{size:"16",color:"#909399"},{default:X(()=>[y.showMessage?(T(),re(i(pf),{key:0})):(T(),re(i(Nr),{key:1}))]),_:2},1024)],8,Kle)):te("",!0),y.status==i(gt).Connecting||y.status==i(gt).Executing||y.status>i(gt).Executing&&y.showMessage?(T(),V("div",{key:1,class:N(["exec-message","exec-message-"+y.uuid])},[(T(!0),V(Ve,null,bt(y.message,(b,w)=>(T(),V("pre",{key:w,class:"message-item"},le(b),1))),128))],2)):te("",!0)],64)):te("",!0)]),_:2},1024)]),_:2},1032,["class","type","timestamp"]))),128))]),_:1})):(T(),re(v,{key:1,"image-size":80,description:i(t)("terminal.No mission yet")},null,8,["description"])),K(h,null,{default:X(()=>[tt((T(),re(c,{class:"terminal-menu-item",onClick:s[0]||(s[0]=y=>i(n).addTaskPM("test",!1))},{default:X(()=>[Ge(le(i(t)("terminal.Test command")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[1]||(s[1]=y=>i(n).addTaskPM("web-install"))},{default:X(()=>[Ge(le(i(t)("terminal.Install dependent packages")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[2]||(s[2]=y=>r())},{default:X(()=>[Ge(le(i(t)("terminal.Republish")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[3]||(s[3]=y=>i(n).addTask("version.npm",!1))},{default:X(()=>[Ge("npm -v")]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:a},{default:X(()=>[Ge(le(i(t)("Switch package manager")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[4]||(s[4]=y=>i(n).clearSuccessTask())},{default:X(()=>[Ge(le(i(t)("terminal.Clean up task list")),1)]),_:1})),[[g]])]),_:1})]),_:1},16,["modelValue","title"]),K(C,{onClose:s[12]||(s[12]=y=>i(n).togglePackageManagerDialog(!1)),modelValue:i(n).state.showPackageManagerDialog,"onUpdate:modelValue":s[13]||(s[13]=y=>i(n).state.showPackageManagerDialog=y),class:"ba-terminal-dialog",title:i(t)("Please select package manager"),center:""},{footer:X(()=>[F("div",qle,[K(c,{onClick:s[6]||(s[6]=y=>i(Ua)("npm"))},{default:X(()=>[Ge("npm")]),_:1}),K(c,{onClick:s[7]||(s[7]=y=>i(Ua)("cnpm"))},{default:X(()=>[Ge("cnpm")]),_:1}),K(c,{onClick:s[8]||(s[8]=y=>i(Ua)("pnpm"))},{default:X(()=>[Ge("pnpm")]),_:1}),K(c,{onClick:s[9]||(s[9]=y=>i(Ua)("yarn"))},{default:X(()=>[Ge("yarn")]),_:1}),K(c,{onClick:s[10]||(s[10]=y=>i(Ua)("ni"))},{default:X(()=>[Ge("ni")]),_:1}),K(c,{onClick:s[11]||(s[11]=y=>i(Ua)("none"))},{default:X(()=>[Ge(le(i(t)("I want to execute the command manually")),1)]),_:1})])]),default:X(()=>[F("div",Ule,le(i(t)("Switch package manager title")),1)]),_:1},8,["modelValue","title"])],64)}}}),ui=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Gle=ui(Yle,[["__scopeId","data-v-c55edab5"]]),g$="/install/assets/logo.svg",Xle="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAACVBMVEUAAADc3eTc3+YFvQraAAAAAnRSTlMA9btEy6sAAAGFSURBVGje7dixbcNAEERR24EBuwSX4CpYimNVoRJYggIF1lTpAr6xPxgo2wkpHMEnUXe7+7LZbDabzWazeVo+/rv4My75Pnjt9XdckpPX3jOteMudF79yHZZ85sGLl9wmSnKAkkyYJCcpyURJ7qQk14GSPEhJbhMlOUCZMEmSk5RkoiR3UAbMa0LMJXxafmy34UOcpPA14ue8i2L4rIbhTQyjFGKUQoxTiFEKMUohRinEOIUYpxDjFGJIUQwphiFFMaQoBhTHkOIYUBwDimNAcQwpjgHFMaA4BhTHgOIYUBwDimNAcQwoggHFMaQ4hhTHkOIYUhxDimNIcczRL+kfzPn9l+w/Zf/C+GvZv/z+F+v/yL5d9JuSb339Bttv435Y9EeSH3z98eqHeF8qeEHSlz1eXPUlnBeKRTnaF71eWvcFvLcJfTPiLU/VWPXtmzeJfSvqDW/fVnvz3o8IfBBRjDv6oYqPbvoBkY+h+mGXj9T6wZ2PB/shpI86N5vNZrPZbDbPyh8nhMFbtczXEQAAAABJRU5ErkJggg==",Jle=Object.freeze(Object.defineProperty({__proto__:null,default:Xle},Symbol.toStringTag,{value:"Module"})),b$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAADFBMVEUAAAD2bGz1bGz1bGxNefxdAAAAA3RSTlMAVaoLuSc5AAABi0lEQVRo3u3YwXHCQBBEUeOLy+UgHIJTUCjOBDJzCgqBIDhwQe0APrX/0MVt+ihqVXogdmfmbTKZTCaTyWTysnw+u/i7XPKz8drpvlzyt/Pax7Fa8Z4bL37nsljylQcvnnNdUZINlOS+oiQ7KMmxoiQ3UpLLgpI8SEmuK0qygZLcV5RkByU5VpTkBsoCc0qIOYdPy4/tNnyIHZTwNeLnvIti+KyG4U0MoxRilEKMU4hRCjFKIUYpxDiFGKcQ4xRiSFEMKYYhRTGkKAYUx5DiGFAcA4pjQHEMKY4BxTGgOAYUx4DiGFAcA4pjQHEMKIIBxTGkOIYUx5DiGFIcQ4pjSHHM1i/pH8z5/ZfsP2X/wvhr2b/8/hfr/8i+XfSbkm99/Qbbb+N+WPRHkh98/fHqh3hfKnhB0pc9Xlz1JZwXikU52he9Xlr3Bby3CX0z4i1P1Vj17Zs3iX0r6g1v31Z7896PCHwQUYw7+qGKj276AZGPofphl4/U+sGdjwf7IaSPOieTyWQymUwmr8o/BXYQUa5D7j4AAAAASUVORK5CYII=",Zle=Object.freeze(Object.defineProperty({__proto__:null,default:b$},Symbol.toStringTag,{value:"Module"})),Qle="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAmVBMVEUAAABnwjpmwjlnwjpnwztnwjpnwjpnwjpmwzpowzpnwzlnwTtnwjpnwjpmwjlnwzpnwzpnwjpnwjlnwzpnxDltuTZnwjlnwjpnwzpnwzpnwzpnwjpnwjpnwjpnwjhlwDdixDtnwjpnwzlnwjpnwjlowjpnwjpnwzlnwjpnwjpnwjlmwjpnwjpnwjpnwjpmwTpmwjtnwjlnwjrJKS+EAAAAMnRSTlMA7GidKOfFulROSBng2c5vYVs7Mw8Fv7WqfnX1o0MiEwr61dKwlpOJh3o/LvHKgjYdj7mKH34AAANoSURBVHja7dzpUuJQFATgEwhhR1BAZBdwYRu13//hpqxxSsVziQEh98T+fltSVAHp7nARIiIiIiIiIiIiIiIiIiIiIqJfYdJcIKhH/Y7Y9jTDP9uSWFbBu6bY1ccHg7VYNcInRTFqgh1lsekWO/Ji0ha7ArHoDl9sxKAcvqqLPU9QRGJOB5qlmBNAUW+LNUVoLsSaB2iuxZoWNLOxGBNCM1iJNXhnOsTXobkRaxZ4ZT8u3kDTnYoxZWhqoRjzDFVFrNlAkxNrGtA8iDVDaHpizQU024kYs4JmcyXGtKGyN5QWoOmLNV1o7sWa+4xUqSY0s2cx5goqe1XqFpqWWDNjlfLKY0aqVAmajbkqFWalSgUZqVIRNI9iTVaq1BKambkqVYHKXJWqZqVK1TJyN6eY6SpVlJMbh1P5QRfQBKeuUq1eDcDsfiw/5BKqSzmp6R3eFPo/9B8HaVSpKj7odeQHNM5apfRHvW7L0XrQDOW0cvisODlNlZp35LQi7OhWT7H9IJQTC7ArGssR1qlUKT0RNUI5XCGlKrWCYr6WQ3XTqlJVaOqHZu18OsnE3aprl3KIPjRBW84ggqowkuRKaVapCnRBRZIap1ulltANypJQPeUq1YPutiSJXKc+8g4BHB9XX6CZyznl4dBMktlUz3JWdwCOuyKPUqlS+uvimLfqJPDlrtQjHPryHVt/Rt4/cLhJ8HHhxRGdJRz+HPgFv6Aj6ejD4UH2a7mqVFou4PASc4RCNZL05OBwJ27Tmod3pZpwyItTMfVkomnBYZjsWtqQtJVuoet1kryvPDjTUh5At2hrfw2VF6dVKwF01xPZFQ7wytMjnqsCFOp0N3dcQT1xWYNCme4Wvn8x7qoO3TaMPytVEI+Ec+jm69iLTlV8EjaAmOlu5UmVivEcAXunu2rBw2SiqXaxd7qLvEwmmnZx33SX9zSZaKYL6DZlVwvz9NdNOu7pDip/D3cO4eBzMkky3fmdTL5fN3xPJt+d7vxPJgolUXlbpRJOd7onMeAGHxlJJrHTnZlkEjMxGEomqhz2EUOaeGWhSsVpmUwmjukuI2eMygOLyUSf7iwmE82oYKVKxU931o8e/PdUt5hMNOtGNp6HSPsBb7pmX1dvRvfFGqKlb5MiEREREREREREREREREREREdHv8xfQb5TIVcxdIwAAAABJRU5ErkJggg==",ese=Object.freeze(Object.defineProperty({__proto__:null,default:Qle},Symbol.toStringTag,{value:"Module"})),tse="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAllBMVEUAAADnozzkoDzmojzmojzmojznozrnojzmojvmojvnojznojzmojznojzmojzmojznojznojzmojzmojzmojvnojzmojzmojzmpDvmojzmojzmojzmojzmoTvnojznojvlnjjmoDzmojzmojzmojzmojznojznozzmojznojzmoTvmojzmojznpjnmojzmojzmoDzmojxUQ0wVAAAAMXRSTlMAfz+/onQV5+GHevLRybavqJSObl9YUzcP7cRKRTIoGwYj+tedgWROmWks3LsK9s0fysZrJgAABRZJREFUeNrt3Wdv20AMBmDGQ17y3kveM178/3+uQVAUIWO7PuVO4gV8PhZFgdf2G51oqgGllFJKKaWUUkoppdTv1uvB7xCG8Cu8Ib7BLxDhhwj818APDfBeDz/twHchfrqC58r4Vxm8tljiX5cF+CyH/+TAYzv8Ygz+uuIXVfBWGYk8eGpxQaIyAz/lkFmDl8b4zQR8VMVvRuChPN7RBu/cKnjH0L++r/GuPXhmjA9kwC9VfCALXsnjQwfwyGyIDxUC8Mcan2iCNyZINX3t+wiJTUA/aSfwRBuJ929/sgUvzApIdAFg5GPf90jU7rSmBR7gTZ/eS9cH+UZ3X/xZhb1N4rFeFwb3r/UdEC5gTd8+OH0VByBbE4nsw/NwCUTLPDm053zqe/bJbdTt4k/fD0gMA/jkXd+D4vNRw5UeXeT2nTW9CszOk77zpo//N3ucgkwnJHLwTbTEr+og0haJyuL/8/kuCDR4R6IMd8xD/Golse8tJEK4q4fEBsTpI9WD+xrS+17D13p8xH9ErkSwpi+P8MgGCWErUOcVEqWX/2p4BklY01dzeKyLn0SuRPSXJufBOv8UylFHkxP6FD+IXInooNk9U0lo33nTW4aHgOscZCih6VyhI3IlYnpB4mB8+bzI6Hs9xndrfYF9503PmF14xKw8zkMk9rFu76vp9501vTAjN7/ZL+hbtRXW92kFifzju/jMsxvjSgTpavCtmZeDZEStQHWRGj8PwvsuZuVxfuU/Rg2C3ApyVqA2SAwXJkHgIGYF6sia/gYmQfjIe5he3xt8RGoYZCJkJYI3vWsaBPYy+l7lAxHjIIuhhBWoNyQqR/Mg0BbQ92jIBycxgvCViAUkL4dEOI8VZJd633tIdSBWEFinveI84iPSmEGOlXRXoMpILPtxg0A+1ZXHqMAHJ7GDnNlKxA2StEZiFcQPAr0UV6B2SB3AJAiXS6/vWT4i/VGQ6TKtlYgyUhPDIFw5pb4vivwq9sMggzCdvu+RKM6Mg3DdVPrOm54H8yBcI40V5xMfkVoI0sfkVyLySO1sBIFN4ivOtyKfR1kJEqzoCtQMXGsiUYjsBIFOwitQY6TKYCkI1JPt+4mPSK0FySTa9zZSXXtBoJRg32fvfERqLwj/x1e87w6bPpzCc/z7kee2ifV9gj/dthLS9xoS1bPbF6oBjhzQ9QZyK5EV59nK9QvGbxDCAFxoIVHJgH3tBFYeJ8skfqjU+JTJvjom8baPnX98D5jMhbfpuO9BiETdfFseXhLRvl8DsKuExHLiKgjknfY9c+HjAWdB5nRodum7bPrq5i4I9ByuQG2RaoPDIHzc1HXX9Bo4DTKlo/7qwFXTcew2CB+hvllreoWPSB0HGYzoYWgKdjSQKEaug0DXSd8730akzoNAzkHfB1cksvMEgvSHdFgzsL/KhD1IIAhsrD/S0B/GXdnjwwcwEVTZmMP2gkNhCongzVzbXmUqQ1IaVh9pGFTRtHWOrl7Zs81VJuxCckoWPwv9QorL+LOQtvNor+nDPiRpy/pur+kbSFbdUt/PIySqASRrsrTT97LBiNSNlpVHGqaF1B+rXdApbTFe39euR6Tm07R9vKVFCf/VRC3OI0x8KiPQaQ6m8iiScd+PRRSpGBmvMgnVNF1lEmtn1PQTinWa+99040caoncU7D0y+NZItJf7Pkbhxi8fC4SrwUvaKN5LfV+8ecDv38qilFJKKaWUUkoppZRSSimllFIv+wNEulUVw2/KggAAAABJRU5ErkJggg==",nse=Object.freeze(Object.defineProperty({__proto__:null,default:tse},Symbol.toStringTag,{value:"Module"})),ose="/install/assets/loading.gif",rse="/install/assets/lang.svg",ase=e=>(Xd("data-v-631c568f"),e=e(),Jd(),e),lse={class:"lang"},sse=["src"],ise={class:"lang-list"},use=ase(()=>F("span",{class:"lang-list-arrow"},null,-1)),cse={class:"logo-box"},dse=["src"],fse={class:"title"},pse=Y({__name:"index",setup(e){const{t}=Bl(),n=o=>{window.localStorage.setItem("ba-lang",o),location.reload()};return(o,r)=>(T(),V(Ve,null,[F("div",lse,[F("img",{src:i(rse),alt:"lang icon"},null,8,sse),F("div",ise,[use,F("div",{onClick:r[0]||(r[0]=a=>n("zh-cn")),class:"lang-item"},"中文简体"),F("div",{onClick:r[1]||(r[1]=a=>n("en")),class:"lang-item"},"English")])]),F("div",cse,[F("img",{class:"logo",alt:"Build Admin logo",src:i(g$)},null,8,dse),F("div",fse,le(i(t)("Install BuildAdmin")),1)])],64))}}),Kf=ui(pse,[["__scopeId","data-v-631c568f"]]);var hse={VITE_PORT:"2828",VITE_OPEN:"false",VITE_BASE_PATH:"/install/",BASE_URL:"/install/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const mse={class:"container"},vse={class:"table-title"},gse={class:"table"},bse={key:0,class:"global-warning"},yse={target:"_blank",href:"https://doc.buildadmin.com/guide/install/start.html"},wse={class:"table-label"},_se=["title","onClick"],Cse={class:"table-value"},Sse=["title","src","alt"],kse={key:1,class:"table-item"},Ese={class:"table-label"},Tse={class:"table-value"},$se=["title","alt"],Ose={class:"block-help"},Nse={class:"start-install"},Ise=Y({__name:"check",setup(e){const{t,locale:n}=Bl(),o=ju(),r=ii(),a=Et({envCheckData:[],stateTitle:{ok:"Environmental inspection passed",fail:"This environmental check failed",warn:"The environment check failed, but the installation can continue"},checkType:{base:"Basic environment",npm:"NPM correlation",npminstall:"Test npm install",done:"Check complete"},checkTypeIndex:"base",checkDone:{ok:"Congratulations, the installation can continue~",fail:"Sorry, the necessary installation environment conditions have not been met, please check the above form!",executing:"executing"},checkDoneIndex:"executing",startForm:{lang:n.value,packageManager:r.state.packageManager,setNpmRegistry:"taobao"},showPortErrorPrompt:!1}),l=Object.assign({"../assets/img/install/close.png":Jle,"../assets/img/install/fail.png":Zle,"../assets/img/install/ok.png":ese,"../assets/img/install/warn.png":nse}),s=w=>{const S=`../assets/img/install/${w}.png`;return l[S].default},u=w=>{window.localStorage.setItem("ba-lang",w),location.reload()},c=()=>{o.state.showStartDialog&&Ua(a.startForm.packageManager),o.toggleStartDialog(!1),Lle().then(w=>{if(w.data.code!=1)return p(w.data.msg);m(),a.envCheckData=w.data.data})},f=w=>{w.type=="faq"?window.open(w.url):w.type=="install-package-manager"?(a.checkDoneIndex="executing",v(),r.toggle(!0),r.addTaskPM("install",!0,"",S=>{r.toggle(!1),y(),S==gt.Failed?p(t("Sorry, the automatic installation of package manager failed. Please complete the installation manually!")):S==gt.Success&&(a.envCheckData=Object.assign({},a.envCheckData,{success:{describe:t("PM is ready!"),state:"ok",link:[]}}),a.envCheckData=Object.assign({},a.envCheckData,{npm_package_manager:{describe:t("already installed"),state:"ok",link:[],pm:r.state.packageManager}}),h())})):w.type=="test-npm-install"&&C()},d=()=>{a.checkDoneIndex=="ok"&&o.setStep("config")},p=w=>{y(),a.checkDoneIndex=="fail"&&(a.checkDoneIndex="executing"),Cr({type:"error",message:w,duration:0,center:!0})},m=()=>{a.checkTypeIndex="npm",xle().then(w=>{if(y(),w.data.code==2)return!1;if(w.data.code!=1)return p(w.data.msg);a.envCheckData=Object.assign({},a.envCheckData,w.data.data),w.data.data.npm_package_manager.state=="ok"&&(v(),h())})},v=()=>{if(a.startForm.setNpmRegistry!="none"){let w=!1;for(const S in r.state.taskList)if(r.state.taskList[S].command=="set-npm-registry."+a.startForm.setNpmRegistry&&r.state.taskList[S].status==gt.Success){w=!0;break}w||r.addTask("set-npm-registry."+a.startForm.setNpmRegistry,!1,"",S=>{if(S==gt.Failed){let E={"set-npm-registry":{describe:t("Command execution failed"),state:"fail",link:[{name:t("How to solve"),title:t("Click to see how to solve it"),type:"faq",url:"https://doc.buildadmin.com/guide/install/setNpmRegistryFail.html"}]}};a.envCheckData=Object.assign({},a.envCheckData,E)}})}},h=()=>{a.envCheckData=Object.assign({},a.envCheckData,{"check npm install":{describe:"",state:"warn",link:[{name:t("Click to test"),title:t("Click to test")+" npm install",type:"test-npm-install"}]}})},C=()=>{a.checkDoneIndex="executing",a.checkTypeIndex="npminstall",g("check npm install"),r.toggle(!0),r.addTaskPM("test",!0,"",w=>{if(y(),r.toggle(!1),w==gt.Failed){let S={"test-npm-install":{describe:t("Command execution test failed"),state:"warn",link:[{name:t("How to solve"),title:t("Click to see how to solve it"),type:"faq",url:"https://doc.buildadmin.com/guide/install/npmInstallFail.html"}]}};a.envCheckData=Object.assign({},a.envCheckData,S)}else if(w==gt.Success){let S={"test-npm-install":{describe:t("Can execute"),state:"ok",link:[]}};a.envCheckData=Object.assign({},a.envCheckData,S)}})},g=w=>{delete a.envCheckData[w]},y=()=>{a.checkTypeIndex="done";let w=["php_version","config_is_writable","public_is_writable","php_pdo","php_gd2"];for(const S in w)if(!a.envCheckData[w[S]]||a.envCheckData[w[S]].state!="ok")return a.checkDoneIndex="fail",!1;return a.checkDoneIndex="ok",!0},_=()=>r.state.packageManager=="none"?t("None - manual execution"):r.state.packageManager,b=()=>{let w=hse.VITE_AXIOS_BASE_URL;return w=w=="getCurrentDomain"||!w?window.location.protocol+"//"+window.location.host:w,new URL(w).port};return at(()=>{o.state.showStartDialog||c(),b()!="8000"&&(a.showPortErrorPrompt=!0)}),(w,S)=>{const E=qe("el-alert"),$=qe("el-option"),O=qe("el-select"),A=qe("el-form-item"),M=qe("el-radio"),D=qe("el-radio-group"),U=qe("el-form"),j=qe("el-icon"),W=qe("el-button"),L=qe("el-dialog");return T(),V("div",null,[K(Kf),F("div",mse,[F("div",vse,le(i(t)("Environmental inspection")),1),F("div",gse,[a.showPortErrorPrompt?(T(),V("div",bse,[K(E,{closable:!1,center:"",type:"error"},{default:X(()=>[Ge(le(i(t)("Port error prompt 1"))+" ",1),F("a",yse,le(i(t)("Get started quickly")),1),Ge(" "+le(i(t)("Port error prompt 3")),1)]),_:1})])):te("",!0),K(ku,{name:"slide-bottom"},{default:X(()=>[(T(!0),V(Ve,null,bt(a.envCheckData,(P,x)=>(T(),V("div",{class:N(["table-item",x]),key:x+P.describe+P.state},[F("div",wse,[Ge(le(x.toString()=="npm_package_manager"?i(t)(x)+" "+_():i(t)(x))+" ",1),P.link&&P.link.length>0?(T(!0),V(Ve,{key:0},bt(P.link,(I,H)=>(T(),V("span",{key:H,title:I.title?I.title:"",onClick:G=>f(I),class:N(["label-need",I.type])},le(I.name),11,_se))),128)):te("",!0)]),F("div",Cse,[Ge(le(P.describe)+" ",1),F("img",{title:i(t)(a.stateTitle[P.state]),class:"data-state",src:s(P.state),alt:P.state},null,8,Sse)])],2))),128))]),_:1}),a.checkTypeIndex!="done"?(T(),V("div",kse,[F("div",Ese,le(i(t)("Checking installation environment")),1),F("div",Tse,[Ge(le(i(t)(a.checkType[a.checkTypeIndex]))+" ",1),F("img",{title:i(t)("Current execution to:")+i(t)(a.checkType[a.checkTypeIndex]),class:"data-state",src:ose,alt:i(t)(a.checkType[a.checkTypeIndex])},null,8,$se)])])):te("",!0),F("div",{class:N(["check-done",a.checkDoneIndex])},le(i(t)(a.checkDone[a.checkDoneIndex])),3),F("div",{class:N(["button",a.checkDoneIndex=="ok"?"pass":""]),onClick:d},le(i(t)("Step 2 site configuration")),3)])]),K(L,{modelValue:i(o).state.showStartDialog,"onUpdate:modelValue":S[3]||(S[3]=P=>i(o).state.showStartDialog=P),"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,"destroy-on-close":!0,class:"ba-terminal-dialog",title:i(t)("Ready to start"),center:""},{footer:X(()=>[K(W,{onClick:c,type:"primary",size:"large",round:""},{default:X(()=>[K(j,null,{default:X(()=>[K(i(D4))]),_:1}),F("span",Nse,le(i(t)("Start installation")),1)]),_:1})]),default:X(()=>[K(U,{onKeyup:Pt(c,["enter"]),class:"start-from","label-position":"left","label-width":"120px",model:a.startForm},{default:X(()=>[K(A,{label:i(t)("language")},{default:X(()=>[K(O,{onChange:u,class:"w100",modelValue:a.startForm.lang,"onUpdate:modelValue":S[0]||(S[0]=P=>a.startForm.lang=P)},{default:X(()=>[K($,{label:"中文简体",value:"zh-cn"}),K($,{label:"English",value:"en"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),K(A,{label:i(t)("NPM package manager")},{default:X(()=>[K(O,{class:"w100",modelValue:a.startForm.packageManager,"onUpdate:modelValue":S[1]||(S[1]=P=>a.startForm.packageManager=P)},{default:X(()=>[K($,{label:"npm",value:"npm"}),K($,{label:"cnpm",value:"cnpm"}),K($,{label:"pnpm"+i(t)("recommend"),value:"pnpm"},null,8,["label"]),K($,{label:"yarn"+i(t)("recommend"),value:"yarn"},null,8,["label"]),K($,{label:"ni",value:"ni"}),K($,{label:i(t)("I want to execute the command manually"),value:"none"},null,8,["label"])]),_:1},8,["modelValue"]),F("div",Ose,le(i(t)("The system has a Web terminal. Please select an installed or your favorite NPM package manager")),1)]),_:1},8,["label"]),K(A,{label:i(t)("Set NPM source")},{default:X(()=>[K(D,{modelValue:a.startForm.setNpmRegistry,"onUpdate:modelValue":S[2]||(S[2]=P=>a.startForm.setNpmRegistry=P),class:"ml-4"},{default:X(()=>[K(M,{label:i(t)("Use current source"),value:"none",size:"large"},null,8,["label"]),K(M,{label:i(t)("TaoBao"),value:"taobao",size:"large"},null,8,["label"]),K(M,{label:"NPM",value:"npm",size:"large"}),K(M,{label:i(t)("Tencent"),value:"tencent",size:"large"},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["onKeyup","model"])]),_:1},8,["modelValue","title"])])}}}),Mse=ui(Ise,[["__scopeId","data-v-e96f3865"]]),y$=e=>(Xd("data-v-efc9ce06"),e=e(),Jd(),e),Ase={class:"container"},Pse={class:"table-title"},Rse={key:0,class:"install-tips-box"},Lse={class:"install-tips"},xse=["alt"],Dse={class:"install-tips-title"},Fse={class:"install-tips-item"},Bse={class:"install-tips-item"},Vse={class:"change-route",href:"https://gitee.com/wonderful-code/buildadmin/issues",target:"_blank"},Hse={class:"table"},zse={key:0,class:"table-item-br"},jse={key:1,class:"table-column table-item"},Wse={key:0,class:"block-help"},Kse={class:"connecting-prompt"},Use={class:"footer-buttons"},qse={class:"phinx-fail-box"},Yse={class:"title"},Gse={class:"content-item"},Xse={class:"content-item"},Jse={class:"command"},Zse={class:"content-item"},Qse=y$(()=>F("div",{class:"command"},"php vendor/bin/phinx migrate",-1)),eie={class:"block-help"},tie={class:"content-item"},nie={class:"text"},oie=y$(()=>F("div",{class:"output-box"},[F("div",{class:"output"},"PS E:\\build-admin> php think migrate:run"),F("div",{class:"output mt10"},"== 20230620180908 Install: migrating"),F("div",{class:"output"},"== 20230620180908 Install: migrated 0.0165s"),F("div",{class:"output mt10"},"== 20230620180916 InstallData: migrating"),F("div",{class:"output"},"== 20230620180916 InstallData: migrated 0.0573s"),F("div",{class:"output mt10"},"All Done. Took 0.0898s")],-1)),rie={class:"block-help mt10"},aie={class:"command"},lie={class:"phinx-fail-footer-button"},sie=Y({__name:"config",setup(e){var t,n={hostname:"",username:"",password:"",hostport:""};const{t:o}=Bl(),r=ju(),a=ii(),l=R(),s=Et({formItem:{hostname:{label:o("Mysql database address"),value:"127.0.0.1",name:"hostname",type:"text"},username:{label:o("MySQL connection user name"),value:"root",name:"username",type:"text"},password:{label:o("MySQL connection password"),value:"",name:"password",type:"password"},hostport:{label:o("MySQL connection port number"),value:"3306",name:"hostport",type:"number"},database:{label:o("Mysql database name"),value:"",name:"database",type:"text",blockHelp:""},prefix:{label:o("MySQL data table prefix"),value:"ba_",name:"prefix",type:"text"},br1:{type:"br"},adminname:{label:o("Administrator user name"),value:"admin",name:"adminname",type:"text"},adminpassword:{label:o("Administrator password"),value:"",name:"adminpassword",type:"password",placeholder:o("Backend login password")},repeatadminpassword:{label:o("Duplicate administrator password"),value:"",name:"repeatadminpassword",type:"password"},br2:{type:"br"},sitename:{label:o("Site name"),value:"BuildAdmin",name:"sitename",type:"text"}},showFormItem:!1,showError:"",baseConfigSubmitState:!1,databaseCheck:"wait",databases:[],showInstallTips:!1,autoJumpSeconds:5,maximumCommandFailures:1,commandFailureCount:0,executionWebCommand:!0,execMigrateFail:!1,execMigrateIdx:0,rootPath:""}),u=async()=>{n={hostname:s.formItem.hostname.value,username:s.formItem.username.value,password:s.formItem.password.value,hostport:s.formItem.hostport.value,database:s.formItem.database.value},n.hostname&&n.username&&n.hostport&&(s.databaseCheck="connecting",await Dle(n).then(y=>{if(y.data.code==1)s.databaseCheck="connect-ok",s.databases=y.data.data.databases,s.formItem.database.value&&c.findDatabase(s.formItem.database.value);else throw s.databaseCheck="wait",s.databases=[],Cr({type:"error",message:y.data.msg,center:!0}),new Error(y.data.msg)}))},c={required:(y,_,b)=>_.value==""||!_.value?b(new Error(_.label+o("Required"))):b(),findDatabase:y=>{s.databaseCheck=="connect-ok"&&(y&&s.databases.indexOf(y)===-1?s.formItem.database.blockHelp=o("The entered database was not found!"):s.formItem.database.blockHelp="")},database:(y,_,b)=>(c.findDatabase(_.value),b()),connect:(y,_,b)=>{let w=!1;for(const S in n)n[S]!=s.formItem[S].value&&(w=!0);return w&&u(),b()},prefix:function(y,_,b){if(_.value){var w=new RegExp(/^[a-zA-Z][a-zA-Z0-9_]*$/i);if(!w.test(_.value))return b(new Error(o("The table prefix can only contain alphanumeric characters and underscores, and starts with a letter")))}return b()},adminname:function(y,_,b){return/^[a-zA-Z][a-zA-Z0-9_]{2,15}$/.test(_.value)?b():b(new Error(o("It is composed of letters, numbers and underscores, starting with letters (3-15 digits)")))},adminpassword:function(y,_,b){return/^(?!.*[&<>"'\n\r]).{6,32}$/.test(_.value)?b():b(new Error(o("Please enter the correct password")))},repeatadminpassword:function(y,_,b){return s.formItem.adminpassword.value&&_.value&&s.formItem.adminpassword.value!=_.value?b(new Error(o("Duplicate passwords do not match"))):b()}},f=Et({hostname:[{validator:c.required,trigger:"blur"}],username:[{validator:c.required,trigger:"blur"}],hostport:[{validator:c.required,trigger:"blur"}],database:[{validator:c.required,trigger:"blur"},{validator:c.database,trigger:"blur"}],prefix:[{validator:c.connect,trigger:"blur"},{validator:c.prefix,trigger:"blur"}],adminname:[{validator:c.required,trigger:"blur"},{validator:c.connect,trigger:"blur"},{validator:c.adminname,trigger:"blur"}],adminpassword:[{validator:c.required,trigger:"blur"},{validator:c.connect,trigger:"blur"},{validator:c.adminpassword,trigger:"blur"}],repeatadminpassword:[{validator:c.required,trigger:"blur"},{validator:c.repeatadminpassword,trigger:"blur"}],sitename:[{validator:c.required,trigger:"blur"}]}),d=y=>{window.open(y)},p=y=>{s.showError=y},m=()=>{a.addTask("migrate.run",!0,"",(y,_)=>{y==gt.Success?v():(s.execMigrateIdx=_,s.execMigrateFail=!0)})},v=()=>{s.execMigrateIdx&&a.delTask(s.execMigrateIdx),setTimeout(()=>{pw({type:"migrate",adminname:s.formItem.adminname.value,adminpassword:s.formItem.adminpassword.value,sitename:s.formItem.sitename.value}).then(()=>{h()})},1500)},h=()=>{if(s.execMigrateFail=!1,!s.executionWebCommand){s.showInstallTips=!1,r.setStep("manualInstall");return}a.toggle(!0),a.addTaskPM("web-install",!0,"",(y,_)=>{y==gt.Success?a.addTaskPM("web-build",!0,"",b=>{s.baseConfigSubmitState=!1,b==gt.Success?(pw({type:"web"}),a.toggle(!1),r.setStep("done")):b==gt.Failed&&g()}):y==gt.Failed&&(s.commandFailureCount{y&&(s.baseConfigSubmitState=!0,u().then(()=>{y.validate(_=>{if(_){let b={};for(const w in s.formItem)b=Object.assign(b,{[w]:s.formItem[w].value});Ble(b).then(w=>{w.data.code==1?(s.rootPath=w.data.data.rootPath,s.executionWebCommand=w.data.data.executionWebCommand,m()):(Cr({type:"error",message:w.data.msg,center:!0}),s.baseConfigSubmitState=!1)}).catch(()=>{s.baseConfigSubmitState=!1})}else s.baseConfigSubmitState=!1})}).catch(()=>{s.baseConfigSubmitState=!1}))};Fle().then(y=>{y.data.code==1?(s.rootPath=y.data.data.rootPath,s.showInstallTips=!y.data.data.executionWebCommand,s.executionWebCommand=y.data.data.executionWebCommand):y.data.code==0?Cr({type:"error",message:y.data.msg,center:!0,duration:0}):s.showInstallTips=!0});const g=()=>{a.toggle(!1),t=setInterval(()=>{s.autoJumpSeconds<=0?(clearInterval(t),r.setStep("manualInstall")):(s.autoJumpSeconds--,p(o("Manual Install 1")+o("Manual Install 2",{seconds:s.autoJumpSeconds})))},1e3)};return at(()=>{s.showFormItem=!0}),lr(()=>{clearInterval(t)}),(y,_)=>{const b=qe("el-input"),w=qe("el-form-item"),S=qe("el-button"),E=qe("el-alert"),$=qe("el-dialog");return T(),V(Ve,null,[F("div",null,[K(Kf),F("div",Ase,[F("div",Pse,le(i(o)("Site configuration")),1),s.showInstallTips?(T(),V("div",Rse,[F("div",Lse,[F("img",{class:"install-tips-close",onClick:_[0]||(_[0]=O=>s.showInstallTips=!1),src:b$,alt:i(o)("Close the prompt of completing unfinished matters manually")},null,8,xse),F("div",Dse,[F("span",null,le(i(o)("Install Tips Title 1")),1),F("span",{class:"change-route",onClick:_[1]||(_[1]=O=>i(r).setStep("check"))},le(i(o)("Back to previous page")),1),F("span",null,le(i(o)("Install Tips Title 2")),1)]),F("div",Fse,[Ge(le(i(o)("If you don't want to open the corresponding permission due to some security factors, please check "))+" ",1),F("span",{onClick:_[2]||(_[2]=O=>d("https://doc.buildadmin.com/guide/install/senior.html")),class:"change-route"},le(i(o)("how installation services ensure system security")),1)]),F("div",Bse,[Ge(le(i(o)("If you really can't adjust all the tests to pass, please "))+" ",1),F("a",Vse,le(i(o)("click to feed back to us")),1),Ge(" "+le(i(o)("continue installation")),1)])])])):te("",!0),F("div",Hse,[K(i(zS),{ref_key:"formRef",ref:l,"label-width":"150px",onKeyup:_[5]||(_[5]=Pt(O=>C(l.value),["enter"])),rules:f,model:s.formItem},{default:X(()=>[K(fn,{name:"slide-bottom"},{default:X(()=>[tt(F("div",{class:"table-column table-error"},le(s.showError),513),[[kt,s.showError]])]),_:1}),K(ku,{name:"slide-bottom"},{default:X(()=>[(T(!0),V(Ve,null,bt(s.formItem,(O,A)=>tt((T(),V("div",{key:A},[O.type=="br"?(T(),V("div",zse)):(T(),V("div",jse,[K(w,{prop:O.name,class:"table-label",label:O.label},{default:X(()=>[K(b,{placeholder:O.placeholder?O.placeholder:"",modelValue:O.value,"onUpdate:modelValue":M=>O.value=M,class:"table-input",type:O.type},null,8,["placeholder","modelValue","onUpdate:modelValue","type"]),O.blockHelp?(T(),V("div",Wse,le(O.blockHelp),1)):te("",!0)]),_:2},1032,["prop","label"])]))])),[[kt,s.showFormItem]])),128))]),_:1}),K(fn,{name:"slide-bottom"},{default:X(()=>[tt(F("div",null,[tt(F("div",Kse,[F("span",null,le(i(o)("Test connection to data server")),1)],512),[[kt,s.databaseCheck=="connecting"]]),F("div",Use,[K(S,{class:"button",onClick:_[3]||(_[3]=O=>i(r).setStep("check"))},{default:X(()=>[Ge(le(i(o)("Previous step")),1)]),_:1}),K(S,{type:"primary",class:"button",onClick:_[4]||(_[4]=O=>C(l.value)),loading:s.baseConfigSubmitState},{default:X(()=>[Ge(le(i(o)("Install now")),1)]),_:1},8,["loading"])])],512),[[kt,s.showFormItem]])]),_:1})]),_:1},8,["rules","model"])])])]),K($,{modelValue:s.execMigrateFail,"onUpdate:modelValue":_[6]||(_[6]=O=>s.execMigrateFail=O),top:"5vh","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,title:i(o)("Table migration failed")},{default:X(()=>[K(E,{title:i(o)("We use Phinx to manage the data table, which can version the data table"),closable:!1,center:"",type:"info"},null,8,["title"]),F("div",qse,[F("div",Yse,le(i(o)("Data table automatic migration failed, please manually migrate as follows:")),1),F("div",Gse,"1、"+le(i(o)("Open terminal (windows PowerShell)")),1),F("div",Xse,[F("div",null,"2、"+le(i(o)("Execute command")),1),F("div",Jse,"cd "+le(s.rootPath),1)]),F("div",Zse,[F("div",null,"3、"+le(i(o)("Execute command")),1),Qse,F("div",eie,le(i(o)("If the command fails to be executed, add sudo or press the error message")),1)]),F("div",tie,[F("div",null,"4、"+le(i(o)("Migration check")),1),F("div",nie,le(i(o)("When the command is executed successfully, the output is similar to:")),1),oie,F("div",rie,[Ge(le(i(o)("After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to "))+" ",1),F("span",aie,le(i(o)("continue install")),1)])])]),F("div",lie,[K(S,{type:"primary",onClick:v},{default:X(()=>[Ge(le(i(o)("continue install")),1)]),_:1})])]),_:1},8,["modelValue","title"])],64)}}}),iie=ui(sie,[["__scopeId","data-v-efc9ce06"]]),uie={class:"container"},cie={class:"table-title"},die={class:"done-box"},fie={class:"reload-tips"},pie={class:"text-warning"},hie={class:"done-button"},mie=Y({__name:"done",setup(e){const{t}=Bl(),n=window.location.protocol+"//"+window.location.host,o=Et({hideIndexUrl:"https://doc.buildadmin.com/guide/install/hideIndex.html",indexUrl:n+"/index.html/#/",adminUrl:n+"/index.html/#/admin"}),r=l=>{window.open(l)},a=()=>{window.localStorage.clear(),location.reload()};return(l,s)=>{const u=qe("el-alert"),c=qe("el-button");return T(),V("div",null,[K(Kf),F("div",uie,[F("div",cie,"✨ "+le(i(t)("Thanks for using buildadmin"))+" ✨",1),F("div",die,[F("div",null,le(i(t)("Background URL")),1),F("div",{onClick:s[0]||(s[0]=f=>r(o.adminUrl)),class:"admin-url"},le(o.adminUrl),1),F("div",fie,[Ge(le(i(t)("Need to reinstall the system?")),1),F("span",{class:"reload",onClick:a},le(i(t)("Please click on me")),1)])]),F("div",pie,[K(u,{closable:!1,center:"",title:i(t)("It is recommended to delete the root directory / public / install folder; This page is only visible on your device."),type:"error"},null,8,["title"])]),F("div",hie,[K(c,{onClick:s[1]||(s[1]=f=>r(o.hideIndexUrl)),type:"primary",plain:"",size:"large"},{default:X(()=>[Ge(le(i(t)("Hide index.html?")),1)]),_:1}),K(c,{onClick:s[2]||(s[2]=f=>r(o.indexUrl)),type:"primary",plain:"",size:"large"},{default:X(()=>[Ge(le(i(t)("Access foreground")),1)]),_:1}),K(c,{onClick:s[3]||(s[3]=f=>r(o.adminUrl)),type:"primary",size:"large"},{default:X(()=>[Ge(le(i(t)("Access background")),1)]),_:1})])])])}}}),vie=ui(mie,[["__scopeId","data-v-e1e72612"]]),Wu=e=>(Xd("data-v-292784ff"),e=e(),Jd(),e),gie={class:"container"},bie={class:"title"},yie={class:"content"},wie={class:"content-item"},_ie={class:"content-item"},Cie={class:"command"},Sie={class:"content-item"},kie=Wu(()=>F("div",{class:"command"},"npm install",-1)),Eie={class:"content-item"},Tie=Wu(()=>F("div",{class:"command"},"npm run build",-1)),$ie={class:"content-item"},Oie={class:"step-box"},Nie={class:"step"},Iie={class:"text-bold"},Mie={class:"step"},Aie=Wu(()=>F("span",{class:"text-bold"},"assets",-1)),Pie=Wu(()=>F("span",{class:"text-bold"},"index.html",-1)),Rie=Wu(()=>F("span",{class:"text-bold"},"public",-1)),Lie={class:"step"},xie={class:"min-help"},Die={key:0,class:"loading"},Fie={class:"reload-tips"},Bie=Y({__name:"index",setup(e){const{t}=Bl(),n=ju(),o=Et({showLoading:"",webPath:t("Getting full path of root directory / Web")}),r=s=>{window.open(s)},a=()=>{o.showLoading=t("Moving automatically"),Vle().then(s=>{s.data.code==1?n.setStep("done"):Cr({type:"error",message:s.data.msg,center:!0})}).finally(()=>{o.showLoading=""})};Hle().then(s=>{s.data.code==1?o.webPath=s.data.data.webPath:Cr({type:"error",message:s.data.msg,center:!0})});const l=()=>{window.localStorage.clear(),location.reload()};return(s,u)=>{const c=qe("el-alert");return T(),V("div",gie,[F("div",bie,le(i(t)("Unfinished matters manually")),1),F("div",yie,[K(c,{title:i(t)("Sorry, some operations could not be completed automatically You need to manually complete the outstanding matters according to the following guidance"),type:"error"},null,8,["title"]),F("div",wie,"1、"+le(i(t)("Open terminal (windows PowerShell)")),1),F("div",_ie,[F("div",null,"2、"+le(i(t)("Execute command")),1),F("div",Cie,"cd "+le(o.webPath),1)]),F("div",Sie,[F("div",null,"3、"+le(i(t)("Execute command")),1),kie,F("div",{onClick:u[0]||(u[0]=f=>r("https://doc.buildadmin.com/guide/install/npmInstallFail.html")),class:"block-help link"},le(i(t)("Execution failed?")),1)]),F("div",Eie,[F("div",null,"4、"+le(i(t)("Execute command")),1),Tie,F("div",{onClick:u[1]||(u[1]=f=>r("https://doc.buildadmin.com/guide/install/npmBuildFail.html")),class:"block-help link"},le(i(t)("Execution failed?")),1)]),F("div",$ie,[F("div",null,"5、"+le(i(t)("Move the built file to the specified location of the system")),1),F("div",{onClick:a,class:"block-help link size-15"},le(i(t)("Click to try to automatically move the build file")),1),F("div",Oie,[F("div",Nie,[Ge(" 1. "+le(i(t)("The build output directory is: site")),1),F("span",Iie,le(i(t)("root directory / dist")),1)]),F("div",Mie,[Ge(" 2. "+le(i(t)("Please move 1")),1),Aie,Ge(le(i(t)("Please move 2")),1),Pie,Ge(le(i(t)("Please move 3")),1),Rie,Ge(le(i(t)("Please move 4")),1)]),F("div",Lie,"3. "+le(i(t)("You can delete the build output directory directly")),1)]),F("div",xie,le(i(t)("During construction, all files in the output directory will be overwritten, so the system is designed to build in the root directory first, and then move to the public directory to prevent other files in the public from being overwritten")),1)]),o.showLoading?(T(),V("div",Die,le(o.showLoading),1)):te("",!0)]),F("div",Fie,[Ge(le(i(t)("Need to reinstall the system?")),1),F("span",{class:"reload",onClick:l},le(i(t)("Please click on me")),1)])])}}}),Vie=ui(Bie,[["__scopeId","data-v-292784ff"]]),Hie=Y({__name:"manualInstall",setup(e){return(t,n)=>(T(),V("div",null,[K(Kf),K(Vie)]))}}),zie={class:"ba-terminal"},jie=["src"],Wie=Y({__name:"App",setup(e){const t=ju(),n=ii(),{locale:o,getLocaleMessage:r}=Bl();var a=window.localStorage.getItem("ba-lang")||"zh-cn";o.value=a;const l=r(a);return at(()=>{n.init()}),(s,u)=>{const c=qe("el-badge"),f=qe("el-config-provider");return T(),re(f,{locale:i(l)},{default:X(()=>[i(t).state.step=="check"?(T(),re(Mse,{key:0})):te("",!0),i(t).state.step=="config"?(T(),re(iie,{key:1})):te("",!0),i(t).state.step=="done"?(T(),re(vie,{key:2})):te("",!0),i(t).state.step=="manualInstall"?(T(),re(Hie,{key:3})):te("",!0),K(Gle),F("div",zie,[K(c,{"is-dot":i(n).state.showDot},{default:X(()=>[F("img",{onClick:u[0]||(u[0]=d=>i(n).toggle()),class:"terminal-logo",draggable:"false",src:i(g$),alt:"BuildAdmin Logo"},null,8,jie)]),_:1},8,["is-dot"])])]),_:1},8,["locale"])}}});function Kie(e){Yie(e),qie(e),Uie(e)}function Uie(e){e.directive("blur",{mounted(t){t.addEventListener("focus",()=>{t.blur()})}})}function qie(e){e.directive("zoom",{mounted(t,n){if(!n.value)return!1;We(()=>{const o=document.querySelector(n.value),r=document.createElement("div");r.className="zoom-handle",r.onmouseenter=()=>{r.onmousedown=a=>{const l=a.clientX,s=a.clientY,u=o.offsetWidth,c=o.offsetHeight;document.onmousemove=f=>{f.preventDefault();const d=u+(f.clientX-l)*2,p=c+(f.clientY-s);o.style.width=`${d}px`,o.style.height=`${p}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}},o.appendChild(r)})}})}function Yie(e){e.directive("drag",{mounted(t,n){if(!n.value)return!1;const o=document.querySelector(n.value[0]),r=document.querySelector(n.value[1]);if(!r||!o)return!1;r.onmouseover=()=>r.style.cursor="move";function a(s,u){const c=u==="pc"?s.clientX-r.offsetLeft:s.touches[0].clientX-r.offsetLeft,f=u==="pc"?s.clientY-r.offsetTop:s.touches[0].clientY-r.offsetTop,d=document.body.clientWidth,p=document.body.clientHeight||document.documentElement.clientHeight,m=o.offsetWidth,v=o.offsetHeight,h=o.offsetLeft,C=d-o.offsetLeft-m,g=o.offsetTop,y=p-o.offsetTop-v;let _=getComputedStyle(o).left,b=getComputedStyle(o).top;return _.includes("%")?(_=+document.body.clientWidth*(+_.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(_=+_.replace(/\px/g,""),b=+b.replace(/\px/g,"")),{disX:c,disY:f,minDragDomLeft:h,maxDragDomLeft:C,minDragDomTop:g,maxDragDomTop:y,styL:_,styT:b}}function l(s,u,c){const{disX:f,disY:d,minDragDomLeft:p,maxDragDomLeft:m,minDragDomTop:v,maxDragDomTop:h,styL:C,styT:g}=c;let y=u==="pc"?s.clientX-f:s.touches[0].clientX-f,_=u==="pc"?s.clientY-d:s.touches[0].clientY-d;-y>p?y=-p:y>m&&(y=m),-_>v?_=-v:_>h&&(_=h),o.style.cssText+=`;left:${y+C}px;top:${_+g}px;`}r.onmousedown=s=>{const u=a(s,"pc");document.onmousemove=c=>{l(c,"pc",u)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},r.ontouchstart=s=>{const u=a(s,"app");document.ontouchmove=c=>{l(c,"app",u)},document.ontouchend=()=>{document.ontouchmove=null,document.ontouchend=null}}}})}function Gie(e){return typeof e=="object"&&e!==null}function hw(e,t){return e=Gie(e)?e:Object.create(null),new Proxy(e,{get(n,o,r){return o==="key"?Reflect.get(n,o,r):Reflect.get(n,o,r)||Reflect.get(t,o,r)}})}function Xie(e,t){return t.reduce((n,o)=>n==null?void 0:n[o],e)}function Jie(e,t,n){return t.slice(0,-1).reduce((o,r)=>/^(__proto__)$/.test(r)?{}:o[r]=o[r]||{},e)[t[t.length-1]]=n,e}function Zie(e,t){return t.reduce((n,o)=>{const r=o.split(".");return Jie(n,r,Xie(e,r))},{})}function mw(e,{storage:t,serializer:n,key:o,debug:r}){try{const a=t==null?void 0:t.getItem(o);a&&e.$patch(n==null?void 0:n.deserialize(a))}catch(a){r&&console.error(a)}}function vw(e,{storage:t,serializer:n,key:o,paths:r,debug:a}){try{const l=Array.isArray(r)?Zie(e,r):e;t.setItem(o,n.serialize(l))}catch(l){a&&console.error(l)}}function Qie(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:o=n},store:r}=t;if(!o)return;const a=(Array.isArray(o)?o.map(l=>hw(l,e)):[hw(o,e)]).map(({storage:l=localStorage,beforeRestore:s=null,afterRestore:u=null,serializer:c={serialize:JSON.stringify,deserialize:JSON.parse},key:f=r.$id,paths:d=null,debug:p=!1})=>{var m;return{storage:l,beforeRestore:s,afterRestore:u,serializer:c,key:((m=e.key)!=null?m:v=>v)(f),paths:d,debug:p}});r.$persist=()=>{a.forEach(l=>{vw(r.$state,l)})},r.$hydrate=({runHooks:l=!0}={})=>{a.forEach(s=>{const{beforeRestore:u,afterRestore:c}=s;l&&(u==null||u(t)),mw(r,s),l&&(c==null||c(t))})},a.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;s==null||s(t),mw(r,l),u==null||u(t),r.$subscribe((c,f)=>{vw(f,l)},{detached:!0})})}}var eue=Qie();const w$=TI();w$.use(eue);async function tue(){const e=iv(Wie);e.use(w$),e.use($o),e.use(xne,{i18n:$o.global.t}),Kie(e),e.mount("#app")}tue()});export default nue(); + */Object.defineProperty(Pr,"__esModule",{value:!0});var It=Zae,Rt=Qae,Me=Jg;const l$="9.2.2";let s$=It.CompileErrorCodes.__EXTEND_POINT__;const oo=()=>++s$,mn={UNEXPECTED_RETURN_TYPE:s$,INVALID_ARGUMENT:oo(),MUST_BE_CALL_SETUP_TOP:oo(),NOT_INSLALLED:oo(),NOT_AVAILABLE_IN_LEGACY_MODE:oo(),REQUIRED_VALUE:oo(),INVALID_VALUE:oo(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:oo(),NOT_INSLALLED_WITH_PROVIDE:oo(),UNEXPECTED_ERROR:oo(),NOT_COMPATIBLE_LEGACY_VUE_I18N:oo(),BRIDGE_SUPPORT_VUE_2_ONLY:oo(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:oo(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:oo(),__EXTEND_POINT__:oo()};function _n(e,...t){return It.createCompileError(e,null,void 0)}const $m=Me.makeSymbol("__transrateVNode"),Om=Me.makeSymbol("__datetimeParts"),Nm=Me.makeSymbol("__numberParts"),i$=Me.makeSymbol("__setPluralRules");Me.makeSymbol("__intlifyMeta");const u$=Me.makeSymbol("__injectWithOption"),ele="__VUE_I18N_BRIDGE__";function Im(e){if(!Me.isObject(e))return e;for(const t in e)if(Me.hasOwn(e,t))if(!t.includes("."))Me.isObject(e[t])&&Im(e[t]);else{const n=t.split("."),o=n.length-1;let r=e;for(let a=0;a{if("locale"in s&&"resource"in s){const{locale:u,resource:c}=s;u?(l[u]=l[u]||{},Hi(c,l[u])):Hi(c,l)}else Me.isString(s)&&Hi(JSON.parse(s),l)}),r==null&&a)for(const s in l)Me.hasOwn(l,s)&&Im(l[s]);return l}const kc=e=>!Me.isObject(e)||Me.isArray(e);function Hi(e,t){if(kc(e)||kc(t))throw _n(mn.INVALID_VALUE);for(const n in e)Me.hasOwn(e,n)&&(kc(e[n])||kc(t[n])?t[n]=e[n]:Hi(e[n],t[n]))}function tle(e){return e.type}function c$(e,t,n){let o=Me.isObject(t.messages)?t.messages:{};"__i18nGlobal"in n&&(o=jf(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(a=>{e.mergeLocaleMessage(a,o[a])});{if(Me.isObject(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(l=>{e.mergeDateTimeFormat(l,t.datetimeFormats[l])})}if(Me.isObject(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(l=>{e.mergeNumberFormat(l,t.numberFormats[l])})}}}function aw(e){return Rt.createVNode(Rt.Text,null,e,0)}let lw=0;function sw(e){return(t,n,o,r)=>e(n,o,Rt.getCurrentInstance()||void 0,r)}function ub(e={},t){const{__root:n}=e,o=n===void 0;let r=Me.isBoolean(e.inheritLocale)?e.inheritLocale:!0;const a=Rt.ref(n&&r?n.locale.value:Me.isString(e.locale)?e.locale:It.DEFAULT_LOCALE),l=Rt.ref(n&&r?n.fallbackLocale.value:Me.isString(e.fallbackLocale)||Me.isArray(e.fallbackLocale)||Me.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),s=Rt.ref(jf(a.value,e)),u=Rt.ref(Me.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),c=Rt.ref(Me.isPlainObject(e.numberFormats)?e.numberFormats:{[a.value]:{}});let f=n?n.missingWarn:Me.isBoolean(e.missingWarn)||Me.isRegExp(e.missingWarn)?e.missingWarn:!0,d=n?n.fallbackWarn:Me.isBoolean(e.fallbackWarn)||Me.isRegExp(e.fallbackWarn)?e.fallbackWarn:!0,p=n?n.fallbackRoot:Me.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,v=Me.isFunction(e.missing)?e.missing:null,h=Me.isFunction(e.missing)?sw(e.missing):null,C=Me.isFunction(e.postTranslation)?e.postTranslation:null,g=n?n.warnHtmlMessage:Me.isBoolean(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter;const _=n?n.modifiers:Me.isPlainObject(e.modifiers)?e.modifiers:{};let b=e.pluralRules||n&&n.pluralRules,w;w=(()=>{o&&It.setFallbackContext(null);const ce={version:l$,locale:a.value,fallbackLocale:l.value,messages:s.value,modifiers:_,pluralRules:b,missing:h===null?void 0:h,missingWarn:f,fallbackWarn:d,fallbackFormat:m,unresolving:!0,postTranslation:C===null?void 0:C,warnHtmlMessage:g,escapeParameter:y,messageResolver:e.messageResolver,__meta:{framework:"vue"}};ce.datetimeFormats=u.value,ce.numberFormats=c.value,ce.__datetimeFormatters=Me.isPlainObject(w)?w.__datetimeFormatters:void 0,ce.__numberFormatters=Me.isPlainObject(w)?w.__numberFormatters:void 0;const de=It.createCoreContext(ce);return o&&It.setFallbackContext(de),de})(),It.updateFallbackLocale(w,a.value,l.value);function E(){return[a.value,l.value,s.value,u.value,c.value]}const $=Rt.computed({get:()=>a.value,set:ce=>{a.value=ce,w.locale=a.value}}),O=Rt.computed({get:()=>l.value,set:ce=>{l.value=ce,w.fallbackLocale=l.value,It.updateFallbackLocale(w,a.value,ce)}}),A=Rt.computed(()=>s.value),M=Rt.computed(()=>u.value),D=Rt.computed(()=>c.value);function U(){return Me.isFunction(C)?C:null}function j(ce){C=ce,w.postTranslation=ce}function W(){return v}function L(ce){ce!==null&&(h=sw(ce)),v=ce,w.missing=h}const P=(ce,de,xe,he,He,et)=>{E();let rt;if(rt=ce(w),Me.isNumber(rt)&&rt===It.NOT_REOSLVED){const[wt,Ze]=de();return n&&p?he(n):He(wt)}else{if(et(rt))return rt;throw _n(mn.UNEXPECTED_RETURN_TYPE)}};function x(...ce){return P(de=>Reflect.apply(It.translate,null,[de,...ce]),()=>It.parseTranslateArgs(...ce),"translate",de=>Reflect.apply(de.t,de,[...ce]),de=>de,de=>Me.isString(de))}function I(...ce){const[de,xe,he]=ce;if(he&&!Me.isObject(he))throw _n(mn.INVALID_ARGUMENT);return x(de,xe,Me.assign({resolvedMessage:!0},he||{}))}function H(...ce){return P(de=>Reflect.apply(It.datetime,null,[de,...ce]),()=>It.parseDateTimeArgs(...ce),"datetime format",de=>Reflect.apply(de.d,de,[...ce]),()=>It.MISSING_RESOLVE_VALUE,de=>Me.isString(de))}function G(...ce){return P(de=>Reflect.apply(It.number,null,[de,...ce]),()=>It.parseNumberArgs(...ce),"number format",de=>Reflect.apply(de.n,de,[...ce]),()=>It.MISSING_RESOLVE_VALUE,de=>Me.isString(de))}function J(ce){return ce.map(de=>Me.isString(de)||Me.isNumber(de)||Me.isBoolean(de)?aw(String(de)):de)}const fe={normalize:J,interpolate:ce=>ce,type:"vnode"};function Te(...ce){return P(de=>{let xe;const he=de;try{he.processor=fe,xe=Reflect.apply(It.translate,null,[he,...ce])}finally{he.processor=null}return xe},()=>It.parseTranslateArgs(...ce),"translate",de=>de[$m](...ce),de=>[aw(de)],de=>Me.isArray(de))}function oe(...ce){return P(de=>Reflect.apply(It.number,null,[de,...ce]),()=>It.parseNumberArgs(...ce),"number format",de=>de[Nm](...ce),()=>[],de=>Me.isString(de)||Me.isArray(de))}function ke(...ce){return P(de=>Reflect.apply(It.datetime,null,[de,...ce]),()=>It.parseDateTimeArgs(...ce),"datetime format",de=>de[Om](...ce),()=>[],de=>Me.isString(de)||Me.isArray(de))}function ae(ce){b=ce,w.pluralRules=b}function Oe(ce,de){const xe=Me.isString(de)?de:a.value,he=q(xe);return w.messageResolver(he,ce)!==null}function we(ce){let de=null;const xe=It.fallbackWithLocaleChain(w,l.value,a.value);for(let he=0;he{r&&(a.value=ce,w.locale=ce,It.updateFallbackLocale(w,a.value,l.value))}),Rt.watch(n.fallbackLocale,ce=>{r&&(l.value=ce,w.fallbackLocale=ce,It.updateFallbackLocale(w,a.value,l.value))}));const Ce={id:lw,locale:$,fallbackLocale:O,get inheritLocale(){return r},set inheritLocale(ce){r=ce,ce&&n&&(a.value=n.locale.value,l.value=n.fallbackLocale.value,It.updateFallbackLocale(w,a.value,l.value))},get availableLocales(){return Object.keys(s.value).sort()},messages:A,get modifiers(){return _},get pluralRules(){return b||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(ce){f=ce,w.missingWarn=f},get fallbackWarn(){return d},set fallbackWarn(ce){d=ce,w.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(ce){p=ce},get fallbackFormat(){return m},set fallbackFormat(ce){m=ce,w.fallbackFormat=m},get warnHtmlMessage(){return g},set warnHtmlMessage(ce){g=ce,w.warnHtmlMessage=ce},get escapeParameter(){return y},set escapeParameter(ce){y=ce,w.escapeParameter=ce},t:x,getLocaleMessage:q,setLocaleMessage:B,mergeLocaleMessage:z,getPostTranslationHandler:U,setPostTranslationHandler:j,getMissingHandler:W,setMissingHandler:L,[i$]:ae};return Ce.datetimeFormats=M,Ce.numberFormats=D,Ce.rt=I,Ce.te=Oe,Ce.tm=ge,Ce.d=H,Ce.n=G,Ce.getDateTimeFormat=Z,Ce.setDateTimeFormat=ue,Ce.mergeDateTimeFormat=se,Ce.getNumberFormat=me,Ce.setNumberFormat=_e,Ce.mergeNumberFormat=$e,Ce[u$]=e.__injectWithOption,Ce[$m]=Te,Ce[Om]=ke,Ce[Nm]=oe,Ce}function nle(e){const t=Me.isString(e.locale)?e.locale:It.DEFAULT_LOCALE,n=Me.isString(e.fallbackLocale)||Me.isArray(e.fallbackLocale)||Me.isPlainObject(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Me.isFunction(e.missing)?e.missing:void 0,r=Me.isBoolean(e.silentTranslationWarn)||Me.isRegExp(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=Me.isBoolean(e.silentFallbackWarn)||Me.isRegExp(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=Me.isBoolean(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,u=Me.isPlainObject(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,f=Me.isFunction(e.postTranslation)?e.postTranslation:void 0,d=Me.isString(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,m=Me.isBoolean(e.sync)?e.sync:!0;let v=e.messages;if(Me.isPlainObject(e.sharedMessages)){const w=e.sharedMessages;v=Object.keys(w).reduce((E,$)=>{const O=E[$]||(E[$]={});return Me.assign(O,w[$]),E},v||{})}const{__i18n:h,__root:C,__injectWithOption:g}=e,y=e.datetimeFormats,_=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:v,flatJson:b,datetimeFormats:y,numberFormats:_,missing:o,missingWarn:r,fallbackWarn:a,fallbackRoot:l,fallbackFormat:s,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:d,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:m,__i18n:h,__root:C,__injectWithOption:g}}function Mm(e={},t){{const n=ub(nle(e)),o={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(r){},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return Me.isBoolean(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=Me.isBoolean(r)?!r:r},get silentFallbackWarn(){return Me.isBoolean(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=Me.isBoolean(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(r){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[a,l,s]=r,u={};let c=null,f=null;if(!Me.isString(a))throw _n(mn.INVALID_ARGUMENT);const d=a;return Me.isString(l)?u.locale=l:Me.isArray(l)?c=l:Me.isPlainObject(l)&&(f=l),Me.isArray(s)?c=s:Me.isPlainObject(s)&&(f=s),Reflect.apply(n.t,n,[d,c||f||{},u])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[a,l,s]=r,u={plural:1};let c=null,f=null;if(!Me.isString(a))throw _n(mn.INVALID_ARGUMENT);const d=a;return Me.isString(l)?u.locale=l:Me.isNumber(l)?u.plural=l:Me.isArray(l)?c=l:Me.isPlainObject(l)&&(f=l),Me.isString(s)?u.locale=s:Me.isArray(s)?c=s:Me.isPlainObject(s)&&(f=s),Reflect.apply(n.t,n,[d,c||f||{},u])},te(r,a){return n.te(r,a)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,a){n.setLocaleMessage(r,a)},mergeLocaleMessage(r,a){n.mergeLocaleMessage(r,a)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,a){n.setDateTimeFormat(r,a)},mergeDateTimeFormat(r,a){n.mergeDateTimeFormat(r,a)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,a){n.setNumberFormat(r,a)},mergeNumberFormat(r,a){n.mergeNumberFormat(r,a)},getChoiceIndex(r,a){return-1},__onComponentInstanceCreated(r){const{componentInstanceCreatedListener:a}=e;a&&a(r,o)}};return o}}const cb={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function ole({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>o=[...o,...Me.isArray(r.children)?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},{})}function d$(e){return Rt.Fragment}const Am={name:"i18n-t",props:Me.assign({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Me.isNumber(e)||!isNaN(e)}},cb),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||Wf({useScope:e.scope,__useComponent:!0});return()=>{const a=Object.keys(n).filter(d=>d!=="_"),l={};e.locale&&(l.locale=e.locale),e.plural!==void 0&&(l.plural=Me.isString(e.plural)?+e.plural:e.plural);const s=ole(t,a),u=r[$m](e.keypath,s,l),c=Me.assign({},o),f=Me.isString(e.tag)||Me.isObject(e.tag)?e.tag:d$();return Rt.h(f,c,u)}}};function rle(e){return Me.isArray(e)&&!Me.isString(e[0])}function f$(e,t,n,o){const{slots:r,attrs:a}=t;return()=>{const l={part:!0};let s={};e.locale&&(l.locale=e.locale),Me.isString(e.format)?l.key=e.format:Me.isObject(e.format)&&(Me.isString(e.format.key)&&(l.key=e.format.key),s=Object.keys(e.format).reduce((p,m)=>n.includes(m)?Me.assign({},p,{[m]:e.format[m]}):p,{}));const u=o(e.value,l,s);let c=[l.key];Me.isArray(u)?c=u.map((p,m)=>{const v=r[p.type],h=v?v({[p.type]:p.value,index:m,parts:u}):[p.value];return rle(h)&&(h[0].key=`${p.type}-${m}`),h}):Me.isString(u)&&(c=[u]);const f=Me.assign({},a),d=Me.isString(e.tag)||Me.isObject(e.tag)?e.tag:d$();return Rt.h(d,f,c)}}const Pm={name:"i18n-n",props:Me.assign({value:{type:Number,required:!0},format:{type:[String,Object]}},cb),setup(e,t){const n=e.i18n||Wf({useScope:"parent",__useComponent:!0});return f$(e,t,It.NUMBER_FORMAT_OPTIONS_KEYS,(...o)=>n[Nm](...o))}},Rm={name:"i18n-d",props:Me.assign({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},cb),setup(e,t){const n=e.i18n||Wf({useScope:"parent",__useComponent:!0});return f$(e,t,It.DATETIME_FORMAT_OPTIONS_KEYS,(...o)=>n[Om](...o))}};function ale(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function p$(e){const t=l=>{const{instance:s,modifiers:u,value:c}=l;if(!s||!s.$)throw _n(mn.UNEXPECTED_ERROR);const f=ale(e,s.$),d=iw(c);return[Reflect.apply(f.t,f,[...uw(d)]),f]};return{created:(l,s)=>{const[u,c]=t(s);Me.inBrowser&&e.global===c&&(l.__i18nWatcher=Rt.watch(c.locale,()=>{s.instance&&s.instance.$forceUpdate()})),l.__composer=c,l.textContent=u},unmounted:l=>{Me.inBrowser&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:s})=>{if(l.__composer){const u=l.__composer,c=iw(s);l.textContent=Reflect.apply(u.t,u,[...uw(c)])}},getSSRProps:l=>{const[s]=t(l);return{textContent:s}}}}function iw(e){if(Me.isString(e))return{path:e};if(Me.isPlainObject(e)){if(!("path"in e))throw _n(mn.REQUIRED_VALUE,"path");return e}else throw _n(mn.INVALID_VALUE)}function uw(e){const{path:t,locale:n,args:o,choice:r,plural:a}=e,l={},s=o||{};return Me.isString(n)&&(l.locale=n),Me.isNumber(r)&&(l.plural=r),Me.isNumber(a)&&(l.plural=a),[t,s,l]}function lle(e,t,...n){const o=Me.isPlainObject(n[0])?n[0]:{},r=!!o.useI18nComponentName;(Me.isBoolean(o.globalInstall)?o.globalInstall:!0)&&(e.component(r?"i18n":Am.name,Am),e.component(Pm.name,Pm),e.component(Rm.name,Rm)),e.directive("t",p$(t))}function sle(e,t,n){return{beforeCreate(){const o=Rt.getCurrentInstance();if(!o)throw _n(mn.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const a=r.i18n;r.__i18n&&(a.__i18n=r.__i18n),a.__root=t,this===this.$root?this.$i18n=cw(e,a):(a.__injectWithOption=!0,this.$i18n=Mm(a))}else r.__i18n?this===this.$root?this.$i18n=cw(e,r):this.$i18n=Mm({__i18n:r.__i18n,__injectWithOption:!0,__root:t}):this.$i18n=e;r.__i18nGlobal&&c$(t,r,r),e.__onComponentInstanceCreated(this.$i18n),n.__setInstance(o,this.$i18n),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$tc=(...a)=>this.$i18n.tc(...a),this.$te=(a,l)=>this.$i18n.te(a,l),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a)},mounted(){},unmounted(){const o=Rt.getCurrentInstance();if(!o)throw _n(mn.UNEXPECTED_ERROR);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__deleteInstance(o),delete this.$i18n}}}function cw(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[i$](t.pluralizationRules||e.pluralizationRules);const n=jf(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const h$=Me.makeSymbol("global-vue-i18n");function ile(e={},t){const n=Me.isBoolean(e.legacy)?e.legacy:!0,o=Me.isBoolean(e.globalInjection)?e.globalInjection:!0,r=n?!!e.allowComposition:!0,a=new Map,[l,s]=cle(e,n),u=Me.makeSymbol("");function c(p){return a.get(p)||null}function f(p,m){a.set(p,m)}function d(p){a.delete(p)}{const p={get mode(){return n?"legacy":"composition"},get allowComposition(){return r},async install(m,...v){m.__VUE_I18N_SYMBOL__=u,m.provide(m.__VUE_I18N_SYMBOL__,p),!n&&o&&yle(m,p.global),lle(m,p,...v),n&&m.mixin(sle(s,s.__composer,p));const h=m.unmount;m.unmount=()=>{p.dispose(),h()}},get global(){return s},dispose(){l.stop()},__instances:a,__getInstance:c,__setInstance:f,__deleteInstance:d};return p}}function Wf(e={}){const t=Rt.getCurrentInstance();if(t==null)throw _n(mn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw _n(mn.NOT_INSLALLED);const n=dle(t),o=ple(n),r=tle(t),a=fle(e,r);if(n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw _n(mn.NOT_AVAILABLE_IN_LEGACY_MODE);return vle(t,a,o,e)}if(a==="global")return c$(o,e,r),o;if(a==="parent"){let u=hle(n,t,e.__useComponent);return u==null&&(u=o),u}const l=n;let s=l.__getInstance(t);if(s==null){const u=Me.assign({},e);"__i18n"in r&&(u.__i18n=r.__i18n),o&&(u.__root=o),s=ub(u),mle(l,t),l.__setInstance(t,s)}return s}const ule=e=>{if(!(ele in e))throw _n(mn.NOT_COMPATIBLE_LEGACY_VUE_I18N);return e};function cle(e,t,n){const o=Rt.effectScope();{const r=t?o.run(()=>Mm(e)):o.run(()=>ub(e));if(r==null)throw _n(mn.UNEXPECTED_ERROR);return[o,r]}}function dle(e){{const t=Rt.inject(e.isCE?h$:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw _n(e.isCE?mn.NOT_INSLALLED_WITH_PROVIDE:mn.UNEXPECTED_ERROR);return t}}function fle(e,t){return Me.isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function ple(e){return e.mode==="composition"?e.global:e.global.__composer}function hle(e,t,n=!1){let o=null;const r=t.root;let a=t.parent;for(;a!=null;){const l=e;if(e.mode==="composition")o=l.__getInstance(a);else{const s=l.__getInstance(a);s!=null&&(o=s.__composer,n&&o&&!o[u$]&&(o=null))}if(o!=null||r===a)break;a=a.parent}return o}function mle(e,t,n){Rt.onMounted(()=>{},t),Rt.onUnmounted(()=>{e.__deleteInstance(t)},t)}function vle(e,t,n,o={}){const r=t==="local",a=Rt.shallowRef(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw _n(mn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const l=Me.isBoolean(o.inheritLocale)?o.inheritLocale:!0,s=Rt.ref(r&&l?n.locale.value:Me.isString(o.locale)?o.locale:It.DEFAULT_LOCALE),u=Rt.ref(r&&l?n.fallbackLocale.value:Me.isString(o.fallbackLocale)||Me.isArray(o.fallbackLocale)||Me.isPlainObject(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:s.value),c=Rt.ref(jf(s.value,o)),f=Rt.ref(Me.isPlainObject(o.datetimeFormats)?o.datetimeFormats:{[s.value]:{}}),d=Rt.ref(Me.isPlainObject(o.numberFormats)?o.numberFormats:{[s.value]:{}}),p=r?n.missingWarn:Me.isBoolean(o.missingWarn)||Me.isRegExp(o.missingWarn)?o.missingWarn:!0,m=r?n.fallbackWarn:Me.isBoolean(o.fallbackWarn)||Me.isRegExp(o.fallbackWarn)?o.fallbackWarn:!0,v=r?n.fallbackRoot:Me.isBoolean(o.fallbackRoot)?o.fallbackRoot:!0,h=!!o.fallbackFormat,C=Me.isFunction(o.missing)?o.missing:null,g=Me.isFunction(o.postTranslation)?o.postTranslation:null,y=r?n.warnHtmlMessage:Me.isBoolean(o.warnHtmlMessage)?o.warnHtmlMessage:!0,_=!!o.escapeParameter,b=r?n.modifiers:Me.isPlainObject(o.modifiers)?o.modifiers:{},w=o.pluralRules||r&&n.pluralRules;function S(){return[s.value,u.value,c.value,f.value,d.value]}const E=Rt.computed({get:()=>a.value?a.value.locale.value:s.value,set:z=>{a.value&&(a.value.locale.value=z),s.value=z}}),$=Rt.computed({get:()=>a.value?a.value.fallbackLocale.value:u.value,set:z=>{a.value&&(a.value.fallbackLocale.value=z),u.value=z}}),O=Rt.computed(()=>a.value?a.value.messages.value:c.value),A=Rt.computed(()=>f.value),M=Rt.computed(()=>d.value);function D(){return a.value?a.value.getPostTranslationHandler():g}function U(z){a.value&&a.value.setPostTranslationHandler(z)}function j(){return a.value?a.value.getMissingHandler():C}function W(z){a.value&&a.value.setMissingHandler(z)}function L(z){return S(),z()}function P(...z){return a.value?L(()=>Reflect.apply(a.value.t,null,[...z])):L(()=>"")}function x(...z){return a.value?Reflect.apply(a.value.rt,null,[...z]):""}function I(...z){return a.value?L(()=>Reflect.apply(a.value.d,null,[...z])):L(()=>"")}function H(...z){return a.value?L(()=>Reflect.apply(a.value.n,null,[...z])):L(()=>"")}function G(z){return a.value?a.value.tm(z):{}}function J(z,Z){return a.value?a.value.te(z,Z):!1}function ee(z){return a.value?a.value.getLocaleMessage(z):{}}function fe(z,Z){a.value&&(a.value.setLocaleMessage(z,Z),c.value[z]=Z)}function Te(z,Z){a.value&&a.value.mergeLocaleMessage(z,Z)}function oe(z){return a.value?a.value.getDateTimeFormat(z):{}}function ke(z,Z){a.value&&(a.value.setDateTimeFormat(z,Z),f.value[z]=Z)}function ae(z,Z){a.value&&a.value.mergeDateTimeFormat(z,Z)}function Oe(z){return a.value?a.value.getNumberFormat(z):{}}function we(z,Z){a.value&&(a.value.setNumberFormat(z,Z),d.value[z]=Z)}function ge(z,Z){a.value&&a.value.mergeNumberFormat(z,Z)}const q={get id(){return a.value?a.value.id:-1},locale:E,fallbackLocale:$,messages:O,datetimeFormats:A,numberFormats:M,get inheritLocale(){return a.value?a.value.inheritLocale:l},set inheritLocale(z){a.value&&(a.value.inheritLocale=z)},get availableLocales(){return a.value?a.value.availableLocales:Object.keys(c.value)},get modifiers(){return a.value?a.value.modifiers:b},get pluralRules(){return a.value?a.value.pluralRules:w},get isGlobal(){return a.value?a.value.isGlobal:!1},get missingWarn(){return a.value?a.value.missingWarn:p},set missingWarn(z){a.value&&(a.value.missingWarn=z)},get fallbackWarn(){return a.value?a.value.fallbackWarn:m},set fallbackWarn(z){a.value&&(a.value.missingWarn=z)},get fallbackRoot(){return a.value?a.value.fallbackRoot:v},set fallbackRoot(z){a.value&&(a.value.fallbackRoot=z)},get fallbackFormat(){return a.value?a.value.fallbackFormat:h},set fallbackFormat(z){a.value&&(a.value.fallbackFormat=z)},get warnHtmlMessage(){return a.value?a.value.warnHtmlMessage:y},set warnHtmlMessage(z){a.value&&(a.value.warnHtmlMessage=z)},get escapeParameter(){return a.value?a.value.escapeParameter:_},set escapeParameter(z){a.value&&(a.value.escapeParameter=z)},t:P,getPostTranslationHandler:D,setPostTranslationHandler:U,getMissingHandler:j,setMissingHandler:W,rt:x,d:I,n:H,tm:G,te:J,getLocaleMessage:ee,setLocaleMessage:fe,mergeLocaleMessage:Te,getDateTimeFormat:oe,setDateTimeFormat:ke,mergeDateTimeFormat:ae,getNumberFormat:Oe,setNumberFormat:we,mergeNumberFormat:ge};function B(z){z.locale.value=s.value,z.fallbackLocale.value=u.value,Object.keys(c.value).forEach(Z=>{z.mergeLocaleMessage(Z,c.value[Z])}),Object.keys(f.value).forEach(Z=>{z.mergeDateTimeFormat(Z,f.value[Z])}),Object.keys(d.value).forEach(Z=>{z.mergeNumberFormat(Z,d.value[Z])}),z.escapeParameter=_,z.fallbackFormat=h,z.fallbackRoot=v,z.fallbackWarn=m,z.missingWarn=p,z.warnHtmlMessage=y}return Rt.onBeforeMount(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw _n(mn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const z=a.value=e.proxy.$i18n.__composer;t==="global"?(s.value=z.locale.value,u.value=z.fallbackLocale.value,c.value=z.messages.value,f.value=z.datetimeFormats.value,d.value=z.numberFormats.value):r&&B(z)}),q}const gle=["locale","fallbackLocale","availableLocales"],ble=["t","rt","d","n","tm"];function yle(e,t){const n=Object.create(null);gle.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r)throw _n(mn.UNEXPECTED_ERROR);const a=Rt.isRef(r.value)?{get(){return r.value.value},set(l){r.value.value=l}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,o,a)}),e.config.globalProperties.$i18n=n,ble.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r||!r.value)throw _n(mn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,r)})}It.registerMessageCompiler(It.compileToFunction);It.registerMessageResolver(It.resolveValue);It.registerLocaleFallbacker(It.fallbackWithLocaleChain);Pr.DatetimeFormat=Rm;Pr.I18nInjectionKey=h$;Pr.NumberFormat=Pm;Pr.Translation=Am;Pr.VERSION=l$;Pr.castToVueI18n=ule;var wle=Pr.createI18n=ile,Bl=Pr.useI18n=Wf;Pr.vTDirective=p$;var _le={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const Cle={"Install BuildAdmin":"安装 BuildAdmin","Environmental inspection":"环境检查","Checking installation environment":"正在检查安装环境","Current execution to:":"当前执行到:","Step 2 site configuration":"第二步 站点配置","Environmental inspection passed":"环境检查通过","This environmental check failed":"此项环境检查未通过","The environment check failed, but the installation can continue":"环境检查为失败/未确认,但可以继续安装","Basic environment":"基础环境","NPM correlation":"NPM相关","Test npm install":"测试 npm install","Check complete":"检查完成","Congratulations, the installation can continue~":"恭喜,安装可以继续~","Sorry, the necessary installation environment conditions have not been met, please check the above form!":"抱歉,有必要的安装环境条件没有达成,请检查以上表格!","Network Timeout":"网络超时","Network connection error":"网络连接错误","The interface path cannot be found":"接口路径找不到了(404):{url}","unknown error":"未知错误",executing:"",php_version:"PHP 版本",config_is_writable:"配置目录是否可写",public_is_writable:"public 目录是否可写",php_pdo:"PHP pdo_mysql 扩展",php_safe_mode:"PHP安全模式",php_proc:"PHP 程序执行函数(proc)",php_gd2:"PHP gd2 或 freeType",npm_version:"NPM 版本",npm_package_manager:"包管理器",nodejs_version:"node.js 版本",error:"错误",success:"成功","test-npm-install":"测试 npm install","check npm install":"是否测试命令执行?","set-npm-registry":"设置NPM源","Set NPM source":"设置NPM源","Use current source":"使用当前源",recommend:"(推荐)",TaoBao:"淘宝",Tencent:"腾讯","Click to test":"点击进行测试","Can execute":"可以执行","Command execution test failed":"命令执行测试失败","PM is ready!":"npm包管理器已经准备好了!","already installed":"已安装","The installation can continue, and some operations need to be completed manually":"可以继续安装,部分操作需手动完成","Sorry, the automatic installation of package manager failed. Please complete the installation manually!":"抱歉,自动安装包管理器失败,请手动完成安装!","Click to see how to solve it":"点击查看如何解决","How to solve":"如何解决",terminal:"终端",narrow:"缩小",Connecting:"连接中...","No command":"无命令",executed:" 已执行","Waiting for execution":" 等待执行","Connection successful, executing":"连接成功 正在执行 ","Unfinished matters manually":"手动完成未尽事宜","Open terminal (windows PowerShell)":"打开您PC/服务器的终端(Windows PowerShell、cmd等)","Execute command":"执行命令","Execution failed?":"执行失败了?","Move the built file to the specified location of the system":"移动构建好的文件到系统指定位置","Click to try to automatically move the build file":"点击尝试自动移动构建文件","The build output directory is: site":"构建输出目录为:站点","root directory / dist":"根目录/web/dist","You can delete the build output directory directly":"您可以直接删除构建输出目录","Getting full path of root directory / Web":"正在获取 根目录/web 的完整路径","Moving automatically":"正在自动移动...","Please move 1":"请移动构建输出目录中的","Please move 2":"文件夹和","Please move 3":"文件到根目录的","Please move 4":"目录下","During construction, all files in the output directory will be overwritten, so the system is designed to build in the root directory first, and then move to the public directory to prevent other files in the public from being overwritten":"构建时,会覆盖输出目录的所有文件,所以系统设计为先构建,然后移动到public目录,以免public内的其他文件被覆盖掉","Thanks for using buildadmin":"感谢使用 BuildAdmin","Background URL":"后台地址","Access foreground":"访问前台","Access background":"访问后台","Install Tips Title 1":"安装环境检测并没有完全通过,但安装可以继续,只是您后续需要手动进行一些操作,建议您","Install Tips Title 2":",在所有检测通过后再安装,以便您体验到 BuildAdmin 的核心功能之一。","Back to previous page":"回到上一页","If you don't want to open the corresponding permission due to some security factors, please check ":"如果你考虑到一些安全因素而不愿开启相应权限,请查看","how installation services ensure system security":"安装服务如何保障系统安全","If you really can't adjust all the tests to pass, please ":"如果您确实无法将所有检测调整到通过状态,请","click to feed back to us":"点击向我们反馈","continue installation":",并继续安装,安装程序后续将引导您,如何手动完成未尽事宜。","Close the prompt of completing unfinished matters manually":"关闭手动完成未尽事宜提示","Test connection to data server":"测试连接数据服务器...","Install now":"立即安装","Mysql database address":"MySQL 数据库地址","MySQL connection user name":"MySQL 连接用户名","MySQL connection password":"MySQL 连接密码","MySQL connection port number":"MySQL 连接端口号","Mysql database name":"MySQL 数据库名","MySQL data table prefix":"MySQL 数据表前缀","Administrator user name":"管理员用户名","Administrator password":"管理员密码","Duplicate administrator password":"重复管理员密码","Site name":"站点名称","Site configuration":"站点配置","The entered database was not found!":"数据表不存在,安装时将自动建立!","Duplicate passwords do not match":"重复密码不匹配","Command execution failed":"命令执行失败",Installing:"正在安装...","After installation, please complete the unfinished matters manually":"安装完成,请手动完成未尽事宜","Automatically executing the build command on the web side":"正在自动执行 WEB端的 构建命令","Installation complete":"安装完成...","The table prefix can only contain alphanumeric characters and underscores, and starts with a letter":"表前缀只能包含字母数字和下划线,并以字母开头","Manual Install 1":"命令自动执行失败,请手动完成未尽事宜,","Manual Install 2":"{seconds}秒 后自动跳转到操作引导页面...",Retry:"重试",delete:"删除",Confirm:"确认",Cancel:"取消","Request timeout!":"请求超时!","Server internal error!":"服务器内部错误!","The service is temporarily unavailable. Please try again later!":"服务暂时无法访问,请稍后再试!","Abnormal problem, please contact the website administrator!":"异常问题,请联系网站管理员!","You're disconnected!":"您断网了!",Required:"必填","Please enter the correct password":`密码要求6到32位,不能包含 & < > " '`,"It is composed of letters, numbers and underscores, starting with letters (3-15 digits)":"由字母、数字、下划线组成,以字母开头(3-15位)","It is recommended to delete the root directory / public / install folder; This page is only visible on your device.":"建议删除: 根目录/public/install 文件夹;本页仅在您的设备上可见。","Switch package manager":"切换包管理器","Please select package manager":"请选择包管理器","Switch package manager title":"只读WEB终端,可以在CRUD等操作后方便的执行 npm install、npm build 等命令,请在下方选择一个已安装好或您喜欢的的 NPM 包管理器","I want to execute the command manually":"我想手动执行命令",Reminder:"温馨提醒","Ready to start":"准备开始",language:"语言","NPM package manager":"NPM包管理器","The system has a Web terminal. Please select an installed or your favorite NPM package manager":"系统拥有WEB终端,请选择一个已安装好或您喜欢的的NPM包管理器","Start installation":"开始安装","Setup will restart. Are you sure you want to switch package manager?":"将重新开始安装程序,请确定要切换包管理器吗?","None - manual execution":"无-手动执行","Previous step":"上一步","Hide index.html?":"隐藏 index.html?","Sorry, some operations could not be completed automatically You need to manually complete the outstanding matters according to the following guidance":"抱歉,一些操作未能自动完成,需要您根据以下引导手动完成未尽事宜。","Need to reinstall the system?":"需重新安装系统?","Please click on me":"请点击我","Backend login password":"后台登录密码","Port error prompt 1":"当前安装程序站点的端口不是8000,您可能以错误的方式启动了安装服务,请参考","Get started quickly":"快速上手文档","Port error prompt 3":"进行安装。","Table migration failed":"数据表迁移失败","We use Phinx to manage the data table, which can version the data table":"我们使用`Phinx`管理数据表,它可以对数据表进行版本化管理。","Data table automatic migration failed, please manually migrate as follows:":"数据表自动迁移失败了,请按以下方法手动迁移:","If the command fails to be executed, add sudo or press the error message":"若命令执行失败,请尝试加 sudo,或按报错解决即可","Migration check":"迁移检查","When the command is executed successfully, the output is similar to:":"命令执行成功时,输出类似于:","After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to ":"命令执行成功后,数据库内将自动建立多个数据表,然后请您点击下方的","continue install":"继续安装"},Sle={"Install BuildAdmin":"Install BuildAdmin","Environmental inspection":"Environmental inspection","Checking installation environment":"Checking the installation environment","Current execution to:":"Current execution to:","Step 2 site configuration":"Step 2 site configuration","Environmental inspection passed":"Environmental inspection passed","This environmental check failed":"This environmental inspection was not passed.","The environment check failed, but the installation can continue":"Environment check failed/unconfirmed, but you can continue to install.","Basic environment":"Basic Environment","NPM correlation":"NPM correlation","Test npm install":"Test npm install","Check complete":"Check complete","Congratulations, the installation can continue~":"Congratulations, the installation can continue~","Sorry, the necessary installation environment conditions have not been met, please check the above form!":"Sorry, the necessary installation environmental conditions have not been met, please check the above form!","Network Timeout":"Network timeout","Network connection error":"Network connection error","The interface path cannot be found":"The interface path cannot be found(404):{url}","unknown error":"Unknown error",executing:"",php_version:"PHP Version",config_is_writable:"Is the configuration directory writable?",public_is_writable:"Is the public directory writable?",php_pdo:"PHP pdo_mysql extension",php_safe_mode:"PHP security mode",php_proc:"PHP proc_open and proc_close permission",php_gd2:"PHP gd2 or freeType extensions",npm_version:"NPM Version",npm_package_manager:"NPM package manager",nodejs_version:"node.js Version",error:"error",success:"success","test-npm-install":"Test npm install","check npm install":"Whether to test command execution?","set-npm-registry":"Set NPM source","Set NPM source":"Set NPM source","Use current source":"Use the current source",recommend:"(Recommend)",TaoBao:"TaoBao","Click to test":"Click to test","Can execute":"Can be executed","Command execution test failed":"Command execution test failed","PM is ready!":"The NPM package manager is ready!","already installed":"Already installed","The installation can continue, and some operations need to be completed manually":"You can continue the installation, and some operations need to be completed manually.","Sorry, the automatic installation of package manager failed. Please complete the installation manually!":"Sorry, the automatic installation of the package manager failed. Please complete the installation manually!","Click to see how to solve it":"Click to see how to solve it","How to solve":"How to solve",terminal:"Terminal",narrow:"Narrow",Connecting:"Connecting...","No command":"No command",executed:" Executed","Waiting for execution":" Waiting for execution","Connection successful, executing":"Connection successful, executing ","Unfinished matters manually":"Complete unfinished matters manually","Open terminal (windows PowerShell)":"Open the terminal of your PC/Server (PowerShell, cmd)","Execute command":"Execute the command","Execution failed?":"Failed execution?","Move the built file to the specified location of the system":"Move the built file to the specified location on the system.","Click to try to automatically move the build file":"Click to try to move the build file automatically","The build output directory is: site":"Build the output directory as: site","root directory / dist":"root directory/web/dist","You can delete the build output directory directly":"You can delete the build output directory directly","Getting full path of root directory / Web":"Getting the full path to the root directory/web","Moving automatically":"Moving automatically","Please move 1":"Please move the ","Please move 2":" folder and ","Please move 3":" files from the build output directory to the ","Please move 4":" directory of the root directory.","During construction, all files in the output directory will be overwritten, so the system is designed to build in the root directory first, and then move to the public directory to prevent other files in the public from being overwritten":"When constructing the process, all files in the output directory are overwriting, so the system is designed to build first and then move to the public directory to prevent overwriting other files in the public directory","Thanks for using buildadmin":"Thanks for using BuildAdmin","Background URL":"Background URL","Access foreground":"Access to the foreground","Access background":"Access to the background","Install Tips Title 1":"The installation environment test does not completely passed, but the installation can continue, and you need to do some manual operations to see how to modify it.It is recommended that you go ","Install Tips Title 2":" and install it after all the tests have passed so that you can experience one of the core functions of BuildAdmin.","Back to previous page":"back to previous page","If you don't want to open the corresponding permission due to some security factors, please check ":"If you don't want to open the corresponding permission due to some security factors, please check ","how installation services ensure system security":"how installation services ensure system security","If you really can't adjust all the tests to pass, please ":"If you really can't adjust all the tests to pass, please ","click to feed back to us":"click to feed back to us","continue installation":" and continue the installation. The subsequent installation program will guide you on how to manually complete the outstanding matters.","Close the prompt of completing unfinished matters manually":"Close the prompt of completing unfinished matters manually","Test connection to data server":"Test connection to data server","Install now":"Install now","Mysql database address":"Mysql database address","MySQL connection user name":"MySQL connection username","MySQL connection password":"MySQL connection password","MySQL connection port number":"MySQL connection port number","Mysql database name":"Mysql database name","MySQL data table prefix":"MySQL data table prefix","Administrator user name":"Administrator username","Administrator password":"Administrator password","Duplicate administrator password":"Duplicate administrator password","Site name":"Site Name","Site configuration":"Site Configuration","The entered database was not found!":"The data table does not exist and will be created automatically during installation","Duplicate passwords do not match":"Duplicate passwords mismatch","Command execution failed":"Command execution failed",Installing:"Installing","After installation, please complete the unfinished matters manually":"Installation is complete, please complete the unfinished matters manually.","Automatically executing the build command on the web side":"Automatically executing the build command on the web side","Installation complete":"Installation completed","The table prefix can only contain alphanumeric characters and underscores, and starts with a letter":"The table prefix can only contain alphanumeric characters and underscores, and starts with letters","Manual Install 1":"Failed to execute Command automatically. Please complete the unfinished matters manually.","Manual Install 2":"Automatically jump to the operation boot page after {seconds} seconds...",Retry:"Retry",delete:"Delete",Confirm:"Confirm",Cancel:"Cancel","Request timeout!":"Request timeout!","Server internal error!":"Internal server error!","The service is temporarily unavailable. Please try again later!":"The service is temporarily unavailable. Please try again later!","Abnormal problem, please contact the website administrator!":"Abnormal problem, please contact the website administrator!","You're disconnected!":"You're disconnected!",Required:"Required","Please enter the correct password":`The password requires 6 to 32 bits and cannot contain & < > " '`,"It is composed of letters, numbers and underscores, starting with letters (3-15 digits)":"Composed of letters, numbers and underscores, start with letters (3-15 digits)","It is recommended to delete the root directory / public / install folder; This page is only visible on your device.":"It is recommended to delete the root directory / public / install folder; This page is only visible on your device.","Switch package manager":"Switch package manager","Please select package manager":"Please select the package manager","Switch package manager title":"Read-only Web terminal, you can easily execute NPM install, NPM builds, and other commands after crud and other operations. Please select an installed or your favorite NPM package manager below","I want to execute the command manually":"I want to execute the command manually",Reminder:"Reminder","Ready to start":"Ready to start",language:"Language","NPM package manager":"NPM package manager","The system has a Web terminal. Please select an installed or your favorite NPM package manager":"The system has a Web terminal. Please select an installed or your favorite NPM package manager","Start installation":"Start installation","Setup will restart. Are you sure you want to switch package manager?":"The install will restart. Are you sure you want to switch the package manager?","None - manual execution":"None - manual execution","Previous step":"Previous step","Hide index.html?":"Hide index.html?","Sorry, some operations could not be completed automatically You need to manually complete the outstanding matters according to the following guidance":"Sorry, some operations could not be completed automatically. You need to outstanding matters according to the following guidance manually.","Need to reinstall the system?":"Need to reinstall the system?","Please click on me":"Please click on me","Backend login password":"Backend login password","Port error prompt 1":"The current installation site port is not 8000. You may have started the installation service in the wrong way. Please refer to the","Get started quickly":" Quick Start documentation ","Port error prompt 3":" for installation.","Table migration failed":"Table migration failed","We use Phinx to manage the data table, which can version the data table":"We use 'Phinx' to manage the data table, which can version the data table","Data table automatic migration failed, please manually migrate as follows:":"Data table automatic migration failed, please manually migrate as follows:","If the command fails to be executed, add sudo or press the error message":"If the command fails to be executed, add sudo or press the error message","Migration check":"Migration check","When the command is executed successfully, the output is similar to:":"When the command is executed successfully, the output is similar to:","After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to ":"After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to ","continue install":"continue the installation"},dw={"zh-cn":fw(Object.assign({"./pages/zh-cn/terminal.ts":Joe}),"zh-cn"),en:fw(Object.assign({"./pages/en/terminal.ts":Qoe}),"en")},kle={"zh-cn":{...Cle,..._le,...dw["zh-cn"]},en:{...Sle,...oS,...dw.en}},$o=wle({locale:"zh-cn",legacy:!1,fallbackLocale:"en",messages:kle});function fw(e,t){const n={};for(const o in e)if(e[o].default){const r=o.slice(o.lastIndexOf(t)+(t.length+1),o.lastIndexOf("."));if(r.indexOf("/")>0){const a=r.split("/");for(const l in a)typeof n[a[l]]>"u"&&(n[a[l]]=[]);a.length==2?n[a[0]][a[1]]=Ec(e[o].default):a.length==3?n[a[0]][a[1]][a[2]]=Ec(e[o].default):n[r]=Ec(e[o].default)}else n[r]=Ec(e[o].default)}return n}function Ec(e){const t=[];for(const n in e)if(n.indexOf(".")>0){const o=n.split(".");typeof t[o[0]]>"u"?t[o[0]]=[]:t[o[0]][o[1]]=e[n]}else t[n]=e[n];return t}const Ele=window.localStorage.getItem("ba-lang")||"zh-cn",m$=()=>window.location.protocol+"//"+window.location.host,Rr=Nn.create({baseURL:m$(),timeout:1e3*10,headers:{"Content-Type":"application/json","think-lang":Ele}});Rr.interceptors.response.use(e=>e,e=>(Tle(e),Promise.reject(e)));function Tle(e){let t="";if(e&&e.response)switch(e.response.status){case 404:t=$o.global.t("The interface path cannot be found",{url:e.response.config.url});break;case 408:t=$o.global.t("Request timeout!");break;case 500:t=$o.global.t("Server internal error!");break;case 504:t=$o.global.t("The service is temporarily unavailable. Please try again later!");break;default:t=$o.global.t("Abnormal problem, please contact the website administrator!");break}e.message.includes("timeout")&&(t=$o.global.t("Network Timeout")),e.message.includes("Network Error")&&(t=$o.global.t("Network connection error")),e.message.includes("Network")&&(t=window.navigator.onLine?$o.global.t("Abnormal problem, please contact the website administrator!"):$o.global.t("You're disconnected!")),t||(t=$o.global.t("unknown error")),Cr({type:"error",message:t,center:!0})}const na="/index.php",$le=na+"/api/install/envBaseCheck",Ole=na+"/api/install/envNpmCheck",Nle=na+"/api/install/testDatabase",v$=na+"/api/install/baseConfig",Ile=na+"/api/install/commandExecComplete",Mle=na+"/api/install/mvDist",Ale=na+"/api/install/manualInstall",Ple=na+"/api/install/terminal",Rle=na+"/api/install/changePackageManager",Lle=()=>Rr.get($le),xle=()=>{const e=ii();return Rr.post(Ole,{manager:e.state.packageManager})},Dle=e=>Rr.post(Nle,e),Fle=()=>Rr.get(v$),Ble=e=>Rr.post(v$,e),pw=e=>Rr.post(Ile,e).then(t=>{t.data.code!=1&&Cr({type:"error",message:t.data.msg,center:!0})}),Ua=e=>{const t=ii();Rr.post(Rle,{manager:e}).then(n=>{n.data.code==1?t.changePackageManager(n.data.data.manager):n.data.msg&&Cr({type:"error",message:n.data.msg,center:!0})})},Vle=()=>Rr.post(Mle),Hle=()=>Rr.get(Ale),zle=(e,t,n)=>m$()+Ple+"?command="+e+"&uuid="+t+"&extend="+n,gt={Waiting:0,Connecting:1,Executing:2,Success:3,Failed:4,Unknown:5},ju=Y_("common",()=>{const e=Et({step:"check",showStartDialog:!0});function t(o){e.step=o}function n(o){e.showStartDialog=o}return{state:e,setStep:t,toggleStartDialog:n}},{persist:{key:AI}}),ii=Y_("terminal",()=>{const e=Et({show:!1,showDot:!1,taskList:[],packageManager:"pnpm",showPackageManagerDialog:!1});function t(){for(const b in e.taskList)(e.taskList[b].status==gt.Connecting||e.taskList[b].status==gt.Executing)&&(e.taskList[b].status=gt.Unknown)}function n(b=!e.show){e.show=b,b&&o(!1)}function o(b=!e.showDot){e.showDot=b}function r(b=!e.showPackageManagerDialog){n(!b),e.showPackageManagerDialog=b}function a(b){e.packageManager=b}function l(b,w){e.taskList[b]&&(e.taskList[b].status=w,(w==gt.Failed||w==gt.Unknown)&&e.taskList[b].blockOnFailure&&u(b,!0))}function s(b){if(!e.taskList[b]||typeof e.taskList[b].callback!="function")return;const w=e.taskList[b].status;if(w==gt.Failed||w==gt.Unknown)e.taskList[b].callback(gt.Failed,b);else if(w==gt.Success&&(e.taskList[b].callback(gt.Success,b),e.taskList[b].command=="web-build."+e.packageManager)){const S=ju();S.state.step=="manualInstall"&&(n(!1),S.setStep("done"))}}function u(b,w=!e.taskList[b].showMessage){e.taskList[b].showMessage=w}function c(b,w){e.show||o(!0),e.taskList[b].message=e.taskList[b].message.concat(w),We(()=>{_(e.taskList[b].uuid)})}function f(b,w=!0,S="",E=()=>{}){if(e.taskList.some(T=>T.command===b&&(T.status===gt.Waiting||T.status===gt.Connecting||T.status===gt.Executing)))return;e.show||o(!0),e.taskList=e.taskList.concat({uuid:LI(),createtime:RI(),status:gt.Waiting,command:b,message:[],showMessage:!1,blockOnFailure:w,extend:S,callback:E}),m()}function d(b,w=!0,S="",E=()=>{}){f(b+"."+e.packageManager,w,S,E)}function p(b){e.taskList[b].status!=gt.Connecting&&e.taskList[b].status!=gt.Executing&&e.taskList.splice(b,1),m()}function m(){let b=null;for(const w in e.taskList){if(e.taskList[w].status==gt.Waiting){b=parseInt(w);break}if(e.taskList[w].status==gt.Connecting||e.taskList[w].status==gt.Executing)break;if(e.taskList[w].status!=gt.Success&&(e.taskList[w].status==gt.Failed||e.taskList[w].status==gt.Unknown)){if(e.taskList[w].blockOnFailure)break;continue}}b!==null&&(l(b,gt.Connecting),v(b))}function v(b){window.eventSource=new EventSource(zle(e.taskList[b].command,e.taskList[b].uuid,e.taskList[b].extend)),window.eventSource.onmessage=function(w){const S=JSON.parse(w.data);if(!S||!S.data)return;const E=g(S.uuid);E!==!1&&(S.data=="command-exec-error"?(l(E,gt.Failed),window.eventSource.close(),s(E),m()):S.data=="command-exec-completed"?(window.eventSource.close(),e.taskList[E].status!=gt.Success&&l(E,gt.Failed),s(E),m()):S.data=="command-link-success"?l(E,gt.Executing):S.data=="command-exec-success"?l(E,gt.Success):c(E,S.data))},window.eventSource.onerror=function(){window.eventSource.close();const w=y(b);w!==!1&&(l(w,gt.Failed),s(w))}}function h(b){e.taskList[b].message=[],l(b,gt.Waiting),m()}function C(){e.taskList=e.taskList.filter(b=>b.status!=gt.Success)}function g(b){for(const w in e.taskList)if(e.taskList[w].uuid==b)return parseInt(w);return!1}function y(b){if(e.taskList[b])return b;{let w=-1;for(const S in e.taskList)(e.taskList[S].status==gt.Connecting||e.taskList[S].status==gt.Executing)&&(w=parseInt(S));return w===-1?!1:w}}function _(b){const w=document.querySelector(".exec-message-"+b);w&&w.scrollHeight&&(w.scrollTop=w.scrollHeight)}return{state:e,init:t,toggle:n,toggleDot:o,setTaskStatus:l,setTaskShowMessage:u,addTaskMessage:c,addTask:f,addTaskPM:d,delTask:p,startTask:m,retryTask:h,clearSuccessTask:C,togglePackageManagerDialog:r,changePackageManager:a}},{persist:{key:PI}}),jle={class:"command"},Wle={class:"task-opt"},Kle=["onClick"],Ule={class:"indent-2"},qle={class:"package-manager-dialog-footer"},Yle=Y({__name:"index",setup(e){const{t}=Bl(),n=ii(),o=l=>{let s=t("terminal.unknown"),u="info";switch(l){case gt.Waiting:s=t("terminal.Waiting for execution"),u="info";break;case gt.Connecting:s=t("terminal.Connecting"),u="warning";break;case gt.Executing:s=t("terminal.Executing"),u="warning";break;case gt.Success:s=t("terminal.Successful execution"),u="success";break;case gt.Failed:s=t("terminal.Execution failed"),u="danger";break;case gt.Unknown:s=t("terminal.Unknown execution result"),u="danger";break}return{statusText:s,statusType:u}},r=()=>{bm.confirm(t("terminal.Are you sure you want to republish?"),t("Reminder"),{confirmButtonText:t("Confirm"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{n.addTaskPM("web-build")})},a=()=>{bm.confirm(t("Setup will restart. Are you sure you want to switch package manager?"),t("Reminder"),{confirmButtonText:t("Confirm"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{window.localStorage.clear(),location.reload()})};return(l,s)=>{const u=qe("el-tag"),c=qe("el-button"),f=qe("el-icon"),d=qe("el-card"),p=qe("el-timeline-item"),m=qe("el-timeline"),v=qe("el-empty"),h=qe("el-button-group"),C=qe("el-dialog"),g=qs("blur");return T(),V(Ve,null,[K(C,mt(l.$attrs,{modelValue:i(n).state.show,"onUpdate:modelValue":s[5]||(s[5]=y=>i(n).state.show=y),title:i(t)("terminal.Terminal")+" - "+i(n).state.packageManager,class:"ba-terminal-dialog","append-to-body":!0,"close-on-click-modal":!1}),{default:X(()=>[i(n).state.taskList.length?(T(),re(m,{key:0},{default:X(()=>[(T(!0),V(Ve,null,bt(i(n).state.taskList,(y,_)=>(T(),re(p,{key:_,class:N(["task-item","task-status-"+y.status]),type:o(y.status).statusType,center:"",timestamp:y.createtime,placement:"top"},{default:X(()=>[K(d,null,{default:X(()=>[F("div",null,[K(u,{type:o(y.status).statusType},{default:X(()=>[Ge(le(o(y.status).statusText),1)]),_:2},1032,["type"]),(y.status==i(gt).Failed||y.status==i(gt).Unknown)&&y.blockOnFailure?(T(),re(u,{key:0,class:"block-on-failure-tag",type:"warning"},{default:X(()=>[Ge(le(i(t)("terminal.Failure to execute this command will block the execution of the queue")),1)]),_:1})):te("",!0),y.status==i(gt).Connecting||y.status==i(gt).Executing?(T(),re(u,{key:1,class:"block-on-failure-tag",type:"danger"},{default:X(()=>[Ge(le(i(t)("terminal.Do not refresh the browser")),1)]),_:1})):te("",!0),F("span",jle,le(y.command),1),F("div",Wle,[y.status==i(gt).Failed||y.status==i(gt).Unknown?tt((T(),re(c,{key:0,title:i(t)("Retry"),size:"small",type:"warning",icon:i(XC),circle:"",onClick:b=>i(n).retryTask(_)},null,8,["title","icon","onClick"])),[[g]]):te("",!0),tt(K(c,{onClick:b=>i(n).delTask(_),title:i(t)("delete"),size:"small",type:"danger",icon:i(YC),circle:""},null,8,["onClick","title","icon"]),[[g]])])]),y.status!=i(gt).Waiting?(T(),V(Ve,{key:0},[y.status!=i(gt).Connecting&&y.status!=i(gt).Executing?(T(),V("div",{key:0,onClick:b=>i(n).setTaskShowMessage(_),class:"toggle-message-display"},[F("span",null,le(i(t)("terminal.Command run log")),1),K(f,{size:"16",color:"#909399"},{default:X(()=>[y.showMessage?(T(),re(i(pf),{key:0})):(T(),re(i(Nr),{key:1}))]),_:2},1024)],8,Kle)):te("",!0),y.status==i(gt).Connecting||y.status==i(gt).Executing||y.status>i(gt).Executing&&y.showMessage?(T(),V("div",{key:1,class:N(["exec-message","exec-message-"+y.uuid])},[(T(!0),V(Ve,null,bt(y.message,(b,w)=>(T(),V("pre",{key:w,class:"message-item"},le(b),1))),128))],2)):te("",!0)],64)):te("",!0)]),_:2},1024)]),_:2},1032,["class","type","timestamp"]))),128))]),_:1})):(T(),re(v,{key:1,"image-size":80,description:i(t)("terminal.No mission yet")},null,8,["description"])),K(h,null,{default:X(()=>[tt((T(),re(c,{class:"terminal-menu-item",onClick:s[0]||(s[0]=y=>i(n).addTaskPM("test",!1))},{default:X(()=>[Ge(le(i(t)("terminal.Test command")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[1]||(s[1]=y=>i(n).addTaskPM("web-install"))},{default:X(()=>[Ge(le(i(t)("terminal.Install dependent packages")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[2]||(s[2]=y=>r())},{default:X(()=>[Ge(le(i(t)("terminal.Republish")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[3]||(s[3]=y=>i(n).addTask("version.npm",!1))},{default:X(()=>[Ge("npm -v")]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:a},{default:X(()=>[Ge(le(i(t)("Switch package manager")),1)]),_:1})),[[g]]),tt((T(),re(c,{class:"terminal-menu-item",onClick:s[4]||(s[4]=y=>i(n).clearSuccessTask())},{default:X(()=>[Ge(le(i(t)("terminal.Clean up task list")),1)]),_:1})),[[g]])]),_:1})]),_:1},16,["modelValue","title"]),K(C,{onClose:s[12]||(s[12]=y=>i(n).togglePackageManagerDialog(!1)),modelValue:i(n).state.showPackageManagerDialog,"onUpdate:modelValue":s[13]||(s[13]=y=>i(n).state.showPackageManagerDialog=y),class:"ba-terminal-dialog",title:i(t)("Please select package manager"),center:""},{footer:X(()=>[F("div",qle,[K(c,{onClick:s[6]||(s[6]=y=>i(Ua)("npm"))},{default:X(()=>[Ge("npm")]),_:1}),K(c,{onClick:s[7]||(s[7]=y=>i(Ua)("cnpm"))},{default:X(()=>[Ge("cnpm")]),_:1}),K(c,{onClick:s[8]||(s[8]=y=>i(Ua)("pnpm"))},{default:X(()=>[Ge("pnpm")]),_:1}),K(c,{onClick:s[9]||(s[9]=y=>i(Ua)("yarn"))},{default:X(()=>[Ge("yarn")]),_:1}),K(c,{onClick:s[10]||(s[10]=y=>i(Ua)("ni"))},{default:X(()=>[Ge("ni")]),_:1}),K(c,{onClick:s[11]||(s[11]=y=>i(Ua)("none"))},{default:X(()=>[Ge(le(i(t)("I want to execute the command manually")),1)]),_:1})])]),default:X(()=>[F("div",Ule,le(i(t)("Switch package manager title")),1)]),_:1},8,["modelValue","title"])],64)}}}),ui=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Gle=ui(Yle,[["__scopeId","data-v-c55edab5"]]),g$="/install/assets/logo.svg",Xle="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAACVBMVEUAAADc3eTc3+YFvQraAAAAAnRSTlMA9btEy6sAAAGFSURBVGje7dixbcNAEERR24EBuwSX4CpYimNVoRJYggIF1lTpAr6xPxgo2wkpHMEnUXe7+7LZbDabzWazeVo+/rv4My75Pnjt9XdckpPX3jOteMudF79yHZZ85sGLl9wmSnKAkkyYJCcpyURJ7qQk14GSPEhJbhMlOUCZMEmSk5RkoiR3UAbMa0LMJXxafmy34UOcpPA14ue8i2L4rIbhTQyjFGKUQoxTiFEKMUohRinEOIUYpxDjFGJIUQwphiFFMaQoBhTHkOIYUBwDimNAcQwpjgHFMaA4BhTHgOIYUBwDimNAcQwoggHFMaQ4hhTHkOIYUhxDimNIcczRL+kfzPn9l+w/Zf/C+GvZv/z+F+v/yL5d9JuSb339Bttv435Y9EeSH3z98eqHeF8qeEHSlz1eXPUlnBeKRTnaF71eWvcFvLcJfTPiLU/VWPXtmzeJfSvqDW/fVnvz3o8IfBBRjDv6oYqPbvoBkY+h+mGXj9T6wZ2PB/shpI86N5vNZrPZbDbPyh8nhMFbtczXEQAAAABJRU5ErkJggg==",Jle=Object.freeze(Object.defineProperty({__proto__:null,default:Xle},Symbol.toStringTag,{value:"Module"})),b$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAADFBMVEUAAAD2bGz1bGz1bGxNefxdAAAAA3RSTlMAVaoLuSc5AAABi0lEQVRo3u3YwXHCQBBEUeOLy+UgHIJTUCjOBDJzCgqBIDhwQe0APrX/0MVt+ihqVXogdmfmbTKZTCaTyWTysnw+u/i7XPKz8drpvlzyt/Pax7Fa8Z4bL37nsljylQcvnnNdUZINlOS+oiQ7KMmxoiQ3UpLLgpI8SEmuK0qygZLcV5RkByU5VpTkBsoCc0qIOYdPy4/tNnyIHZTwNeLnvIti+KyG4U0MoxRilEKMU4hRCjFKIUYpxDiFGKcQ4xRiSFEMKYYhRTGkKAYUx5DiGFAcA4pjQHEMKY4BxTGgOAYUx4DiGFAcA4pjQHEMKIIBxTGkOIYUx5DiGFIcQ4pjSHHM1i/pH8z5/ZfsP2X/wvhr2b/8/hfr/8i+XfSbkm99/Qbbb+N+WPRHkh98/fHqh3hfKnhB0pc9Xlz1JZwXikU52he9Xlr3Bby3CX0z4i1P1Vj17Zs3iX0r6g1v31Z7896PCHwQUYw7+qGKj276AZGPofphl4/U+sGdjwf7IaSPOieTyWQymUwmr8o/BXYQUa5D7j4AAAAASUVORK5CYII=",Zle=Object.freeze(Object.defineProperty({__proto__:null,default:b$},Symbol.toStringTag,{value:"Module"})),Qle="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAmVBMVEUAAABnwjpmwjlnwjpnwztnwjpnwjpnwjpmwzpowzpnwzlnwTtnwjpnwjpmwjlnwzpnwzpnwjpnwjlnwzpnxDltuTZnwjlnwjpnwzpnwzpnwzpnwjpnwjpnwjpnwjhlwDdixDtnwjpnwzlnwjpnwjlowjpnwjpnwzlnwjpnwjpnwjlmwjpnwjpnwjpnwjpmwTpmwjtnwjlnwjrJKS+EAAAAMnRSTlMA7GidKOfFulROSBng2c5vYVs7Mw8Fv7WqfnX1o0MiEwr61dKwlpOJh3o/LvHKgjYdj7mKH34AAANoSURBVHja7dzpUuJQFATgEwhhR1BAZBdwYRu13//hpqxxSsVziQEh98T+fltSVAHp7nARIiIiIiIiIiIiIiIiIiIiIqJfYdJcIKhH/Y7Y9jTDP9uSWFbBu6bY1ccHg7VYNcInRTFqgh1lsekWO/Ji0ha7ArHoDl9sxKAcvqqLPU9QRGJOB5qlmBNAUW+LNUVoLsSaB2iuxZoWNLOxGBNCM1iJNXhnOsTXobkRaxZ4ZT8u3kDTnYoxZWhqoRjzDFVFrNlAkxNrGtA8iDVDaHpizQU024kYs4JmcyXGtKGyN5QWoOmLNV1o7sWa+4xUqSY0s2cx5goqe1XqFpqWWDNjlfLKY0aqVAmajbkqFWalSgUZqVIRNI9iTVaq1BKambkqVYHKXJWqZqVK1TJyN6eY6SpVlJMbh1P5QRfQBKeuUq1eDcDsfiw/5BKqSzmp6R3eFPo/9B8HaVSpKj7odeQHNM5apfRHvW7L0XrQDOW0cvisODlNlZp35LQi7OhWT7H9IJQTC7ArGssR1qlUKT0RNUI5XCGlKrWCYr6WQ3XTqlJVaOqHZu18OsnE3aprl3KIPjRBW84ggqowkuRKaVapCnRBRZIap1ulltANypJQPeUq1YPutiSJXKc+8g4BHB9XX6CZyznl4dBMktlUz3JWdwCOuyKPUqlS+uvimLfqJPDlrtQjHPryHVt/Rt4/cLhJ8HHhxRGdJRz+HPgFv6Aj6ejD4UH2a7mqVFou4PASc4RCNZL05OBwJ27Tmod3pZpwyItTMfVkomnBYZjsWtqQtJVuoet1kryvPDjTUh5At2hrfw2VF6dVKwF01xPZFQ7wytMjnqsCFOp0N3dcQT1xWYNCme4Wvn8x7qoO3TaMPytVEI+Ec+jm69iLTlV8EjaAmOlu5UmVivEcAXunu2rBw2SiqXaxd7qLvEwmmnZx33SX9zSZaKYL6DZlVwvz9NdNOu7pDip/D3cO4eBzMkky3fmdTL5fN3xPJt+d7vxPJgolUXlbpRJOd7onMeAGHxlJJrHTnZlkEjMxGEomqhz2EUOaeGWhSsVpmUwmjukuI2eMygOLyUSf7iwmE82oYKVKxU931o8e/PdUt5hMNOtGNp6HSPsBb7pmX1dvRvfFGqKlb5MiEREREREREREREREREREREdHv8xfQb5TIVcxdIwAAAABJRU5ErkJggg==",ese=Object.freeze(Object.defineProperty({__proto__:null,default:Qle},Symbol.toStringTag,{value:"Module"})),tse="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAllBMVEUAAADnozzkoDzmojzmojzmojznozrnojzmojvmojvnojznojzmojznojzmojzmojznojznojzmojzmojzmojvnojzmojzmojzmpDvmojzmojzmojzmojzmoTvnojznojvlnjjmoDzmojzmojzmojzmojznojznozzmojznojzmoTvmojzmojznpjnmojzmojzmoDzmojxUQ0wVAAAAMXRSTlMAfz+/onQV5+GHevLRybavqJSObl9YUzcP7cRKRTIoGwYj+tedgWROmWks3LsK9s0fysZrJgAABRZJREFUeNrt3Wdv20AMBmDGQ17y3kveM178/3+uQVAUIWO7PuVO4gV8PhZFgdf2G51oqgGllFJKKaWUUkoppdTv1uvB7xCG8Cu8Ib7BLxDhhwj818APDfBeDz/twHchfrqC58r4Vxm8tljiX5cF+CyH/+TAYzv8Ygz+uuIXVfBWGYk8eGpxQaIyAz/lkFmDl8b4zQR8VMVvRuChPN7RBu/cKnjH0L++r/GuPXhmjA9kwC9VfCALXsnjQwfwyGyIDxUC8Mcan2iCNyZINX3t+wiJTUA/aSfwRBuJ929/sgUvzApIdAFg5GPf90jU7rSmBR7gTZ/eS9cH+UZ3X/xZhb1N4rFeFwb3r/UdEC5gTd8+OH0VByBbE4nsw/NwCUTLPDm053zqe/bJbdTt4k/fD0gMA/jkXd+D4vNRw5UeXeT2nTW9CszOk77zpo//N3ucgkwnJHLwTbTEr+og0haJyuL/8/kuCDR4R6IMd8xD/Golse8tJEK4q4fEBsTpI9WD+xrS+17D13p8xH9ErkSwpi+P8MgGCWErUOcVEqWX/2p4BklY01dzeKyLn0SuRPSXJufBOv8UylFHkxP6FD+IXInooNk9U0lo33nTW4aHgOscZCih6VyhI3IlYnpB4mB8+bzI6Hs9xndrfYF9503PmF14xKw8zkMk9rFu76vp9501vTAjN7/ZL+hbtRXW92kFifzju/jMsxvjSgTpavCtmZeDZEStQHWRGj8PwvsuZuVxfuU/Rg2C3ApyVqA2SAwXJkHgIGYF6sia/gYmQfjIe5he3xt8RGoYZCJkJYI3vWsaBPYy+l7lAxHjIIuhhBWoNyQqR/Mg0BbQ92jIBycxgvCViAUkL4dEOI8VZJd633tIdSBWEFinveI84iPSmEGOlXRXoMpILPtxg0A+1ZXHqMAHJ7GDnNlKxA2StEZiFcQPAr0UV6B2SB3AJAiXS6/vWT4i/VGQ6TKtlYgyUhPDIFw5pb4vivwq9sMggzCdvu+RKM6Mg3DdVPrOm54H8yBcI40V5xMfkVoI0sfkVyLySO1sBIFN4ivOtyKfR1kJEqzoCtQMXGsiUYjsBIFOwitQY6TKYCkI1JPt+4mPSK0FySTa9zZSXXtBoJRg32fvfERqLwj/x1e87w6bPpzCc/z7kee2ifV9gj/dthLS9xoS1bPbF6oBjhzQ9QZyK5EV59nK9QvGbxDCAFxoIVHJgH3tBFYeJ8skfqjU+JTJvjom8baPnX98D5jMhbfpuO9BiETdfFseXhLRvl8DsKuExHLiKgjknfY9c+HjAWdB5nRodum7bPrq5i4I9ByuQG2RaoPDIHzc1HXX9Bo4DTKlo/7qwFXTcew2CB+hvllreoWPSB0HGYzoYWgKdjSQKEaug0DXSd8730akzoNAzkHfB1cksvMEgvSHdFgzsL/KhD1IIAhsrD/S0B/GXdnjwwcwEVTZmMP2gkNhCongzVzbXmUqQ1IaVh9pGFTRtHWOrl7Zs81VJuxCckoWPwv9QorL+LOQtvNor+nDPiRpy/pur+kbSFbdUt/PIySqASRrsrTT97LBiNSNlpVHGqaF1B+rXdApbTFe39euR6Tm07R9vKVFCf/VRC3OI0x8KiPQaQ6m8iiScd+PRRSpGBmvMgnVNF1lEmtn1PQTinWa+99040caoncU7D0y+NZItJf7Pkbhxi8fC4SrwUvaKN5LfV+8ecDv38qilFJKKaWUUkoppZRSSimllFIv+wNEulUVw2/KggAAAABJRU5ErkJggg==",nse=Object.freeze(Object.defineProperty({__proto__:null,default:tse},Symbol.toStringTag,{value:"Module"})),ose="/install/assets/loading.gif",rse="/install/assets/lang.svg",ase=e=>(Xd("data-v-631c568f"),e=e(),Jd(),e),lse={class:"lang"},sse=["src"],ise={class:"lang-list"},use=ase(()=>F("span",{class:"lang-list-arrow"},null,-1)),cse={class:"logo-box"},dse=["src"],fse={class:"title"},pse=Y({__name:"index",setup(e){const{t}=Bl(),n=o=>{window.localStorage.setItem("ba-lang",o),location.reload()};return(o,r)=>(T(),V(Ve,null,[F("div",lse,[F("img",{src:i(rse),alt:"lang icon"},null,8,sse),F("div",ise,[use,F("div",{onClick:r[0]||(r[0]=a=>n("zh-cn")),class:"lang-item"},"中文简体"),F("div",{onClick:r[1]||(r[1]=a=>n("en")),class:"lang-item"},"English")])]),F("div",cse,[F("img",{class:"logo",alt:"Build Admin logo",src:i(g$)},null,8,dse),F("div",fse,le(i(t)("Install BuildAdmin")),1)])],64))}}),Kf=ui(pse,[["__scopeId","data-v-631c568f"]]);var hse={VITE_PORT:"2828",VITE_OPEN:"false",VITE_BASE_PATH:"/install/",BASE_URL:"/install/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const mse={class:"container"},vse={class:"table-title"},gse={class:"table"},bse={key:0,class:"global-warning"},yse={target:"_blank",href:"https://doc.buildadmin.com/guide/install/start.html"},wse={class:"table-label"},_se=["title","onClick"],Cse={class:"table-value"},Sse=["title","src","alt"],kse={key:1,class:"table-item"},Ese={class:"table-label"},Tse={class:"table-value"},$se=["title","alt"],Ose={class:"block-help"},Nse={class:"start-install"},Ise=Y({__name:"check",setup(e){const{t,locale:n}=Bl(),o=ju(),r=ii(),a=Et({envCheckData:[],stateTitle:{ok:"Environmental inspection passed",fail:"This environmental check failed",warn:"The environment check failed, but the installation can continue"},checkType:{base:"Basic environment",npm:"NPM correlation",npminstall:"Test npm install",done:"Check complete"},checkTypeIndex:"base",checkDone:{ok:"Congratulations, the installation can continue~",fail:"Sorry, the necessary installation environment conditions have not been met, please check the above form!",executing:"executing"},checkDoneIndex:"executing",startForm:{lang:n.value,packageManager:r.state.packageManager,setNpmRegistry:"taobao"},showPortErrorPrompt:!1}),l=Object.assign({"../assets/img/install/close.png":Jle,"../assets/img/install/fail.png":Zle,"../assets/img/install/ok.png":ese,"../assets/img/install/warn.png":nse}),s=w=>{const S=`../assets/img/install/${w}.png`;return l[S].default},u=w=>{window.localStorage.setItem("ba-lang",w),location.reload()},c=()=>{o.state.showStartDialog&&Ua(a.startForm.packageManager),o.toggleStartDialog(!1),Lle().then(w=>{if(w.data.code!=1)return p(w.data.msg);m(),a.envCheckData=w.data.data})},f=w=>{w.type=="faq"?window.open(w.url):w.type=="install-package-manager"?(a.checkDoneIndex="executing",v(),r.toggle(!0),r.addTaskPM("install",!0,"",S=>{r.toggle(!1),y(),S==gt.Failed?p(t("Sorry, the automatic installation of package manager failed. Please complete the installation manually!")):S==gt.Success&&(a.envCheckData=Object.assign({},a.envCheckData,{success:{describe:t("PM is ready!"),state:"ok",link:[]}}),a.envCheckData=Object.assign({},a.envCheckData,{npm_package_manager:{describe:t("already installed"),state:"ok",link:[],pm:r.state.packageManager}}),h())})):w.type=="test-npm-install"&&C()},d=()=>{a.checkDoneIndex=="ok"&&o.setStep("config")},p=w=>{y(),a.checkDoneIndex=="fail"&&(a.checkDoneIndex="executing"),Cr({type:"error",message:w,duration:0,center:!0})},m=()=>{a.checkTypeIndex="npm",xle().then(w=>{if(y(),w.data.code==2)return!1;if(w.data.code!=1)return p(w.data.msg);a.envCheckData=Object.assign({},a.envCheckData,w.data.data),w.data.data.npm_package_manager.state=="ok"&&(v(),h())})},v=()=>{if(a.startForm.setNpmRegistry!="none"){let w=!1;for(const S in r.state.taskList)if(r.state.taskList[S].command=="set-npm-registry."+a.startForm.setNpmRegistry&&r.state.taskList[S].status==gt.Success){w=!0;break}w||r.addTask("set-npm-registry."+a.startForm.setNpmRegistry,!1,"",S=>{if(S==gt.Failed){let E={"set-npm-registry":{describe:t("Command execution failed"),state:"fail",link:[{name:t("How to solve"),title:t("Click to see how to solve it"),type:"faq",url:"https://doc.buildadmin.com/guide/install/setNpmRegistryFail.html"}]}};a.envCheckData=Object.assign({},a.envCheckData,E)}})}},h=()=>{a.envCheckData=Object.assign({},a.envCheckData,{"check npm install":{describe:"",state:"warn",link:[{name:t("Click to test"),title:t("Click to test")+" npm install",type:"test-npm-install"}]}})},C=()=>{a.checkDoneIndex="executing",a.checkTypeIndex="npminstall",g("check npm install"),r.toggle(!0),r.addTaskPM("test",!0,"",w=>{if(y(),r.toggle(!1),w==gt.Failed){let S={"test-npm-install":{describe:t("Command execution test failed"),state:"warn",link:[{name:t("How to solve"),title:t("Click to see how to solve it"),type:"faq",url:"https://doc.buildadmin.com/guide/install/npmInstallFail.html"}]}};a.envCheckData=Object.assign({},a.envCheckData,S)}else if(w==gt.Success){let S={"test-npm-install":{describe:t("Can execute"),state:"ok",link:[]}};a.envCheckData=Object.assign({},a.envCheckData,S)}})},g=w=>{delete a.envCheckData[w]},y=()=>{a.checkTypeIndex="done";let w=["php_version","config_is_writable","public_is_writable","php_pdo","php_gd2"];for(const S in w)if(!a.envCheckData[w[S]]||a.envCheckData[w[S]].state!="ok")return a.checkDoneIndex="fail",!1;return a.checkDoneIndex="ok",!0},_=()=>r.state.packageManager=="none"?t("None - manual execution"):r.state.packageManager,b=()=>{let w=hse.VITE_AXIOS_BASE_URL;return w=w=="getCurrentDomain"||!w?window.location.protocol+"//"+window.location.host:w,new URL(w).port};return at(()=>{o.state.showStartDialog||c(),b()!="8000"&&(a.showPortErrorPrompt=!0)}),(w,S)=>{const E=qe("el-alert"),$=qe("el-option"),O=qe("el-select"),A=qe("el-form-item"),M=qe("el-radio"),D=qe("el-radio-group"),U=qe("el-form"),j=qe("el-icon"),W=qe("el-button"),L=qe("el-dialog");return T(),V("div",null,[K(Kf),F("div",mse,[F("div",vse,le(i(t)("Environmental inspection")),1),F("div",gse,[a.showPortErrorPrompt?(T(),V("div",bse,[K(E,{closable:!1,center:"",type:"error"},{default:X(()=>[Ge(le(i(t)("Port error prompt 1"))+" ",1),F("a",yse,le(i(t)("Get started quickly")),1),Ge(" "+le(i(t)("Port error prompt 3")),1)]),_:1})])):te("",!0),K(ku,{name:"slide-bottom"},{default:X(()=>[(T(!0),V(Ve,null,bt(a.envCheckData,(P,x)=>(T(),V("div",{class:N(["table-item",x]),key:x+P.describe+P.state},[F("div",wse,[Ge(le(x.toString()=="npm_package_manager"?i(t)(x)+" "+_():i(t)(x))+" ",1),P.link&&P.link.length>0?(T(!0),V(Ve,{key:0},bt(P.link,(I,H)=>(T(),V("span",{key:H,title:I.title?I.title:"",onClick:G=>f(I),class:N(["label-need",I.type])},le(I.name),11,_se))),128)):te("",!0)]),F("div",Cse,[Ge(le(P.describe)+" ",1),F("img",{title:i(t)(a.stateTitle[P.state]),class:"data-state",src:s(P.state),alt:P.state},null,8,Sse)])],2))),128))]),_:1}),a.checkTypeIndex!="done"?(T(),V("div",kse,[F("div",Ese,le(i(t)("Checking installation environment")),1),F("div",Tse,[Ge(le(i(t)(a.checkType[a.checkTypeIndex]))+" ",1),F("img",{title:i(t)("Current execution to:")+i(t)(a.checkType[a.checkTypeIndex]),class:"data-state",src:ose,alt:i(t)(a.checkType[a.checkTypeIndex])},null,8,$se)])])):te("",!0),F("div",{class:N(["check-done",a.checkDoneIndex])},le(i(t)(a.checkDone[a.checkDoneIndex])),3),F("div",{class:N(["button",a.checkDoneIndex=="ok"?"pass":""]),onClick:d},le(i(t)("Step 2 site configuration")),3)])]),K(L,{modelValue:i(o).state.showStartDialog,"onUpdate:modelValue":S[3]||(S[3]=P=>i(o).state.showStartDialog=P),"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,"destroy-on-close":!0,class:"ba-terminal-dialog",title:i(t)("Ready to start"),center:""},{footer:X(()=>[K(W,{onClick:c,type:"primary",size:"large",round:""},{default:X(()=>[K(j,null,{default:X(()=>[K(i(D4))]),_:1}),F("span",Nse,le(i(t)("Start installation")),1)]),_:1})]),default:X(()=>[K(U,{onKeyup:Pt(c,["enter"]),class:"start-from","label-position":"left","label-width":"120px",model:a.startForm},{default:X(()=>[K(A,{label:i(t)("language")},{default:X(()=>[K(O,{onChange:u,class:"w100",modelValue:a.startForm.lang,"onUpdate:modelValue":S[0]||(S[0]=P=>a.startForm.lang=P)},{default:X(()=>[K($,{label:"中文简体",value:"zh-cn"}),K($,{label:"English",value:"en"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),K(A,{label:i(t)("NPM package manager")},{default:X(()=>[K(O,{class:"w100",modelValue:a.startForm.packageManager,"onUpdate:modelValue":S[1]||(S[1]=P=>a.startForm.packageManager=P)},{default:X(()=>[K($,{label:"npm",value:"npm"}),K($,{label:"cnpm",value:"cnpm"}),K($,{label:"pnpm"+i(t)("recommend"),value:"pnpm"},null,8,["label"]),K($,{label:"yarn"+i(t)("recommend"),value:"yarn"},null,8,["label"]),K($,{label:"ni",value:"ni"}),K($,{label:i(t)("I want to execute the command manually"),value:"none"},null,8,["label"])]),_:1},8,["modelValue"]),F("div",Ose,le(i(t)("The system has a Web terminal. Please select an installed or your favorite NPM package manager")),1)]),_:1},8,["label"]),K(A,{label:i(t)("Set NPM source")},{default:X(()=>[K(D,{modelValue:a.startForm.setNpmRegistry,"onUpdate:modelValue":S[2]||(S[2]=P=>a.startForm.setNpmRegistry=P),class:"ml-4"},{default:X(()=>[K(M,{label:i(t)("Use current source"),value:"none",size:"large"},null,8,["label"]),K(M,{label:i(t)("TaoBao"),value:"taobao",size:"large"},null,8,["label"]),K(M,{label:"NPM",value:"npm",size:"large"}),K(M,{label:i(t)("Tencent"),value:"tencent",size:"large"},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["onKeyup","model"])]),_:1},8,["modelValue","title"])])}}}),Mse=ui(Ise,[["__scopeId","data-v-e96f3865"]]),y$=e=>(Xd("data-v-efc9ce06"),e=e(),Jd(),e),Ase={class:"container"},Pse={class:"table-title"},Rse={key:0,class:"install-tips-box"},Lse={class:"install-tips"},xse=["alt"],Dse={class:"install-tips-title"},Fse={class:"install-tips-item"},Bse={class:"install-tips-item"},Vse={class:"change-route",href:"https://gitee.com/wonderful-code/buildadmin/issues",target:"_blank"},Hse={class:"table"},zse={key:0,class:"table-item-br"},jse={key:1,class:"table-column table-item"},Wse={key:0,class:"block-help"},Kse={class:"connecting-prompt"},Use={class:"footer-buttons"},qse={class:"phinx-fail-box"},Yse={class:"title"},Gse={class:"content-item"},Xse={class:"content-item"},Jse={class:"command"},Zse={class:"content-item"},Qse=y$(()=>F("div",{class:"command"},"php vendor/bin/phinx migrate",-1)),eie={class:"block-help"},tie={class:"content-item"},nie={class:"text"},oie=y$(()=>F("div",{class:"output-box"},[F("div",{class:"output"},"PS E:\\build-admin> php think migrate:run"),F("div",{class:"output mt10"},"== 20230620180908 Install: migrating"),F("div",{class:"output"},"== 20230620180908 Install: migrated 0.0165s"),F("div",{class:"output mt10"},"== 20230620180916 InstallData: migrating"),F("div",{class:"output"},"== 20230620180916 InstallData: migrated 0.0573s"),F("div",{class:"output mt10"},"All Done. Took 0.0898s")],-1)),rie={class:"block-help mt10"},aie={class:"command"},lie={class:"phinx-fail-footer-button"},sie=Y({__name:"config",setup(e){var t,n={hostname:"",username:"",password:"",hostport:""};const{t:o}=Bl(),r=ju(),a=ii(),l=R(),s=Et({formItem:{hostname:{label:o("Mysql database address"),value:"127.0.0.1",name:"hostname",type:"text"},username:{label:o("MySQL connection user name"),value:"root",name:"username",type:"text"},password:{label:o("MySQL connection password"),value:"",name:"password",type:"password"},hostport:{label:o("MySQL connection port number"),value:"3306",name:"hostport",type:"number"},database:{label:o("Mysql database name"),value:"",name:"database",type:"text",blockHelp:""},prefix:{label:o("MySQL data table prefix"),value:"ba_",name:"prefix",type:"text"},br1:{type:"br"},adminname:{label:o("Administrator user name"),value:"admin",name:"adminname",type:"text"},adminpassword:{label:o("Administrator password"),value:"",name:"adminpassword",type:"password",placeholder:o("Backend login password")},repeatadminpassword:{label:o("Duplicate administrator password"),value:"",name:"repeatadminpassword",type:"password"},br2:{type:"br"},sitename:{label:o("Site name"),value:"BuildAdmin",name:"sitename",type:"text"}},showFormItem:!1,showError:"",baseConfigSubmitState:!1,databaseCheck:"wait",databases:[],showInstallTips:!1,autoJumpSeconds:5,maximumCommandFailures:1,commandFailureCount:0,executionWebCommand:!0,execMigrateFail:!1,execMigrateIdx:0,rootPath:""}),u=async()=>{n={hostname:s.formItem.hostname.value,username:s.formItem.username.value,password:s.formItem.password.value,hostport:s.formItem.hostport.value,database:s.formItem.database.value},n.hostname&&n.username&&n.hostport&&(s.databaseCheck="connecting",await Dle(n).then(y=>{if(y.data.code==1)s.databaseCheck="connect-ok",s.databases=y.data.data.databases,s.formItem.database.value&&c.findDatabase(s.formItem.database.value);else throw s.databaseCheck="wait",s.databases=[],Cr({type:"error",message:y.data.msg,center:!0}),new Error(y.data.msg)}))},c={required:(y,_,b)=>_.value==""||!_.value?b(new Error(_.label+o("Required"))):b(),findDatabase:y=>{s.databaseCheck=="connect-ok"&&(y&&s.databases.indexOf(y)===-1?s.formItem.database.blockHelp=o("The entered database was not found!"):s.formItem.database.blockHelp="")},database:(y,_,b)=>(c.findDatabase(_.value),b()),connect:(y,_,b)=>{let w=!1;for(const S in n)n[S]!=s.formItem[S].value&&(w=!0);return w&&u(),b()},prefix:function(y,_,b){if(_.value){var w=new RegExp(/^[a-zA-Z][a-zA-Z0-9_]*$/i);if(!w.test(_.value))return b(new Error(o("The table prefix can only contain alphanumeric characters and underscores, and starts with a letter")))}return b()},adminname:function(y,_,b){return/^[a-zA-Z][a-zA-Z0-9_]{2,15}$/.test(_.value)?b():b(new Error(o("It is composed of letters, numbers and underscores, starting with letters (3-15 digits)")))},adminpassword:function(y,_,b){return/^(?!.*[&<>"'\n\r]).{6,32}$/.test(_.value)?b():b(new Error(o("Please enter the correct password")))},repeatadminpassword:function(y,_,b){return s.formItem.adminpassword.value&&_.value&&s.formItem.adminpassword.value!=_.value?b(new Error(o("Duplicate passwords do not match"))):b()}},f=Et({hostname:[{validator:c.required,trigger:"blur"}],username:[{validator:c.required,trigger:"blur"}],hostport:[{validator:c.required,trigger:"blur"}],database:[{validator:c.required,trigger:"blur"},{validator:c.database,trigger:"blur"}],prefix:[{validator:c.connect,trigger:"blur"},{validator:c.prefix,trigger:"blur"}],adminname:[{validator:c.required,trigger:"blur"},{validator:c.connect,trigger:"blur"},{validator:c.adminname,trigger:"blur"}],adminpassword:[{validator:c.required,trigger:"blur"},{validator:c.connect,trigger:"blur"},{validator:c.adminpassword,trigger:"blur"}],repeatadminpassword:[{validator:c.required,trigger:"blur"},{validator:c.repeatadminpassword,trigger:"blur"}],sitename:[{validator:c.required,trigger:"blur"}]}),d=y=>{window.open(y)},p=y=>{s.showError=y},m=()=>{a.addTask("migrate.run",!0,"",(y,_)=>{y==gt.Success?v():(s.execMigrateIdx=_,s.execMigrateFail=!0)})},v=()=>{s.execMigrateIdx&&a.delTask(s.execMigrateIdx),setTimeout(()=>{pw({type:"migrate",adminname:s.formItem.adminname.value,adminpassword:s.formItem.adminpassword.value,sitename:s.formItem.sitename.value}).then(()=>{h()})},1500)},h=()=>{if(s.execMigrateFail=!1,!s.executionWebCommand){s.showInstallTips=!1,r.setStep("manualInstall");return}a.toggle(!0),a.addTaskPM("web-install",!0,"",(y,_)=>{y==gt.Success?a.addTaskPM("web-build",!0,"",b=>{s.baseConfigSubmitState=!1,b==gt.Success?(pw({type:"web"}),a.toggle(!1),r.setStep("done")):b==gt.Failed&&g()}):y==gt.Failed&&(s.commandFailureCount{y&&(s.baseConfigSubmitState=!0,u().then(()=>{y.validate(_=>{if(_){let b={};for(const w in s.formItem)b=Object.assign(b,{[w]:s.formItem[w].value});Ble(b).then(w=>{w.data.code==1?(s.rootPath=w.data.data.rootPath,s.executionWebCommand=w.data.data.executionWebCommand,m()):(Cr({type:"error",message:w.data.msg,center:!0}),s.baseConfigSubmitState=!1)}).catch(()=>{s.baseConfigSubmitState=!1})}else s.baseConfigSubmitState=!1})}).catch(()=>{s.baseConfigSubmitState=!1}))};Fle().then(y=>{y.data.code==1?(s.rootPath=y.data.data.rootPath,s.showInstallTips=!y.data.data.executionWebCommand,s.executionWebCommand=y.data.data.executionWebCommand):y.data.code==0?Cr({type:"error",message:y.data.msg,center:!0,duration:0}):s.showInstallTips=!0});const g=()=>{a.toggle(!1),t=setInterval(()=>{s.autoJumpSeconds<=0?(clearInterval(t),r.setStep("manualInstall")):(s.autoJumpSeconds--,p(o("Manual Install 1")+o("Manual Install 2",{seconds:s.autoJumpSeconds})))},1e3)};return at(()=>{s.showFormItem=!0}),lr(()=>{clearInterval(t)}),(y,_)=>{const b=qe("el-input"),w=qe("el-form-item"),S=qe("el-button"),E=qe("el-alert"),$=qe("el-dialog");return T(),V(Ve,null,[F("div",null,[K(Kf),F("div",Ase,[F("div",Pse,le(i(o)("Site configuration")),1),s.showInstallTips?(T(),V("div",Rse,[F("div",Lse,[F("img",{class:"install-tips-close",onClick:_[0]||(_[0]=O=>s.showInstallTips=!1),src:b$,alt:i(o)("Close the prompt of completing unfinished matters manually")},null,8,xse),F("div",Dse,[F("span",null,le(i(o)("Install Tips Title 1")),1),F("span",{class:"change-route",onClick:_[1]||(_[1]=O=>i(r).setStep("check"))},le(i(o)("Back to previous page")),1),F("span",null,le(i(o)("Install Tips Title 2")),1)]),F("div",Fse,[Ge(le(i(o)("If you don't want to open the corresponding permission due to some security factors, please check "))+" ",1),F("span",{onClick:_[2]||(_[2]=O=>d("https://doc.buildadmin.com/guide/install/senior.html")),class:"change-route"},le(i(o)("how installation services ensure system security")),1)]),F("div",Bse,[Ge(le(i(o)("If you really can't adjust all the tests to pass, please "))+" ",1),F("a",Vse,le(i(o)("click to feed back to us")),1),Ge(" "+le(i(o)("continue installation")),1)])])])):te("",!0),F("div",Hse,[K(i(zS),{ref_key:"formRef",ref:l,"label-width":"150px",onKeyup:_[5]||(_[5]=Pt(O=>C(l.value),["enter"])),rules:f,model:s.formItem},{default:X(()=>[K(fn,{name:"slide-bottom"},{default:X(()=>[tt(F("div",{class:"table-column table-error"},le(s.showError),513),[[kt,s.showError]])]),_:1}),K(ku,{name:"slide-bottom"},{default:X(()=>[(T(!0),V(Ve,null,bt(s.formItem,(O,A)=>tt((T(),V("div",{key:A},[O.type=="br"?(T(),V("div",zse)):(T(),V("div",jse,[K(w,{prop:O.name,class:"table-label",label:O.label},{default:X(()=>[K(b,{placeholder:O.placeholder?O.placeholder:"",modelValue:O.value,"onUpdate:modelValue":M=>O.value=M,class:"table-input",type:O.type},null,8,["placeholder","modelValue","onUpdate:modelValue","type"]),O.blockHelp?(T(),V("div",Wse,le(O.blockHelp),1)):te("",!0)]),_:2},1032,["prop","label"])]))])),[[kt,s.showFormItem]])),128))]),_:1}),K(fn,{name:"slide-bottom"},{default:X(()=>[tt(F("div",null,[tt(F("div",Kse,[F("span",null,le(i(o)("Test connection to data server")),1)],512),[[kt,s.databaseCheck=="connecting"]]),F("div",Use,[K(S,{class:"button",onClick:_[3]||(_[3]=O=>i(r).setStep("check"))},{default:X(()=>[Ge(le(i(o)("Previous step")),1)]),_:1}),K(S,{type:"primary",class:"button",onClick:_[4]||(_[4]=O=>C(l.value)),loading:s.baseConfigSubmitState},{default:X(()=>[Ge(le(i(o)("Install now")),1)]),_:1},8,["loading"])])],512),[[kt,s.showFormItem]])]),_:1})]),_:1},8,["rules","model"])])])]),K($,{modelValue:s.execMigrateFail,"onUpdate:modelValue":_[6]||(_[6]=O=>s.execMigrateFail=O),top:"5vh","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,title:i(o)("Table migration failed")},{default:X(()=>[K(E,{title:i(o)("We use Phinx to manage the data table, which can version the data table"),closable:!1,center:"",type:"info"},null,8,["title"]),F("div",qse,[F("div",Yse,le(i(o)("Data table automatic migration failed, please manually migrate as follows:")),1),F("div",Gse,"1、"+le(i(o)("Open terminal (windows PowerShell)")),1),F("div",Xse,[F("div",null,"2、"+le(i(o)("Execute command")),1),F("div",Jse,"cd "+le(s.rootPath),1)]),F("div",Zse,[F("div",null,"3、"+le(i(o)("Execute command")),1),Qse,F("div",eie,le(i(o)("If the command fails to be executed, add sudo or press the error message")),1)]),F("div",tie,[F("div",null,"4、"+le(i(o)("Migration check")),1),F("div",nie,le(i(o)("When the command is executed successfully, the output is similar to:")),1),oie,F("div",rie,[Ge(le(i(o)("After the command is executed successfully, multiple data tables will be automatically created in the database, and then click below to "))+" ",1),F("span",aie,le(i(o)("continue install")),1)])])]),F("div",lie,[K(S,{type:"primary",onClick:v},{default:X(()=>[Ge(le(i(o)("continue install")),1)]),_:1})])]),_:1},8,["modelValue","title"])],64)}}}),iie=ui(sie,[["__scopeId","data-v-efc9ce06"]]),uie={class:"container"},cie={class:"table-title"},die={class:"done-box"},fie={class:"reload-tips"},pie={class:"text-warning"},hie={class:"done-button"},mie=Y({__name:"done",setup(e){const{t}=Bl(),n=window.location.protocol+"//"+window.location.host,o=Et({hideIndexUrl:"https://doc.buildadmin.com/guide/install/hideIndex.html",indexUrl:n+"/index.html#/",adminUrl:n+"/index.html#/admin"}),r=l=>{window.open(l)},a=()=>{window.localStorage.clear(),location.reload()};return(l,s)=>{const u=qe("el-alert"),c=qe("el-button");return T(),V("div",null,[K(Kf),F("div",uie,[F("div",cie,"✨ "+le(i(t)("Thanks for using buildadmin"))+" ✨",1),F("div",die,[F("div",null,le(i(t)("Background URL")),1),F("div",{onClick:s[0]||(s[0]=f=>r(o.adminUrl)),class:"admin-url"},le(o.adminUrl),1),F("div",fie,[Ge(le(i(t)("Need to reinstall the system?")),1),F("span",{class:"reload",onClick:a},le(i(t)("Please click on me")),1)])]),F("div",pie,[K(u,{closable:!1,center:"",title:i(t)("It is recommended to delete the root directory / public / install folder; This page is only visible on your device."),type:"error"},null,8,["title"])]),F("div",hie,[K(c,{onClick:s[1]||(s[1]=f=>r(o.hideIndexUrl)),type:"primary",plain:"",size:"large"},{default:X(()=>[Ge(le(i(t)("Hide index.html?")),1)]),_:1}),K(c,{onClick:s[2]||(s[2]=f=>r(o.indexUrl)),type:"primary",plain:"",size:"large"},{default:X(()=>[Ge(le(i(t)("Access foreground")),1)]),_:1}),K(c,{onClick:s[3]||(s[3]=f=>r(o.adminUrl)),type:"primary",size:"large"},{default:X(()=>[Ge(le(i(t)("Access background")),1)]),_:1})])])])}}}),vie=ui(mie,[["__scopeId","data-v-e1e72612"]]),Wu=e=>(Xd("data-v-292784ff"),e=e(),Jd(),e),gie={class:"container"},bie={class:"title"},yie={class:"content"},wie={class:"content-item"},_ie={class:"content-item"},Cie={class:"command"},Sie={class:"content-item"},kie=Wu(()=>F("div",{class:"command"},"npm install",-1)),Eie={class:"content-item"},Tie=Wu(()=>F("div",{class:"command"},"npm run build",-1)),$ie={class:"content-item"},Oie={class:"step-box"},Nie={class:"step"},Iie={class:"text-bold"},Mie={class:"step"},Aie=Wu(()=>F("span",{class:"text-bold"},"assets",-1)),Pie=Wu(()=>F("span",{class:"text-bold"},"index.html",-1)),Rie=Wu(()=>F("span",{class:"text-bold"},"public",-1)),Lie={class:"step"},xie={class:"min-help"},Die={key:0,class:"loading"},Fie={class:"reload-tips"},Bie=Y({__name:"index",setup(e){const{t}=Bl(),n=ju(),o=Et({showLoading:"",webPath:t("Getting full path of root directory / Web")}),r=s=>{window.open(s)},a=()=>{o.showLoading=t("Moving automatically"),Vle().then(s=>{s.data.code==1?n.setStep("done"):Cr({type:"error",message:s.data.msg,center:!0})}).finally(()=>{o.showLoading=""})};Hle().then(s=>{s.data.code==1?o.webPath=s.data.data.webPath:Cr({type:"error",message:s.data.msg,center:!0})});const l=()=>{window.localStorage.clear(),location.reload()};return(s,u)=>{const c=qe("el-alert");return T(),V("div",gie,[F("div",bie,le(i(t)("Unfinished matters manually")),1),F("div",yie,[K(c,{title:i(t)("Sorry, some operations could not be completed automatically You need to manually complete the outstanding matters according to the following guidance"),type:"error"},null,8,["title"]),F("div",wie,"1、"+le(i(t)("Open terminal (windows PowerShell)")),1),F("div",_ie,[F("div",null,"2、"+le(i(t)("Execute command")),1),F("div",Cie,"cd "+le(o.webPath),1)]),F("div",Sie,[F("div",null,"3、"+le(i(t)("Execute command")),1),kie,F("div",{onClick:u[0]||(u[0]=f=>r("https://doc.buildadmin.com/guide/install/npmInstallFail.html")),class:"block-help link"},le(i(t)("Execution failed?")),1)]),F("div",Eie,[F("div",null,"4、"+le(i(t)("Execute command")),1),Tie,F("div",{onClick:u[1]||(u[1]=f=>r("https://doc.buildadmin.com/guide/install/npmBuildFail.html")),class:"block-help link"},le(i(t)("Execution failed?")),1)]),F("div",$ie,[F("div",null,"5、"+le(i(t)("Move the built file to the specified location of the system")),1),F("div",{onClick:a,class:"block-help link size-15"},le(i(t)("Click to try to automatically move the build file")),1),F("div",Oie,[F("div",Nie,[Ge(" 1. "+le(i(t)("The build output directory is: site")),1),F("span",Iie,le(i(t)("root directory / dist")),1)]),F("div",Mie,[Ge(" 2. "+le(i(t)("Please move 1")),1),Aie,Ge(le(i(t)("Please move 2")),1),Pie,Ge(le(i(t)("Please move 3")),1),Rie,Ge(le(i(t)("Please move 4")),1)]),F("div",Lie,"3. "+le(i(t)("You can delete the build output directory directly")),1)]),F("div",xie,le(i(t)("During construction, all files in the output directory will be overwritten, so the system is designed to build in the root directory first, and then move to the public directory to prevent other files in the public from being overwritten")),1)]),o.showLoading?(T(),V("div",Die,le(o.showLoading),1)):te("",!0)]),F("div",Fie,[Ge(le(i(t)("Need to reinstall the system?")),1),F("span",{class:"reload",onClick:l},le(i(t)("Please click on me")),1)])])}}}),Vie=ui(Bie,[["__scopeId","data-v-292784ff"]]),Hie=Y({__name:"manualInstall",setup(e){return(t,n)=>(T(),V("div",null,[K(Kf),K(Vie)]))}}),zie={class:"ba-terminal"},jie=["src"],Wie=Y({__name:"App",setup(e){const t=ju(),n=ii(),{locale:o,getLocaleMessage:r}=Bl();var a=window.localStorage.getItem("ba-lang")||"zh-cn";o.value=a;const l=r(a);return at(()=>{n.init()}),(s,u)=>{const c=qe("el-badge"),f=qe("el-config-provider");return T(),re(f,{locale:i(l)},{default:X(()=>[i(t).state.step=="check"?(T(),re(Mse,{key:0})):te("",!0),i(t).state.step=="config"?(T(),re(iie,{key:1})):te("",!0),i(t).state.step=="done"?(T(),re(vie,{key:2})):te("",!0),i(t).state.step=="manualInstall"?(T(),re(Hie,{key:3})):te("",!0),K(Gle),F("div",zie,[K(c,{"is-dot":i(n).state.showDot},{default:X(()=>[F("img",{onClick:u[0]||(u[0]=d=>i(n).toggle()),class:"terminal-logo",draggable:"false",src:i(g$),alt:"BuildAdmin Logo"},null,8,jie)]),_:1},8,["is-dot"])])]),_:1},8,["locale"])}}});function Kie(e){Yie(e),qie(e),Uie(e)}function Uie(e){e.directive("blur",{mounted(t){t.addEventListener("focus",()=>{t.blur()})}})}function qie(e){e.directive("zoom",{mounted(t,n){if(!n.value)return!1;We(()=>{const o=document.querySelector(n.value),r=document.createElement("div");r.className="zoom-handle",r.onmouseenter=()=>{r.onmousedown=a=>{const l=a.clientX,s=a.clientY,u=o.offsetWidth,c=o.offsetHeight;document.onmousemove=f=>{f.preventDefault();const d=u+(f.clientX-l)*2,p=c+(f.clientY-s);o.style.width=`${d}px`,o.style.height=`${p}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}},o.appendChild(r)})}})}function Yie(e){e.directive("drag",{mounted(t,n){if(!n.value)return!1;const o=document.querySelector(n.value[0]),r=document.querySelector(n.value[1]);if(!r||!o)return!1;r.onmouseover=()=>r.style.cursor="move";function a(s,u){const c=u==="pc"?s.clientX-r.offsetLeft:s.touches[0].clientX-r.offsetLeft,f=u==="pc"?s.clientY-r.offsetTop:s.touches[0].clientY-r.offsetTop,d=document.body.clientWidth,p=document.body.clientHeight||document.documentElement.clientHeight,m=o.offsetWidth,v=o.offsetHeight,h=o.offsetLeft,C=d-o.offsetLeft-m,g=o.offsetTop,y=p-o.offsetTop-v;let _=getComputedStyle(o).left,b=getComputedStyle(o).top;return _.includes("%")?(_=+document.body.clientWidth*(+_.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(_=+_.replace(/\px/g,""),b=+b.replace(/\px/g,"")),{disX:c,disY:f,minDragDomLeft:h,maxDragDomLeft:C,minDragDomTop:g,maxDragDomTop:y,styL:_,styT:b}}function l(s,u,c){const{disX:f,disY:d,minDragDomLeft:p,maxDragDomLeft:m,minDragDomTop:v,maxDragDomTop:h,styL:C,styT:g}=c;let y=u==="pc"?s.clientX-f:s.touches[0].clientX-f,_=u==="pc"?s.clientY-d:s.touches[0].clientY-d;-y>p?y=-p:y>m&&(y=m),-_>v?_=-v:_>h&&(_=h),o.style.cssText+=`;left:${y+C}px;top:${_+g}px;`}r.onmousedown=s=>{const u=a(s,"pc");document.onmousemove=c=>{l(c,"pc",u)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},r.ontouchstart=s=>{const u=a(s,"app");document.ontouchmove=c=>{l(c,"app",u)},document.ontouchend=()=>{document.ontouchmove=null,document.ontouchend=null}}}})}function Gie(e){return typeof e=="object"&&e!==null}function hw(e,t){return e=Gie(e)?e:Object.create(null),new Proxy(e,{get(n,o,r){return o==="key"?Reflect.get(n,o,r):Reflect.get(n,o,r)||Reflect.get(t,o,r)}})}function Xie(e,t){return t.reduce((n,o)=>n==null?void 0:n[o],e)}function Jie(e,t,n){return t.slice(0,-1).reduce((o,r)=>/^(__proto__)$/.test(r)?{}:o[r]=o[r]||{},e)[t[t.length-1]]=n,e}function Zie(e,t){return t.reduce((n,o)=>{const r=o.split(".");return Jie(n,r,Xie(e,r))},{})}function mw(e,{storage:t,serializer:n,key:o,debug:r}){try{const a=t==null?void 0:t.getItem(o);a&&e.$patch(n==null?void 0:n.deserialize(a))}catch(a){r&&console.error(a)}}function vw(e,{storage:t,serializer:n,key:o,paths:r,debug:a}){try{const l=Array.isArray(r)?Zie(e,r):e;t.setItem(o,n.serialize(l))}catch(l){a&&console.error(l)}}function Qie(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:o=n},store:r}=t;if(!o)return;const a=(Array.isArray(o)?o.map(l=>hw(l,e)):[hw(o,e)]).map(({storage:l=localStorage,beforeRestore:s=null,afterRestore:u=null,serializer:c={serialize:JSON.stringify,deserialize:JSON.parse},key:f=r.$id,paths:d=null,debug:p=!1})=>{var m;return{storage:l,beforeRestore:s,afterRestore:u,serializer:c,key:((m=e.key)!=null?m:v=>v)(f),paths:d,debug:p}});r.$persist=()=>{a.forEach(l=>{vw(r.$state,l)})},r.$hydrate=({runHooks:l=!0}={})=>{a.forEach(s=>{const{beforeRestore:u,afterRestore:c}=s;l&&(u==null||u(t)),mw(r,s),l&&(c==null||c(t))})},a.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;s==null||s(t),mw(r,l),u==null||u(t),r.$subscribe((c,f)=>{vw(f,l)},{detached:!0})})}}var eue=Qie();const w$=TI();w$.use(eue);async function tue(){const e=iv(Wie);e.use(w$),e.use($o),e.use(xne,{i18n:$o.global.t}),Kie(e),e.mount("#app")}tue()});export default nue(); diff --git a/public/install/index.html b/public/install/index.html index 66fe5d0..f73216e 100644 --- a/public/install/index.html +++ b/public/install/index.html @@ -107,7 +107,7 @@ if (!urls.adminUrl && !urls.frontUrl) return; document.querySelectorAll('input[type="text"], input:not([type])').forEach(function(inp){ var v = (inp.value || '').trim(); - if (v && (v.indexOf('#/admin') >= 0 || v.indexOf('index.html') >= 0) && v.indexOf('#/') >= 0) { + if (v && (v.indexOf('#/admin') >= 0 || v.indexOf('index.html') >= 0 || v.indexOf('/index#') >= 0) && v.indexOf('#/') >= 0) { inp.value = urls.adminUrl; inp.dispatchEvent(new Event('input', { bubbles: true })); } @@ -116,6 +116,22 @@ document.querySelectorAll('a[href*="#/"]').forEach(function(a){ if (urls.frontUrl && a.href.indexOf('#/admin') < 0) a.href = urls.frontUrl; }); + // index.html/#/ 会被当成路径 /index.html/ 导致 webman 404,统一为 index.html#/ + document.querySelectorAll('a[href*="index.html/#"]').forEach(function(a){ + a.href = a.href.replace(/index\.html\/#\//g, 'index.html#/'); + }); + // 打包的 index.js 完成页用 protocol+host 拼 adminUrl,会漏掉 /index.php 等前缀;用接口结果覆盖展示与点击 + if (urls.adminUrl) { + document.querySelectorAll('.admin-url').forEach(function(el){ + el.textContent = urls.adminUrl; + el.style.cursor = 'pointer'; + el.onclick = function(ev){ + ev.preventDefault(); + ev.stopPropagation(); + window.open(urls.adminUrl, '_blank', 'noreferrer'); + }; + }); + } ensureQuickPanel(); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', function(){ setInterval(applyUrls, 800); }); diff --git a/support/Request.php b/support/Request.php index 9d9d91d..8180a4e 100644 --- a/support/Request.php +++ b/support/Request.php @@ -35,6 +35,18 @@ class Request extends \Webman\Http\Request return $path; } + /** + * 入口为 /index.php/... 时返回 /index.php,用于拼接后台/前台完整 URL(与路由 path() 剥离规则对应) + */ + public function publicBasePath(): string + { + $path = parent::path(); + if (str_starts_with($path, '/index.php')) { + return '/index.php'; + } + return ''; + } + /** * 获取请求参数(兼容 ThinkPHP param,合并 get/post,post 优先) * @param string|null $name 参数名,null 返回全部 diff --git a/web/src/stores/terminal.ts b/web/src/stores/terminal.ts index 034e5ad..2b3e1e0 100644 --- a/web/src/stores/terminal.ts +++ b/web/src/stores/terminal.ts @@ -100,6 +100,16 @@ export const useTerminal = defineStore( } function addTask(command: string, blockOnFailure = true, extend = '', callback: Function = () => {}) { + const duplicatePending = state.taskList.some( + (item) => + item.command === command && + (item.status === taskStatus.Waiting || + item.status === taskStatus.Connecting || + item.status === taskStatus.Executing) + ) + if (duplicatePending) { + return + } if (!state.show) toggleDot(true) state.taskList = state.taskList.concat({ uuid: uuid(),