luckyphoenix 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/alist-web/assets/{2fa-legacy.3350d44d.js → 2fa-legacy.2216bec0.js} +1 -1
  2. package/alist-web/assets/{2fa.0dab7189.js → 2fa.dab33f0f.js} +1 -1
  3. package/alist-web/assets/{About-legacy.e1597551.js → About-legacy.cb8fa4ff.js} +1 -1
  4. package/alist-web/assets/{About.11e2f3bb.js → About.9ffd6886.js} +1 -1
  5. package/alist-web/assets/{AddOrEdit-legacy.6ac6f516.js → AddOrEdit-legacy.6162b185.js} +1 -1
  6. package/alist-web/assets/{AddOrEdit-legacy.2a02db88.js → AddOrEdit-legacy.7039689c.js} +1 -1
  7. package/alist-web/assets/{AddOrEdit-legacy.432f6c0e.js → AddOrEdit-legacy.da71b71e.js} +1 -1
  8. package/alist-web/assets/{AddOrEdit.f0ec5bf9.js → AddOrEdit.6a9e71d9.js} +1 -1
  9. package/alist-web/assets/{AddOrEdit.e641a9bd.js → AddOrEdit.d6d54e63.js} +1 -1
  10. package/alist-web/assets/{AddOrEdit.79c069f9.js → AddOrEdit.e27f7c8a.js} +1 -1
  11. package/alist-web/assets/Common-legacy.97014408.js +1 -0
  12. package/alist-web/assets/Common.1082c7b3.js +1 -0
  13. package/alist-web/assets/{Copy-legacy.3d846482.js → Copy-legacy.7ee68eb1.js} +1 -1
  14. package/alist-web/assets/Copy.29e85b67.js +1 -0
  15. package/alist-web/assets/{DeletePopover-legacy.1906395c.js → DeletePopover-legacy.87aad2c7.js} +1 -1
  16. package/alist-web/assets/{DeletePopover.f7887d88.js → DeletePopover.dd980db4.js} +1 -1
  17. package/alist-web/assets/File-legacy.f494fe2d.js +1 -0
  18. package/alist-web/assets/File.166a875e.js +1 -0
  19. package/alist-web/assets/{Folder-legacy.a4550db5.js → Folder-legacy.6208649f.js} +3 -3
  20. package/alist-web/assets/{Folder.7e9202ae.js → Folder.eb3c4250.js} +2 -2
  21. package/alist-web/assets/{FolderTree-legacy.2cffdb64.js → FolderTree-legacy.ced41d7a.js} +1 -1
  22. package/alist-web/assets/{FolderTree.3d6d889d.js → FolderTree.b81bb9fa.js} +1 -1
  23. package/alist-web/assets/Grid-legacy.3dfa22c0.js +1 -0
  24. package/alist-web/assets/Grid.d49fda70.js +1 -0
  25. package/alist-web/assets/{GridItem-legacy.2300a556.js → GridItem-legacy.9bec535e.js} +1 -1
  26. package/alist-web/assets/{GridItem.5502f946.js → GridItem.8c8dabc0.js} +1 -1
  27. package/alist-web/assets/{ImageWithError-legacy.184872e5.js → ImageWithError-legacy.586304c6.js} +1 -1
  28. package/alist-web/assets/{ImageWithError.fbebe083.js → ImageWithError.a265f8e8.js} +1 -1
  29. package/alist-web/assets/{Images-legacy.47953965.js → Images-legacy.d43bf411.js} +1 -1
  30. package/alist-web/assets/{Images.cc1e423a.js → Images.a37df6cd.js} +1 -1
  31. package/alist-web/assets/{Layout-legacy.bbe308ea.js → Layout-legacy.2cde7d9a.js} +1 -1
  32. package/alist-web/assets/{Layout.683e33e3.js → Layout.f0d4817f.js} +4 -4
  33. package/alist-web/assets/{List-legacy.dc5a2a38.js → List-legacy.4b3de3b4.js} +1 -1
  34. package/alist-web/assets/List.c06a3b00.js +1 -0
  35. package/alist-web/assets/{Messenger-legacy.15747cf4.js → Messenger-legacy.179ccd64.js} +1 -1
  36. package/alist-web/assets/{Messenger.0de50ee8.js → Messenger.9c3d042c.js} +1 -1
  37. package/alist-web/assets/{Metas-legacy.9a37ad69.js → Metas-legacy.eb8ffa88.js} +1 -1
  38. package/alist-web/assets/{Metas.94282135.js → Metas.f22d5f3f.js} +1 -1
  39. package/alist-web/assets/{Other-legacy.1defd90b.js → Other-legacy.8a957f52.js} +1 -1
  40. package/alist-web/assets/{Other.c698471d.js → Other.3cd2edb3.js} +1 -1
  41. package/alist-web/assets/{PackageDownload-legacy.13e43bb9.js → PackageDownload-legacy.c3c4d04f.js} +1 -1
  42. package/alist-web/assets/{PackageDownload.89e4ecc4.js → PackageDownload.4549128a.js} +1 -1
  43. package/alist-web/assets/{Paginator-legacy.6f9f1dcb.js → Paginator-legacy.7ad987f2.js} +1 -1
  44. package/alist-web/assets/{Paginator.758bcfa3.js → Paginator.e5bccc02.js} +1 -1
  45. package/alist-web/assets/{Password-legacy.5e5cbd20.js → Password-legacy.27fb08bd.js} +1 -1
  46. package/alist-web/assets/{Password.500d1886.js → Password.0e509043.js} +1 -1
  47. package/alist-web/assets/{Profile-legacy.ccf1ddd4.js → Profile-legacy.977dc39f.js} +1 -1
  48. package/alist-web/assets/{Profile.33671ffe.js → Profile.59577a2a.js} +1 -1
  49. package/alist-web/assets/ResponsiveGrid-legacy.f2aef776.js +1 -0
  50. package/alist-web/assets/{ResponsiveGrid.04e247e9.js → ResponsiveGrid.d6bbac68.js} +1 -1
  51. package/alist-web/assets/{S3-legacy.fb41a1b8.js → S3-legacy.c7277126.js} +1 -1
  52. package/alist-web/assets/{S3.135ba8ad.js → S3.130efb14.js} +1 -1
  53. package/alist-web/assets/{SettingItem-legacy.51bf5808.js → SettingItem-legacy.0a673b4b.js} +1 -1
  54. package/alist-web/assets/{SettingItem.d9757149.js → SettingItem.313a7d54.js} +1 -1
  55. package/alist-web/assets/{Storages-legacy.6fe86e3a.js → Storages-legacy.a02cfef8.js} +1 -1
  56. package/alist-web/assets/{Storages.22e89c36.js → Storages.0448d029.js} +1 -1
  57. package/alist-web/assets/{Tasks-legacy.bcf4e457.js → Tasks-legacy.07bf988c.js} +1 -1
  58. package/alist-web/assets/{Tasks.f607862a.js → Tasks.c2e766fa.js} +1 -1
  59. package/alist-web/assets/{Upload-legacy.7dd2be21.js → Upload-legacy.1bc7d518.js} +1 -1
  60. package/alist-web/assets/{Upload-legacy.cb936202.js → Upload-legacy.c55092be.js} +1 -1
  61. package/alist-web/assets/Upload.9fe71fc8.js +1 -0
  62. package/alist-web/assets/{Upload.d35bb47b.js → Upload.e74f078a.js} +1 -1
  63. package/alist-web/assets/Users-legacy.ef91f7d2.js +1 -0
  64. package/alist-web/assets/{Users.7eb39296.js → Users.8fe6202b.js} +1 -1
  65. package/alist-web/assets/{Wether-legacy.66b7b0d3.js → Wether-legacy.eb9a7f7c.js} +1 -1
  66. package/alist-web/assets/{Wether.f17d6a97.js → Wether.00e7c9de.js} +1 -1
  67. package/alist-web/assets/{aliyun_office-legacy.7e1c4ff6.js → aliyun_office-legacy.402b4713.js} +1 -1
  68. package/alist-web/assets/{aliyun_office.627eb2ac.js → aliyun_office.50f9d873.js} +1 -1
  69. package/alist-web/assets/{aliyun_video-legacy.dfd303c5.js → aliyun_video-legacy.56b42909.js} +1 -1
  70. package/alist-web/assets/{aliyun_video.681fb5ee.js → aliyun_video.a247bab7.js} +1 -1
  71. package/alist-web/assets/{asciinema-legacy.554330ec.js → asciinema-legacy.fb279f1c.js} +1 -1
  72. package/alist-web/assets/{asciinema.a6e925e9.js → asciinema.7ab15d2d.js} +1 -1
  73. package/alist-web/assets/{audio-legacy.d6ef56f6.js → audio-legacy.2a977be7.js} +1 -1
  74. package/alist-web/assets/{audio.0cad5cce.js → audio.aadde76e.js} +1 -1
  75. package/alist-web/assets/{backup-restore-legacy.f4c8daf0.js → backup-restore-legacy.55ce35e0.js} +1 -1
  76. package/alist-web/assets/{backup-restore.db700ca0.js → backup-restore.22360504.js} +1 -1
  77. package/alist-web/assets/{entry-legacy.eec15c4b.js → entry-legacy.3105662f.js} +1 -1
  78. package/alist-web/assets/entry-legacy.cef313fd.js +1 -0
  79. package/alist-web/assets/{entry.5c41c532.js → entry.8aa3cc4a.js} +1 -1
  80. package/alist-web/assets/entry.cd1cc308.js +9 -0
  81. package/alist-web/assets/{helper-legacy.646eb2d9.js → helper-legacy.6e035754.js} +1 -1
  82. package/alist-web/assets/{helper.d54883e3.js → helper.4c1695f5.js} +1 -1
  83. package/alist-web/assets/{hls-legacy.9e0f7edb.js → hls-legacy.edbd5087.js} +7 -7
  84. package/alist-web/assets/{hls.1623c369.js → hls.39746a0b.js} +1 -1
  85. package/alist-web/assets/{html-legacy.fa26963f.js → html-legacy.48733905.js} +1 -1
  86. package/alist-web/assets/{html.8b79f6ca.js → html.b637a32a.js} +1 -1
  87. package/alist-web/assets/{icon-legacy.2d7c0a16.js → icon-legacy.0fc20af0.js} +1 -1
  88. package/alist-web/assets/{icon.94f94d81.js → icon.eec0896f.js} +3 -3
  89. package/alist-web/assets/{image-legacy.236a9cca.js → image-legacy.72dce631.js} +1 -1
  90. package/alist-web/assets/{image.82ca8574.js → image.81339d6b.js} +1 -1
  91. package/alist-web/assets/{index-legacy.0bd3a7f2.js → index-legacy.163cda36.js} +1 -1
  92. package/alist-web/assets/{index-legacy.40b50240.js → index-legacy.85a3f3b2.js} +1 -1
  93. package/alist-web/assets/{index-legacy.840e3d82.js → index-legacy.8dcd5574.js} +1 -1
  94. package/alist-web/assets/{index-legacy.d72e643a.js → index-legacy.a5be584a.js} +1 -1
  95. package/alist-web/assets/{index-legacy.a7c40fe3.js → index-legacy.a92c0df2.js} +4 -4
  96. package/alist-web/assets/{index-legacy.91fe7355.js → index-legacy.b67c6603.js} +1 -1
  97. package/alist-web/assets/{index-legacy.fb7fb711.js → index-legacy.b70065b7.js} +1 -1
  98. package/alist-web/assets/{index-legacy.efef9df2.js → index-legacy.c2114cfa.js} +1 -1
  99. package/alist-web/assets/{index-legacy.61172c95.js → index-legacy.f2143918.js} +1 -1
  100. package/alist-web/assets/{index.afa471fc.js → index.141a0537.js} +1 -1
  101. package/alist-web/assets/{index.fae3cea4.js → index.392c6ddc.js} +48 -48
  102. package/alist-web/assets/{index.c15f7469.js → index.443f6a1d.js} +1 -1
  103. package/alist-web/assets/{index.26f5b473.js → index.7bdc91bb.js} +1 -1
  104. package/alist-web/assets/{index.0adfc44b.js → index.af3d6b7a.js} +1 -1
  105. package/alist-web/assets/{index.dcae211e.js → index.c5c8918a.js} +1 -1
  106. package/alist-web/assets/{index.952b63b2.js → index.d7b001db.js} +1 -1
  107. package/alist-web/assets/{index.7409b67a.js → index.f3acbce8.js} +1 -1
  108. package/alist-web/assets/{index.72e3f724.js → index.f5de5c5c.js} +1 -1
  109. package/alist-web/assets/{indexes-legacy.2c89d2d8.js → indexes-legacy.72c03316.js} +1 -1
  110. package/alist-web/assets/{indexes.9cb6f537.js → indexes.9c0f7f6f.js} +2 -2
  111. package/alist-web/assets/{ipa-legacy.7a49e0e2.js → ipa-legacy.1da193c9.js} +1 -1
  112. package/alist-web/assets/{ipa.97543f5f.js → ipa.cd919f01.js} +1 -1
  113. package/alist-web/assets/{markdown-legacy.164943d8.js → markdown-legacy.6a3fa3e5.js} +1 -1
  114. package/alist-web/assets/{markdown.3a932f53.js → markdown.a9038c55.js} +1 -1
  115. package/alist-web/assets/{markdown_with_word_wrap-legacy.5e032546.js → markdown_with_word_wrap-legacy.97fef60b.js} +1 -1
  116. package/alist-web/assets/{markdown_with_word_wrap.0efe2540.js → markdown_with_word_wrap.0deaec24.js} +1 -1
  117. package/alist-web/assets/offline_download-legacy.ea2bbf1f.js +1 -0
  118. package/alist-web/assets/{offline_download.940ca54b.js → offline_download.59ac107d.js} +1 -1
  119. package/alist-web/assets/{plist-legacy.c76fc720.js → plist-legacy.567574eb.js} +1 -1
  120. package/alist-web/assets/plist.3e6f5f9c.js +1 -0
  121. package/alist-web/assets/{polyfills-legacy.5f28c7ae.js → polyfills-legacy.dccac97d.js} +1 -1
  122. package/alist-web/assets/{text-editor-legacy.6e126724.js → text-editor-legacy.07565d40.js} +1 -1
  123. package/alist-web/assets/{text-editor.45600bb2.js → text-editor.84cdff5b.js} +3 -3
  124. package/alist-web/assets/url-legacy.faedc5eb.js +1 -0
  125. package/alist-web/assets/url.1b6c406c.js +1 -0
  126. package/alist-web/assets/{useTitle-legacy.e942225f.js → useTitle-legacy.af253628.js} +1 -1
  127. package/alist-web/assets/{useTitle.630c0b7f.js → useTitle.f88f51f6.js} +1 -1
  128. package/alist-web/assets/{video-legacy.5198eeb8.js → video-legacy.d351b598.js} +1 -1
  129. package/alist-web/assets/{video.afae2b68.js → video.febb1e2b.js} +1 -1
  130. package/alist-web/assets/{video360-legacy.227ed7df.js → video360-legacy.1c56acba.js} +1 -1
  131. package/alist-web/assets/{video360.c8385eb2.js → video360.405d2eb6.js} +1 -1
  132. package/alist-web/assets/{video_box-legacy.d60b6928.js → video_box-legacy.ee2db89d.js} +1 -1
  133. package/alist-web/assets/{video_box.bfb0d4a5.js → video_box.5d85210f.js} +3 -3
  134. package/alist-web/index.html +11 -9
  135. package/alist-web/static/manifest.json +1 -1
  136. package/alist-web/static/pdf.js/web/viewer.mjs +1 -0
  137. package/css/alist_wallpaper.css +7 -7
  138. package/package.json +1 -1
  139. package/alist-web/assets/Common-legacy.5144e9c0.js +0 -1
  140. package/alist-web/assets/Common.6eff9060.js +0 -1
  141. package/alist-web/assets/Copy.d1980101.js +0 -1
  142. package/alist-web/assets/File-legacy.889dd355.js +0 -1
  143. package/alist-web/assets/File.23490613.js +0 -1
  144. package/alist-web/assets/Grid-legacy.a63ef469.js +0 -1
  145. package/alist-web/assets/Grid.7759c684.js +0 -1
  146. package/alist-web/assets/List.249d43e3.js +0 -1
  147. package/alist-web/assets/ResponsiveGrid-legacy.d58d4dfe.js +0 -1
  148. package/alist-web/assets/Upload.4c54bcbf.js +0 -1
  149. package/alist-web/assets/Users-legacy.b992a339.js +0 -1
  150. package/alist-web/assets/entry-legacy.01f22349.js +0 -1
  151. package/alist-web/assets/entry-legacy.31390e6c.js +0 -1
  152. package/alist-web/assets/entry-legacy.5119e4e8.js +0 -1
  153. package/alist-web/assets/entry-legacy.d3b909f7.js +0 -1
  154. package/alist-web/assets/entry-legacy.e017de3e.js +0 -1
  155. package/alist-web/assets/entry-legacy.fa23a37d.js +0 -1
  156. package/alist-web/assets/entry.2eaf5bb3.js +0 -5
  157. package/alist-web/assets/entry.371138c7.js +0 -7
  158. package/alist-web/assets/entry.6cce3889.js +0 -5
  159. package/alist-web/assets/entry.8acdb7f9.js +0 -9
  160. package/alist-web/assets/entry.abb9e6ed.js +0 -5
  161. package/alist-web/assets/entry.e83ea613.js +0 -6
  162. package/alist-web/assets/offline_download-legacy.11c4744c.js +0 -1
  163. package/alist-web/assets/plist.3c9cbb1a.js +0 -1
  164. package/alist-web/assets/url-legacy.e95c5b8b.js +0 -1
  165. package/alist-web/assets/url.f7914d75.js +0 -1
@@ -1 +1 @@
1
- import{b9 as H,_ as J,a1 as K,a as V,b as N,m as P,cj as Q,h as o,S as T,ae as _,C as M,G as X,I as O,a4 as R,al as v,n as Y,bP as j,a7 as Z,bc as E,ak as G,ch as ee,b5 as U,ck as te,az as ae,cl as oe,cm as ne,cn as re,d as se}from"./index.fae3cea4.js";import{u as le,c as ce,d as ie}from"./index.952b63b2.js";async function*de(a,l,p){const n=new Set;async function i(){const[m,c]=await Promise.race(n);return n.delete(m),c}for(const m of l){const c=(async()=>await p(m,l))().then(r=>[c,r]);n.add(c),n.size>=a&&(yield await i())}for(;n.size;)yield await i()}const ue={pending:"neutral",uploading:"info",backending:"info",success:"success",error:"danger"},pe=async a=>{let l=[];const p=async(n,i)=>{await new Promise((c,r)=>{const d=s=>{console.error(s),r(s)};if(n.isFile)n.file(s=>{const u=new File([s],i+s.name,{type:s.type});l.push(u),console.log(u),c({})},d);else if(n.isDirectory){const s=n.createReader(),u=()=>{s.readEntries(async w=>{for(let g=0;g<w.length;g++)await p(w[g],i+n.name+"/");c({}),w.length>0&&u()},d)};u()}})};return await p(a,""),l},me=a=>({name:a.name,path:a.webkitRelativePath?a.webkitRelativePath:a.name,size:a.size,progress:0,speed:0,status:"pending"}),ge=async(a,l,p,n=!1)=>{let i=new Date().valueOf(),m=0;const c=new FormData;c.append("file",l);const r=await H.put("/fs/form",c,{headers:{"File-Path":encodeURIComponent(a),"As-Task":n,"Content-Type":"multipart/form-data","Last-Modified":l.lastModified,Password:J()},onUploadProgress:d=>{if(d.total){const s=d.loaded/d.total*100|0;p("progress",s);const u=new Date().valueOf(),w=(u-i)/1e3;if(w>1){const y=(d.loaded-m)/w,h=(d.total-d.loaded)/y;p("speed",y),console.log(h),i=u,m=d.loaded}s===100&&p("status","backending")}}});if(r.code!==200)return new Error(r.message)},fe=async(a,l,p,n=!1)=>{let i=new Date().valueOf(),m=0;const c=await H.put("/fs/put",l,{headers:{"File-Path":encodeURIComponent(a),"As-Task":n,"Content-Type":l.type||"application/octet-stream","Last-Modified":l.lastModified,Password:J()},onUploadProgress:r=>{if(r.total){const d=r.loaded/r.total*100|0;p("progress",d);const s=new Date().valueOf(),u=(s-i)/1e3;if(u>1){const g=(r.loaded-m)/u,$=(r.total-r.loaded)/g;p("speed",g),console.log($),i=s,m=r.loaded}d===100&&p("status","backending")}}});if(c.code!==200)return new Error(c.message)},he=[{name:"Stream",upload:fe,provider:/.*/},{name:"Form",upload:ge,provider:/.*/}],we=()=>he.filter(a=>a.provider.test(K.provider)),ke=a=>{const l=V();return o(R,{w:"$full",spacing:"$1",rounded:"$lg",border:"1px solid $neutral7",alignItems:"start",p:"$2",get _hover(){return{border:`1px solid ${v()}`}},get children(){return[o(U,{css:{wordBreak:"break-all"},get children(){return a.path}}),o(_,{spacing:"$2",get children(){return[o(te,{get colorScheme(){return ue[a.status]},get children(){return l(`home.upload.${a.status}`)}}),o(U,{get children(){return[ae(()=>oe(a.speed)),"/s"]}})]}}),o(ne,{w:"$full",trackColor:"$info3",rounded:"$full",get value(){return a.progress},size:"sm",get children(){return o(re,{get color(){return v()},rounded:"$md"})}}),o(U,{color:"$danger10",get children(){return a.msg}})]}})},$e=()=>{const a=V(),{pathname:l}=N(),{refresh:p}=le(),[n,i]=P(!1),[m,c]=P(!1),[r,d]=P(!1),[s,u]=Q({uploads:[]}),w=()=>s.uploads.every(({status:e})=>["success","error"].includes(e));let g,y;const $=async e=>{if(e.length!==0){c(!0);for(const t of e){const k=me(t);u("uploads",f=>[...f,k])}for await(const t of de(3,e,q))console.log(t);p(void 0,!0)}},h=(e,t,k)=>{u("uploads",f=>f.path===e,t,k)},D=we(),[x,W]=P(D[0]),q=async e=>{const t=e.webkitRelativePath?e.webkitRelativePath:e.name;h(t,"status","uploading");const k=se(l(),t);try{const f=await x().upload(k,e,(S,C)=>{h(t,S,C)},r());f?(h(t,"status","error"),h(t,"msg",f.message)):(h(t,"status","success"),h(t,"progress",100))}catch(f){console.error(f),h(t,"status","error"),h(t,"msg",f.message)}};return o(R,{w:"$full",pb:"$2",spacing:"$2",get children(){return o(T,{get when(){return!m()},get fallback(){return[o(_,{spacing:"$2",get children(){return[o(M,{colorScheme:"accent",onClick:()=>{u("uploads",e=>e.filter(({status:t})=>!["success","error"].includes(t))),console.log(s.uploads)},get children(){return a("home.upload.clear_done")}}),o(T,{get when(){return w()},get children(){return o(M,{onClick:()=>{c(!1)},get children(){return a("home.upload.back")}})}})]}}),o(X,{get each(){return s.uploads},children:e=>o(ke,e)})]},get children(){return[o(O,{type:"file",multiple:!0,ref(e){const t=g;typeof t=="function"?t(e):g=e},display:"none",onChange:e=>{var t;$(Array.from((t=e.target.files)!=null?t:[]))}}),o(O,{type:"file",multiple:!0,webkitdirectory:!0,ref(e){const t=y;typeof t=="function"?t(e):y=e},display:"none",onChange:e=>{var t;$(Array.from((t=e.target.files)!=null?t:[]))}}),o(R,{w:"$full",justifyContent:"center",get border(){return`2px dashed ${n()?v():"$neutral8"}`},rounded:"$lg",onDragOver:e=>{e.preventDefault(),i(!0)},onDragLeave:()=>{i(!1)},onDrop:async e=>{var A,z,I,B;e.preventDefault(),e.stopPropagation(),i(!1);const t=[],k=Array.from((z=(A=e.dataTransfer)==null?void 0:A.items)!=null?z:[]),f=Array.from((B=(I=e.dataTransfer)==null?void 0:I.files)!=null?B:[]);let S=k.length;const C=[];for(let F=0;F<S;F++){const b=k[F].webkitGetAsEntry();b!=null&&b.isFile?t.push(f[F]):b!=null&&b.isDirectory&&C.push(b)}for(const F of C){const L=await pe(F);t.push(...L)}t.length===0&&Y.warning(a("home.upload.no_files_drag")),$(t)},spacing:"$4",h:"$56",get children(){return o(T,{get when(){return!n()},get fallback(){return o(j,{get children(){return a("home.upload.release")}})},get children(){return[o(j,{get children(){return a("home.upload.upload-tips")}}),o(Z,{w:"30%",get children(){return o(E,{get value(){return x().name},onChange:e=>{W(D.find(t=>t.name===e))},get options(){return D.map(e=>({label:e.name,value:e.name}))}})}}),o(_,{spacing:"$4",get children(){return[o(G,{compact:!0,size:"xl",get["aria-label"](){return a("home.upload.upload_folder")},colorScheme:"accent",get icon(){return o(ce,{})},onClick:()=>{y.click()}}),o(G,{compact:!0,size:"xl",get["aria-label"](){return a("home.upload.upload_files")},get icon(){return o(ie,{})},onClick:()=>{g.click()}})]}}),o(ee,{get checked(){return r()},onChange:()=>{d(!r())},get children(){return a("home.upload.add_as_task")}})]}})}})]}})}})};export{$e as default};
1
+ import{b9 as H,_ as J,a1 as K,a as V,b as N,m as P,cj as Q,h as o,S as T,ae as _,C as M,G as X,I as O,a4 as R,al as v,n as Y,bP as j,a7 as Z,bc as E,ak as G,ch as ee,b5 as U,ck as te,az as ae,cl as oe,cm as ne,cn as re,d as se}from"./index.392c6ddc.js";import{u as le,c as ce,d as ie}from"./index.d7b001db.js";async function*de(a,l,p){const n=new Set;async function i(){const[m,c]=await Promise.race(n);return n.delete(m),c}for(const m of l){const c=(async()=>await p(m,l))().then(r=>[c,r]);n.add(c),n.size>=a&&(yield await i())}for(;n.size;)yield await i()}const ue={pending:"neutral",uploading:"info",backending:"info",success:"success",error:"danger"},pe=async a=>{let l=[];const p=async(n,i)=>{await new Promise((c,r)=>{const d=s=>{console.error(s),r(s)};if(n.isFile)n.file(s=>{const u=new File([s],i+s.name,{type:s.type});l.push(u),console.log(u),c({})},d);else if(n.isDirectory){const s=n.createReader(),u=()=>{s.readEntries(async w=>{for(let g=0;g<w.length;g++)await p(w[g],i+n.name+"/");c({}),w.length>0&&u()},d)};u()}})};return await p(a,""),l},me=a=>({name:a.name,path:a.webkitRelativePath?a.webkitRelativePath:a.name,size:a.size,progress:0,speed:0,status:"pending"}),ge=async(a,l,p,n=!1)=>{let i=new Date().valueOf(),m=0;const c=new FormData;c.append("file",l);const r=await H.put("/fs/form",c,{headers:{"File-Path":encodeURIComponent(a),"As-Task":n,"Content-Type":"multipart/form-data","Last-Modified":l.lastModified,Password:J()},onUploadProgress:d=>{if(d.total){const s=d.loaded/d.total*100|0;p("progress",s);const u=new Date().valueOf(),w=(u-i)/1e3;if(w>1){const y=(d.loaded-m)/w,h=(d.total-d.loaded)/y;p("speed",y),console.log(h),i=u,m=d.loaded}s===100&&p("status","backending")}}});if(r.code!==200)return new Error(r.message)},fe=async(a,l,p,n=!1)=>{let i=new Date().valueOf(),m=0;const c=await H.put("/fs/put",l,{headers:{"File-Path":encodeURIComponent(a),"As-Task":n,"Content-Type":l.type||"application/octet-stream","Last-Modified":l.lastModified,Password:J()},onUploadProgress:r=>{if(r.total){const d=r.loaded/r.total*100|0;p("progress",d);const s=new Date().valueOf(),u=(s-i)/1e3;if(u>1){const g=(r.loaded-m)/u,$=(r.total-r.loaded)/g;p("speed",g),console.log($),i=s,m=r.loaded}d===100&&p("status","backending")}}});if(c.code!==200)return new Error(c.message)},he=[{name:"Stream",upload:fe,provider:/.*/},{name:"Form",upload:ge,provider:/.*/}],we=()=>he.filter(a=>a.provider.test(K.provider)),ke=a=>{const l=V();return o(R,{w:"$full",spacing:"$1",rounded:"$lg",border:"1px solid $neutral7",alignItems:"start",p:"$2",get _hover(){return{border:`1px solid ${v()}`}},get children(){return[o(U,{css:{wordBreak:"break-all"},get children(){return a.path}}),o(_,{spacing:"$2",get children(){return[o(te,{get colorScheme(){return ue[a.status]},get children(){return l(`home.upload.${a.status}`)}}),o(U,{get children(){return[ae(()=>oe(a.speed)),"/s"]}})]}}),o(ne,{w:"$full",trackColor:"$info3",rounded:"$full",get value(){return a.progress},size:"sm",get children(){return o(re,{get color(){return v()},rounded:"$md"})}}),o(U,{color:"$danger10",get children(){return a.msg}})]}})},$e=()=>{const a=V(),{pathname:l}=N(),{refresh:p}=le(),[n,i]=P(!1),[m,c]=P(!1),[r,d]=P(!1),[s,u]=Q({uploads:[]}),w=()=>s.uploads.every(({status:e})=>["success","error"].includes(e));let g,y;const $=async e=>{if(e.length!==0){c(!0);for(const t of e){const k=me(t);u("uploads",f=>[...f,k])}for await(const t of de(3,e,q))console.log(t);p(void 0,!0)}},h=(e,t,k)=>{u("uploads",f=>f.path===e,t,k)},D=we(),[x,W]=P(D[0]),q=async e=>{const t=e.webkitRelativePath?e.webkitRelativePath:e.name;h(t,"status","uploading");const k=se(l(),t);try{const f=await x().upload(k,e,(S,C)=>{h(t,S,C)},r());f?(h(t,"status","error"),h(t,"msg",f.message)):(h(t,"status","success"),h(t,"progress",100))}catch(f){console.error(f),h(t,"status","error"),h(t,"msg",f.message)}};return o(R,{w:"$full",pb:"$2",spacing:"$2",get children(){return o(T,{get when(){return!m()},get fallback(){return[o(_,{spacing:"$2",get children(){return[o(M,{colorScheme:"accent",onClick:()=>{u("uploads",e=>e.filter(({status:t})=>!["success","error"].includes(t))),console.log(s.uploads)},get children(){return a("home.upload.clear_done")}}),o(T,{get when(){return w()},get children(){return o(M,{onClick:()=>{c(!1)},get children(){return a("home.upload.back")}})}})]}}),o(X,{get each(){return s.uploads},children:e=>o(ke,e)})]},get children(){return[o(O,{type:"file",multiple:!0,ref(e){const t=g;typeof t=="function"?t(e):g=e},display:"none",onChange:e=>{var t;$(Array.from((t=e.target.files)!=null?t:[]))}}),o(O,{type:"file",multiple:!0,webkitdirectory:!0,ref(e){const t=y;typeof t=="function"?t(e):y=e},display:"none",onChange:e=>{var t;$(Array.from((t=e.target.files)!=null?t:[]))}}),o(R,{w:"$full",justifyContent:"center",get border(){return`2px dashed ${n()?v():"$neutral8"}`},rounded:"$lg",onDragOver:e=>{e.preventDefault(),i(!0)},onDragLeave:()=>{i(!1)},onDrop:async e=>{var A,z,I,B;e.preventDefault(),e.stopPropagation(),i(!1);const t=[],k=Array.from((z=(A=e.dataTransfer)==null?void 0:A.items)!=null?z:[]),f=Array.from((B=(I=e.dataTransfer)==null?void 0:I.files)!=null?B:[]);let S=k.length;const C=[];for(let F=0;F<S;F++){const b=k[F].webkitGetAsEntry();b!=null&&b.isFile?t.push(f[F]):b!=null&&b.isDirectory&&C.push(b)}for(const F of C){const L=await pe(F);t.push(...L)}t.length===0&&Y.warning(a("home.upload.no_files_drag")),$(t)},spacing:"$4",h:"$56",get children(){return o(T,{get when(){return!n()},get fallback(){return o(j,{get children(){return a("home.upload.release")}})},get children(){return[o(j,{get children(){return a("home.upload.upload-tips")}}),o(Z,{w:"30%",get children(){return o(E,{get value(){return x().name},onChange:e=>{W(D.find(t=>t.name===e))},get options(){return D.map(e=>({label:e.name,value:e.name}))}})}}),o(_,{spacing:"$4",get children(){return[o(G,{compact:!0,size:"xl",get["aria-label"](){return a("home.upload.upload_folder")},colorScheme:"accent",get icon(){return o(ce,{})},onClick:()=>{y.click()}}),o(G,{compact:!0,size:"xl",get["aria-label"](){return a("home.upload.upload_files")},get icon(){return o(ie,{})},onClick:()=>{g.click()}})]}}),o(ee,{get checked(){return r()},onChange:()=>{d(!r())},get children(){return a("home.upload.add_as_task")}})]}})}})]}})}})};export{$e as default};
@@ -0,0 +1 @@
1
+ !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(O){l=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=L(a,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=f(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(O){return{type:"throw",arg:O}}}e.wrap=s;var h={};function d(){}function p(){}function g(){}var y={};l(y,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(j([])));m&&m!==n&&o.call(m,a)&&(y=m);var w=g.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,c,u){var l=f(r[i],r,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function L(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,L(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=g,l(w,"constructor",g),l(g,"constructor",p),p.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),_(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;_(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:j(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},e}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void e(l)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))}}function o(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return i(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.a92c0df2.js","./useTitle-legacy.af253628.js","./DeletePopover-legacy.87aad2c7.js","./Wether-legacy.eb9a7f7c.js"],(function(t){"use strict";var e,i,a,c,u,l,s,f,h,d,p,g,y,v,m,w,b,x,L,E,_,S,j,k,O,G,$;return{setters:[function(t){e=t.a,i=t.b,a=t.aW,c=t.b9,u=t.m,l=t.d4,s=t.h,f=t.ae,h=t.C,d=t.a7,p=t.d5,g=t.d6,y=t.d7,v=t.G,m=t.d8,w=t.d9,b=t.da,x=t.ba,L=t.n,E=t.a4,_=t.ck,S=t.aG,j=t.aH,k=t.ag},function(t){O=t.b},function(t){G=t.D},function(t){$=t.W}],execute:function(){var P=function(t){var r=[{name:"general",color:"info"},{name:"guest",color:"neutral"},{name:"admin",color:"accent"}];return s(_,{get colorScheme(){return r[t.role].color},get children(){return r[t.role].name}})},A=function(t){var r=e();return s(f,{spacing:"$0_5",get children(){return s(v,{each:S,children:function(e,n){return s(j,{get label(){return r("users.permissions.".concat(e))},get children(){return s(d,{boxSize:"$2",rounded:"$full",get bg(){return r=k.can(t.user,n()),"$".concat(r?"success":"danger","9");var r}})}})}})}})};t("default",(function(){var t=e();O("manage.sidemenu.users");var _=i().to,S=o(a((function(){return c.get("/admin/user/list")})),2),j=S[0],k=S[1],N=o(u([]),2),C=N[0],I=N[1],T=function(){var t=n(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k();case 2:e=t.sent,x(e,(function(t){return I(t.content)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();T();var F=o(l((function(t){return c.post("/admin/user/delete?id=".concat(t))})),2),W=F[0],D=F[1],H=o(l((function(t){return c.post("/admin/user/cancel_2fa?id=".concat(t))})),2),Y=H[0],z=H[1];return s(E,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[s(f,{spacing:"$2",get children(){return[s(h,{colorScheme:"accent",get loading(){return j()},onClick:T,get children(){return t("global.refresh")}}),s(h,{onClick:function(){_("/@manage/users/add")},get children(){return t("global.add")}})]}}),s(d,{w:"$full",overflowX:"auto",get children(){return s(p,{highlightOnHover:!0,dense:!0,get children(){return[s(g,{get children(){return s(y,{get children(){return[s(v,{each:["username","base_path","role","permission","available"],children:function(r){return s(m,{get children(){return t("users.".concat(r))}})}}),s(m,{get children(){return t("global.operations")}})]}})}}),s(w,{get children(){return s(v,{get each(){return C()},children:function(e){return s(y,{get children(){return[s(b,{get children(){return e.username}}),s(b,{get children(){return e.base_path}}),s(b,{get children(){return s(P,{get role(){return e.role}})}}),s(b,{get children(){return s(A,{user:e})}}),s(b,{get children(){return s($,{get yes(){return!e.disabled}})}}),s(b,{get children(){return s(f,{spacing:"$2",get children(){return[s(h,{onClick:function(){_("/@manage/users/edit/".concat(e.id))},get children(){return t("global.edit")}}),s(G,{get name(){return e.username},get loading(){return W()===e.id},onClick:(i=n(r().mark((function n(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,D(e.id);case 2:o=r.sent,x(o,(function(){L.success(t("global.delete_success")),T()}));case 4:case"end":return r.stop()}}),n)}))),function(){return i.apply(this,arguments)})}),s(h,{colorScheme:"accent",get loading(){return Y()===e.id},onClick:(o=n(r().mark((function n(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,z(e.id);case 2:o=r.sent,x(o,(function(){L.success(t("users.cancel_2fa_success")),T()}));case 4:case"end":return r.stop()}}),n)}))),function(){return o.apply(this,arguments)}),get children(){return t("users.cancel_2fa")}})];var o,i}})}})]}})}})}})]}})}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{a as _,b as y,aW as v,b9 as u,m as x,d9 as p,h as e,ae as h,C as o,a7 as T,da as B,db as F,dc as b,G as m,dd as f,de as H,df as s,ba as g,n as $,a4 as P,ck as R,aG as W,aH as D,ag as G}from"./index.fae3cea4.js";import{b as I}from"./useTitle.630c0b7f.js";import{D as L}from"./DeletePopover.f7887d88.js";import{W as M}from"./Wether.f17d6a97.js";const z=n=>{const t=[{name:"general",color:"info"},{name:"guest",color:"neutral"},{name:"admin",color:"accent"}];return e(R,{get colorScheme(){return t[n.role].color},get children(){return t[n.role].name}})},O=n=>{const t=_(),i=a=>`$${a?"success":"danger"}9`;return e(h,{spacing:"$0_5",get children(){return e(m,{each:W,children:(a,d)=>e(D,{get label(){return t(`users.permissions.${a}`)},get children(){return e(T,{boxSize:"$2",rounded:"$full",get bg(){return i(G.can(n.user,d()))}})}})})}})},A=()=>{const n=_();I("manage.sidemenu.users");const{to:t}=y(),[i,a]=v(()=>u.get("/admin/user/list")),[d,k]=x([]),l=async()=>{const r=await a();g(r,c=>k(c.content))};l();const[C,S]=p(r=>u.post(`/admin/user/delete?id=${r}`)),[U,w]=p(r=>u.post(`/admin/user/cancel_2fa?id=${r}`));return e(P,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(h,{spacing:"$2",get children(){return[e(o,{colorScheme:"accent",get loading(){return i()},onClick:l,get children(){return n("global.refresh")}}),e(o,{onClick:()=>{t("/@manage/users/add")},get children(){return n("global.add")}})]}}),e(T,{w:"$full",overflowX:"auto",get children(){return e(B,{highlightOnHover:!0,dense:!0,get children(){return[e(F,{get children(){return e(b,{get children(){return[e(m,{each:["username","base_path","role","permission","available"],children:r=>e(f,{get children(){return n(`users.${r}`)}})}),e(f,{get children(){return n("global.operations")}})]}})}}),e(H,{get children(){return e(m,{get each(){return d()},children:r=>e(b,{get children(){return[e(s,{get children(){return r.username}}),e(s,{get children(){return r.base_path}}),e(s,{get children(){return e(z,{get role(){return r.role}})}}),e(s,{get children(){return e(O,{user:r})}}),e(s,{get children(){return e(M,{get yes(){return!r.disabled}})}}),e(s,{get children(){return e(h,{spacing:"$2",get children(){return[e(o,{onClick:()=>{t(`/@manage/users/edit/${r.id}`)},get children(){return n("global.edit")}}),e(L,{get name(){return r.username},get loading(){return C()===r.id},onClick:async()=>{const c=await S(r.id);g(c,()=>{$.success(n("global.delete_success")),l()})}}),e(o,{colorScheme:"accent",get loading(){return U()===r.id},onClick:async()=>{const c=await w(r.id);g(c,()=>{$.success(n("users.cancel_2fa_success")),l()})},get children(){return n("users.cancel_2fa")}})]}})}})]}})})}})]}})}})]}})};export{A as default};
1
+ import{a as _,b as y,aW as v,b9 as u,m as x,d4 as p,h as e,ae as h,C as o,a7 as T,d5 as B,d6 as F,d7 as b,G as m,d8 as f,d9 as H,da as s,ba as g,n as $,a4 as P,ck as R,aG as W,aH as D,ag as G}from"./index.392c6ddc.js";import{b as I}from"./useTitle.f88f51f6.js";import{D as L}from"./DeletePopover.dd980db4.js";import{W as M}from"./Wether.00e7c9de.js";const z=n=>{const t=[{name:"general",color:"info"},{name:"guest",color:"neutral"},{name:"admin",color:"accent"}];return e(R,{get colorScheme(){return t[n.role].color},get children(){return t[n.role].name}})},O=n=>{const t=_(),i=a=>`$${a?"success":"danger"}9`;return e(h,{spacing:"$0_5",get children(){return e(m,{each:W,children:(a,d)=>e(D,{get label(){return t(`users.permissions.${a}`)},get children(){return e(T,{boxSize:"$2",rounded:"$full",get bg(){return i(G.can(n.user,d()))}})}})})}})},A=()=>{const n=_();I("manage.sidemenu.users");const{to:t}=y(),[i,a]=v(()=>u.get("/admin/user/list")),[d,k]=x([]),l=async()=>{const r=await a();g(r,c=>k(c.content))};l();const[C,S]=p(r=>u.post(`/admin/user/delete?id=${r}`)),[U,w]=p(r=>u.post(`/admin/user/cancel_2fa?id=${r}`));return e(P,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(h,{spacing:"$2",get children(){return[e(o,{colorScheme:"accent",get loading(){return i()},onClick:l,get children(){return n("global.refresh")}}),e(o,{onClick:()=>{t("/@manage/users/add")},get children(){return n("global.add")}})]}}),e(T,{w:"$full",overflowX:"auto",get children(){return e(B,{highlightOnHover:!0,dense:!0,get children(){return[e(F,{get children(){return e(b,{get children(){return[e(m,{each:["username","base_path","role","permission","available"],children:r=>e(f,{get children(){return n(`users.${r}`)}})}),e(f,{get children(){return n("global.operations")}})]}})}}),e(H,{get children(){return e(m,{get each(){return d()},children:r=>e(b,{get children(){return[e(s,{get children(){return r.username}}),e(s,{get children(){return r.base_path}}),e(s,{get children(){return e(z,{get role(){return r.role}})}}),e(s,{get children(){return e(O,{user:r})}}),e(s,{get children(){return e(M,{get yes(){return!r.disabled}})}}),e(s,{get children(){return e(h,{spacing:"$2",get children(){return[e(o,{onClick:()=>{t(`/@manage/users/edit/${r.id}`)},get children(){return n("global.edit")}}),e(L,{get name(){return r.username},get loading(){return C()===r.id},onClick:async()=>{const c=await S(r.id);g(c,()=>{$.success(n("global.delete_success")),l()})}}),e(o,{colorScheme:"accent",get loading(){return U()===r.id},onClick:async()=>{const c=await w(r.id);g(c,()=>{$.success(n("users.cancel_2fa_success")),l()})},get children(){return n("users.cancel_2fa")}})]}})}})]}})})}})]}})}})]}})};export{A as default};
@@ -1 +1 @@
1
- System.register(["./index-legacy.a7c40fe3.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.a,n=e.h,r=e.ck}],execute:function(){e("W",(function(e){var c=t();return n(r,{get colorScheme(){return e.yes?"success":"danger"},get children(){return c("global.".concat(e.yes?"yes":"no"))}})}))}}}));
1
+ System.register(["./index-legacy.a92c0df2.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.a,n=e.h,r=e.ck}],execute:function(){e("W",(function(e){var c=t();return n(r,{get colorScheme(){return e.yes?"success":"danger"},get children(){return c("global.".concat(e.yes?"yes":"no"))}})}))}}}));
@@ -1 +1 @@
1
- import{a as t,h as s,ck as n}from"./index.fae3cea4.js";const a=e=>{const r=t();return s(n,{get colorScheme(){return e.yes?"success":"danger"},get children(){return r(`global.${e.yes?"yes":"no"}`)}})};export{a as W};
1
+ import{a as t,h as s,ck as n}from"./index.392c6ddc.js";const a=e=>{const r=t();return s(n,{get colorScheme(){return e.yes?"success":"danger"},get children(){return r(`global.${e.yes?"yes":"no"}`)}})};export{a as W};
@@ -1 +1 @@
1
- !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(k){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=L(a,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=s(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var h={};function p(){}function y(){}function v(){}var d={};f(d,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==n&&o.call(g,a)&&(d=g);var w=v.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,c,u){var f=s(r[i],r,a);if("throw"!==f.type){var l=f.arg,h=l.value;return h&&"object"==t(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(f.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function L(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,L(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return y.prototype=v,f(w,"constructor",v),f(v,"constructor",y),y.displayName=f(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},b(x.prototype),f(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),f(w,u,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:j(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},e}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(f){return void e(f)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return o(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.a7c40fe3.js"],(function(t){"use strict";var o,i,a,c,u,f,l,s;return{setters:[function(t){o=t.b,i=t.aW,a=t.b9,c=t._,u=t.h,f=t.a7,l=t.a8,s=t.ba}],execute:function(){t("default",(function(){var t=o().pathname,h=n(i((function(){return a.post("/fs/other",{path:t(),password:c(),method:"doc_preview"})})),2),p=h[0],y=h[1],v=function(){var t,n=(t=r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y();case 2:e=t.sent,s(e,(function(t){aliyun.config({mount:document.querySelector("#office-preview"),url:t.preview_url}).setToken({token:t.access_token})}));case 4:case"end":return t.stop()}}),t)})),function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))});return function(){return n.apply(this,arguments)}}();return v(),u(l,{get loading(){return p()},get children(){return u(f,{w:"$full",h:"70vh",id:"office-preview"})}})}))}}}))}();
1
+ !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(k){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=L(a,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=s(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(k){return{type:"throw",arg:k}}}e.wrap=l;var h={};function p(){}function y(){}function v(){}var d={};f(d,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==n&&o.call(g,a)&&(d=g);var w=v.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,c,u){var f=s(r[i],r,a);if("throw"!==f.type){var l=f.arg,h=l.value;return h&&"object"==t(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(f.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function L(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,L(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return y.prototype=v,f(w,"constructor",v),f(v,"constructor",y),y.displayName=f(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},b(x.prototype),f(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),f(w,u,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:j(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},e}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(f){return void e(f)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return o(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.a92c0df2.js"],(function(t){"use strict";var o,i,a,c,u,f,l,s;return{setters:[function(t){o=t.b,i=t.aW,a=t.b9,c=t._,u=t.h,f=t.a7,l=t.a8,s=t.ba}],execute:function(){t("default",(function(){var t=o().pathname,h=n(i((function(){return a.post("/fs/other",{path:t(),password:c(),method:"doc_preview"})})),2),p=h[0],y=h[1],v=function(){var t,n=(t=r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y();case 2:e=t.sent,s(e,(function(t){aliyun.config({mount:document.querySelector("#office-preview"),url:t.preview_url}).setToken({token:t.access_token})}));case 4:case"end":return t.stop()}}),t)})),function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))});return function(){return n.apply(this,arguments)}}();return v(),u(l,{get loading(){return p()},get children(){return u(f,{w:"$full",h:"70vh",id:"office-preview"})}})}))}}}))}();
@@ -1 +1 @@
1
- import{b as r,aW as i,b9 as c,_ as p,h as o,a7 as u,a8 as d,ba as l}from"./index.fae3cea4.js";const m=()=>{const{pathname:t}=r(),[s,n]=i(()=>c.post("/fs/other",{path:t(),password:p(),method:"doc_preview"}));return(async()=>{const a=await n();l(a,e=>{aliyun.config({mount:document.querySelector("#office-preview"),url:e.preview_url}).setToken({token:e.access_token})})})(),o(d,{get loading(){return s()},get children(){return o(u,{w:"$full",h:"70vh",id:"office-preview"})}})};export{m as default};
1
+ import{b as r,aW as i,b9 as c,_ as p,h as o,a7 as u,a8 as d,ba as l}from"./index.392c6ddc.js";const m=()=>{const{pathname:t}=r(),[s,n]=i(()=>c.post("/fs/other",{path:t(),password:p(),method:"doc_preview"}));return(async()=>{const a=await n();l(a,e=>{aliyun.config({mount:document.querySelector("#office-preview"),url:e.preview_url}).setToken({token:e.access_token})})})(),o(d,{get loading(){return s()},get children(){return o(u,{w:"$full",h:"70vh",id:"office-preview"})}})};export{m as default};
@@ -1 +1 @@
1
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(P){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===h)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}r.wrap=s;var h={};function p(){}function d(){}function y(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==n&&o.call(g,a)&&(v=g);var w=y.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,l,u){var c=f(e[i],e,a);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,l,u)}),(function(t){n("throw",t,l,u)})):r.resolve(h).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,u)}))}u(c.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=y,c(w,"constructor",y),c(y,"constructor",d),d.displayName=c(y,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,l,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),c(w,u,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=S,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(c){return void r(c)}l.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function l(t){r(a,o,i,l,u,"next",t)}function u(t){r(a,o,i,l,u,"throw",t)}l(void 0)}))}}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){l=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.a7c40fe3.js","./icon-legacy.2d7c0a16.js","./video_box-legacy.d60b6928.js","./hls-legacy.9e0f7edb.js","./index-legacy.91fe7355.js","./Layout-legacy.bbe308ea.js","./useTitle-legacy.e942225f.js","./index-legacy.61172c95.js","./FolderTree-legacy.2cffdb64.js","./index-legacy.fb7fb711.js","./_commonjs-dynamic-modules-legacy.cf19cda3.js"],(function(t){"use strict";var r,i,a,l,u,c,s,f,h,p,d,y,v,m,g,w,b,x,k,_,L,j,S,E,P,O,C,F,z,I,N,A,T,M;return{setters:[function(t){r=t.b,i=t.a5,a=t.dB,l=t.a1,u=t.aJ,c=t.dC,s=t.cF,f=t.aL,h=t.c9,p=t.ca,d=t.aW,y=t.b9,v=t._,m=t.o,g=t.ba,w=t.n,b=t.e,x=t.m,k=t.h,_=t.a7,L=t.S,j=t.aC,S=t.ai,E=t.d,P=t.dD},function(t){O=t.O,C=t.A},function(t){F=t.A,z=t.a,I=t.V},function(t){N=t.H,A=t.a,T=t.b},function(t){M=t.r},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var G=S("<span></span>");t("default",(function(){var t=r(),S=t.pathname,W=t.searchParams,q=i().proxyLink,B=a(),H=l.objs.filter((function(t){return t.type===O.VIDEO}));0===H.length&&(H=[l.obj]);var D,U,V=function(){var t=H.findIndex((function(t){return t.name===l.obj.name}));t<H.length-1&&B(E(P(location.pathname),H[t+1].name)+"?auto_fullscreen="+D.fullscreen)},$={id:S(),container:"#video-player",title:l.obj.name,volume:.5,autoplay:u("video_autoplay"),autoSize:!1,autoMini:!0,controls:[{name:"previous-button",index:10,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Previous",click:function(){var t;(t=H.findIndex((function(t){return t.name===l.obj.name})))>0&&B(E(P(location.pathname),H[t-1].name)+"?auto_fullscreen="+D.fullscreen)}},{name:"next-button",index:11,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Next",click:function(){V()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,quality:[],plugins:[F],whitelist:[],settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0},type:"m3u8",customType:{m3u8:function(t,e){var r=new N;r.loadSource(e),r.attachMedia(t),t.src||(t.src=e)}},lang:["en","zh-cn","zh-tw"].includes(c().toLowerCase())?c().toLowerCase():"en",lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0},R=l.related.filter((function(t){for(var e=0,r=[".srt",".ass",".vtt"];e<r.length;e++){var n=r[e];if(t.name.endsWith(n))return!0}return!1})),Y=l.related.find((function(t){for(var e=0,r=[".xml"];e<r.length;e++){var n=r[e];if(t.name.endsWith(n))return!0}return!1}));if(0!=R.length){var J,K,Q=!1,X=R[0];if("ass"===s(X.name).toLowerCase())Q=!0,null===(K=$.plugins)||void 0===K||K.push(A({subUrl:q(X,!0)}));else $.subtitle={url:q(X,!0),type:s(X.name)};var Z=[{id:"setting_subtitle_display",html:"Display",tooltip:"Show",switch:!0,onSwitch:function(t){var e;t.tooltip=t.switch?"Hide":"Show",ht(!t.switch);var r=null===(e=$.settings)||void 0===e?void 0:e.find((function(t){return"setting_subtitle"===t.id}));return r&&(r.tooltip=t.tooltip),!t.switch}}];function ht(t){if("ass"===(Q?"ass":"webvtt"))D.subtitle.show=!1,D.emit("artplayer-plugin-ass:visible",t);else D.subtitle.show=t,D.emit("artplayer-plugin-ass:visible",!1)}R.forEach((function(t,e){var r;Z.push({default:0===e,html:(r=G.cloneNode(!0),r.style.setProperty("max-width","200px"),r.style.setProperty("overflow","hidden"),r.style.setProperty("text-overflow","ellipsis"),r.style.setProperty("word-break","break-all"),r.style.setProperty("white-space","normal"),r.style.setProperty("display","-webkit-box"),r.style.setProperty("-webkit-line-clamp","2"),r.style.setProperty("-webkit-box-orient","vertical"),r.style.setProperty("font-size","12px"),f(r,(function(){return t.name})),h((function(){return p(r,"title",t.name)})),r),name:t.name,url:q(t,!0)})})),null===(J=$.settings)||void 0===J||J.push({id:"setting_subtitle",html:"Subtitle",tooltip:"Show",icon:C({size:24}),selector:Z,onSelect:function(t){var e,r;"ass"===s(t.name).toLowerCase()?(Q=!0,this.emit("artplayer-plugin-ass:switch",t.url),ht(!0)):(Q=!1,this.subtitle.switch(t.url,{name:t.name}),this.once("subtitleLoad",ht.bind(this,!0)));var n=Z.find((function(t){return"setting_subtitle_display"===t.id}));return n&&!n.switch&&(null===(e=n.$html)||void 0===e||null===(r=e.click)||void 0===r||r.call(e)),null==n?void 0:n.tooltip}})}Y&&(null===(U=$.plugins)||void 0===U||U.push(T({danmuku:q(Y,!0),speed:5,opacity:1,fontSize:25,color:"#FFFFFF",mode:0,margin:[0,"0%"],antiOverlap:!1,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,theme:"dark"})));var tt,et,rt=o(d((function(){return y.post("/fs/other",{path:S(),password:v(),method:"video_preview"})})),2),nt=(rt[0],rt[1]);function ot(){return it.apply(this,arguments)}function it(){return it=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt();case 2:r=t.sent,g(r,function(){var t=n(e().mark((function t(r){var n,o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==(n=r.video_preview_play_info.live_transcoding_task_list.filter((function(t){return t.url}))).length){t.next=4;break}return w.error("No transcoding video found"),t.abrupt("return");case 4:return o=n.map((function(t,e){return{html:t.template_id,url:t.url,default:e===n.length-1}})),$.quality=o,D.quality=o,et=D.currentTime,i=D.playing,t.next=11,D.switchUrl(o[o.length-1].url);case 11:i||D.pause(),setTimeout((function(){D.seek=et}),1e3);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}}),t)}))),it.apply(this,arguments)}m(n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt();case 2:r=t.sent,ft(200!==r.code),g(r,(function(t){var e=t.video_preview_play_info.live_transcoding_task_list.filter((function(t){return t.url}));if(0!==e.length){var r;switch($.url=e[e.length-1].url,$.quality=e.map((function(t,r){return{html:t.template_id,url:t.url,default:r===e.length-1}})),D=new z($),W.auto_fullscreen){case"true":r=!0;case"false":r=!1;default:r=!1}D.on("ready",(function(){D.fullscreen=r})),D.on("video:ended",(function(){lt()&&V()})),tt=window.setInterval(ot,84e4)}else w.error("No transcoding video found")}));case 5:case"end":return t.stop()}}),t)})))),b((function(){var t;null===(t=D)||void 0===t||t.destroy(),window.clearInterval(tt)}));var at=o(x(),2),lt=at[0],ut=at[1],ct=o(x(!1),2),st=ct[0],ft=ct[1];return k(I,{onAutoNextChange:ut,get children(){return[k(_,{w:"$full",h:"60vh",id:"video-player"}),k(L,{get when(){return st()},get children(){return k(j,{w:"100%",h:"60vh",bgColor:"black",get children(){return k(M,{size:"4rem"})}})}})]}})}))}}}))}();
1
+ !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(P){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===h)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}r.wrap=s;var h={};function p(){}function d(){}function y(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==n&&o.call(g,a)&&(v=g);var w=y.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,l,u){var c=f(e[i],e,a);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,l,u)}),(function(t){n("throw",t,l,u)})):r.resolve(h).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,u)}))}u(c.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=y,c(w,"constructor",y),c(y,"constructor",d),d.displayName=c(y,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,l,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),c(w,u,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=S,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(c){return void r(c)}l.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function l(t){r(a,o,i,l,u,"next",t)}function u(t){r(a,o,i,l,u,"throw",t)}l(void 0)}))}}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){l=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.a92c0df2.js","./icon-legacy.0fc20af0.js","./video_box-legacy.ee2db89d.js","./hls-legacy.edbd5087.js","./index-legacy.b67c6603.js","./Layout-legacy.2cde7d9a.js","./useTitle-legacy.af253628.js","./index-legacy.f2143918.js","./FolderTree-legacy.ced41d7a.js","./index-legacy.b70065b7.js","./_commonjs-dynamic-modules-legacy.cf19cda3.js"],(function(t){"use strict";var r,i,a,l,u,c,s,f,h,p,d,y,v,m,g,w,b,x,k,_,L,j,S,E,P,O,C,z,A,F,I,N,T,M;return{setters:[function(t){r=t.b,i=t.a5,a=t.dw,l=t.a1,u=t.aJ,c=t.dx,s=t.cA,f=t.aL,h=t.c9,p=t.ca,d=t.aW,y=t.b9,v=t._,m=t.o,g=t.ba,w=t.n,b=t.e,x=t.m,k=t.h,_=t.a7,L=t.S,j=t.aC,S=t.ai,E=t.d,P=t.dy},function(t){O=t.O,C=t.A},function(t){z=t.A,A=t.a,F=t.V},function(t){I=t.H,N=t.a,T=t.b},function(t){M=t.r},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var G=S("<span></span>");t("default",(function(){var t=r(),S=t.pathname,W=t.searchParams,q=i().proxyLink,H=a(),B=l.objs.filter((function(t){return t.type===O.VIDEO}));0===B.length&&(B=[l.obj]);var U,V,$=function(){var t=B.findIndex((function(t){return t.name===l.obj.name}));t<B.length-1&&H(E(P(location.pathname),B[t+1].name)+"?auto_fullscreen="+U.fullscreen)},D={id:S(),container:"#video-player",title:l.obj.name,volume:.5,autoplay:u("video_autoplay"),autoSize:!1,autoMini:!0,controls:[{name:"previous-button",index:10,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Previous",click:function(){var t;(t=B.findIndex((function(t){return t.name===l.obj.name})))>0&&H(E(P(location.pathname),B[t-1].name)+"?auto_fullscreen="+U.fullscreen)}},{name:"next-button",index:11,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Next",click:function(){$()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,quality:[],plugins:[z],whitelist:[],settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0},type:"m3u8",customType:{m3u8:function(t,e){var r=new I;r.loadSource(e),r.attachMedia(t),t.src||(t.src=e)}},lang:["en","zh-cn","zh-tw"].includes(c().toLowerCase())?c().toLowerCase():"en",lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0},R=l.related.filter((function(t){for(var e=0,r=[".srt",".ass",".vtt"];e<r.length;e++){var n=r[e];if(t.name.endsWith(n))return!0}return!1})),Y=l.related.find((function(t){for(var e=0,r=[".xml"];e<r.length;e++){var n=r[e];if(t.name.endsWith(n))return!0}return!1}));if(0!=R.length){var J,K,Q=!1,X=R[0];if("ass"===s(X.name).toLowerCase())Q=!0,null===(K=D.plugins)||void 0===K||K.push(N({subUrl:q(X,!0)}));else D.subtitle={url:q(X,!0),type:s(X.name)};var Z=[{id:"setting_subtitle_display",html:"Display",tooltip:"Show",switch:!0,onSwitch:function(t){var e;t.tooltip=t.switch?"Hide":"Show",ht(!t.switch);var r=null===(e=D.settings)||void 0===e?void 0:e.find((function(t){return"setting_subtitle"===t.id}));return r&&(r.tooltip=t.tooltip),!t.switch}}];function ht(t){if("ass"===(Q?"ass":"webvtt"))U.subtitle.show=!1,U.emit("artplayer-plugin-ass:visible",t);else U.subtitle.show=t,U.emit("artplayer-plugin-ass:visible",!1)}R.forEach((function(t,e){var r;Z.push({default:0===e,html:(r=G.cloneNode(!0),r.style.setProperty("max-width","200px"),r.style.setProperty("overflow","hidden"),r.style.setProperty("text-overflow","ellipsis"),r.style.setProperty("word-break","break-all"),r.style.setProperty("white-space","normal"),r.style.setProperty("display","-webkit-box"),r.style.setProperty("-webkit-line-clamp","2"),r.style.setProperty("-webkit-box-orient","vertical"),r.style.setProperty("font-size","12px"),f(r,(function(){return t.name})),h((function(){return p(r,"title",t.name)})),r),name:t.name,url:q(t,!0)})})),null===(J=D.settings)||void 0===J||J.push({id:"setting_subtitle",html:"Subtitle",tooltip:"Show",icon:C({size:24}),selector:Z,onSelect:function(t){var e,r;"ass"===s(t.name).toLowerCase()?(Q=!0,this.emit("artplayer-plugin-ass:switch",t.url),ht(!0)):(Q=!1,this.subtitle.switch(t.url,{name:t.name}),this.once("subtitleLoad",ht.bind(this,!0)));var n=Z.find((function(t){return"setting_subtitle_display"===t.id}));return n&&!n.switch&&(null===(e=n.$html)||void 0===e||null===(r=e.click)||void 0===r||r.call(e)),null==n?void 0:n.tooltip}})}Y&&(null===(V=D.plugins)||void 0===V||V.push(T({danmuku:q(Y,!0),speed:5,opacity:1,fontSize:25,color:"#FFFFFF",mode:0,margin:[0,"0%"],antiOverlap:!1,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,theme:"dark"})));var tt,et,rt=o(d((function(){return y.post("/fs/other",{path:S(),password:v(),method:"video_preview"})})),2),nt=(rt[0],rt[1]);function ot(){return it.apply(this,arguments)}function it(){return it=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt();case 2:r=t.sent,g(r,function(){var t=n(e().mark((function t(r){var n,o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==(n=r.video_preview_play_info.live_transcoding_task_list.filter((function(t){return t.url}))).length){t.next=4;break}return w.error("No transcoding video found"),t.abrupt("return");case 4:return o=n.map((function(t,e){return{html:t.template_id,url:t.url,default:e===n.length-1}})),D.quality=o,U.quality=o,et=U.currentTime,i=U.playing,t.next=11,U.switchUrl(o[o.length-1].url);case 11:i||U.pause(),setTimeout((function(){U.seek=et}),1e3);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}}),t)}))),it.apply(this,arguments)}m(n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,nt();case 2:r=t.sent,ft(200!==r.code),g(r,(function(t){var e=t.video_preview_play_info.live_transcoding_task_list.filter((function(t){return t.url}));if(0!==e.length){var r;switch(D.url=e[e.length-1].url,D.quality=e.map((function(t,r){return{html:t.template_id,url:t.url,default:r===e.length-1}})),U=new A(D),W.auto_fullscreen){case"true":r=!0;case"false":r=!1;default:r=!1}U.on("ready",(function(){U.fullscreen=r})),U.on("video:ended",(function(){lt()&&$()})),tt=window.setInterval(ot,84e4)}else w.error("No transcoding video found")}));case 5:case"end":return t.stop()}}),t)})))),b((function(){var t;null===(t=U)||void 0===t||t.destroy(),window.clearInterval(tt)}));var at=o(x(),2),lt=at[0],ut=at[1],ct=o(x(!1),2),st=ct[0],ft=ct[1];return k(F,{onAutoNextChange:ut,get children(){return[k(_,{w:"$full",h:"60vh",id:"video-player"}),k(L,{get when(){return st()},get children(){return k(j,{w:"100%",h:"60vh",bgColor:"black",get children(){return k(M,{size:"4rem"})}})}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{b as T,a5 as q,dB as D,a1 as c,aJ as R,dC as C,cF as m,aL as E,c9 as $,ca as U,aW as J,b9 as G,_ as K,o as Q,ba as z,n as A,e as X,m as M,h as p,a7 as Y,S as Z,aC as ee,ai as te,d as L,dD as j}from"./index.fae3cea4.js";import{O as re,A as se}from"./icon.94f94d81.js";import{A as oe,a as le,V as ne}from"./video_box.bfb0d4a5.js";import{H as ae,a as ie,b as ue}from"./hls.1623c369.js";import{r as ce}from"./index.0adfc44b.js";import"./Layout.683e33e3.js";import"./useTitle.630c0b7f.js";import"./index.952b63b2.js";import"./FolderTree.3d6d889d.js";import"./index.afa471fc.js";import"./_commonjs-dynamic-modules.30ae7933.js";const pe=te("<span></span>"),Pe=()=>{var _,P,S;const{pathname:w,searchParams:F}=T(),{proxyLink:h}=q(),y=D();let u=c.objs.filter(e=>e.type===re.VIDEO);u.length===0&&(u=[c.obj]);const g=()=>{const e=u.findIndex(o=>o.name===c.obj.name);e<u.length-1&&y(L(j(location.pathname),u[e+1].name)+"?auto_fullscreen="+s.fullscreen)},W=()=>{const e=u.findIndex(o=>o.name===c.obj.name);e>0&&y(L(j(location.pathname),u[e-1].name)+"?auto_fullscreen="+s.fullscreen)};let s,i={id:w(),container:"#video-player",title:c.obj.name,volume:.5,autoplay:R("video_autoplay"),autoSize:!1,autoMini:!0,controls:[{name:"previous-button",index:10,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Previous",click:function(){W()}},{name:"next-button",index:11,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Next",click:function(){g()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,quality:[],plugins:[oe],whitelist:[],settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0},type:"m3u8",customType:{m3u8:function(e,o){const n=new ae;n.loadSource(o),n.attachMedia(e),e.src||(e.src=o)}},lang:["en","zh-cn","zh-tw"].includes(C().toLowerCase())?C().toLowerCase():"en",lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0};const f=c.related.filter(e=>{for(const o of[".srt",".ass",".vtt"])if(e.name.endsWith(o))return!0;return!1}),b=c.related.find(e=>{for(const o of[".xml"])if(e.name.endsWith(o))return!0;return!1});if(f.length!=0){let a=function(t){switch(e?"ass":"webvtt"){case"ass":s.subtitle.show=!1,s.emit("artplayer-plugin-ass:visible",t);break;case"webvtt":default:s.subtitle.show=t,s.emit("artplayer-plugin-ass:visible",!1);break}},e=!1;const o=f[0];m(o.name).toLowerCase()==="ass"?(e=!0,(_=i.plugins)==null||_.push(ie({subUrl:h(o,!0)}))):i.subtitle={url:h(o,!0),type:m(o.name)};const n=[{id:"setting_subtitle_display",html:"Display",tooltip:"Show",switch:!0,onSwitch:function(t){var r;t.tooltip=t.switch?"Hide":"Show",a(!t.switch);const l=(r=i.settings)==null?void 0:r.find(d=>d.id==="setting_subtitle");return l&&(l.tooltip=t.tooltip),!t.switch}}];f.forEach((t,l)=>{n.push({default:l===0,html:(()=>{const r=pe.cloneNode(!0);return r.style.setProperty("max-width","200px"),r.style.setProperty("overflow","hidden"),r.style.setProperty("text-overflow","ellipsis"),r.style.setProperty("word-break","break-all"),r.style.setProperty("white-space","normal"),r.style.setProperty("display","-webkit-box"),r.style.setProperty("-webkit-line-clamp","2"),r.style.setProperty("-webkit-box-orient","vertical"),r.style.setProperty("font-size","12px"),E(r,()=>t.name),$(()=>U(r,"title",t.name)),r})(),name:t.name,url:h(t,!0)})}),(P=i.settings)==null||P.push({id:"setting_subtitle",html:"Subtitle",tooltip:"Show",icon:se({size:24}),selector:n,onSelect:function(t){var r,d;m(t.name).toLowerCase()==="ass"?(e=!0,this.emit("artplayer-plugin-ass:switch",t.url),a(!0)):(e=!1,this.subtitle.switch(t.url,{name:t.name}),this.once("subtitleLoad",a.bind(this,!0)));const l=n.find(O=>O.id==="setting_subtitle_display");return l&&!l.switch&&((d=(r=l.$html)==null?void 0:r.click)==null||d.call(r)),l==null?void 0:l.tooltip}})}b&&((S=i.plugins)==null||S.push(ue({danmuku:h(b,!0),speed:5,opacity:1,fontSize:25,color:"#FFFFFF",mode:0,margin:[0,"0%"],antiOverlap:!1,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,theme:"dark"})));const[he,v]=J(()=>G.post("/fs/other",{path:w(),password:K(),method:"video_preview"}));Q(async()=>{const e=await v();H(e.code!==200),z(e,o=>{const n=o.video_preview_play_info.live_transcoding_task_list.filter(t=>t.url);if(n.length===0){A.error("No transcoding video found");return}i.url=n[n.length-1].url,i.quality=n.map((t,l)=>({html:t.template_id,url:t.url,default:l===n.length-1})),s=new le(i);let a;switch(F.auto_fullscreen){case"true":a=!0;case"false":a=!1;default:a=!1}s.on("ready",()=>{s.fullscreen=a}),s.on("video:ended",()=>{!N()||g()}),k=window.setInterval(I,1e3*60*14)})});let k,x;async function I(){const e=await v();z(e,async o=>{const n=o.video_preview_play_info.live_transcoding_task_list.filter(l=>l.url);if(n.length===0){A.error("No transcoding video found");return}const a=n.map((l,r)=>({html:l.template_id,url:l.url,default:r===n.length-1}));i.quality=a,s.quality=a,x=s.currentTime;let t=s.playing;await s.switchUrl(a[a.length-1].url),t||s.pause(),setTimeout(()=>{s.seek=x},1e3)})}X(()=>{s==null||s.destroy(),window.clearInterval(k)});const[N,B]=M(),[V,H]=M(!1);return p(ne,{onAutoNextChange:B,get children(){return[p(Y,{w:"$full",h:"60vh",id:"video-player"}),p(Z,{get when(){return V()},get children(){return p(ee,{w:"100%",h:"60vh",bgColor:"black",get children(){return p(ce,{size:"4rem"})}})}})]}})};export{Pe as default};
1
+ import{b as T,a5 as q,dw as R,a1 as c,aJ as D,dx as C,cA as m,aL as E,c9 as $,ca as U,aW as J,b9 as G,_ as K,o as Q,ba as z,n as A,e as X,m as M,h as p,a7 as Y,S as Z,aC as ee,ai as te,d as L,dy as j}from"./index.392c6ddc.js";import{O as re,A as se}from"./icon.eec0896f.js";import{A as oe,a as le,V as ne}from"./video_box.5d85210f.js";import{H as ae,a as ie,b as ue}from"./hls.39746a0b.js";import{r as ce}from"./index.af3d6b7a.js";import"./Layout.f0d4817f.js";import"./useTitle.f88f51f6.js";import"./index.d7b001db.js";import"./FolderTree.b81bb9fa.js";import"./index.141a0537.js";import"./_commonjs-dynamic-modules.30ae7933.js";const pe=te("<span></span>"),Pe=()=>{var _,P,S;const{pathname:w,searchParams:W}=T(),{proxyLink:h}=q(),y=R();let u=c.objs.filter(e=>e.type===re.VIDEO);u.length===0&&(u=[c.obj]);const g=()=>{const e=u.findIndex(o=>o.name===c.obj.name);e<u.length-1&&y(L(j(location.pathname),u[e+1].name)+"?auto_fullscreen="+s.fullscreen)},F=()=>{const e=u.findIndex(o=>o.name===c.obj.name);e>0&&y(L(j(location.pathname),u[e-1].name)+"?auto_fullscreen="+s.fullscreen)};let s,i={id:w(),container:"#video-player",title:c.obj.name,volume:.5,autoplay:D("video_autoplay"),autoSize:!1,autoMini:!0,controls:[{name:"previous-button",index:10,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-prev-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path><path d="M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Previous",click:function(){F()}},{name:"next-button",index:11,position:"left",html:'<svg fill="none" stroke-width="2" xmlns="http://www.w3.org/2000/svg" height="22" width="22" class="icon icon-tabler icon-tabler-player-track-next-filled" width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="overflow: visible; color: currentcolor;"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M2 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path><path d="M13 5v14c0 .86 1.012 1.318 1.659 .753l8 -7a1 1 0 0 0 0 -1.506l-8 -7c-.647 -.565 -1.659 -.106 -1.659 .753z" stroke-width="0" fill="currentColor"></path></svg>',tooltip:"Next",click:function(){g()}}],loop:!1,flip:!0,playbackRate:!0,aspectRatio:!0,setting:!0,hotkey:!0,pip:!0,mutex:!0,fullscreen:!0,fullscreenWeb:!0,subtitleOffset:!0,miniProgressBar:!1,playsInline:!0,quality:[],plugins:[oe],whitelist:[],settings:[],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0},type:"m3u8",customType:{m3u8:function(e,o){const n=new ae;n.loadSource(o),n.attachMedia(e),e.src||(e.src=o)}},lang:["en","zh-cn","zh-tw"].includes(C().toLowerCase())?C().toLowerCase():"en",lock:!0,fastForward:!0,autoPlayback:!0,autoOrientation:!0,airplay:!0};const f=c.related.filter(e=>{for(const o of[".srt",".ass",".vtt"])if(e.name.endsWith(o))return!0;return!1}),b=c.related.find(e=>{for(const o of[".xml"])if(e.name.endsWith(o))return!0;return!1});if(f.length!=0){let a=function(t){switch(e?"ass":"webvtt"){case"ass":s.subtitle.show=!1,s.emit("artplayer-plugin-ass:visible",t);break;case"webvtt":default:s.subtitle.show=t,s.emit("artplayer-plugin-ass:visible",!1);break}},e=!1;const o=f[0];m(o.name).toLowerCase()==="ass"?(e=!0,(_=i.plugins)==null||_.push(ie({subUrl:h(o,!0)}))):i.subtitle={url:h(o,!0),type:m(o.name)};const n=[{id:"setting_subtitle_display",html:"Display",tooltip:"Show",switch:!0,onSwitch:function(t){var r;t.tooltip=t.switch?"Hide":"Show",a(!t.switch);const l=(r=i.settings)==null?void 0:r.find(d=>d.id==="setting_subtitle");return l&&(l.tooltip=t.tooltip),!t.switch}}];f.forEach((t,l)=>{n.push({default:l===0,html:(()=>{const r=pe.cloneNode(!0);return r.style.setProperty("max-width","200px"),r.style.setProperty("overflow","hidden"),r.style.setProperty("text-overflow","ellipsis"),r.style.setProperty("word-break","break-all"),r.style.setProperty("white-space","normal"),r.style.setProperty("display","-webkit-box"),r.style.setProperty("-webkit-line-clamp","2"),r.style.setProperty("-webkit-box-orient","vertical"),r.style.setProperty("font-size","12px"),E(r,()=>t.name),$(()=>U(r,"title",t.name)),r})(),name:t.name,url:h(t,!0)})}),(P=i.settings)==null||P.push({id:"setting_subtitle",html:"Subtitle",tooltip:"Show",icon:se({size:24}),selector:n,onSelect:function(t){var r,d;m(t.name).toLowerCase()==="ass"?(e=!0,this.emit("artplayer-plugin-ass:switch",t.url),a(!0)):(e=!1,this.subtitle.switch(t.url,{name:t.name}),this.once("subtitleLoad",a.bind(this,!0)));const l=n.find(O=>O.id==="setting_subtitle_display");return l&&!l.switch&&((d=(r=l.$html)==null?void 0:r.click)==null||d.call(r)),l==null?void 0:l.tooltip}})}b&&((S=i.plugins)==null||S.push(ue({danmuku:h(b,!0),speed:5,opacity:1,fontSize:25,color:"#FFFFFF",mode:0,margin:[0,"0%"],antiOverlap:!1,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,theme:"dark"})));const[he,v]=J(()=>G.post("/fs/other",{path:w(),password:K(),method:"video_preview"}));Q(async()=>{const e=await v();H(e.code!==200),z(e,o=>{const n=o.video_preview_play_info.live_transcoding_task_list.filter(t=>t.url);if(n.length===0){A.error("No transcoding video found");return}i.url=n[n.length-1].url,i.quality=n.map((t,l)=>({html:t.template_id,url:t.url,default:l===n.length-1})),s=new le(i);let a;switch(W.auto_fullscreen){case"true":a=!0;case"false":a=!1;default:a=!1}s.on("ready",()=>{s.fullscreen=a}),s.on("video:ended",()=>{!N()||g()}),k=window.setInterval(I,1e3*60*14)})});let k,x;async function I(){const e=await v();z(e,async o=>{const n=o.video_preview_play_info.live_transcoding_task_list.filter(l=>l.url);if(n.length===0){A.error("No transcoding video found");return}const a=n.map((l,r)=>({html:l.template_id,url:l.url,default:r===n.length-1}));i.quality=a,s.quality=a,x=s.currentTime;let t=s.playing;await s.switchUrl(a[a.length-1].url),t||s.pause(),setTimeout(()=>{s.seek=x},1e3)})}X(()=>{s==null||s.destroy(),window.clearInterval(k)});const[N,V]=M(),[B,H]=M(!1);return p(ne,{onAutoNextChange:V,get children(){return[p(Y,{w:"$full",h:"60vh",id:"video-player"}),p(Z,{get when(){return B()},get children(){return p(ee,{w:"100%",h:"60vh",bgColor:"black",get children(){return p(ce,{size:"4rem"})}})}})]}})};export{Pe as default};