diff --git a/app-store-ui/src/dist/luci-static/istore/i18n/en.json b/app-store-ui/src/dist/luci-static/istore/i18n/en.json
index b3c0e4a6e..1ce01e969 100644
--- a/app-store-ui/src/dist/luci-static/istore/i18n/en.json
+++ b/app-store-ui/src/dist/luci-static/istore/i18n/en.json
@@ -1 +1 @@
-{"en":{"%{ num } download":["%{ num } download","%{ num } downloads"],"%{ num } like":["%{ num } like","%{ num } likes"],"all app":"all app","app backup":"app backup","are you sure you want to uninstall %{name}?":"are you sure you want to uninstall %{name}?","author":"author","backup fail":"backup fail","backup now":"backup now","backup now backs up installed software (unlimited installation sources) to external storage":"backup now backs up installed software (unlimited installation sources) to external storage","backup now will download a list of iStore installed software":"backup now will download a list of iStore installed software","backup success":"backup success","backuping":"backuping","By download":"By download","By rating":"By rating","checking for latest version":"checking for latest version","choose":"choose","choose backup file":"choose backup file","click to download":"click to download","click to update":"click to update","closed":"closed","customize":"customize","default":"default","do not refresh this page during plugin installation/uninstallation":"do not refresh this page during plugin installation/uninstallation","download":"Download","explain":"explain","external storage directory":"external storage directory","from this page, you can upload plugin packages to install plugins":"from this page, you can upload plugin packages to install plugins","Icon is gone":"Icon is gone","install":"install","installation failed, error code":"installation failed, error code","installation is complete, please close the current window":"installation is complete, please close the current window","installed":"installed","installing plugin":"installing plugin","last version":"last version","light backup":"light backup","like":"like","liked":"liked","loading data":"loading data","local backup":"local backup","maintain":"maintain","manual install":"manual install","monitor":"Monitor","multimedia":"Multimedia","nas":"NAS","net":"Net","networking":"Networking","no files selected":"no files selected","no internet required for recovery":"no internet required for recovery","offline install":"offline install","offline installation failed with error code":"offline installation failed with error code","offline installation is successful, please close the current window":"offline installation is successful, please close the current window","open":"open","order":"order","please enter an absolute path starting with %{name}":"please enter an absolute path starting with %{name}","please enter the path, give up the input, please clear the input box":"please enter the path, give up the input, please clear the input box","please enter the search keyword":"please enter the search keyword","please fill in the external storage directory":"please fill in the external storage directory","please select a backup file to restore":"please select a backup file to restore","restore backup":"restore backup","restore now":"restore now","restoring backup":"restoring backup","select or drag and drop files":"select or drag and drop files","service":"Service","support .ipk plug-in, .run self-extracting format":"support .ipk plug-in, .run self-extracting format","system":"System","tag":"Tag","the backup was restored fail":"the backup was restored fail","the backup was restored success":"the backup was restored success","the is last version":"the is last version","the update is success, please close the current window":"the update is success, please close the current window","there are no backup files in this path":"there are no backup files in this path","tool":"Tool","uninstall":"uninstall","uninstall failed, error code":"uninstall failed, error code","uninstallation succeeded, please close the current window":"uninstallation succeeded, please close the current window","uninstalling plugin":"uninstalling plugin","update date":"update date","update error":"update error","update failed with error code":"update failed with error code","update success":"update success","updateing":"updateing","updating plugin":"updating plugin","upgrade":"upgrade","upload software list and install from iStore when restoring backup":"upload software list and install from iStore when restoring backup","uploading plugin":"uploading plugin","website":"website","you have already liked":"you have already liked"}}
\ No newline at end of file
+{"en":{"%{ num } download":["%{ num } download","%{ num } downloads"],"%{ num } like":["%{ num } like","%{ num } likes"],"all app":"all app","app backup":"app backup","are you sure you want to uninstall %{name}?":"are you sure you want to uninstall %{name}?","author":"author","backup fail":"backup fail","backup fail with error code":"backup fail with error code","backup now":"backup now","backup now backs up installed software (unlimited installation sources) to external storage":"backup now backs up installed software (unlimited installation sources) to external storage","backup now will download a list of iStore installed software":"backup now will download a list of iStore installed software","backup success":"backup success","backuping":"backuping","By download":"By download","By rating":"By rating","checking for latest version":"checking for latest version","choose":"choose","choose backup file":"choose backup file","click to download":"click to download","click to update":"click to update","closed":"closed","customize":"customize","default":"default","download":"Download","explain":"explain","external storage directory":"external storage directory","from this page, you can upload plugin packages to install plugins":"from this page, you can upload plugin packages to install plugins","Icon is gone":"Icon is gone","install":"install","installation failed, error code":"installation failed, error code","installed":"installed","last version":"last version","light backup":"light backup","like":"like","liked":"liked","loading data":"loading data","local backup":"local backup","maintain":"maintain","manual install":"manual install","monitor":"Monitor","multimedia":"Multimedia","nas":"NAS","net":"Net","networking":"Networking","no files selected":"no files selected","no internet required for recovery":"no internet required for recovery","offline install":"offline install","offline installation failed with error code":"offline installation failed with error code","open":"open","order":"order","please enter an absolute path starting with %{name}":"please enter an absolute path starting with %{name}","please enter the path, give up the input, please clear the input box":"please enter the path, give up the input, please clear the input box","please enter the search keyword":"please enter the search keyword","please fill in the external storage directory":"please fill in the external storage directory","please select a backup file to restore":"please select a backup file to restore","restore backup":"restore backup","restore failed with error code":"restore failed with error code","restore now":"restore now","select or drag and drop files":"select or drag and drop files","service":"Service","support .ipk plug-in, .run self-extracting format":"support .ipk plug-in, .run self-extracting format","system":"System","tag":"Tag","the is last version":"the is last version","there are no backup files in this path":"there are no backup files in this path","tool":"Tool","uninstall":"uninstall","uninstall failed, error code":"uninstall failed, error code","update date":"update date","update error":"update error","update failed with error code":"update failed with error code","update success, reloading":"update success, reloading","updateing":"updateing","upgrade":"upgrade","upload software list and install from iStore when restoring backup":"upload software list and install from iStore when restoring backup","uploading":"uploading","website":"website","you have already liked":"you have already liked"}}
\ No newline at end of file
diff --git a/app-store-ui/src/dist/luci-static/istore/i18n/zh-cn.json b/app-store-ui/src/dist/luci-static/istore/i18n/zh-cn.json
index 24f2a4354..8d33f7cbc 100644
--- a/app-store-ui/src/dist/luci-static/istore/i18n/zh-cn.json
+++ b/app-store-ui/src/dist/luci-static/istore/i18n/zh-cn.json
@@ -1 +1 @@
-{"zh-cn":{"%{ num } download":["%{ num } 次下载","%{ num } 次下载"],"%{ num } like":["%{ num } 次点赞","%{ num } 次点赞"],"all app":"全部软件","app backup":"软件备份","are you sure you want to uninstall %{name}?":"确定要卸载 %{name} 吗?","author":"作者","backup fail":"备份失败","backup now":"立即备份","backup now backs up installed software (unlimited installation sources) to external storage":"立即备份将备份已安装软件(不限安装来源)到外部存储","backup now will download a list of iStore installed software":"立即备份将下载iStore已安装的软件列表","backup success":"备份成功","backuping":"正在备份","By download":"按下载","By rating":"按评分","checking for latest version":"正在检查最新版本","choose":"请选择","choose backup file":"选择备份文件","click to download":"点此下载","click to update":"点我更新","closed":"关闭","customize":"自定义","default":"默认","do not refresh this page during plugin installation/uninstallation":"插件安装/卸载过程中请勿刷新此页面","download":"下载","explain":"说明","external storage directory":"外部存储目录","from this page, you can upload plugin packages to install plugins":"通过本页,你可以上传插件包来安装插件","Icon is gone":"图标出走啦","install":"安装","installation failed, error code":"安装失败,错误码","installation is complete, please close the current window":"安装完成,请关闭当前窗口","installed":"已安装","installing plugin":"正在安装插件","last version":"最新版本","light backup":"轻量备份","like":"点赞","liked":"已点赞","loading data":"正在努力的获取数据","local backup":"本地备份","maintain":"维护","manual install":"手动安装","monitor":"监控","multimedia":"多媒体","nas":"NAS","net":"网络","networking":"组网","no files selected":"未选择任何文件","no internet required for recovery":"恢复时不需要网络","offline install":"离线安装","offline installation failed with error code":"离线安装失败,错误码","offline installation is successful, please close the current window":"离线安装成功,请关闭当前窗口","open":"打开","order":"排序","please enter an absolute path starting with %{name}":"请输入 %{name} 开头的绝对路径","please enter the path, give up the input, please clear the input box":"请输入路径,放弃输入请清空输入框","please enter the search keyword":"请输入搜索关键词","please fill in the external storage directory":"请填写外部存储目录","please select a backup file to restore":"请选择要恢复的备份文件","restore backup":"恢复备份","restore now":"立即恢复","restoring backup":"正在恢复备份","select or drag and drop files":"选择或拖放文件","service":"服务","support .ipk plug-in, .run self-extracting format":"支持 .ipk 插件,.run 自解压格式","system":"系统","tag":"标签","the backup was restored fail":"恢复备份失败","the backup was restored success":"恢复备份成功","the is last version":"当前已经是最新版本","the update is success, please close the current window":"更新成功,请关闭当前窗口","there are no backup files in this path":"此路径下没有备份文件","tool":"工具","uninstall":"卸载","uninstall failed, error code":"卸载失败,错误码","uninstallation succeeded, please close the current window":"卸载完成,请关闭当前窗口","uninstalling plugin":"正在卸载插件","update date":"更新日期","update error":"更新失败","update failed with error code":"更新失败,错误代码","update success":"更新成功","updateing":"正在更新中","updating plugin":"正在更新插件","upgrade":"更新","upload software list and install from iStore when restoring backup":"复备份时上传软件列表并从iStore安装","uploading plugin":"正在上传插件","website":"官网","you have already liked":"您已经点赞过啦"}}
\ No newline at end of file
+{"zh-cn":{"%{ num } download":["%{ num } 次下载","%{ num } 次下载"],"%{ num } like":["%{ num } 次点赞","%{ num } 次点赞"],"all app":"全部软件","app backup":"软件备份","are you sure you want to uninstall %{name}?":"确定要卸载 %{name} 吗?","author":"作者","backup fail":"备份失败","backup fail with error code":"备份失败,错误代码","backup now":"立即备份","backup now backs up installed software (unlimited installation sources) to external storage":"立即备份将备份已安装软件(不限安装来源)到外部存储","backup now will download a list of iStore installed software":"立即备份将下载iStore已安装的软件列表","backup success":"备份成功","backuping":"正在备份","By download":"按下载","By rating":"按评分","checking for latest version":"正在检查最新版本","choose":"请选择","choose backup file":"选择备份文件","click to download":"点此下载","click to update":"点我更新","closed":"关闭","customize":"自定义","default":"默认","download":"下载","explain":"说明","external storage directory":"外部存储目录","from this page, you can upload plugin packages to install plugins":"通过本页,你可以上传插件包来安装插件","Icon is gone":"图标出走啦","install":"安装","installation failed, error code":"安装失败,错误码","installed":"已安装","last version":"最新版本","light backup":"轻量备份","like":"点赞","liked":"已点赞","loading data":"正在努力的获取数据","local backup":"本地备份","maintain":"维护","manual install":"手动安装","monitor":"监控","multimedia":"多媒体","nas":"NAS","net":"网络","networking":"组网","no files selected":"未选择任何文件","no internet required for recovery":"恢复时不需要网络","offline install":"离线安装","offline installation failed with error code":"离线安装失败,错误码","open":"打开","order":"排序","please enter an absolute path starting with %{name}":"请输入 %{name} 开头的绝对路径","please enter the path, give up the input, please clear the input box":"请输入路径,放弃输入请清空输入框","please enter the search keyword":"请输入搜索关键词","please fill in the external storage directory":"请填写外部存储目录","please select a backup file to restore":"请选择要恢复的备份文件","restore backup":"恢复备份","restore failed with error code":"恢复失败,错误代码","restore now":"立即恢复","select or drag and drop files":"选择或拖放文件","service":"服务","support .ipk plug-in, .run self-extracting format":"支持 .ipk 插件,.run 自解压格式","system":"系统","tag":"标签","the is last version":"当前已经是最新版本","there are no backup files in this path":"此路径下没有备份文件","tool":"工具","uninstall":"卸载","uninstall failed, error code":"卸载失败,错误码","update date":"更新日期","update error":"更新失败","update failed with error code":"更新失败,错误代码","update success, reloading":"更新成功,重新加载页面","updateing":"正在更新中","upgrade":"更新","upload software list and install from iStore when restoring backup":"复备份时上传软件列表并从iStore安装","uploading":"上传中","website":"官网","you have already liked":"您已经点赞过啦"}}
\ No newline at end of file
diff --git a/app-store-ui/src/dist/luci-static/istore/index.js b/app-store-ui/src/dist/luci-static/istore/index.js
index efc130224..063d6769f 100644
--- a/app-store-ui/src/dist/luci-static/istore/index.js
+++ b/app-store-ui/src/dist/luci-static/istore/index.js
@@ -1,35 +1,8 @@
-var Ee=Object.defineProperty,Ie=Object.defineProperties;var De=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var Pe=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable;var $e=(t,e,n)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z=(t,e)=>{for(var n in e||(e={}))Pe.call(e,n)&&$e(t,n,e[n]);if(be)for(var n of be(e))Be.call(e,n)&&$e(t,n,e[n]);return t},_e=(t,e)=>Ie(t,De(e));var Ve=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var A=(t,e,n)=>new Promise((a,o)=>{var l=c=>{try{i(n.next(c))}catch(h){o(h)}},u=c=>{try{i(n.throw(c))}catch(h){o(h)}},i=c=>c.done?a(c.value):Promise.resolve(c.value).then(l,u);i((n=n.apply(t,e)).next())});import{a as he,c as Fe,u as R,b as H,d as B,r as re,o as d,e as _,F as U,f as K,g as X,w as Me,h as r,p as le,i as ce,j as s,t as f,k as z,n as j,l as ze,m as S,q as xe,s as Ue,v as N,x as ge,y as Ce,z as ue,A as Se,B as Le,C as Oe,D as ye,E as Re,G as Ne,H as Ge}from"./vendor.js?v=64c6a109";var jo=Ve(I=>{const He=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};He();const pe={tagMap:{},numberFormat:new Intl.NumberFormat("en",{notation:"compact"})},Ke=t=>A(I,null,function*(){const e=window.vue_lang;new Date().getTime();let n={};try{const l=yield he({url:window.vue_lang_data,method:"GET"});l.data&&(n=l.data)}catch(l){console.log(l)}const a=Fe({defaultLanguage:e,translations:n,setGlobalProperties:!1,provideDirective:!1,provideComponent:!1});t.use(a);const{$gettext:o}=a;window.$i18n=o,pe.tagMap={net:o("net"),tool:o("tool"),download:o("download"),service:o("service"),multimedia:o("multimedia"),nas:o("nas"),monitor:o("monitor"),system:o("system"),networking:o("networking")};try{pe.numberFormat=new Intl.NumberFormat(e,{notation:"compact"})}catch(l){console.error("Intl.NumberFormat unsupported lang",e,l)}}),Ae=t=>pe.tagMap[t]||t,ke=t=>typeof t=="number"?pe.numberFormat.format(t):"?";var E=(t,e)=>{const n=t.__vccOpts||t;for(const[a,o]of e)n[a]=o;return n};const We=t=>(le("data-v-13251538"),t=t(),ce(),t),qe={class:"tabs"},Ze=["href","onClick"],Ye={key:0},Je=We(()=>s("div",{class:"auto"},null,-1)),Qe={setup(t){const{$gettext:e}=R(),n=H(),a=B(()=>n.state.version),o=B(()=>[{to:"/installed",name:e("installed")},{to:"/store",name:e("all app")},{to:"/upload",name:e("manual install")},{to:"/maintance",name:e("maintain"),up:a.value}]);return(l,u)=>{const i=re("router-link");return d(),_("ul",qe,[(d(!0),_(U,null,K(r(o),c=>(d(),X(i,{to:c.to,custom:"",key:c.to},{default:Me(({href:h,navigate:y,isActive:k})=>[s("li",{class:j(k&&"active cbi-tab")},[s("a",{href:h,onClick:y},f(c.name),9,Ze),c.up?(d(),_("span",Ye)):z("",!0)],2)]),_:2},1032,["to"]))),128)),Je])}}};var Xe=E(Qe,[["__scopeId","data-v-13251538"]]);const je=()=>window.vue_base,et=()=>window.istore_api_base||"https://istore.linkease.com",tt=t=>{if(t)return ze(t).format("YYYY-MM-DD HH:mm:ss")},nt=()=>new Date().getTime(),at=t=>{if(t<1024)return""+t+"KB";let n=1024,a=0;for(let l=t/1024;l>=1024;l/=1024)n*=1024,a++;let o=["M","G","T","P","E"];return(t/100/(n/100)).toFixed(2)+o[a]},ot=t=>{if(t==null)return 0;if(t<1e4)return t;let n=parseInt(`${t/1e4}`),a=t%1e4;return`${n}\u4E07${a}`},st=()=>window.token||"",rt=()=>{var t;return((t=window==null?void 0:window.device_id)==null?void 0:t.uid)||""},lt=()=>{var t;return((t=window==null?void 0:window.device_id)==null?void 0:t.version)||""},ct=()=>{var t;return((t=window==null?void 0:window.device_id)==null?void 0:t.arch)||""},it=()=>"https://www.kooldns.cn/bind";var ut=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",BasePage:je,ApiBaseURL:et,formatDate:tt,UnixDate:nt,numberToSize:at,numberToSum:ot,getToken:st,getDeviceId:rt,getVersion:lt,modelArch:ct,getIframeURL:it}),O=Z({},ut);const P=he.create({});P.interceptors.request.use(t=>(t.params==null&&(t.params={}),t.params=_e(Z({},t.params),{token:O.getToken(),_t:O.UnixDate()}),t),t=>t);P.interceptors.response.use(t=>t,t=>t);const Y=he.create({baseURL:O.ApiBaseURL()});Y.interceptors.request.use(t=>(t.params==null&&(t.params={}),t.params=_e(Z({},t.params),{modelArch:O.modelArch(),deviceId:O.getDeviceId(),_t:O.UnixDate()}),t),t=>t);Y.interceptors.response.use(t=>t);const dt=()=>new Promise((t,e)=>A(I,null,function*(){try{const n=yield P({method:"GET",url:"/cgi-bin/luci/admin/store/installed"});if(n.status==200){t(n.data);return}e(n.status);return}catch(n){e(n);return}})),pt=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/install",params:{package:t}});if(a.status==200){e(a.data);return}n(a.status);return}catch(a){n(a);return}})),_t=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/upgrade",params:{package:t}});if(a.status==200){e(a.data);return}n(a.status);return}catch(a){n(a);return}})),ht=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/remove",params:{package:t}});if(a.status==200){e(a.data);return}n(a.status);return}catch(a){n(a);return}})),gt=()=>new Promise((t,e)=>A(I,null,function*(){try{const n=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/update"});if(n.status==200){t(n.data);return}e(n.status);return}catch(n){e(n);return}})),ft=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"GET",url:"/cgi-bin/luci/admin/store/status",params:{package:t}});if(a.status==200){e(a.data);return}n(a.status);return}catch(a){n(a);return}})),vt=()=>new Promise((t,e)=>A(I,null,function*(){try{const n=yield P({method:"GET",url:"/cgi-bin/luci/admin/store/log"});if(n.status==200){t(n.data);return}e(n.status);return}catch(n){e(n);return}})),mt=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/upload",headers:{"Content-Type":"multipart/form-data"},data:t});if(a.data){e(a.data);return}}catch(a){n(a);return}n("not found soft")})),wt=()=>new Promise((t,e)=>A(I,null,function*(){try{const n=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/light_backup"});if(n.status==200){t(n.data);return}e(n.status);return}catch(n){e(n);return}})),bt=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/light_restore",headers:{"Content-Type":"multipart/form-data"},data:t});if(a.data){e(a.data);return}}catch(a){n(a);return}n("not found soft")})),$t=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"GET",url:"/cgi-bin/luci/admin/store/get_available_backup_file_list",params:{path:t}});if(a.status==200){e(a==null?void 0:a.data);return}n(a.status);return}catch(a){n(a);return}})),yt=()=>new Promise((t,e)=>A(I,null,function*(){try{const n=yield P({method:"GET",url:"/cgi-bin/luci/admin/store/get_local_backup_dir_path"});if(n.status==200){t(n==null?void 0:n.data);return}e(n.status);return}catch(n){e(n);return}})),kt=(t,e)=>new Promise((n,a)=>A(I,null,function*(){try{const o=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/local_backup",params:{path:t,force:e}});if(o.status==200){n(o==null?void 0:o.data);return}a(o.status);return}catch(o){a(o);return}})),xt=t=>new Promise((e,n)=>A(I,null,function*(){try{const a=yield P({method:"POST",url:"/cgi-bin/luci/admin/store/local_restore",params:{path:t}});if(a.status==200){e(a.data);return}n(a.status);return}catch(a){n(a);return}})),Ct=()=>new Promise((t,e)=>A(I,null,function*(){try{const n=yield P({method:"GET",url:"/cgi-bin/luci/admin/store/get_block_devices"});if(n.status==200){t(n==null?void 0:n.data);return}e(n.status);return}catch(n){e(n);return}}));var St=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",getInstalledApp:dt,installApp:pt,upgradeApp:_t,removeApp:ht,updateAppStore:gt,getAppStatus:ft,getLog:vt,uploadAppIPK:mt,lightBackup:wt,lightRestore:bt,backupFileList:$t,localBackupdirPath:yt,localBackup:kt,localRestore:xt,getBlockDevices:Ct});const Lt=t=>new Promise((e,n)=>A(I,null,function*(){var a,o,l,u;try{const i=yield Y({method:"GET",url:"/api/store/list",params:t});if(((a=i==null?void 0:i.data)==null?void 0:a.success)===0){e((o=i==null?void 0:i.data)==null?void 0:o.result);return}if((l=i==null?void 0:i.data)!=null&&l.message){n((u=i==null?void 0:i.data)==null?void 0:u.message);return}n("error")}catch(i){console.log(i),n(i);return}})),At=O.ApiBaseURL(),Tt=t=>`${At}${t}`,Et=()=>new Promise((t,e)=>A(I,null,function*(){var n,a,o,l;try{const u=yield Y({method:"GET",url:"/api/store/tags"});if(((n=u==null?void 0:u.data)==null?void 0:n.success)===0){t((a=u==null?void 0:u.data)==null?void 0:a.result);return}if((o=u==null?void 0:u.data)!=null&&o.message){e((l=u==null?void 0:u.data)==null?void 0:l.message);return}e("error")}catch(u){e(u);return}})),It=t=>new Promise((e,n)=>{Y({method:"POST",url:"/api/store/expand",data:{appsId:t||[],deviceId:O.getDeviceId()}}).then(a=>{var o,l,u;if(((o=a.data)==null?void 0:o.success)==0&&((l=a.data)==null?void 0:l.result)){e((u=a.data)==null?void 0:u.result);return}n("not found expand")}).catch(a=>{n(a)})}),Dt=t=>{Y({method:"POST",url:"/api/store/download",data:{appId:t,deviceId:O.getDeviceId()}}).then(e=>{var n;((n=e.data)==null?void 0:n.success)!=0})},Pt=t=>new Promise((e,n)=>{Y({method:"POST",url:"/api/store/star",data:{appId:t,deviceId:O.getDeviceId()}}).then(a=>{var o;if(((o=a.data)==null?void 0:o.success)==0){e(a.data);return}n("not found expand")}).catch(a=>{n(a)})});var Bt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",getStoreAppList:Lt,getStoreAppIcon:Tt,getStoreTags:Et,getAppExpandData:It,increasingDownloadCount:Dt,postStarApp:Pt});const Vt=()=>P({method:"GET",url:"/cgi-bin/luci/admin/store/check_self_upgrade"}),Ft=()=>P({method:"POST",url:"/cgi-bin/luci/admin/store/do_self_upgrade"});var Mt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",updateIstore:Vt,selfUpdateIstore:Ft}),T=Z(Z(Z({},St),Bt),Mt);const zt={setup(){const t=H(),e=B(()=>t.state.log.action),n=B(()=>t.state.log.content),a=B(()=>t.state.log.end),o=B(()=>t.state.log.exitCode),l=S(!1),u=S(null);let i="",c=S(""),h=S("."),y="",k="";switch(e.value){case"install":i="\u6B63\u5728\u5B89\u88C5\u63D2\u4EF6",y="\u5B89\u88C5\u5B8C\u6210,\u8BF7\u5173\u95ED\u5F53\u524D\u7A97\u53E3",k="\u5B89\u88C5\u5931\u8D25,\u9519\u8BEF\u7801";break;case"uninstall":i="\u6B63\u5728\u5378\u8F7D\u63D2\u4EF6",y="\u5378\u8F7D\u6210\u529F,\u8BF7\u5173\u95ED\u5F53\u524D\u7A97\u53E3",k="\u5378\u8F7D\u5931\u8D25,\u9519\u8BEF\u7801";break;case"upgrade":i="\u6B63\u5728\u66F4\u65B0\u63D2\u4EF6",y="\u66F4\u65B0\u6210\u529F,\u8BF7\u5173\u95ED\u5F53\u524D\u7A97\u53E3",k="\u66F4\u65B0\u5931\u8D25,\u9519\u8BEF\u7801";break;case"upload":i="\u6B63\u5728\u4E0A\u4F20\u63D2\u4EF6",y="\u79BB\u7EBF\u5B89\u88C5\u6210\u529F,\u8BF7\u5173\u95ED\u5F53\u524D\u7A97\u53E3",k="\u79BB\u7EBF\u5B89\u88C5\u5931\u8D25,\u9519\u8BEF\u7801";break}xe(()=>{document.body.setAttribute("lock-scroll",!0),V()}),Ue(()=>{document.body.removeAttribute("lock-scroll")});const D=()=>{var g;(g=u.value)!=null&&g.scrollHeight&&(u.value.scrollTop=u.value.scrollHeight)},V=()=>{setTimeout(()=>{if(a.value){b(),D();return}T.getLog().then(g=>{if(a.value){b(),D();return}switch(g==null?void 0:g.code){}const C=g==null?void 0:g.stdout,v=g==null?void 0:g.stderr;(C||v)&&(c.value=`${C}${v}`),h.value=`${h.value}.`,D(),V()}).catch(g=>{c.value=`${g}`,D(),V()})},500)},b=()=>{l.value=!0},p=()=>{location.reload()};return{logText:B(()=>l.value?o.value!==void 0&&o.value!==0?`${i}
-${n.value}
-${k} ${o.value}
-`:`${i}
-${n.value}
-${y}
-`:`${i}
-${h.value}
-${c.value}
-${n.value}
-`),Close:p,disabled:l,textDom:u}},mounted(){this.$nextTick(()=>{const t=document.querySelector("body");t.append?t.append(this.$el):t.appendChild(this.$el)})}},fe=t=>(le("data-v-6695545b"),t=t(),ce(),t),Ut={class:"software-log_shade"},Ot=fe(()=>s("div",{class:"software-log_shade__bg"},null,-1)),Rt={class:"software-log_shade__pannel"},Nt=fe(()=>s("div",{class:"software-log_shade__pannel-title"}," \u8F6F\u4EF6\u4E2D\u5FC3 - \u65E5\u5FD7\u8BB0\u5F55 ",-1)),Gt=fe(()=>s("div",{class:"software-log_shade__pannel-now"},[s("i",null,"\xA0\xA0\xA0\xA0\u63D2\u4EF6\u5B89\u88C5/\u5378\u8F7D\u8FC7\u7A0B\u4E2D\u8BF7\u52FF\u5237\u65B0\u6B64\u9875\u9762\uFF01")],-1)),Ht={class:"software-log_shade__pannel-content"},Kt=["value"],Wt={key:0,class:"software-log_shade__pannel-btn"};function qt(t,e,n,a,o,l){return d(),_("div",Ut,[Ot,s("div",Rt,[Nt,Gt,s("div",Ht,[s("textarea",{ref:"textDom",cols:"63",rows:"26",wrap:"on",readonly:"readonly",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",value:a.logText},null,8,Kt)]),a.disabled?(d(),_("div",Wt,[s("button",{class:"close",onClick:e[0]||(e[0]=u=>a.Close())}," \u5173\u95ED ")])):z("",!0)])])}var Zt=E(zt,[["render",qt],["__scopeId","data-v-6695545b"]]);const Yt={setup(t){const e=H();e.dispatch("getData");const n=B(()=>e.state.log.status);return(a,o)=>{const l=re("router-view");return d(),_(U,null,[N(Xe),N(l),r(n)?(d(),X(Zt,{key:0})):z("",!0)],64)}}},Jt={class:"toast"},Qt=["title"],Xt={key:1,class:"msg"},jt=["innerHTML"],en={props:{content:String,type:String,Close:Function,keep:Boolean,html:Boolean},setup(t){const e=t,n=S(e.content),a=S(e.keep),o=S(e.html),l=S(window.$i18n);e.keep||setTimeout(()=>{e.Close()},2e3);const u=()=>{e.Close()};return(i,c)=>(d(),_("div",Jt,[a.value?(d(),_("div",{key:0,class:"toast-close",onClick:u,title:l.value("closed")},"x",8,Qt)):z("",!0),o.value?z("",!0):(d(),_("div",Xt,f(n.value),1)),o.value?(d(),_("div",{key:2,class:"msg",innerHTML:n.value},null,8,jt)):z("",!0)]))}};var tn=E(en,[["__scopeId","data-v-b05f92bc"]]);const M=t=>{let e={content:"",type:"",keep:!1,html:!1,Close:()=>{a.unmount(n),document.body.removeChild(n)}};t!=null&&(typeof t=="object"?(e.content=(t==null?void 0:t.content)||"",e.type=(t==null?void 0:t.type)||"",e.keep=(t==null?void 0:t.keep)||!1,e.html=(t==null?void 0:t.html)||!1):e.content=t);let n=document.createElement("div"),a=ge(tn,e);document.body.append(n),a.mount(n),Ce(()=>{a.unmount(n),document.body.removeChild(n)})},nn={props:{content:String,Close:Function},setup(t){return{message:t.content}}},an=t=>(le("data-v-6d7664a4"),t=t(),ce(),t),on={class:"loading"},sn=an(()=>s("div",{class:"icon"},null,-1)),rn={class:"msg"};function ln(t,e,n,a,o,l){return d(),_("div",on,[sn,s("div",rn,f(a.message),1)])}var cn=E(nn,[["render",ln],["__scopeId","data-v-6d7664a4"]]),G={props:{content:"",Close:()=>{}},Start(t){this.props={content:t,Close:()=>{e.unmount(n),document.body.removeChild(n)}};let e=ge(cn,this.props),n=document.createElement("div");document.body.append(n),e.mount(n),Ce(()=>{this.props.Close()})},Stop(){this.props.Close()}};const un=()=>`
-
- `,dn=()=>{const t=document.createElement("div");return t.className="software-log_shade",t.setAttribute("data-logger",""),t.innerHTML=un(),t},pn=()=>{const t=document.createElement("div");return t.className="software-log_shade__bg",t},_n=()=>{const t=document.createElement("div");return t.className="software-log_shade__pannel",t},hn=t=>{const e=document.createElement("div");return e.className="software-log_shade__pannel-title",e.textContent=t,e},gn=t=>{const e=document.createElement("div");return e.className="software-log_shade__pannel-now",e.innerHTML=` ${t}`,e},fn=()=>{const t=document.createElement("div");return t.className="software-log_shade__pannel-content",t},vn=t=>{const e=document.createElement("textarea");return e.setAttribute("readonly",""),e.setAttribute("cols","63"),e.setAttribute("rows","26"),e.setAttribute("wrap","on"),e.setAttribute("autocomplete","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false"),e.className="software-log_shade__pannel-content-text",e.value=t,e},mn=(t,e)=>{const n=document.createElement("button");return n.className="software-log_shade__pannel-btn-close",n.textContent=t,n.addEventListener("click",e),n},wn=()=>{const t=document.createElement("div");return t.className="software-log_shade__pannel-btn",t},bn=t=>{const e=t.title!=null?t.title:"\u65E5\u5FD7\u8BB0\u5F55",n=t.description!=null?t.description:"\u63D2\u4EF6\u5B89\u88C5/\u5378\u8F7D\u8FC7\u7A0B\u4E2D\u8BF7\u52FF\u5237\u65B0\u6B64\u9875\u9762!",a=t.clearText!=null?t.clearText:"\u5173\u95ED",o=t.value!=null?t.value:"",l=t.callback!=null?t.callback:()=>{};return{title:e,description:n,clearText:a,valueText:o,callback:l}},de=t=>{const{title:e,description:n,clearText:a,valueText:o,callback:l}=bn(t);let u=!1,i="",c="",h=!1;const y=dn(),k=()=>{h||(document.body&&document.body.removeAttribute("lock-scroll"),l&&l(),y&&y.remove(),h=!0)},D=()=>{W.scrollTop=W.scrollHeight},V=L=>{W.value=`${i}
-${L}`,D()},b=L=>{c=L,V(c)},p=L=>{b(c+L)},m=()=>{i+=".",b(c)},g=L=>{u=L,u?J.appendChild(te):J.removeChild(te)},C=()=>u,v=()=>{C()||setTimeout(()=>{T.getLog().then(L=>{switch(L==null?void 0:L.code){}const ne=L==null?void 0:L.stdout,ae=L==null?void 0:L.stderr;(ne||ae)&&b(`${ne}${ae}`),m()}).catch(L=>{b(`${L}`)}).finally(()=>{v()})},500)};v();const $=pn(),w=_n(),x=hn(e),F=gn(n),ee=fn(),W=vn(o);ee.appendChild(W);const J=wn(),te=mn(a,k);return w.append(x,F,ee,J),y.append($,w),document.body.appendChild(y),document.body.setAttribute("lock-scroll","true"),{close:k,setValue:b,addValue:p,setDisabled:g,getDisabled:C}},ie=t=>(le("data-v-42a2bb20"),t=t(),ce(),t),$n={class:"app-container"},yn={class:"app-info"},kn={class:"app-f"},xn={class:"app-icon"},Cn=["alt","src"],Sn={class:"app-tags"},Ln={class:"tag"},An=ie(()=>s("span",{class:"block"},"\uFF5C",-1)),Tn={class:"app-r"},En=["title"],In={class:"app-name"},Dn={class:"app-version"},Pn={class:"app-as"},Bn=ie(()=>s("span",{style:{margin:"0 10px"}},"|",-1)),Vn=["title"],Fn=["title"],Mn=["title"],zn={class:"app-author"},Un={class:"app-date"},On={class:"app-btns"},Rn=["href"],Nn=ie(()=>s("div",{class:"auto"},null,-1)),Gn=ie(()=>s("div",{class:"app-margin-left"},null,-1)),Hn=["href"],Kn=ie(()=>s("div",{class:"app-margin-left"},null,-1)),Wn={props:{col:{type:Object,default(){return{description:"",tags:[],entry:"",author:"",depends:[],installed:!1,hasupdate:!1,title:"",time:"",release:1,website:"",name:"",version:""}}}},setup(t){const e=t,{$gettext:n,$ngettext:a}=R(),o=B(()=>e.col),l=H(),u=O.formatDate,i=p=>{const m=de({title:n("updating plugin"),description:n("do not refresh this page during plugin installation/uninstallation"),clearText:n("closed"),valueText:"",callback:()=>{location.reload()}});T.upgradeApp(p).then(g=>{let C=g.stdout,v=g.stderr;g.code!==0?(m.addValue(`${v}`),m.addValue(`
-${n("update failed with error code")}: ${g.code}`)):(m.addValue(`${C}
-${v}`),m.addValue(`
-${n("the update is success, please close the current window")}`))}).catch(g=>{m.addValue(`${g}`),m.addValue(`
-${n("update failed with error code")}: ${500}`)}).finally(()=>{m.setDisabled(!0);try{window.L.ui.menu.flushCache()}catch(g){}})},c=p=>{const m=de({title:n("installing plugin"),description:n("do not refresh this page during plugin installation/uninstallation"),clearText:n("closed"),valueText:"",callback:()=>{location.reload()}});T.increasingDownloadCount(p),l.dispatch("apps/incrAppDownload",{name:p}),T.installApp(p).then(g=>{let C=g.stdout,v=g.stderr;g.code!==0?(m.addValue(`${v}`),m.addValue(`
-${n("installation failed, error code")}: ${g.code}`)):(m.addValue(`${C}
-${v}`),m.addValue(`
-${n("installation is complete, please close the current window")}`))}).catch(g=>{m.addValue(`${g}`),m.addValue(`
-${n("installation failed, error code")}: ${500}`)}).finally(()=>{m.setDisabled(!0);try{window.L.ui.menu.flushCache()}catch(g){}})},h=p=>{if(!confirm(n("are you sure you want to uninstall %{name}?",{name:p})))return;const g=de({title:n("uninstalling plugin"),description:n("do not refresh this page during plugin installation/uninstallation"),clearText:n("closed"),valueText:"",callback:()=>{location.reload()}});T.removeApp(p).then(C=>{let v=C.stdout,$=C.stderr;g.addValue(`${v}
-${$}`),g.addValue(`
-${n("uninstallation succeeded, please close the current window")}`)}).catch(C=>{g.addValue(`${C}`),g.addValue(`
-${n("uninstall failed, error code")}: ${500}`)}).finally(()=>{g.setDisabled(!0);try{window.L.ui.menu.flushCache()}catch(C){}})},y=p=>A(this,null,function*(){G.Start();try{(yield T.postStarApp(p))&&l.dispatch("apps/incrAppStar",{name:p})}catch(m){}G.Stop()}),k=()=>{M(n("you have already liked"))},D=p=>o.value.installed?`/luci-static/resources/app-icons/${p}.png`:o.value.icon?T.getStoreAppIcon(o.value.icon):`/luci-static/resources/app-icons/${p}.png`,V=p=>{switch(window.vue_lang){case"zh-cn":case"zh-tw":return p.title}return p.title_en||p.title},b=p=>{switch(window.vue_lang){case"zh-cn":case"zh-tw":return p.description}return p.description_en||p.description};return(p,m)=>{var v,$,w,x,F,ee,W,J,te,L,ne,ae,ve,me,we;const g=re("svg-star-off"),C=re("svg-star-on");return d(),_("div",$n,[s("div",yn,[s("div",kn,[s("div",xn,[s("img",{alt:r(n)("Icon is gone")+"~",src:D(r(o).name)},null,8,Cn)]),s("div",Sn,[(d(!0),_(U,null,K(r(o).tags,q=>(d(),_(U,{key:q},[s("div",Ln,[s("span",null,f(r(Ae)(q)),1)]),An],64))),128))])]),s("div",Tn,[s("div",{class:"app-title",title:r(o).name},[s("span",In,f(V(r(o))),1),s("span",Dn,"v"+f(r(o).version),1)],8,En),s("div",Pn,[s("span",null,f(r(a)("%{ num } download","%{ num } downloads",(($=(v=r(o))==null?void 0:v.expand)==null?void 0:$.downloadCount)||0,{num:r(ke)((x=(w=r(o))==null?void 0:w.expand)==null?void 0:x.downloadCount)})),1),Bn,s("span",null,f(r(a)("%{ num } like","%{ num } likes",((ee=(F=r(o))==null?void 0:F.expand)==null?void 0:ee.starCount)||0,{num:r(ke)((J=(W=r(o))==null?void 0:W.expand)==null?void 0:J.starCount)})),1),((te=r(o))==null?void 0:te.expand)!=null?(d(),_(U,{key:0},[(ne=(L=r(o))==null?void 0:L.expand)!=null&&ne.isStar?(d(),_("a",{key:0,class:"star-btn",title:r(n)("liked"),onClick:m[0]||(m[0]=q=>k())},[N(g)],8,Vn)):(d(),_("a",{key:1,class:"star-btn",title:r(n)("like"),onClick:m[1]||(m[1]=q=>y(r(o).name))},[N(C)],8,Fn))],64)):z("",!0)]),s("div",{class:"app-description cbi-value-description",title:b(r(o))},[s("span",null,f(b(r(o))),1)],8,Mn),s("div",zn,[s("span",null,f(r(n)("author"))+": "+f(r(o).author||"null"),1)]),s("div",Un,[s("span",null,f(r(n)("update date"))+": "+f(r(u)(r(o).time*1e3)||"null"),1)])])]),s("div",On,[r(o).website?(d(),_("a",{key:0,class:"app-btn cbi-button cbi-button-apply",target:"_blank",href:r(o).website},f(r(n)("website")),9,Rn)):z("",!0),Nn,r(o).installed?(d(),_(U,{key:1},[((ae=r(o))==null?void 0:ae.curVersion)!=((ve=r(o))==null?void 0:ve.lastVersion)||((me=r(o))==null?void 0:me.curRelease)!=((we=r(o))==null?void 0:we.lastRelease)?(d(),_("a",{key:0,class:"app-btn cbi-button cbi-button-reload",onClick:m[2]||(m[2]=q=>i(r(o).name))},f(r(n)("upgrade")),1)):z("",!0),Gn,r(o).entry?(d(),_("a",{key:1,class:"app-btn cbi-button cbi-button-apply",href:r(o).entry},f(r(n)("open")),9,Hn)):z("",!0),Kn,s("a",{class:"app-btn cbi-button cbi-button-remove",onClick:m[3]||(m[3]=q=>h(r(o).name))},f(r(n)("uninstall")),1)],64)):(d(),_("a",{key:2,class:"app-btn cbi-button cbi-button-add",onClick:m[4]||(m[4]=q=>c(r(o).name))},f(r(n)("install")),1))])])}}};var Te=E(Wn,[["__scopeId","data-v-42a2bb20"]]);const qn={class:"cbi-section"},Zn={class:"containers"},Yn={setup(t){const e=H(),n=B(()=>e.getters["apps/LocalApps"]);return(a,o)=>(d(),_("fieldset",qn,[s("div",Zn,[(d(!0),_(U,null,K(r(n),l=>(d(),X(Te,{key:l.name,col:l},null,8,["col"]))),128))])]))}};var Jn=E(Yn,[["__scopeId","data-v-0046e0f2"]]);const Qn={class:"sort-container"},Xn={class:"sort-title"},jn={class:"sort-value"},ea=["value","onClick"],ta={setup(t){const{$gettext:e}=R(),n=S("default"),a=H(),o=S([{key:e("default"),value:"default"},{key:e("By download"),value:"download"},{key:e("By rating"),value:"star"}]),l=u=>{n.value=u,a.dispatch("apps/filterCurApps",{sort:u})};return(u,i)=>(d(),_("div",Qn,[s("div",Xn,f(r(e)("order"))+":",1),s("div",jn,[(d(!0),_(U,null,K(o.value,c=>(d(),_("input",{key:c.value,class:j(["cbi-button",{"cbi-button-apply":n.value==c.value}]),type:"button",value:c.key,onClick:h=>l(c.value)},null,10,ea))),128))])]))}};var na=E(ta,[["__scopeId","data-v-e3845a5c"]]);const aa={class:"tags-container"},oa={class:"tags-title"},sa={class:"tags-value"},ra=["value"],la=["value","onClick"],ca={setup(t){const{$gettext:e}=R(),n=S("default"),a=H(),o=B(()=>a.getters["tags/Tags"]),l=u=>{n.value=u,a.dispatch("apps/filterCurApps",{tag:u})};return(u,i)=>(d(),_("div",aa,[s("div",oa,f(r(e)("tag"))+": ",1),s("div",sa,[s("input",{class:j(["cbi-button",{"cbi-button-apply":n.value=="default"}]),type:"button",value:r(e)("default"),onClick:i[0]||(i[0]=c=>l("default"))},null,10,ra),(d(!0),_(U,null,K(r(o),c=>(d(),_("input",{key:c,class:j(["cbi-button",{"cbi-button-apply":n.value==c}]),type:"button",value:r(Ae)(c),onClick:h=>l(c)},null,10,la))),128))])]))}};var ia=E(ca,[["__scopeId","data-v-07bccc36"]]);const ua=["onSubmit"],da=["placeholder"],pa={setup(t){const{$gettext:e}=R(),n=S(""),a=H(),o=()=>{a.dispatch("apps/filterCurApps",{search:n.value})};return(l,u)=>{const i=re("svg-search");return d(),_("form",{class:"search",onSubmit:Le(o,["prevent"])},[s("a",{class:"search-btn",onClick:o},[N(i)]),ue(s("input",{type:"text",placeholder:r(e)("please enter the search keyword"),"onUpdate:modelValue":u[0]||(u[0]=c=>n.value=c)},null,8,da),[[Se,n.value,void 0,{trim:!0}]])],40,ua)}}};var _a=E(pa,[["__scopeId","data-v-c4e8a9f2"]]);const ha={class:"containers"},ga={key:1,style:{margin:"10px 0","text-align":"center",width:"100%"}},fa={setup(t){const{$gettext:e}=R(),n=H(),a=B(()=>n.getters["apps/StoreApps"]),o=B(()=>n.state.apps.Load);return(l,u)=>(d(),_("div",ha,[r(o)?(d(!0),_(U,{key:0},K(r(a),i=>(d(),X(Te,{key:i.name,col:i},null,8,["col"]))),128)):(d(),_("span",ga,f(r(e)("loading data"))+"...",1))]))}};var va=E(fa,[["__scopeId","data-v-1b494368"]]);const ma={class:"cbi-section"},wa={setup(t){return(e,n)=>(d(),_("fieldset",ma,[N(_a),N(ia),N(na),N(va)]))}};var ba=E(wa,[["__scopeId","data-v-74b0669f"]]);const $a=t=>(le("data-v-49941f68"),t=t(),ce(),t),ya={class:"cbi-section"},ka={class:"container_msg cbi-map-descr"},xa=["onSubmit"],Ca={class:"upload-file"},Sa={class:"button"},La=$a(()=>s("div",{class:"auto"},null,-1)),Aa={setup(t){const{$gettext:e}=R(),n=S(null),a=S(null);xe(()=>{if(n.value){const i=n.value;i.addEventListener("dragenter",c=>{(c.fromElement===null||!i.contains(c.fromElement))&&console.log("dragenter")},!1),i.addEventListener("dragleave",c=>{(c.fromElement===null||!i.contains(c.fromElement))&&console.log("dragleave")},!1),i.addEventListener("dragover",c=>{c.preventDefault(),c.dataTransfer.dropEffect="link"},!1),i.addEventListener("drop",c=>{console.log("drop"),c.preventDefault(),o(c)},!1)}});const o=i=>{const c=i.dataTransfer.files;if(c&&c.length>0){const h=c[0];u(h);return}},l=i=>{const c=i.target.files;if(c&&c.length>0){const h=c[0];u(h);return}},u=i=>{if(i.name.endsWith(".run")||i.name.endsWith(".ipk")){const c=de({title:e("uploading plugin"),description:e("do not refresh this page during plugin installation/uninstallation"),clearText:e("closed"),valueText:"",callback:()=>{location.reload()}});let h=new FormData;h.append(i.name,i),T.uploadAppIPK(h).then(y=>{let k=y.stdout,D=y.stderr;y.code!==0?(c.addValue(`${D}`),c.addValue(`
-${e("offline installation failed with error code")}: ${y.code}`)):(c.addValue(`${k}
-${D}`),c.addValue(`
-${e("offline installation is successful, please close the current window")}`))}).catch(y=>{c.addValue(`${y}`),c.addValue(`
-${e("offline installation failed with error code")}: ${500}`)}).finally(()=>{c.setDisabled(!0);try{window.L.ui.menu.flushCache()}catch(y){}})}};return(i,c)=>{var h;return d(),_("fieldset",ya,[s("div",ka,[s("span",null,f(r(e)("offline install")),1),s("span",null,"\xB7 "+f(r(e)("from this page, you can upload plugin packages to install plugins")),1),s("span",null,"\xB7 "+f(r(e)("support .ipk plug-in, .run self-extracting format")),1)]),s("form",{onSubmit:Le(u,["prevent"])},[s("div",{class:"flex",ref_key:"upl",ref:n},[s("label",Ca,[s("span",null,f(((h=a.value)==null?void 0:h.name)||r(e)("no files selected")),1),s("input",{type:"file",name:"file",accept:".ipk, .run",hidden:"",onChange:l},null,32),s("div",Sa,f(r(e)("select or drag and drop files")),1)]),La],512)],40,xa)])}}};var Ta=E(Aa,[["__scopeId","data-v-49941f68"]]);const Ea={class:"cbi-section"},Ia={class:"webapp-container"},Da=["src"],Pa={setup(t){const e=B(()=>""),n=B(()=>""),a=B(()=>`${O.getIframeURL()}/#/apps?token=${n.value}&deviceId=${e.value}`);return(o,l)=>(d(),_("fieldset",Ea,[s("div",Ia,[s("iframe",{src:r(a),sandbox:"allow-scripts allow-same-origin allow-popups",seamless:""},null,8,Da)])]))}};var Ba=E(Pa,[["__scopeId","data-v-8e330954"]]);const Va={class:"log-containers"},Fa={key:0,class:"containers-tit"},Ma={key:1,class:"containers-tit"},za=["value"],Ua={key:1},Oa={setup(t){const{$gettext:e}=R(),n=H(),a=B(()=>n.state.version),o=B(()=>n.state.versionLoad),l=()=>{G.Start(`${e("updateing")}...`),T.selfUpdateIstore().then(({data:u})=>{if(u){const{stdout:i,stderr:c,code:h}=u;if(h==0){M(e("update success")),n.dispatch("istoreUpdated");return}else throw c||"unknown error"}throw"unknown error"}).catch(u=>{M(`${e("update error")}: ${u}`)}).finally(()=>{G.Stop()})};return(u,i)=>(d(),_("div",Va,[r(o)?(d(),_("div",Ma,[r(a)?(d(),_(U,{key:0},[s("span",null,f(r(e)("last version"))+":"+f(r(a)),1),s("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:i[0]||(i[0]=c=>l()),value:r(e)("click to update")},null,8,za)],64)):(d(),_("span",Ua,f(r(e)("the is last version"))+"...",1))])):(d(),_("div",Fa,f(r(e)("checking for latest version")),1))]))}};var Ra=E(Oa,[["__scopeId","data-v-8f2ad39a"]]),Na={namespaced:!0,state:{Load:!1,LocalApps:[],StoreApps:[],Expand:{},Cur:{tag:"default",sort:"default",search:"",limit:30,offset:0},LocalAppsMap:{},StoreAppsMap:{}},mutations:{setExpand(t,e){t.Expand=e},setLocalApps(t,e){t.LocalApps=e||[],e.forEach(n=>{t.LocalAppsMap[n.name]=n})},setStoreApps(t,e){t.StoreApps=e||[],e.forEach(n=>{t.StoreAppsMap[n.name]=n})},setCur(t,e){for(const n in e)Object.hasOwnProperty.call(e,n)&&(t.Cur[n]=e[n])}},getters:{Cur(t){return t.Cur},LocalApps(t){let e=[...t.LocalApps],n=t.Expand;for(let a=0;a{p.tags&&p.tags.forEach(m=>{m==a&&b.push(p)})}),e=b}let o=t.Cur.search;if(o){let b=[];e.forEach(p=>{let m=JSON.stringify(p);new RegExp(o,"i").test(m)&&b.push(p)}),e=b}let l=e.length;switch(t.Cur.sort){case"download":for(let b=0;b{n.forEach(a=>{a.installed=!0}),e("setLocalApps",n)})},getStoreApps(t,e){const{state:n,commit:a,dispatch:o}=t;let l=[];T.getStoreAppList(e).then(u=>{u.apps&&(u.apps.forEach(i=>{l.push(i.name)}),o("getStoreAppsExpand",l),a("setStoreApps",u.apps)),n.Load=!0}).catch(u=>{console.log(u)})},getStoreAppsExpand(t,e){const{commit:n}=t;T.getAppExpandData(e).then(a=>{a&&n("setExpand",a)})}}},Ga={namespaced:!0,state:{Tags:[],Total:0},mutations:{},getters:{Tags(t){return t.Tags},Total(t){return t.Total}},actions:{getTags(t){const{state:e,commit:n}=t;T.getStoreTags().then(a=>{e.Tags=(a==null?void 0:a.tags)||[],e.Total=(a==null?void 0:a.total)||0})}}},Ha={namespaced:!0,state:{status:!1,action:"install",content:"",end:!1,exitCode:void 0},mutations:{setStatus(t,e){t.status=e.status,t.action=(e==null?void 0:e.action)||"install",t.content=(e==null?void 0:e.content)||"",t.end=(e==null?void 0:e.end)||!1,t.exitCode=void 0},setContent(t,e){t.content=e},setEnd(t,e){t.end=!0,t.exitCode=e}},getters:{},actions:{}},se=Oe({state:{version:"",versionLoad:!1},mutations:{setVersion(t,e){t.version=e},setVersionLoad(t,e){t.versionLoad=e}},modules:{apps:Na,tags:Ga,log:Ha},actions:{getData(t){const{dispatch:e}=t;e("tags/getTags"),e("apps/getApps"),e("getVersion")},getVersion(t){return A(this,null,function*(){const{commit:e}=t;try{const n=yield T.updateIstore(),{code:a,msg:o}=n==null?void 0:n.data;a==200&&e("setVersion",o)}catch(n){console.log(n)}e("setVersionLoad",!0)})},istoreUpdated(t){const{commit:e}=t;e("setVersion","")}}}),oe={Start(t,e){se.commit("log/setStatus",{status:!0,action:t,content:""})},Stop(){se.commit("log/setStatus",{status:!1,action:"install",content:""})},Add(t){se.commit("log/setContent",t)},End(t){se.commit("log/setEnd",t)}};const Ka={class:"Lightweight"},Wa={class:"Lightweight-container"},qa={class:"model"},Za={class:"Lightweight-container1"},Ya={class:"container1-center"},Ja={class:"Lightweight-tit"},Qa={class:"Lightweight-backup"},Xa=["value"],ja=["value"],eo={setup(t){const{$gettext:e}=R(),n=S(null),a=()=>{const i=e("backuping"),c=e("backup success"),h=e("backup fail"),y=e("click to download");G.Start(`${i}...`),T.lightBackup().then(k=>{if(k){const{msg:D,code:V}=k;if(V==200){M({content:`${c}\uFF0C${y}
`,keep:!0,html:!0});return}else throw D||"unknown error"}throw"unknown error"}).catch(k=>{M(`${h} : ${k}`)}).finally(()=>{G.Stop()})},o=i=>{const c=i.target.files;if(c&&c.length>0){const h=c[0];l(h);return}},l=i=>{let c=new FormData;c.append(i.name,i),oe.Start("upload"),T.lightRestore(c).then(h=>{let y=h.stdout,k=h.stderr;oe.Add(`${y}
-${k}`),oe.End(h.code)}).catch(h=>{oe.Add(h),oe.End(500)})},u=i=>{n.value.click(i),i.preventDefault()};return(i,c)=>(d(),_("div",Ka,[s("div",Wa,[s("div",qa,f(r(e)("explain")),1),s("div",Za,[s("div",Ya,[s("div",Ja,[s("span",null,"\xB7 "+f(r(e)("backup now will download a list of iStore installed software")),1),s("span",null,"\xB7 "+f(r(e)("upload software list and install from iStore when restoring backup")),1)]),s("div",Qa,[s("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:a,value:r(e)("backup now")},null,8,Xa),s("input",{type:"file",name:"file",accept:".tar, .gz",hidden:"",onChange:o,ref_key:"upl",ref:n},null,544),s("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:u,value:r(e)("restore backup")},null,8,ja)])])])])]))}};var to=E(eo,[["__scopeId","data-v-0f5d170b"]]);const no={class:"local"},ao={class:"local-container"},oo={class:"model"},so={class:"local-container1"},ro={class:"container1-center"},lo={class:"local-tit"},co={class:"local-device"},io={class:"local-input"},uo={value:"",disabled:""},po=["value"],_o={value:"-"},ho=["onKeyup","placeholder"],go={key:2,class:"local-btn"},fo=["value"],vo=["value"],mo={key:0,class:"device-list"},wo=["value"],bo=["value"],$o={setup(t){const{$gettext:e}=R(),n=e("backup now backs up installed software (unlimited installation sources) to external storage"),a=S([]),o=S("-");let l="-";const u=S(!1),i=S([]),c=S(""),h=S(""),y=S(),k=(v,$)=>{if(!($===""||$==="-"||v.find(w=>w.path===$))){let w;v.filter(x=>x.mount&&x.dev&&$.startsWith(x.mount)).forEach(x=>{w&&w.mount.length>x.mount.length||(w=x)}),v.push({path:$,size:w?w.size:void 0})}a.value=v,$!=="-"&&(o.value=$,D())};o.value=="-"&&(T.localBackupdirPath().then(v=>{if(v){const{code:$,msg:w}=v;$==200&&k(a.value,w)}}),T.getBlockDevices().then(v=>{if(v&&v.code==200){const $=v.data,w=[];for(let x in $){const F=$[x];F.mount&&F.mount!="/"&&F.mount!="/rom"&&F.mount!="/overlay"&&w.push(F)}w.forEach(x=>{x.path=x.mount+"/istore_backup"}),k(w,w.length>0&&o.value==="-"?"":o.value)}}));const D=v=>{u.value=!1,o.value==="-"?(l!="-"&&(h.value=l),y.value.focus()):l=o.value},V=v=>{h.value==""?l!="-"?o.value=l:o.value="":h.value.startsWith("/")?k(a.value,h.value):(M(e("please enter the path, give up the input, please clear the input box")),y.value.setSelectionRange(0,h.value.length),y.value.focus())},b=()=>o.value.length>1&&o.value.endsWith("/")?o.value.substring(0,o.value.length-1):o.value,p=()=>{let v=b();if(v==""){M(e("please fill in the external storage directory"));return}u.value=!1,T.backupFileList(v).then($=>{if($){const{code:w,msg:x}=$;if(w==200){let F=JSON.parse(x);F.length==0?(M(e("there are no backup files in this path")),u.value=!1):(i.value=F,u.value=!0);return}throw x||"unknown error"}throw"unknown error"}).catch($=>{M($)})},m=()=>{let v=b();if(v==""){M(e("please fill in the external storage directory"));return}G.Start(`${e("backuping")}...`),T.localBackup(v).then($=>{if($){const{msg:w,code:x,stderr:F}=$;if(x==0){M(e("backup success"));return}else throw x==500?w:F||"unknown error"}throw"unknown error"}).catch($=>{M(`${e("backup fail")}: ${$}`)}).finally(()=>{G.Stop()})},g=v=>o.value.endsWith("/")?o.value+v:o.value+"/"+v,C=()=>{if(c.value===""){M(e("please select a backup file to restore"));return}G.Start(`${e("restoring backup")}...`),T.localRestore(g(c.value)).then(v=>{if(v){const{msg:$,stderr:w,code:x}=v;if(x==0){M(e("the backup was restored success"));return}else throw $||w||"unknown error"}throw"unknown error"}).catch(v=>{M(`${e("the backup was restored fail")}: ${v}`)}).finally(()=>{G.Stop()})};return(v,$)=>(d(),_("div",no,[s("div",ao,[s("div",oo,f(r(e)("explain")),1),s("div",so,[s("div",ro,[s("div",lo,[s("span",null,"\xB7 "+f(r(e)(r(n))),1),s("span",null,"\xB7 "+f(r(e)("no internet required for recovery")),1)]),s("div",co,f(r(e)("external storage directory"))+" \uFF1A ",1),s("div",io,[o.value!="-"?ue((d(),_("select",{key:0,class:"local-input-field",onChange:D,"onUpdate:modelValue":$[0]||($[0]=w=>o.value=w)},[s("option",uo,f(r(e)("choose")),1),(d(!0),_(U,null,K(a.value,(w,x)=>(d(),_("option",{value:w.path,key:x},f(w.path+(w.size?"\uFF08"+w.size+"\uFF09":"")),9,po))),128)),s("option",_o,f(r(e)("customize")),1)],544)),[[ye,o.value,void 0,{trim:!0}]]):ue((d(),_("input",{key:1,class:"local-input-field",onBlur:V,onKeyup:Re(V,["enter"]),placeholder:r(e)("please enter an absolute path starting with %{name}",{name:"/"}),type:"text","onUpdate:modelValue":$[1]||($[1]=w=>h.value=w),ref_key:"user_input",ref:y},null,40,ho)),[[Se,h.value,void 0,{trim:!0}]]),o.value!="-"&&o.value!=""?(d(),_("div",go,[s("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:m,value:r(e)("backup now")},null,8,fo),s("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:p,value:r(e)("restore backup")},null,8,vo)])):z("",!0)]),u.value?(d(),_("div",mo,[s("div",null,f(r(e)("choose backup file"))+" \uFF1A",1),ue(s("select",{"onUpdate:modelValue":$[2]||($[2]=w=>c.value=w)},[(d(!0),_(U,null,K(i.value,w=>(d(),_("option",{key:w,value:w},f(w),9,wo))),128))],512),[[ye,c.value,void 0,{trim:!0}]]),s("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:C,value:r(e)("restore now")},null,8,bo)])):z("",!0)])])])]))}};var yo=E($o,[["__scopeId","data-v-745c433e"]]);const ko={class:"cbi-map"},xo={class:"cbi-section"},Co={class:"panel-title"},So={class:"cbi-section"},Lo={class:"panel-title"},Ao={class:"cbi-tabmenu"},To={onclick:"false",href:"#"},Eo={onclick:"false",href:"#"},Io={setup(t){const{$gettext:e}=R(),n=S(2);return(a,o)=>(d(),_("div",ko,[s("fieldset",xo,[s("span",Co,f(r(e)("upgrade"))+" iStore",1),N(Ra)]),s("fieldset",So,[s("span",Lo,f(r(e)("app backup")),1),s("ul",Ao,[s("li",{class:j(n.value==2?"cbi-tab":"cbi-tab-disabled"),onClick:o[0]||(o[0]=l=>n.value=2)},[s("a",To,f(r(e)("light backup")),1)],2),s("li",{class:j(n.value==3?"cbi-tab":"cbi-tab-disabled"),onClick:o[1]||(o[1]=l=>n.value=3)},[s("a",Eo,f(r(e)("local backup")),1)],2)]),n.value==2?(d(),X(to,{key:0})):z("",!0),n.value==3?(d(),X(yo,{key:1})):z("",!0)])]))}};var Do=E(Io,[["__scopeId","data-v-1d5c62fe"]]);const Po=Ne({history:Ge(O.BasePage()),routes:[{path:"/",redirect:"/installed"},{path:"/installed",name:"Installed",component:Jn},{path:"/store",name:"Store",component:ba},{path:"/upload",name:"Upload",component:Ta},{path:"/webapps",name:"Webapps",component:Ba},{path:"/maintance",name:"Maintance",component:Do},{path:"/:pathMatch(.*)*",name:"notfound",redirect:"/"}]}),Bo={},Vo={width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},Fo=s("path",{d:"M14.9234958,14.5525054 L10.84453,10.4679606 C11.8849284,9.46327833 12.5294813,8.07823887 12.5294813,6.55073066 C12.5294813,3.48989918 9.94358337,1 6.76474066,1 C3.58589795,1 1,3.48989918 1,6.55073066 C1,9.61156213 3.58589795,12.1014613 6.76474066,12.1014613 C8.16008242,12.1014613 9.44067838,11.621191 10.438802,10.8242646 L14.5276502,14.9188536 C14.5814545,14.9730393 14.6533765,15 14.725573,15 C14.7942009,15 14.8625542,14.9754182 14.9158095,14.9262546 C15.025065,14.8250198 15.0283592,14.6577049 14.9234958,14.5525054 Z M6.76474066,11.5728203 C3.8886841,11.5728203 1.54902292,9.32001661 1.54902292,6.55073066 C1.54902292,3.7814447 3.8886841,1.52864101 6.76474066,1.52864101 C9.64079723,1.52864101 11.9804584,3.7814447 11.9804584,6.55073066 C11.9804584,9.32001661 9.64052272,11.5728203 6.76474066,11.5728203 Z",id:"Shape",stroke:"#FFFFFF","stroke-width":"1.3"},null,-1),Mo=[Fo];function zo(t,e,n,a,o,l){return d(),_("svg",Vo,Mo)}var Uo=E(Bo,[["render",zo]]);const Oo={},Ro={width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},No=s("path",{d:"M10.171916,3.81818329 C10.6519813,3.81274681 11.1102149,4.01840688 11.4252438,4.38069009 C11.7402726,4.74297329 11.8803105,5.2253253 11.8081406,5.70080197 L11.0555552,10.608963 C10.9332063,11.4157454 10.2351606,12.0090843 9.42537185,12 L3.27269856,12 C2.97145497,12 2.7272488,11.7556885 2.7272488,11.454445 L2.7272488,5.4544976 C2.7272488,5.37817917 2.74326442,5.30271013 2.77426027,5.23296947 L4.95605931,0.323921631 C5.04360472,0.126944443 5.23894201,0 5.4544976,0 C6.65947193,0 7.63629663,0.976824702 7.63629663,2.18179904 L7.63629663,3.81815451 L10.171916,3.81818329 Z M3.81814832,10.9090654 L9.43153778,10.9090654 C9.70352269,10.9121048 9.93620458,10.7143252 9.97712277,10.4445109 L10.7297188,5.53628009 C10.7537339,5.3780602 10.7070546,5.2172762 10.602045,5.09651513 C10.4970353,4.97575406 10.3442908,4.9072007 10.1780925,4.90904784 L7.09084687,4.90904784 C6.78960329,4.90904784 6.54539711,4.66484166 6.54539711,4.36359808 L6.54539711,2.18179904 C6.54539711,1.69494967 6.22647822,1.2825878 5.78615711,1.14223013 L3.81814832,5.57024992 L3.81814832,10.9090654 Z M2.7272488,5.99994736 L1.63634928,5.99994736 C1.33510569,5.99994736 1.09089952,6.24415353 1.09089952,6.54539711 L1.09089952,10.3635454 C1.09089952,10.664789 1.33510569,10.9089952 1.63634928,10.9089952 L2.7272488,10.9089952 L2.7272488,5.99994736 Z M3.27269856,11.9998947 L1.63634928,11.9998947 C0.732618527,11.9998947 -1.03028697e-13,11.2672762 -1.03028697e-13,10.3635454 L-1.03028697e-13,6.54539711 C-1.03028697e-13,5.64166636 0.732618527,4.90904784 1.63634928,4.90904784 L3.27269856,4.90904784 C3.57394214,4.90904784 3.81814832,5.15325401 3.81814832,5.4544976 L3.81814832,11.454445 C3.81814832,11.7556885 3.57394214,11.9998947 3.27269856,11.9998947 Z",id:"Shape",fill:"#FFFFFF","fill-rule":"nonzero"},null,-1),Go=[No];function Ho(t,e,n,a,o,l){return d(),_("svg",Ro,Go)}var Ko=E(Oo,[["render",Ho]]);const Wo={},qo={width:"12px",height:"12px",viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},Zo=s("path",{d:"M10.171916,3.81818329 C10.6519813,3.81274681 11.1102149,4.01840688 11.4252438,4.38069009 C11.7402726,4.74297329 11.8803105,5.2253253 11.8081406,5.70080197 L11.0555552,10.608963 C10.9332063,11.4157454 10.2351606,12.0090843 9.42537185,12 L3.27269856,12 C2.97145497,12 2.7272488,11.7556885 2.7272488,11.454445 L2.7272488,5.4544976 C2.7272488,5.37817917 2.74326442,5.30271013 2.77426027,5.23296947 L4.95605931,0.323921631 C5.04360472,0.126944443 5.23894201,0 5.4544976,0 C6.65947193,0 7.63629663,0.976824702 7.63629663,2.18179904 L7.63629663,3.81815451 L10.171916,3.81818329 Z M3.27269856,11.9998947 L1.63634928,11.9998947 C0.732618527,11.9998947 0,11.2672762 0,10.3635454 L0,6.54539711 C0,5.64166636 0.732618527,4.90904784 1.63634928,4.90904784 L3.27269856,4.90904784 C3.57394214,4.90904784 3.81814832,5.15325401 3.81814832,5.4544976 L3.81814832,11.454445 C3.81814832,11.7556885 3.57394214,11.9998947 3.27269856,11.9998947 Z",id:"Shape",fill:"#FFE45A","fill-rule":"nonzero"},null,-1),Yo=[Zo];function Jo(t,e,n,a,o,l){return d(),_("svg",qo,Yo)}var Qo=E(Wo,[["render",Jo]]);const Q=ge(Yt);Q.component("svg-search",Uo);Q.component("svg-star-on",Ko);Q.component("svg-star-off",Qo);const Xo=()=>A(I,null,function*(){yield Ke(Q),Q.use(Po).use(se),Q.mount("#app")});Xo()});export default jo();
+var Ct=Object.defineProperty,St=Object.defineProperties;var At=Object.getOwnPropertyDescriptors;var mt=Object.getOwnPropertySymbols;var Lt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var ft=(n,t,e)=>t in n?Ct(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Z=(n,t)=>{for(var e in t||(t={}))Lt.call(t,e)&&ft(n,e,t[e]);if(mt)for(var e of mt(t))Tt.call(t,e)&&ft(n,e,t[e]);return n},st=(n,t)=>St(n,At(t));var It=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var y=(n,t,e)=>new Promise((s,o)=>{var i=c=>{try{l(e.next(c))}catch(v){o(v)}},u=c=>{try{l(e.throw(c))}catch(v){o(v)}},l=c=>c.done?s(c.value):Promise.resolve(c.value).then(i,u);l((e=e.apply(n,t)).next())});import{a as ot,c as Pt,u as O,b as K,d as M,r as J,o as p,e as _,F as E,f as W,g as Q,w as Et,h as r,p as et,i as nt,j as a,t as h,k as D,n as Y,l as U,m as Dt,q as C,s as at,v as wt,x as j,y as bt,z as yt,A as Bt,B as gt,C as Mt,D as Ft,E as Ot,G as Ut}from"./vendor.js?v=3831f804";var Co=It(S=>{const Rt=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function e(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=e(o);fetch(o.href,i)}};Rt();const tt={tagMap:{},numberFormat:new Intl.NumberFormat("en",{notation:"compact"})},Vt=n=>y(S,null,function*(){const t=window.vue_lang;new Date().getTime();let e={};try{const i=yield ot({url:window.vue_lang_data,method:"GET"});i.data&&(e=i.data)}catch(i){console.log(i)}const s=Pt({defaultLanguage:t,translations:e,setGlobalProperties:!1,provideDirective:!1,provideComponent:!1});n.use(s);const{$gettext:o}=s;window.$i18n=o,tt.tagMap={net:o("net"),tool:o("tool"),download:o("download"),service:o("service"),multimedia:o("multimedia"),nas:o("nas"),monitor:o("monitor"),system:o("system"),networking:o("networking")};try{tt.numberFormat=new Intl.NumberFormat(t,{notation:"compact"})}catch(i){console.error("Intl.NumberFormat unsupported lang",t,i)}}),kt=n=>tt.tagMap[n]||n,$t=n=>typeof n=="number"?tt.numberFormat.format(n):"?";var A=(n,t)=>{const e=n.__vccOpts||n;for(const[s,o]of t)e[s]=o;return e};const zt=n=>(et("data-v-13251538"),n=n(),nt(),n),Gt={class:"tabs"},Kt=["href","onClick"],Wt={key:0},Nt=zt(()=>a("div",{class:"auto"},null,-1)),Zt={setup(n){const{$gettext:t}=O(),e=K(),s=M(()=>e.state.version),o=M(()=>[{to:"/installed",name:t("installed")},{to:"/store",name:t("all app")},{to:"/upload",name:t("manual install")},{to:"/maintance",name:t("maintain"),up:s.value}]);return(i,u)=>{const l=J("router-link");return p(),_("ul",Gt,[(p(!0),_(E,null,W(r(o),c=>(p(),Q(l,{to:c.to,custom:"",key:c.to},{default:Et(({href:v,navigate:T,isActive:P})=>[a("li",{class:Y(P&&"active cbi-tab")},[a("a",{href:v,onClick:T},h(c.name),9,Kt),c.up?(p(),_("span",Wt)):D("",!0)],2)]),_:2},1032,["to"]))),128)),Nt])}}};var qt=A(Zt,[["__scopeId","data-v-13251538"]]);const Ht={setup(n){return K().dispatch("getData"),(e,s)=>{const o=J("router-view");return p(),_(E,null,[U(qt),U(o)],64)}}},Yt=()=>window.vue_base,Jt=()=>window.istore_api_base||"https://istore.linkease.com",Qt=n=>{if(n)return Dt(n).format("YYYY-MM-DD HH:mm:ss")},Xt=()=>new Date().getTime(),jt=n=>{if(n<1024)return""+n+"KB";let e=1024,s=0;for(let i=n/1024;i>=1024;i/=1024)e*=1024,s++;let o=["M","G","T","P","E"];return(n/100/(e/100)).toFixed(2)+o[s]},te=n=>{if(n==null)return 0;if(n<1e4)return n;let e=parseInt(`${n/1e4}`),s=n%1e4;return`${e}\u4E07${s}`},ee=()=>window.token||"",ne=()=>{var n;return((n=window==null?void 0:window.device_id)==null?void 0:n.uid)||""},se=()=>{var n;return((n=window==null?void 0:window.device_id)==null?void 0:n.version)||""},oe=()=>{var n;return((n=window==null?void 0:window.device_id)==null?void 0:n.arch)||""},ae=()=>"https://www.kooldns.cn/bind";var re=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",BasePage:Yt,ApiBaseURL:Jt,formatDate:Qt,UnixDate:Xt,numberToSize:jt,numberToSum:te,getToken:ee,getDeviceId:ne,getVersion:se,modelArch:oe,getIframeURL:ae}),B=Z({},re);const L=ot.create({});L.interceptors.request.use(n=>(n.params==null&&(n.params={}),n.params=st(Z({},n.params),{token:B.getToken(),_t:B.UnixDate()}),n),n=>n);L.interceptors.response.use(n=>n,n=>n);const q=ot.create({baseURL:B.ApiBaseURL()});q.interceptors.request.use(n=>(n.params==null&&(n.params={}),n.params=st(Z({},n.params),{modelArch:B.modelArch(),deviceId:B.getDeviceId(),_t:B.UnixDate()}),n),n=>n);q.interceptors.response.use(n=>n);const ie=()=>new Promise((n,t)=>y(S,null,function*(){try{const e=yield L({method:"GET",url:"/cgi-bin/luci/admin/store/installed"});if(e.status==200){n(e.data);return}t(e.status);return}catch(e){t(e);return}})),le=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/install",params:{package:n}});if(s.status==200){t(s.data);return}e(s.status);return}catch(s){e(s);return}})),ce=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/upgrade",params:{package:n}});if(s.status==200){t(s.data);return}e(s.status);return}catch(s){e(s);return}})),ue=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/remove",params:{package:n}});if(s.status==200){t(s.data);return}e(s.status);return}catch(s){e(s);return}})),pe=()=>new Promise((n,t)=>y(S,null,function*(){try{const e=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/update"});if(e.status==200){n(e.data);return}t(e.status);return}catch(e){t(e);return}})),de=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"GET",url:"/cgi-bin/luci/admin/store/status",params:{package:n}});if(s.status==200){t(s.data);return}e(s.status);return}catch(s){e(s);return}})),_e=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/upload",headers:{"Content-Type":"multipart/form-data"},data:n});if(s.data){t(s.data);return}}catch(s){e(s);return}e("not found soft")})),he=()=>new Promise((n,t)=>y(S,null,function*(){try{const e=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/light_backup"});if(e.status==200){n(e.data);return}t(e.status);return}catch(e){t(e);return}})),ve=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/light_restore",headers:{"Content-Type":"multipart/form-data"},data:n});if(s.data){t(s.data);return}}catch(s){e(s);return}e("not found soft")})),me=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"GET",url:"/cgi-bin/luci/admin/store/get_available_backup_file_list",params:{path:n}});if(s.status==200){t(s==null?void 0:s.data);return}e(s.status);return}catch(s){e(s);return}})),fe=()=>new Promise((n,t)=>y(S,null,function*(){try{const e=yield L({method:"GET",url:"/cgi-bin/luci/admin/store/get_local_backup_dir_path"});if(e.status==200){n(e==null?void 0:e.data);return}t(e.status);return}catch(e){t(e);return}})),ge=(n,t)=>new Promise((e,s)=>y(S,null,function*(){try{const o=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/local_backup",params:{path:n,force:t}});if(o.status==200){e(o==null?void 0:o.data);return}s(o.status);return}catch(o){s(o);return}})),$e=n=>new Promise((t,e)=>y(S,null,function*(){try{const s=yield L({method:"POST",url:"/cgi-bin/luci/admin/store/local_restore",params:{path:n}});if(s.status==200){t(s.data);return}e(s.status);return}catch(s){e(s);return}})),we=()=>new Promise((n,t)=>y(S,null,function*(){try{const e=yield L({method:"GET",url:"/cgi-bin/luci/admin/store/get_block_devices"});if(e.status==200){n(e==null?void 0:e.data);return}t(e.status);return}catch(e){t(e);return}}));var be=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",getInstalledApp:ie,installApp:le,upgradeApp:ce,removeApp:ue,updateAppStore:pe,getAppStatus:de,uploadAppIPK:_e,lightBackup:he,lightRestore:ve,backupFileList:me,localBackupdirPath:fe,localBackup:ge,localRestore:$e,getBlockDevices:we});const ye=n=>new Promise((t,e)=>y(S,null,function*(){var s,o,i,u;try{const l=yield q({method:"GET",url:"/api/store/list",params:n});if(((s=l==null?void 0:l.data)==null?void 0:s.success)===0){t((o=l==null?void 0:l.data)==null?void 0:o.result);return}if((i=l==null?void 0:l.data)!=null&&i.message){e((u=l==null?void 0:l.data)==null?void 0:u.message);return}e("error")}catch(l){console.log(l),e(l);return}})),ke=B.ApiBaseURL(),xe=n=>`${ke}${n}`,Ce=()=>new Promise((n,t)=>y(S,null,function*(){var e,s,o,i;try{const u=yield q({method:"GET",url:"/api/store/tags"});if(((e=u==null?void 0:u.data)==null?void 0:e.success)===0){n((s=u==null?void 0:u.data)==null?void 0:s.result);return}if((o=u==null?void 0:u.data)!=null&&o.message){t((i=u==null?void 0:u.data)==null?void 0:i.message);return}t("error")}catch(u){t(u);return}})),Se=n=>new Promise((t,e)=>{q({method:"POST",url:"/api/store/expand",data:{appsId:n||[],deviceId:B.getDeviceId()}}).then(s=>{var o,i,u;if(((o=s.data)==null?void 0:o.success)==0&&((i=s.data)==null?void 0:i.result)){t((u=s.data)==null?void 0:u.result);return}e("not found expand")}).catch(s=>{e(s)})}),Ae=n=>{q({method:"POST",url:"/api/store/download",data:{appId:n,deviceId:B.getDeviceId()}}).then(t=>{var e;((e=t.data)==null?void 0:e.success)!=0})},Le=n=>new Promise((t,e)=>{q({method:"POST",url:"/api/store/star",data:{appId:n,deviceId:B.getDeviceId()}}).then(s=>{var o;if(((o=s.data)==null?void 0:o.success)==0){t(s.data);return}e("not found expand")}).catch(s=>{e(s)})});var Te=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",getStoreAppList:ye,getStoreAppIcon:xe,getStoreTags:Ce,getAppExpandData:Se,increasingDownloadCount:Ae,postStarApp:Le});const Ie=()=>L({method:"GET",url:"/cgi-bin/luci/admin/store/check_self_upgrade"}),Pe=()=>L({method:"POST",url:"/cgi-bin/luci/admin/store/do_self_upgrade"});var Ee=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",updateIstore:Ie,selfUpdateIstore:Pe}),k=Z(Z(Z({},be),Te),Ee);const De={class:"toast"},Be=["title"],Me={key:1,class:"msg"},Fe=["innerHTML"],Oe={props:{content:String,type:String,Close:Function,keep:Boolean,html:Boolean},setup(n){const t=n,e=C(t.content),s=C(t.keep),o=C(t.html),i=C(window.$i18n);t.keep||setTimeout(()=>{t.Close()},2e3);const u=()=>{t.Close()};return(l,c)=>(p(),_("div",De,[s.value?(p(),_("div",{key:0,class:"toast-close",onClick:u,title:i.value("closed")},"x",8,Be)):D("",!0),o.value?D("",!0):(p(),_("div",Me,h(e.value),1)),o.value?(p(),_("div",{key:2,class:"msg",innerHTML:e.value},null,8,Fe)):D("",!0)]))}};var Ue=A(Oe,[["__scopeId","data-v-b05f92bc"]]);const b=n=>{let t={content:"",type:"",keep:!1,html:!1,Close:()=>{s.unmount(e),document.body.removeChild(e)}};n!=null&&(typeof n=="object"?(t.content=(n==null?void 0:n.content)||"",t.type=(n==null?void 0:n.type)||"",t.keep=(n==null?void 0:n.keep)||!1,t.html=(n==null?void 0:n.html)||!1):t.content=n);let e=document.createElement("div"),s=at(Ue,t);document.body.append(e),s.mount(e),wt(()=>{s.unmount(e),document.body.removeChild(e)})},Re={props:{content:String,Close:Function},setup(n){return{message:n.content}}},Ve=n=>(et("data-v-6d7664a4"),n=n(),nt(),n),ze={class:"loading"},Ge=Ve(()=>a("div",{class:"icon"},null,-1)),Ke={class:"msg"};function We(n,t,e,s,o,i){return p(),_("div",ze,[Ge,a("div",Ke,h(s.message),1)])}var Ne=A(Re,[["render",We],["__scopeId","data-v-6d7664a4"]]),R={props:{content:"",Close:()=>{}},Start(n){this.props={content:n,Close:()=>{t.unmount(e),document.body.removeChild(e)}};let t=at(Ne,this.props),e=document.createElement("div");document.body.append(e),t.mount(e),wt(()=>{this.props.Close()})},Stop(){this.props.Close()}};const X=n=>(et("data-v-1597f180"),n=n(),nt(),n),Ze={class:"app-container"},qe={class:"app-info"},He={class:"app-f"},Ye={class:"app-icon"},Je=["alt","src"],Qe={class:"app-tags"},Xe={class:"tag"},je=X(()=>a("span",{class:"block"},"\uFF5C",-1)),tn={class:"app-r"},en=["title"],nn={class:"app-name"},sn={class:"app-version"},on={class:"app-as"},an=X(()=>a("span",{style:{margin:"0 10px"}},"|",-1)),rn=["title"],ln=["title"],cn=["title"],un={class:"app-author"},pn={class:"app-date"},dn={class:"app-btns"},_n=["href"],hn=X(()=>a("div",{class:"auto"},null,-1)),vn=X(()=>a("div",{class:"app-margin-left"},null,-1)),mn=["href"],fn=X(()=>a("div",{class:"app-margin-left"},null,-1)),gn={props:{col:{type:Object,default(){return{description:"",tags:[],entry:"",author:"",depends:[],installed:!1,hasupdate:!1,title:"",time:"",release:1,website:"",name:"",version:""}}}},setup(n){const t=n,{$gettext:e,$ngettext:s}=O(),o=M(()=>t.col),i=K(),u=B.formatDate,l=d=>{k.upgradeApp(d).then(g=>{let I=g.stderr;g.code!==0?b({content:`${I}
+${e("update failed with error code")}: ${g.code}`,keep:!0}):window.istore_log(!0)}).catch(g=>{b({content:`${e("update failed with error code")}: ${500}`,keep:!0})})},c=d=>{k.installApp(d).then(g=>{let I=g.stderr;g.code!==0?b({content:`${I}
+${e("installation failed, error code")}: ${g.code}`,keep:!0}):(k.increasingDownloadCount(d),i.dispatch("apps/incrAppDownload",{name:d}),window.istore_log(!0))}).catch(g=>{b({content:`${e("installation failed, error code")}: ${500}`,keep:!0})})},v=d=>{!confirm(e("are you sure you want to uninstall %{name}?",{name:d}))||k.removeApp(d).then(I=>{let G=I.stderr;I.code!==0?b({content:`${G}
+${e("uninstall failed, error code")}: ${I.code}`,keep:!0}):window.istore_log(!0)}).catch(I=>{b({content:`${e("uninstall failed, error code")}: ${500}`,keep:!0})})},T=d=>y(this,null,function*(){R.Start();try{(yield k.postStarApp(d))&&i.dispatch("apps/incrAppStar",{name:d})}catch(g){}R.Stop()}),P=()=>{b(e("you have already liked"))},V=d=>o.value.installed?`/luci-static/resources/app-icons/${d}.png`:o.value.icon?k.getStoreAppIcon(o.value.icon):`/luci-static/resources/app-icons/${d}.png`,z=d=>{switch(window.vue_lang){case"zh-cn":case"zh-tw":return d.title}return d.title_en||d.title},$=d=>{switch(window.vue_lang){case"zh-cn":case"zh-tw":return d.description}return d.description_en||d.description};return(d,g)=>{var w,f,m,x,F,rt,it,lt,ct,ut,pt,dt,_t,ht,vt;const I=J("svg-star-off"),G=J("svg-star-on");return p(),_("div",Ze,[a("div",qe,[a("div",He,[a("div",Ye,[a("img",{alt:r(e)("Icon is gone")+"~",src:V(r(o).name)},null,8,Je)]),a("div",Qe,[(p(!0),_(E,null,W(r(o).tags,N=>(p(),_(E,{key:N},[a("div",Xe,[a("span",null,h(r(kt)(N)),1)]),je],64))),128))])]),a("div",tn,[a("div",{class:"app-title",title:r(o).name},[a("span",nn,h(z(r(o))),1),a("span",sn,"v"+h(r(o).version),1)],8,en),a("div",on,[a("span",null,h(r(s)("%{ num } download","%{ num } downloads",((f=(w=r(o))==null?void 0:w.expand)==null?void 0:f.downloadCount)||0,{num:r($t)((x=(m=r(o))==null?void 0:m.expand)==null?void 0:x.downloadCount)})),1),an,a("span",null,h(r(s)("%{ num } like","%{ num } likes",((rt=(F=r(o))==null?void 0:F.expand)==null?void 0:rt.starCount)||0,{num:r($t)((lt=(it=r(o))==null?void 0:it.expand)==null?void 0:lt.starCount)})),1),((ct=r(o))==null?void 0:ct.expand)!=null?(p(),_(E,{key:0},[(pt=(ut=r(o))==null?void 0:ut.expand)!=null&&pt.isStar?(p(),_("a",{key:0,class:"star-btn",title:r(e)("liked"),onClick:g[0]||(g[0]=N=>P())},[U(I)],8,rn)):(p(),_("a",{key:1,class:"star-btn",title:r(e)("like"),onClick:g[1]||(g[1]=N=>T(r(o).name))},[U(G)],8,ln))],64)):D("",!0)]),a("div",{class:"app-description cbi-value-description",title:$(r(o))},[a("span",null,h($(r(o))),1)],8,cn),a("div",un,[a("span",null,h(r(e)("author"))+": "+h(r(o).author||"null"),1)]),a("div",pn,[a("span",null,h(r(e)("update date"))+": "+h(r(u)(r(o).time*1e3)||"null"),1)])])]),a("div",dn,[r(o).website?(p(),_("a",{key:0,class:"app-btn cbi-button cbi-button-apply",target:"_blank",href:r(o).website},h(r(e)("website")),9,_n)):D("",!0),hn,r(o).installed?(p(),_(E,{key:1},[((dt=r(o))==null?void 0:dt.curVersion)!=((_t=r(o))==null?void 0:_t.lastVersion)||((ht=r(o))==null?void 0:ht.curRelease)!=((vt=r(o))==null?void 0:vt.lastRelease)?(p(),_("a",{key:0,class:"app-btn cbi-button cbi-button-reload",onClick:g[2]||(g[2]=N=>l(r(o).name))},h(r(e)("upgrade")),1)):D("",!0),vn,r(o).entry?(p(),_("a",{key:1,class:"app-btn cbi-button cbi-button-apply",href:r(o).entry},h(r(e)("open")),9,mn)):D("",!0),fn,a("a",{class:"app-btn cbi-button cbi-button-remove",onClick:g[3]||(g[3]=N=>v(r(o).name))},h(r(e)("uninstall")),1)],64)):(p(),_("a",{key:2,class:"app-btn cbi-button cbi-button-add",onClick:g[4]||(g[4]=N=>c(r(o).name))},h(r(e)("install")),1))])])}}};var xt=A(gn,[["__scopeId","data-v-1597f180"]]);const $n={class:"cbi-section"},wn={class:"containers"},bn={setup(n){const t=K(),e=M(()=>t.getters["apps/LocalApps"]);return(s,o)=>(p(),_("fieldset",$n,[a("div",wn,[(p(!0),_(E,null,W(r(e),i=>(p(),Q(xt,{key:i.name,col:i},null,8,["col"]))),128))])]))}};var yn=A(bn,[["__scopeId","data-v-0046e0f2"]]);const kn={class:"sort-container"},xn={class:"sort-title"},Cn={class:"sort-value"},Sn=["value","onClick"],An={setup(n){const{$gettext:t}=O(),e=C("default"),s=K(),o=C([{key:t("default"),value:"default"},{key:t("By download"),value:"download"},{key:t("By rating"),value:"star"}]),i=u=>{e.value=u,s.dispatch("apps/filterCurApps",{sort:u})};return(u,l)=>(p(),_("div",kn,[a("div",xn,h(r(t)("order"))+":",1),a("div",Cn,[(p(!0),_(E,null,W(o.value,c=>(p(),_("input",{key:c.value,class:Y(["cbi-button",{"cbi-button-apply":e.value==c.value}]),type:"button",value:c.key,onClick:v=>i(c.value)},null,10,Sn))),128))])]))}};var Ln=A(An,[["__scopeId","data-v-e3845a5c"]]);const Tn={class:"tags-container"},In={class:"tags-title"},Pn={class:"tags-value"},En=["value"],Dn=["value","onClick"],Bn={setup(n){const{$gettext:t}=O(),e=C("default"),s=K(),o=M(()=>s.getters["tags/Tags"]),i=u=>{e.value=u,s.dispatch("apps/filterCurApps",{tag:u})};return(u,l)=>(p(),_("div",Tn,[a("div",In,h(r(t)("tag"))+": ",1),a("div",Pn,[a("input",{class:Y(["cbi-button",{"cbi-button-apply":e.value=="default"}]),type:"button",value:r(t)("default"),onClick:l[0]||(l[0]=c=>i("default"))},null,10,En),(p(!0),_(E,null,W(r(o),c=>(p(),_("input",{key:c,class:Y(["cbi-button",{"cbi-button-apply":e.value==c}]),type:"button",value:r(kt)(c),onClick:v=>i(c)},null,10,Dn))),128))])]))}};var Mn=A(Bn,[["__scopeId","data-v-07bccc36"]]);const Fn=["onSubmit"],On=["placeholder"],Un={setup(n){const{$gettext:t}=O(),e=C(""),s=K(),o=()=>{s.dispatch("apps/filterCurApps",{search:e.value})};return(i,u)=>{const l=J("svg-search");return p(),_("form",{class:"search",onSubmit:yt(o,["prevent"])},[a("a",{class:"search-btn",onClick:o},[U(l)]),j(a("input",{type:"text",placeholder:r(t)("please enter the search keyword"),"onUpdate:modelValue":u[0]||(u[0]=c=>e.value=c)},null,8,On),[[bt,e.value,void 0,{trim:!0}]])],40,Fn)}}};var Rn=A(Un,[["__scopeId","data-v-c4e8a9f2"]]);const Vn={class:"containers"},zn={key:1,style:{margin:"10px 0","text-align":"center",width:"100%"}},Gn={setup(n){const{$gettext:t}=O(),e=K(),s=M(()=>e.getters["apps/StoreApps"]),o=M(()=>e.state.apps.Load);return(i,u)=>(p(),_("div",Vn,[r(o)?(p(!0),_(E,{key:0},W(r(s),l=>(p(),Q(xt,{key:l.name,col:l},null,8,["col"]))),128)):(p(),_("span",zn,h(r(t)("loading data"))+"...",1))]))}};var Kn=A(Gn,[["__scopeId","data-v-1b494368"]]);const Wn={class:"cbi-section"},Nn={setup(n){return(t,e)=>(p(),_("fieldset",Wn,[U(Rn),U(Mn),U(Ln),U(Kn)]))}};var Zn=A(Nn,[["__scopeId","data-v-74b0669f"]]);const qn=n=>(et("data-v-ae2fc4f4"),n=n(),nt(),n),Hn={class:"cbi-section"},Yn={class:"container_msg cbi-map-descr"},Jn=["onSubmit"],Qn={class:"upload-file"},Xn={class:"button"},jn=qn(()=>a("div",{class:"auto"},null,-1)),ts={setup(n){const{$gettext:t}=O(),e=C(null),s=C(null);Bt(()=>{if(e.value){const l=e.value;l.addEventListener("dragenter",c=>{(c.fromElement===null||!l.contains(c.fromElement))&&console.log("dragenter")},!1),l.addEventListener("dragleave",c=>{(c.fromElement===null||!l.contains(c.fromElement))&&console.log("dragleave")},!1),l.addEventListener("dragover",c=>{c.preventDefault(),c.dataTransfer.dropEffect="link"},!1),l.addEventListener("drop",c=>{console.log("drop"),c.preventDefault(),o(c)},!1)}});const o=l=>{const c=l.dataTransfer.files;if(c&&c.length>0){const v=c[0];u(v);return}},i=l=>{const c=l.target.files;if(c&&c.length>0){const v=c[0];u(v);return}},u=l=>{if(l.name.endsWith(".run")||l.name.endsWith(".ipk")){let c=new FormData;c.append(l.name,l),R.Start(`${t("uploading")}...`),k.uploadAppIPK(c).then(v=>{let T=v.stderr;v.code!==0?Toast({content:`${T}
+${t("offline installation failed with error code")}: ${v.code}`,keep:!0}):window.istore_log(!0)}).catch(v=>{Toast({content:`${t("offline installation failed with error code")}: ${500}`,keep:!0})}).finally(()=>{R.Stop()})}};return(l,c)=>{var v;return p(),_("fieldset",Hn,[a("div",Yn,[a("span",null,h(r(t)("offline install")),1),a("span",null,"\xB7 "+h(r(t)("from this page, you can upload plugin packages to install plugins")),1),a("span",null,"\xB7 "+h(r(t)("support .ipk plug-in, .run self-extracting format")),1)]),a("form",{onSubmit:yt(u,["prevent"])},[a("div",{class:"flex",ref_key:"upl",ref:e},[a("label",Qn,[a("span",null,h(((v=s.value)==null?void 0:v.name)||r(t)("no files selected")),1),a("input",{type:"file",name:"file",accept:".ipk, .run",hidden:"",onChange:i},null,32),a("div",Xn,h(r(t)("select or drag and drop files")),1)]),jn],512)],40,Jn)])}}};var es=A(ts,[["__scopeId","data-v-ae2fc4f4"]]);const ns={class:"cbi-section"},ss={class:"webapp-container"},os=["src"],as={setup(n){const t=M(()=>""),e=M(()=>""),s=M(()=>`${B.getIframeURL()}/#/apps?token=${e.value}&deviceId=${t.value}`);return(o,i)=>(p(),_("fieldset",ns,[a("div",ss,[a("iframe",{src:r(s),sandbox:"allow-scripts allow-same-origin allow-popups",seamless:""},null,8,os)])]))}};var rs=A(as,[["__scopeId","data-v-8e330954"]]);const is={class:"log-containers"},ls={key:0,class:"containers-tit"},cs={key:1,class:"containers-tit"},us=["value"],ps={key:1},ds={setup(n){const{$gettext:t}=O(),e=K(),s=M(()=>e.state.version),o=M(()=>e.state.versionLoad),i=()=>{R.Start(`${t("updateing")}...`),k.selfUpdateIstore().then(({data:u})=>{if(u){const{stdout:l,stderr:c,code:v}=u;if(v==0){b({content:`${t("update success, reloading")}...`,keep:!0}),e.dispatch("istoreUpdated"),setTimeout(()=>{location.href=location.href},1e3);return}else throw c||"unknown error"}throw"unknown error"}).catch(u=>{b(`${t("update error")}: ${u}`)}).finally(()=>{R.Stop()})};return(u,l)=>(p(),_("div",is,[r(o)?(p(),_("div",cs,[r(s)?(p(),_(E,{key:0},[a("span",null,h(r(t)("last version"))+":"+h(r(s)),1),a("input",{type:"button",class:"app-btn cbi-button cbi-button-apply",onClick:l[0]||(l[0]=c=>i()),value:r(t)("click to update")},null,8,us)],64)):(p(),_("span",ps,h(r(t)("the is last version"))+"...",1))])):(p(),_("div",ls,h(r(t)("checking for latest version")),1))]))}};var _s=A(ds,[["__scopeId","data-v-8ac6e0ca"]]);const hs={class:"Lightweight"},vs={class:"Lightweight-container"},ms={class:"model"},fs={class:"Lightweight-container1"},gs={class:"container1-center"},$s={class:"Lightweight-tit"},ws={class:"Lightweight-backup"},bs=["value"],ys=["value"],ks={setup(n){const{$gettext:t}=O(),e=C(null),s=()=>{const l=t("backuping"),c=t("backup success"),v=t("backup fail"),T=t("click to download");R.Start(`${l}...`),k.lightBackup().then(P=>{if(P){const{msg:V,code:z}=P;if(z==200){b({content:`${c}\uFF0C${T}