comp-hub 0.42.7 → 0.42.8

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 (95) hide show
  1. package/dist/index.js +81 -81
  2. package/dist/master.js +19 -19
  3. package/dist/website/container/assets/{index-BIcqvqGy.js → index-E15UfKFM.js} +8 -8
  4. package/dist/website/container/index.html +1 -1
  5. package/dist/website/item/assets/{index-DDuyXuC_.js → index-CwtVkGPL.js} +29 -29
  6. package/dist/website/item/index.html +1 -1
  7. package/dist/website/main/assets/{BaseBadge-Dwav8-_V.js → BaseBadge-BReHrAqs.js} +1 -1
  8. package/dist/website/main/assets/{CanvasAnimation.vue_vue_type_script_setup_true_lang-Br1ZlT-C.js → CanvasAnimation.vue_vue_type_script_setup_true_lang-T5vn0JFD.js} +1 -1
  9. package/dist/website/main/assets/{CodeMirrorEditor-Cqow8ROO-D5a3bJrn.js → CodeMirrorEditor-Cqow8ROO-DYjlZgX9.js} +3 -3
  10. package/dist/website/main/assets/{GithubCallback-DRfvlj0J.js → GithubCallback-UUNSnoh7.js} +1 -1
  11. package/dist/website/main/assets/{ReplyForm.vue_vue_type_script_setup_true_lang-DztoCP65.js → ReplyForm.vue_vue_type_script_setup_true_lang-CEqkWYsv.js} +1 -1
  12. package/dist/website/main/assets/{SiteLogo-BK2LmBdP.js → SiteLogo-Bpm2Ah9F.js} +1 -1
  13. package/dist/website/main/assets/{index-BIIfOsTM.js → index-4S2NYemE.js} +1 -1
  14. package/dist/website/main/assets/{index--Gl7kxRA.js → index-6zg8j_nT.js} +1 -1
  15. package/dist/website/main/assets/{index-72rReQ2I-DT4t3yv7.js → index-72rReQ2I-C_aIAupr.js} +1 -1
  16. package/dist/website/main/assets/{index-DShvoWo5.js → index-B1K6cAvN.js} +1 -1
  17. package/dist/website/main/assets/{index-CwoRYDBS.js → index-B2qulmRp.js} +1 -1
  18. package/dist/website/main/assets/{index-BGAAZcsT.js → index-B5rd6Qgm.js} +1 -1
  19. package/dist/website/main/assets/index-B6JeEo9g.js +1 -0
  20. package/dist/website/main/assets/{index-GF-tJPqO.js → index-B6Oo99Ej.js} +1 -1
  21. package/dist/website/main/assets/{index-CRerG_jj.js → index-BA02DjBI.js} +1 -1
  22. package/dist/website/main/assets/{index-CmDlT9OG.js → index-BD8DwKlG.js} +1 -1
  23. package/dist/website/main/assets/{index-DOR-FWWa.js → index-BF2ETnQh.js} +1 -1
  24. package/dist/website/main/assets/{index-BYr_uRik.js → index-BNwWVTCF.js} +1 -1
  25. package/dist/website/main/assets/{index-D2YpsmLA.js → index-BPdEkCOx.js} +1 -1
  26. package/dist/website/main/assets/{index-DKrCvuOe.js → index-BTmh_pkn.js} +1 -1
  27. package/dist/website/main/assets/{index-3thCh3qq.js → index-BWh3R1jI.js} +3 -3
  28. package/dist/website/main/assets/{index-CAhGpcw0.js → index-BX3Tl9jb.js} +1 -1
  29. package/dist/website/main/assets/index-By_sRNiP.js +1 -0
  30. package/dist/website/main/assets/{index-B4Denke_.js → index-C1zFaUVE.js} +1 -1
  31. package/dist/website/main/assets/index-CCJiyDal.js +1 -0
  32. package/dist/website/main/assets/{index-DCw86ogq.js → index-CMiBqyhH.js} +1 -1
  33. package/dist/website/main/assets/{index-ruR13HOB.js → index-CaoAcCMA.js} +2 -2
  34. package/dist/website/main/assets/index-CbOKlsZn.js +2 -0
  35. package/dist/website/main/assets/{index-BDXFoym_.js → index-CeiBBtdW.js} +1 -1
  36. package/dist/website/main/assets/{index-bwN_igRO.js → index-CtNrOkJr.js} +1 -1
  37. package/dist/website/main/assets/{index-B_R6um8d.js → index-CuCbuNEj.js} +1 -1
  38. package/dist/website/main/assets/{index-CGL710hV.js → index-D-25wqLa.js} +1 -1
  39. package/dist/website/main/assets/{index-4DalWgib.js → index-D-HOLV6Z.js} +1 -1
  40. package/dist/website/main/assets/{index-D76eWsZ1-_nyu7eQb.js → index-D76eWsZ1-a1NwqrGS.js} +1 -1
  41. package/dist/website/main/assets/{index-C1XabFrJ.js → index-DR4j8Ql1.js} +1 -1
  42. package/dist/website/main/assets/{index-C0QhLzHP.js → index-DRsSRfwD.js} +1 -1
  43. package/dist/website/main/assets/{index-CkHWSI2b.js → index-DS44gjNL.js} +1 -1
  44. package/dist/website/main/assets/index-D_NvG8ob.js +1 -0
  45. package/dist/website/main/assets/{index-B0gjb0CJ.js → index-Dblv7zZt.js} +1 -1
  46. package/dist/website/main/assets/index-Dcp6qLr1.js +1 -0
  47. package/dist/website/main/assets/{index-B_rFxdlu.js → index-DdIWt0oE.js} +1 -1
  48. package/dist/website/main/assets/{index-CKtWjh5B.js → index-DdqWCLvd.js} +1 -1
  49. package/dist/website/main/assets/{index-BZrH5MtZ.js → index-DgQa2ZqK.js} +3 -3
  50. package/dist/website/main/assets/index-DgrizPPB.js +50 -0
  51. package/dist/website/main/assets/{index-Dms7ZQ2h-CXFhQfmI.js → index-Dms7ZQ2h-DZe32-4Q.js} +1 -1
  52. package/dist/website/main/assets/{index-DqiFCfGx-BdEBAtzU.js → index-DqiFCfGx-Be_VzFT8.js} +1 -1
  53. package/dist/website/main/assets/{index-K6SUsq-d.js → index-DvFQxOj2.js} +1 -1
  54. package/dist/website/main/assets/{index-DxypSQ0K-wm4wOntm.js → index-DxypSQ0K-DZ74HfZS.js} +1 -1
  55. package/dist/website/main/assets/{index-DvXl2xci.js → index-Dy0c-ddP.js} +1 -1
  56. package/dist/website/main/assets/{index-C7kbImye.js → index-DyFpWAJM.js} +1 -1
  57. package/dist/website/main/assets/{index-DRLluzuR.js → index-RrkKKQjp.js} +1 -1
  58. package/dist/website/main/assets/{index-DFFxrR-b.js → index-S0EB9acK.js} +1 -1
  59. package/dist/website/main/assets/{index-T76vWLBU-C0PuuEJA.js → index-T76vWLBU-iHnxnk3E.js} +1 -1
  60. package/dist/website/main/assets/index-VpAGAhRh.js +1 -0
  61. package/dist/website/main/assets/{index-CQTH6cXs.js → index-VyPJ3PyN.js} +1 -1
  62. package/dist/website/main/assets/{index-DXwxbpG5.js → index-Zt46lwNk.js} +1 -1
  63. package/dist/website/main/assets/{index-F2VTlbBR.js → index-ex5YI_gC.js} +1 -1
  64. package/dist/website/main/assets/{index-fZBcgzqR-CRYn0SF1.js → index-fZBcgzqR-CqMOhDrG.js} +1 -1
  65. package/dist/website/main/assets/{index-mqeGrL6B-BF63ossB.js → index-mqeGrL6B-C5oP0065.js} +1 -1
  66. package/dist/website/main/assets/index-wd7ZswFD.js +1 -0
  67. package/dist/website/main/assets/index-z8BnmFXm.js +1 -0
  68. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Ap8wTvsB.js +2 -0
  69. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-CJ6uny7o.js → index.vue_vue_type_script_setup_true_lang-B05SHLQS.js} +1 -1
  70. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-D1Yenn0_.js → index.vue_vue_type_script_setup_true_lang-BOkD4Vs3.js} +1 -1
  71. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-DVDnFtUl.js → index.vue_vue_type_script_setup_true_lang-Bs4fbZK8.js} +1 -1
  72. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-CsPwDCDo.js → index.vue_vue_type_script_setup_true_lang-ByHasmxS.js} +1 -1
  73. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-Do3aUu26.js → index.vue_vue_type_script_setup_true_lang-Dsu1eY0B.js} +1 -1
  74. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-CMD4VvG4.js → index.vue_vue_type_style_index_0_lang-66fUtqSq.js} +1 -1
  75. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-C7Y8qEDg.js → index.vue_vue_type_style_index_0_lang-CUQ5yd-1.js} +1 -1
  76. package/dist/website/main/assets/{useCacheOssStore-BovkXuwo.js → useCacheOssStore-C6-kY3lP.js} +1 -1
  77. package/dist/website/main/assets/{useCompEditStore-C47KFq3s.js → useCompEditStore-B7__tBPJ.js} +3 -3
  78. package/dist/website/main/assets/{useKeyword-C0diQZGk.js → useKeyword-O-wdQuD_.js} +1 -1
  79. package/dist/website/main/assets/{useMessage-Dxhw28ry.js → useMessage-yR4W8KDP.js} +1 -1
  80. package/dist/website/main/assets/{useTeamHeaders-BuIG232Y.js → useTeamHeaders-BbJQSrjN.js} +1 -1
  81. package/dist/website/main/assets/{useUnreadStore-CmdbW-yt.js → useUnreadStore-COt1XJEP.js} +1 -1
  82. package/dist/website/main/assets/{useVscodeOpen-0AeELCuF.js → useVscodeOpen-CCvngYEV.js} +1 -1
  83. package/dist/website/main/index.html +1 -1
  84. package/package.json +1 -1
  85. package/dist/website/main/assets/index-APbKgJd9.js +0 -1
  86. package/dist/website/main/assets/index-BLCWm3Fn.js +0 -1
  87. package/dist/website/main/assets/index-BU8KZHUA.js +0 -1
  88. package/dist/website/main/assets/index-BiXGgf9p.js +0 -1
  89. package/dist/website/main/assets/index-BkWR9AZK.js +0 -50
  90. package/dist/website/main/assets/index-Cey7IuDj.js +0 -1
  91. package/dist/website/main/assets/index-Cp8ViCIR.js +0 -1
  92. package/dist/website/main/assets/index-DGc9WQeN.js +0 -2
  93. package/dist/website/main/assets/index-_FSb4t-p.js +0 -1
  94. package/dist/website/main/assets/index-sFKst8yj.js +0 -1
  95. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-C9gk_QQc.js +0 -2
@@ -1,50 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B4Denke_.js","./vendor-ui-Cvgmewma.js","./vendor-core-CNXB6kVe.js","./LoadingWrapper.vue_vue_type_script_setup_true_lang-BYA4gUOI.js","./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CNOUTt3S.js","./BaseDialog.vue_vue_type_script_setup_true_lang-BK7dbjCA.js","./el-dropdown-item-BeIfAqTO.css","./el-card-BAyktVMS.css","./index-CGL710hV.js","./useUnreadStore-CmdbW-yt.js","./index.vue_vue_type_script_setup_true_lang-CJ6uny7o.js","./useCacheOssStore-BovkXuwo.js","./index-DOlF0Z_P.css","./index-CmDlT9OG.js","./index-C0WquRMM.css","./useVscodeOpen-0AeELCuF.js","./SiteLogo-BK2LmBdP.js","./SiteLogo-CszHjM2d.css","./index-DpUmZw4S.js","./index-8dCw6Y2Z.css","./el-link-CPQZ-olG.css","./index-DRLluzuR.js","./md5-Dkj6ZNQB.js","./AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-D-jhE3yA.js","./index-B_R6um8d.js","./CanvasAnimation.vue_vue_type_script_setup_true_lang-Br1ZlT-C.js","./index-CioMG7I6.css","./GithubCallback-DRfvlj0J.js","./index-3thCh3qq.js","./index-KhSB9wFh.js","./el-empty-S7fQQ3B8.css","./index-BLCWm3Fn.js","./index-C7kbImye.js","./index.vue_vue_type_script_setup_true_lang-Do3aUu26.js","./useMessage-Dxhw28ry.js","./index-sFKst8yj.js","./useCompMetaLocalStore-DUMtt_yz.js","./index.vue_vue_type_script_setup_true_lang-DVDnFtUl.js","./index-Cp8ViCIR.js","./el-table-column-C2GQUl4R.js","./el-table-column-B3ZEEuPD.css","./index.vue_vue_type_style_index_0_lang-CMD4VvG4.js","./vendor-xterm-mNFjEaKn.js","./index-Bn5vi5XZ.css","./index.vue_vue_type_script_setup_true_lang-D1Yenn0_.js","./index.vue_vue_type_script_setup_true_lang-C9gk_QQc.js","./useTeamHeaders-BuIG232Y.js","./useTeamHeaders-BMHQzwDq.css","./index.vue_vue_type_script_setup_true_lang-CsPwDCDo.js","./index3-BiHnTK1Z.js","./index-DlkXaOkE.css","./ReplyForm.vue_vue_type_script_setup_true_lang-DztoCP65.js","./BaseSegmented.vue_vue_type_script_setup_true_lang-CcSntY2B.js","./index-D-zBzPPy.css","./home-rounded-CN0qCDnE.js","./home-rounded-B4KVwSYb.css","./index-Cey7IuDj.js","./useKeyword-C0diQZGk.js","./supervised-user-circle-BwUSx6w_.js","./supervised-user-circle-CZYpyCV4.css","./index-DvXl2xci.js","./index.vue_vue_type_style_index_0_lang-C7Y8qEDg.js","./useCompEditStore-C47KFq3s.js","./v4-EwEgHOG0.js","./BaseBadge-Dwav8-_V.js","./BaseBadge-ledSuDnX.css","./useCompEditStore-C2cDxPfw.css","./index-CdWXO9ks.css","./kid-star-CiMfD7Sa.js","./kid-star-D1M-aC1C.css","./index-_FSb4t-p.js","./index-BIIfOsTM.js","./sync-saved-locally-rounded-DyESI323.js","./sync-saved-locally-rounded-wbwASI26.css","./index-F2VTlbBR.js","./cloud-upload-BqJFdj_J.js","./cloud-upload-j3Y0taC9.css","./index-DGc9WQeN.js","./index-BvmEG8Qn.css","./index-BZrH5MtZ.js","./moment-B-YVwB4U.js","./index-ChFpxx4T.css","./index-GF-tJPqO.js","./terminal-DAZ0JqKA.js","./terminal-DFt3N_TH.css","./index-BiXGgf9p.js","./settings-CSr4nQM1.js","./settings-BhagQj3w.css","./index--Gl7kxRA.js","./index-Mnu1wKgu.css","./index-ruR13HOB.js","./index-Ji2WmMDE.css","./index-D6zFRika.js","./CodeMirrorEditor-Cqow8ROO-D5a3bJrn.js"])))=>i.map(i=>d[i]);
2
- import{ao as Ja,m as se,z as ze,aa as ft,G as C,I as Ee,P as Le,W as Z,u as w,ap as Eo,f as xt,n as gt,g as ww,o as Ew,h as Fs,w as He,k as Za,b as ri,e as yn,t as Sn,r as Sw,c as Cw,a as re,i as xw,j as Ls,d as zn,l as Hn,A as Ia,aq as _i,H as R,K as mt,J as _,F as We,a7 as ut,U as Et,V as q,$ as Tn,Y as Tw,S as Se,ar as Ph,a4 as Ih,R as Pn,N as Ot,aj as ni,ah as Lr,a5 as ht,as as kw,O as ZR,Q as Ct,a6 as Ow,ac as ii,ad as Vi,L as an,at as eP,au as Cu,av as tP,aw as nP,ax as Mh,a2 as rP,M as Be,ay as Dh,az as Jr,aA as iP,aB as oP,am as Fh,y as Ts,a3 as Ni,a0 as U_,v as sP,q as ns,a1 as $w,ab as aP,x as Aw,X as Nr,T as el,ai as oi,ae as Zs,aC as $p,af as xf,aD as Lc}from"./vendor-core-CNXB6kVe.js";import{e as lP,u as cP,E as uP,a as js,d as dP,b as N_,c as Is,f as Ap,v as Rw,g as fP,h as pP,i as hP,x as mP,j as vP,k as rs,l as gP,m as Ma,n as _P,o as yP,p as bP,q as Rp,r as Pp,s as wP,t as EP,w as SP,y as CP,z as z_,A as B_,B as V_,C as H_,D as q_,F as W_,G as Y_,H as K_,I as G_,J as Q_,K as X_,L as J_,M as Z_,N as ey,O as ty,P as ny,Q as ry,R as iy,S as oy,T as sy,U as ay,V as ly,W as cy,X as uy,Y as dy,Z as fy,_ as py,$ as cc,a0 as Us,a1 as Lh,a2 as Da,a3 as Fa,a4 as La,a5 as uc,a6 as xP}from"./vendor-ui-Cvgmewma.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const TP="Comp Hub",kP="main",OP="container",$P="item",AP="/__global_config__",RP="local://",PP="comphubConfig",IP="__remote__",MP="__local__",DP="__admin__",FP="https://api.comphub.cn",LP="http://localhost:7002",jP="http://127.0.0.1:5000",UP="http://localhost:5001",NP="http://localhost:3580",zP="https://apiadmin.comphub.cn",BP="https://admin.comphub.cn",VP="/_module_load_prefix_",HP="/_node_modules_load_prefix_",qP="/_comp_preview_prefix_local_",WP="/__proxy__",YP="/__master__",KP="csrfToken",GP="authorization",QP="x-refresh-token",XP="x-csrf-token",JP="accept-language",ZP="comp-hub-db",eI="file-compiled",tI="https://oss.comphub.cn",nI="oss:sts:token",rI="oss:sts:expire",iI="https://prebuild.comphub.cn",oI="/dev",sI="/prod",aI="/node_modules/.prebuild_module",lI="_metadata.json",cI="vue/dist/vue.esm-bundler.js",uI="react-jsx-loader",dI="vue3-sfc-loader",fI="vue2-sfc-loader",pI="sass-compiler",hI="less-compiler",Pw="react",mI={COMP_FRAMEWORK_VUE:"vue",COMP_FRAMEWORK_REACT:Pw},vI="comp.json",gI="README.md",_I="main.js",yI="index.vue",bI=["index.jsx","index.js","index.tsx"],wI="/.comp_hub_temp",EI="screenshot_mini.png",SI=1024*1024*10,CI=1024*1024*3,xI=30,Iw="list_local",Mw="list_remote",TI={COMP_LIST_TYPE_LOCAL:Iw,COMP_LIST_TYPE_REMOTE:Mw},Dw="config",Fw="error",Lw="dir",jw="preview",Uw="extra",Nw="deps",zw="readme",Bw="upgradeLog",kI={TAB_TYPE_CONFIG:Dw,TAB_TYPE_ERROR:Fw,TAB_TYPE_DIR:Lw,TAB_TYPE_PREVIEW:jw,TAB_TYPE_EXTRA:Uw,TAB_TYPE_DEPS:Nw,TAB_TYPE_README:zw,TAB_TYPE_UPGRADE_LOG:Bw},Vw="mini",Hw="full",OI={COMP_EDIT_TAB_TYPE_MINI:Vw,COMP_EDIT_TAB_TYPE_FULL:Hw},qw="EDIT",Ww="ADD",$I={DIALOG_TYPE_EDIT:qw,DIALOG_TYPE_ADD:Ww},Yw="ONLY_INSTALL",Kw="AUTO",Gw="MAJOR_VERSION",Qw="MINOR_VERSION",Xw="EXACT_VERSION",AI={COMP_MATCH_TYPE_ONLY_INSTALL:Yw,COMP_MATCH_TYPE_AUTO:Kw,COMP_MATCH_TYPE_MAJOR_VERSION:Gw,COMP_MATCH_TYPE_MINOR_VERSION:Qw,COMP_MATCH_TYPE_EXACT_VERSION:Xw},Jw="online",Zw="offline",RI={COMP_UPDATE_TYPE_ONLINE:Jw,COMP_UPDATE_TYPE_OFFLINE:Zw},e1="NOT_EXIST",t1="EXIST",PI={COMP_CHECK_STATUS_NOT_EXIST:e1,COMP_CHECK_STATUS_EXIST:t1},n1="__id__",II=0,MI=1,DI=-1,r1="checkPreviewListForm",i1="checkExtraInfoForm",o1="checkCompConfig",s1="checkUpgradeLogForm",a1="getCompError",l1="afterCompDel",c1="afterCompCancelCollect",u1="afterCompRenderRetry",d1="openCompTerminal",FI={COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:r1,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:i1,COMP_METHOD_KEY_CHECK_COMP_CONFIG:o1,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:s1,COMP_METHOD_KEY_GET_COMP_ERROR:a1,COMP_METHOD_KEY_AFTER_COMP_DEL:l1,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:c1,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:u1,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:d1},LI="compListStore",jI="compEditStore",UI="callbacks",NI={CONTAINER:{SHARE:"share",COLLECT:"collect",LOCAL:"local",MINE:"mine",SIMILAR:"similar",TEAM_ALL:"teamAll",TEAM_MINE:"teamMine",TEAM_GROUP:"teamGroup",TEAM_ADD:"teamAdd"},ITEM:{PREVIEW_REMOTE:"previewRemote",PREVIEW_LOCAL:"previewLocal",CAROUSEL_REMOTE:"carouselRemote",CAROUSEL_LOCAL:"carouselLocal",EDIT_PANEL:"editPanel"}},zI="http://127.0.0.1",BI="http://localhost:8095",VI="http://localhost:8096",HI="http://localhost:5198",qI="http://localhost:3056",WI="https://www.comphub.cn",YI="http://localhost:8101",KI="https://render.comphub.cn",GI="/item",QI="/container",XI="CREATE",JI="JOIN",ZI="EXIT",eM="teamAddMyComp",tM="teamCompList",nM="teamCompGroupList",rM="teamMyCompList",iM="teamMyCompUpdate",oM="__v__",sM="local",aM="prod",lM="local",cM="prod",uM="http://localhost:5173",dM="https://docs.comphub.cn",fM=20,pM=20,hM="SUPER_ADMIN",mM="ADMIN",mn=Object.freeze(Object.defineProperty({__proto__:null,ACCEPT_LANGUAGE_HEADER_NAME:JP,ADMIN_SERVICE_PREFIX:DP,ADMIN_SERVICE_URL_DEV:NP,ADMIN_SERVICE_URL_PROD:zP,ADMIN_WEB_URL_PROD:BP,AUTHORIZATION_HEADER_NAME:GP,CACHE_KEY_STS_EXPIRE_TIME:rI,CACHE_KEY_STS_TOKEN:nI,COMPHUB_CONFIG_KEY:PP,COMP_ACTION_ICON_HEIGHT:pM,COMP_ACTION_ICON_WIDTH:fM,COMP_CHECK_STATUSES:PI,COMP_CHECK_STATUS_EXIST:t1,COMP_CHECK_STATUS_NOT_EXIST:e1,COMP_CONFIG_FILENAME:vI,COMP_EDIT_TAB_TYPES:OI,COMP_EDIT_TAB_TYPE_FULL:Hw,COMP_EDIT_TAB_TYPE_MINI:Vw,COMP_ENTRY_FILE:_I,COMP_FIELD_COMP_ID:n1,COMP_FRAMEWORK_REACT:Pw,COMP_FRAMEWORK_TYPES:mI,COMP_FRAMEWORK_VUE:"vue",COMP_HUB_DEV_DOCS_URL:uM,COMP_HUB_PROD_DOCS_URL:dM,COMP_LIST_TYPES:TI,COMP_LIST_TYPE_LOCAL:Iw,COMP_LIST_TYPE_REMOTE:Mw,COMP_MATCH_TYPES:AI,COMP_MATCH_TYPE_AUTO:Kw,COMP_MATCH_TYPE_EXACT_VERSION:Xw,COMP_MATCH_TYPE_MAJOR_VERSION:Gw,COMP_MATCH_TYPE_MINOR_VERSION:Qw,COMP_MATCH_TYPE_ONLY_INSTALL:Yw,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:c1,COMP_METHOD_KEY_AFTER_COMP_DEL:l1,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:u1,COMP_METHOD_KEY_CHECK_COMP_CONFIG:o1,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:i1,COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:r1,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:s1,COMP_METHOD_KEY_GET_COMP_ERROR:a1,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:d1,COMP_PREVIEW_PREFIX_LOCAL:qP,COMP_README_FILENAME:gI,COMP_SCREENSHOT_MINI_FILENAME:EI,COMP_SUBMIT_MAX_FILE_COUNT:xI,COMP_SUBMIT_MAX_SINGLE_FILE_SIZE:CI,COMP_SUBMIT_MAX_TOTAL_SIZE:SI,COMP_TEMP_DIR:wI,COMP_UPDATE_TYPES:RI,COMP_UPDATE_TYPE_OFFLINE:Zw,COMP_UPDATE_TYPE_ONLINE:Jw,COMP_USE_ENTRY_FILE:yI,COMP_USE_ENTRY_FILE_REACT:bI,CSRF_KEY:KP,CSRF_TOKEN_HEADER_NAME:XP,DIALOG_TYPES:$I,DIALOG_TYPE_ADD:Ww,DIALOG_TYPE_EDIT:qw,FILE_MANAGER_DIRNAME:RP,GLOBAL_CONFIG_PATH:AP,IFRAME_CONTAINER_WEBSITE_PATH:QI,IFRAME_HOST:zI,IFRAME_ITEM_WEBSITE_PATH:GI,IFRAME_ROUTES:NI,INDEX_DB_NAME:ZP,INDEX_DB_TABLE_NAME:eI,LESS_COMPILER_KEY:hI,LOCAL_CHILD_IFRAME_URL:BI,LOCAL_ITEM_EXTRANET_URL:YI,LOCAL_LEAF_IFRAME_URL:VI,LOCAL_MAIN_EXTRANET_URL:qI,LOCAL_MIDWAY_ENV_LOCAL:sM,LOCAL_MIDWAY_ENV_PROD:aM,LOCAL_SERVICE_PREFIX:MP,LOCAL_SERVICE_URL_DEV:jP,LOCAL_SERVICE_URL_DEV_SUB:UP,LOCAL_TOP_IFRAME_URL:HI,MASTER_API_PREFIX:YP,META_FILE_NAME:lI,MODULE_LOAD_PREFIX:VP,NODE_MODULES_LOAD_PREFIX:HP,OSS_CUSTOM_DOMAIN:tI,PREBUILD_HOST:iI,PREBUILD_MAX_SINGLE_FILE_SIZE:52428800,PREBUILD_MODULE_DIR:aI,PREBUILD_MODULE_DIR_DEV:oI,PREBUILD_MODULE_DIR_PROD:sI,PROVIDE_KEYS:FI,PROVIDE_KEY_CALLBACKS:UI,PROVIDE_KEY_COMP_EDIT_STORE:jI,PROVIDE_KEY_COMP_LIST_STORE:LI,PROXY_PATH_PREFIX:WP,REACT_JSX_LOADER_KEY:uI,REFRESH_TOKEN_HEADER_NAME:QP,REMOTE_ITEM_EXTRANET_URL:KI,REMOTE_MAIN_EXTRANET_URL:WI,REMOTE_MIDWAY_ENV_LOCAL:lM,REMOTE_MIDWAY_ENV_PROD:cM,REMOTE_SERVICE_PREFIX:IP,REMOTE_SERVICE_URL_DEV:LP,REMOTE_SERVICE_URL_PROD:FP,ROLE_CODE_ADMIN:mM,ROLE_CODE_SUPER_ADMIN:hM,ROUTE_STATE_KEY_VERSION:oM,SASS_COMPILER_KEY:pI,SCOPE_ID_TEAM_ADD_MY_COMP:eM,SCOPE_ID_TEAM_COMP_GROUP_LIST:nM,SCOPE_ID_TEAM_COMP_LIST:tM,SCOPE_ID_TEAM_MY_COMP_LIST:rM,SCOPE_ID_TEAM_MY_COMP_UPDATE:iM,SITE_TITLE:TP,TAB_TYPES:kI,TAB_TYPE_CONFIG:Dw,TAB_TYPE_DEPS:Nw,TAB_TYPE_DIR:Lw,TAB_TYPE_ERROR:Fw,TAB_TYPE_EXTRA:Uw,TAB_TYPE_PREVIEW:jw,TAB_TYPE_README:zw,TAB_TYPE_UPGRADE_LOG:Bw,TEAM_OPERATE_TYPE_CREATE:XI,TEAM_OPERATE_TYPE_EXIT:ZI,TEAM_OPERATE_TYPE_JOIN:JI,VERSION_COMPARE_GREATER:MI,VERSION_COMPARE_LESS:DI,VERSION_COMPARE_SAME:II,VUE2_SFC_LOADER_KEY:fI,VUE3_SFC_LOADER_KEY:dI,VUE_ESM_BUNDLER:cI,WEBSITE_PATH_CONTAINER:OP,WEBSITE_PATH_ITEM:$P,WEBSITE_PATH_MAIN:kP},Symbol.toStringTag,{value:"Module"}));var f1=(e=>(e.FILE="file",e.DIRECTORY="directory",e))(f1||{}),p1=(e=>(e.RECEIVED="received",e.MY="my",e))(p1||{}),h1=(e=>(e.GLOBAL="global",e.TEAM="team",e))(h1||{});const pie=Object.freeze(Object.defineProperty({__proto__:null,FileType:f1,MyCommentTab:p1,TargetType:h1},Symbol.toStringTag,{value:"Module"})),vM=[{label:"tag.systemRecommended",value:"XTTJ"},{label:"tag.all",value:"QB"},{label:"tag.latest",value:"ZX"},{label:"tag.hottest",value:"ZR"}],gM=[".css"],_M=[{name:n1,label:"comp.fieldId",required:!0,default:""},{name:"name",label:"comp.fieldName",required:!0,default:""},{name:"version",label:"comp.fieldVersion",required:!0,default:"1.0.0"}],hie=Object.freeze(Object.defineProperty({__proto__:null,COMP_DEFAULT_FIELD:_M,DEFAULT_TAG_GROUP:vM,PREBUILD_MODULE_SKIP_EXT:gM},Symbol.toStringTag,{value:"Module"})),yM="comp-hub-locale",bM=Object.freeze(Object.defineProperty({__proto__:null,LOCALE_KEY:yM},Symbol.toStringTag,{value:"Module"})),wM="send-auth-code",EM="send-auth-code-success",SM="send-auth-code-failed",CM="login-button",xM="login-button-success",TM="login-button-failed",kM="skip-login",OM="upload-select-folder",$M="upload-confirm",AM="upload-success",RM="upload-failed",PM="upload-repeat-confirm",IM="edit-panel-submit",MM="edit-panel-submit-success",DM="edit-panel-submit-failed",FM="edit-generate-comp-json",LM="edit-view-diff",jM="edit-bg-color-change",UM="edit-dep-version-change",NM="search-component",zM="filter-tag",BM="page-size-change",VM="comp-preview",HM="comp-download",qM="comp-download-success",WM="comp-download-failed",YM="comp-collect-toggle",KM="comp-delete",GM="comp-update",QM="comp-update-success",XM="comp-update-failed",JM="comp-version-change",ZM="preview-open-newtab",eD="preview-tab-change",tD="user-update-avatar",nD="user-update-avatar-success",rD="user-update-avatar-failed",iD="user-update-nickname",oD="user-update-nickname-success",sD="user-update-nickname-failed",aD="user-update-email",lD="user-update-email-success",cD="user-update-email-failed",uD="user-update-password",dD="user-update-password-success",fD="user-update-password-failed",pD="user-email-login-toggle",hD="team-tab-change",mD="team-filter-group",vD="team-kick-member",gD="team-apply-accept",_D="team-apply-reject",yD="team-comp-remove",bD="team-comp-permission-change",wD="sidebar-toggle",ED="setting-apply-rule",SD="clear-cache",hy=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_CACHE:SD,COMP_COLLECT_TOGGLE:YM,COMP_DELETE:KM,COMP_DOWNLOAD:HM,COMP_DOWNLOAD_FAILED:WM,COMP_DOWNLOAD_SUCCESS:qM,COMP_PREVIEW:VM,COMP_UPDATE:GM,COMP_UPDATE_FAILED:XM,COMP_UPDATE_SUCCESS:QM,COMP_VERSION_CHANGE:JM,EDIT_BG_COLOR_CHANGE:jM,EDIT_DEP_VERSION_CHANGE:UM,EDIT_GENERATE_COMP_JSON:FM,EDIT_PANEL_SUBMIT:IM,EDIT_PANEL_SUBMIT_FAILED:DM,EDIT_PANEL_SUBMIT_SUCCESS:MM,EDIT_VIEW_DIFF:LM,FILTER_TAG:zM,LOGIN_BUTTON:CM,LOGIN_BUTTON_FAILED:TM,LOGIN_BUTTON_SUCCESS:xM,PAGE_SIZE_CHANGE:BM,PREVIEW_OPEN_NEWTAB:ZM,PREVIEW_TAB_CHANGE:eD,SEARCH_COMPONENT:NM,SEND_AUTH_CODE:wM,SEND_AUTH_CODE_FAILED:SM,SEND_AUTH_CODE_SUCCESS:EM,SETTING_APPLY_RULE:ED,SIDEBAR_TOGGLE:wD,SKIP_LOGIN:kM,TEAM_APPLY_ACCEPT:gD,TEAM_APPLY_REJECT:_D,TEAM_COMP_PERMISSION_CHANGE:bD,TEAM_COMP_REMOVE:yD,TEAM_FILTER_GROUP:mD,TEAM_KICK_MEMBER:vD,TEAM_TAB_CHANGE:hD,UPLOAD_CONFIRM:$M,UPLOAD_FAILED:RM,UPLOAD_REPEAT_CONFIRM:PM,UPLOAD_SELECT_FOLDER:OM,UPLOAD_SUCCESS:AM,USER_EMAIL_LOGIN_TOGGLE:pD,USER_UPDATE_AVATAR:tD,USER_UPDATE_AVATAR_FAILED:rD,USER_UPDATE_AVATAR_SUCCESS:nD,USER_UPDATE_EMAIL:aD,USER_UPDATE_EMAIL_FAILED:cD,USER_UPDATE_EMAIL_SUCCESS:lD,USER_UPDATE_NICKNAME:iD,USER_UPDATE_NICKNAME_FAILED:sD,USER_UPDATE_NICKNAME_SUCCESS:oD,USER_UPDATE_PASSWORD:uD,USER_UPDATE_PASSWORD_FAILED:fD,USER_UPDATE_PASSWORD_SUCCESS:dD},Symbol.toStringTag,{value:"Module"})),mie=e=>mn.COMP_HUB_PROD_DOCS_URL,CD=e=>"";var xD={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const TD=()=>{const{locale:e}=Ja(),t={zh:xD,en:lP};return{locale:se(()=>t[e.value])}},kD=ze({__name:"App",setup(e){const{locale:t}=TD();return cP(),(n,r)=>{const i=ft("router-view");return C(),Ee(w(uP),{locale:w(t)},{default:Le(()=>[Z(i)]),_:1},8,["locale"])}}}),OD="modulepreload",$D=function(e,t){return new URL(e,t).href},my={},Rt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=d(n.map(f=>{if(f=$D(f,r),f in my)return;my[f]=!0;const p=f.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(r)for(let g=s.length-1;g>=0;g--){const m=s[g];if(m.href===f&&(!p||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${v}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":OD,p||(y.as="script"),y.crossOrigin="",y.href=f,c&&y.setAttribute("nonce",c),document.head.appendChild(y),p)return new Promise((g,m)=>{y.addEventListener("load",g),y.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},co="authorization",au=()=>localStorage.getItem(co),AD=e=>localStorage.setItem(co,e),RD=()=>localStorage.removeItem(co),Bo="x-refresh-token",PD=()=>localStorage.getItem(Bo),ID=e=>localStorage.setItem(Bo,e),MD=()=>localStorage.removeItem(Bo),DD="aside_is_collapse",vie="loginType",gie="compUploadFullscreen",_ie="terminalCommandHistory",yie="compUploadSidePanelSize",bie="tagSelected",FD="asideSize",LD="headerSize",m1="tagsViewMaxCache",wie="readUploadAgreement",jD="dependencyMatchRule",Eie="teamTabActiveName",Sie="settingTabActiveName",Cie="compPreviewTabActiveName",xie="myCommentsTabActiveName",v1="paginationPageSize",UD=()=>localStorage.getItem(v1),ND=e=>localStorage.setItem(v1,e),Tie="selectedFolderPath",tl=Eo("tagsView",{state:()=>({visitedViews:[],maxCache:js(m1,10),payloadMap:new Map}),actions:{setMaxCache(e){this.$patch(t=>{t.maxCache=e})},addView(e){this.$patch(t=>{const n={...e},r=t.visitedViews.findIndex(o=>o.path===e.path);if(r!==-1){t.visitedViews[r]=n;return}t.visitedViews.unshift(n);const i=t.visitedViews.length-t.maxCache;i>0&&this.spliceVisitedViews(-i,i)})},spliceVisitedViews(e,t){this.$patch(n=>{n.visitedViews.splice(e,t)})},delViewByPath(e){this.$patch(t=>{for(const[n,r]of t.visitedViews.entries())if(r.path===e){t.visitedViews.splice(n,1);break}})},delViewAndJumpToPrev(e,t=!1,n){if(t){const r=this.visitedViews.filter(i=>i.path!==e)?.[0];r?n.push(r.path).then(i=>{i||setTimeout(()=>{this.delViewByPath(e)},250)}):n.push("/").then(i=>{i||this.delViewByPath(e)})}else this.delViewByPath(e)},addPayLoad(e,t){this.$patch(n=>{n.payloadMap.set(e,t)})},getPayLoad(e){return this.payloadMap.get(e)}}});function g1(e){return ww()?(Ew(e),!0):!1}const Tf=new WeakMap,zD=(...e)=>{var t;const n=e[0],r=(t=Fs())==null?void 0:t.proxy;if(r==null&&!xw())throw new Error("injectLocal must be called in setup");return r&&Tf.has(r)&&n in Tf.get(r)?Tf.get(r)[n]:Ls(...e)},BD=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const VD=Object.prototype.toString,HD=e=>VD.call(e)==="[object Object]",qD=()=>{};function _1(...e){if(e.length!==1)return Sn(...e);const t=e[0];return typeof t=="function"?Sw(Cw(()=>({get:t,set:qD}))):re(t)}function WD(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const y1=e=>e();function YD(e=y1,t={}){const{initialState:n="active"}=t,r=_1(n==="active");function i(){r.value=!1}function o(){r.value=!0}const s=(...l)=>{r.value&&e(...l)};return{isActive:Sw(r),pause:i,resume:o,eventFilter:s}}function vy(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function jc(e){return Array.isArray(e)?e:[e]}function KD(e){return Fs()}function GD(e,t,n={}){const{eventFilter:r=y1,...i}=n;return He(e,WD(r,t),i)}function QD(e,t,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:s,pause:l,resume:c,isActive:d}=YD(r,{initialState:i});return{stop:GD(e,t,{...o,eventFilter:s}),pause:l,resume:c,isActive:d}}function xu(e,t=!0,n){KD()?xt(e,n):t?e():gt(e)}function kie(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,i=Za(e),o=yn(e);function s(l){if(arguments.length)return o.value=l,o.value;{const c=ri(n);return o.value=o.value===c?ri(r):c,o.value}}return i?s:[o,s]}function XD(e,t,n){return He(e,t,{...n,immediate:!0})}const yo=BD?window:void 0;function fo(e){var t;const n=ri(e);return(t=n?.$el)!=null?t:n}function ja(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},r=(l,c,d,f)=>(l.addEventListener(c,d,f),()=>l.removeEventListener(c,d,f)),i=se(()=>{const l=jc(ri(e[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),o=XD(()=>{var l,c;return[(c=(l=i.value)==null?void 0:l.map(d=>fo(d)))!=null?c:[yo].filter(d=>d!=null),jc(ri(i.value?e[1]:e[0])),jc(w(i.value?e[2]:e[1])),ri(i.value?e[3]:e[2])]},([l,c,d,f])=>{if(n(),!l?.length||!c?.length||!d?.length)return;const p=HD(f)?{...f}:f;t.push(...l.flatMap(v=>c.flatMap(y=>d.map(g=>r(v,y,g,p)))))},{flush:"post"}),s=()=>{o(),n()};return g1(n),s}function JD(){const e=yn(!1),t=Fs();return t&&xt(()=>{e.value=!0},t),e}function b1(e){const t=JD();return se(()=>(t.value,!!e()))}const ZD=Symbol("vueuse-ssr-width");function eF(){const e=xw()?zD(ZD,null):null;return typeof e=="number"?e:void 0}function w1(e,t={}){const{window:n=yo,ssrWidth:r=eF()}=t,i=b1(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=yn(typeof r=="number"),s=yn(),l=yn(!1),c=d=>{l.value=d.matches};return zn(()=>{if(o.value){o.value=!i.value;const d=ri(e).split(",");l.value=d.some(f=>{const p=f.includes("not all"),v=f.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),y=f.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||y);return v&&g&&(g=r>=vy(v[1])),y&&g&&(g=r<=vy(y[1])),p?!g:g});return}i.value&&(s.value=n.matchMedia(ri(e)),l.value=s.value.matches)}),ja(s,"change",c,{passive:!0}),se(()=>l.value)}const dc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fc="__vueuse_ssr_handlers__",tF=nF();function nF(){return fc in dc||(dc[fc]=dc[fc]||{}),dc[fc]}function E1(e,t){return tF[e]||t}function rF(e){return w1("(prefers-color-scheme: dark)",e)}function iF(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const oF={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},gy="vueuse-storage";function sF(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:d=!1,shallow:f,window:p=yo,eventFilter:v,onError:y=D=>{console.error(D)},initOnMounted:g}=r,m=(f?yn:re)(typeof t=="function"?t():t),b=se(()=>ri(e));if(!n)try{n=E1("getDefaultStorage",()=>{var D;return(D=yo)==null?void 0:D.localStorage})()}catch(D){y(D)}if(!n)return m;const x=ri(t),S=iF(x),O=(i=r.serializer)!=null?i:oF[S],{pause:T,resume:A}=QD(m,D=>W(D),{flush:o,deep:s,eventFilter:v});He(b,()=>K(),{flush:o});let M=!1;const z=D=>{g&&!M||K(D)},Y=D=>{g&&!M||L(D)};p&&l&&(n instanceof Storage?ja(p,"storage",z,{passive:!0}):ja(p,gy,Y)),g?xu(()=>{M=!0,K()}):K();function ve(D,ne){if(p){const le={key:b.value,oldValue:D,newValue:ne,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent("storage",le):new CustomEvent(gy,{detail:le}))}}function W(D){try{const ne=n.getItem(b.value);if(D==null)ve(ne,null),n.removeItem(b.value);else{const le=O.write(D);ne!==le&&(n.setItem(b.value,le),ve(ne,le))}}catch(ne){y(ne)}}function X(D){const ne=D?D.newValue:n.getItem(b.value);if(ne==null)return c&&x!=null&&n.setItem(b.value,O.write(x)),x;if(!D&&d){const le=O.read(ne);return typeof d=="function"?d(le,x):S==="object"&&!Array.isArray(le)?{...x,...le}:le}else return typeof ne!="string"?ne:O.read(ne)}function K(D){if(!(D&&D.storageArea!==n)){if(D&&D.key==null){m.value=x;return}if(!(D&&D.key!==b.value)){T();try{const ne=O.write(m.value);(D===void 0||D?.newValue!==ne)&&(m.value=X(D))}catch(ne){y(ne)}finally{D?gt(A):A()}}}}function L(D){K(D.detail)}return m}const aF="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function lF(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=yo,storage:o,storageKey:s="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:d,disableTransition:f=!0}=e,p={auto:"",light:"light",dark:"dark",...e.modes||{}},v=rF({window:i}),y=se(()=>v.value?"dark":"light"),g=c||(s==null?_1(r):sF(s,r,o,{window:i,listenToStorageChanges:l})),m=se(()=>g.value==="auto"?y.value:g.value),b=E1("updateHTMLAttrs",(T,A,M)=>{const z=typeof T=="string"?i?.document.querySelector(T):fo(T);if(!z)return;const Y=new Set,ve=new Set;let W=null;if(A==="class"){const K=M.split(/\s/g);Object.values(p).flatMap(L=>(L||"").split(/\s/g)).filter(Boolean).forEach(L=>{K.includes(L)?Y.add(L):ve.add(L)})}else W={key:A,value:M};if(Y.size===0&&ve.size===0&&W===null)return;let X;f&&(X=i.document.createElement("style"),X.appendChild(document.createTextNode(aF)),i.document.head.appendChild(X));for(const K of Y)z.classList.add(K);for(const K of ve)z.classList.remove(K);W&&z.setAttribute(W.key,W.value),f&&(i.getComputedStyle(X).opacity,document.head.removeChild(X))});function x(T){var A;b(t,n,(A=p[T])!=null?A:T)}function S(T){e.onChanged?e.onChanged(T,x):x(T)}He(m,S,{flush:"post",immediate:!0}),xu(()=>S(m.value));const O=se({get(){return d?g.value:m.value},set(T){g.value=T}});return Object.assign(O,{store:g,system:y,state:m})}function Oie(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=lF({...e,onChanged:(s,l)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,s==="dark",l,s):l(s)},modes:{dark:t,light:n}}),i=se(()=>r.system.value);return se({get(){return r.value==="dark"},set(s){const l=s?"dark":"light";i.value===l?r.value="auto":r.value=l}})}function cF(e,t,n={}){const{window:r=yo,...i}=n;let o;const s=b1(()=>r&&"ResizeObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},c=se(()=>{const p=ri(e);return Array.isArray(p)?p.map(v=>fo(v)):[fo(p)]}),d=He(c,p=>{if(l(),s.value&&r){o=new ResizeObserver(t);for(const v of p)v&&o.observe(v,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),d()};return g1(f),{isSupported:s,stop:f}}function jh(e,t={width:0,height:0},n={}){const{window:r=yo,box:i="content-box"}=n,o=se(()=>{var p,v;return(v=(p=fo(e))==null?void 0:p.namespaceURI)==null?void 0:v.includes("svg")}),s=yn(t.width),l=yn(t.height),{stop:c}=cF(e,([p])=>{const v=i==="border-box"?p.borderBoxSize:i==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(r&&o.value){const y=fo(e);if(y){const g=y.getBoundingClientRect();s.value=g.width,l.value=g.height}}else if(v){const y=jc(v);s.value=y.reduce((g,{inlineSize:m})=>g+m,0),l.value=y.reduce((g,{blockSize:m})=>g+m,0)}else s.value=p.contentRect.width,l.value=p.contentRect.height},n);xu(()=>{const p=fo(e);p&&(s.value="offsetWidth"in p?p.offsetWidth:t.width,l.value="offsetHeight"in p?p.offsetHeight:t.height)});const d=He(()=>fo(e),p=>{s.value=p?t.width:0,l.value=p?t.height:0});function f(){c(),d()}return{width:s,height:l,stop:f}}function $ie(e={}){const{window:t=yo,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:s="inner"}=e,l=yn(n),c=yn(r),d=()=>{if(t)if(s==="outer")l.value=t.outerWidth,c.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:p,height:v,scale:y}=t.visualViewport;l.value=Math.round(p*y),c.value=Math.round(v*y)}else o?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};d(),xu(d);const f={passive:!0};if(ja("resize",d,f),t&&s==="visual"&&t.visualViewport&&ja(t.visualViewport,"resize",d,f),i){const p=w1("(orientation: portrait)");He(p,()=>d())}return{width:l,height:c}}const uF=ze({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){var n,r;const i=yn(),o=Hn(jh(i,{width:(n=e.width)!=null?n:0,height:(r=e.height)!=null?r:0},{box:e.box}));return()=>{if(t.default)return Ia(e.as||"div",{ref:i},t.default(o))}}}),dF={ref:"el",class:"relative"},fF={class:"absolute opacity-0 pointer-events-none flex"},pF=["itemKey"],hF=ze({__name:"AutoWrapRow",props:{list:{},moreWidth:{default:70},gap:{default:5},getKey:{}},setup(e){const t=e,n=re(new Map),r=_i("el"),i=_i("items"),{width:o}=jh(r),s=re([]),l=re(!1),c=se(()=>o.value-t.moreWidth),d=se(()=>{const m=s.value.map(b=>b.key);return t.list.filter(b=>m.includes(t.getKey(b)))}),f=se(()=>l.value?t.list.length-s.value.length:0),p=se(()=>{let m=0;for(const b of n.value.values())m+=b;return m});function v(m,b){n.value.set(m,b)}function y(){const m=new Map;for(const b of t.list){const x=t.getKey(b);m.set(x,n.value.get(x)??0)}n.value=m}const g=dP(()=>{let m=0;const b=[];if(!(!i.value||t.list.length===0)){for(const x of t.list){const S=t.getKey(x),O=i.value.find(T=>T.getAttribute("itemKey")===S);if(O){if(m+=O.offsetWidth+t.gap,m>c.value)break;b.push({key:S,value:O.offsetWidth})}}s.value=b,l.value=!0}},100);return He([()=>o.value,()=>t.list,()=>p.value],([,,m],[,,b])=>{m!==b&&(l.value=!1),g()},{flush:"post",deep:!0}),He(()=>t.list.length,()=>{y()}),(m,b)=>(C(),R("div",dF,[mt(m.$slots,"display",{visibleList:d.value,overflow:f.value}),_("div",fF,[(C(!0),R(We,null,ut(e.list,(x,S)=>(C(),Ee(w(uF),{key:e.getKey(x)},{default:Le(({width:O})=>[Et(q(v(e.getKey(x),Number(O)))+" ",1),_("div",{ref_for:!0,ref:"items",itemKey:e.getKey(x),class:"invisible whitespace-nowrap"},[mt(m.$slots,"measure",{item:x,index:S})],8,pF)]),_:2},1024))),128))])],512))}}),Uh=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},S1=/^[a-z0-9]+(-[a-z0-9]+)*$/,Tu=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),c=i.pop(),d={provider:i.length>0?i[0]:r,prefix:c,name:l};return t&&!Uc(d)?null:d}const o=i[0],s=o.split("-");if(s.length>1){const l={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!Uc(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:o};return t&&!Uc(l,n)?null:l}return null},Uc=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function mF(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const l=r[s]&&r[s].parent,c=l&&o(l);c&&(i[s]=[l].concat(c))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}const C1=Object.freeze({left:0,top:0,width:16,height:16}),lu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ku=Object.freeze({...C1,...lu}),Ip=Object.freeze({...ku,body:"",hidden:!1});function vF(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function _y(e,t){const n=vF(e,t);for(const r in Ip)r in lu?r in e&&!(r in n)&&(n[r]=lu[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function gF(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function s(l){o=_y(r[l]||i[l],o)}return s(t),n.forEach(s),_y(e,o)}function x1(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=mF(e);for(const i in r){const o=r[i];o&&(t(i,gF(e,i,o)),n.push(i))}return n}const _F={provider:"",aliases:{},not_found:{},...C1};function kf(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function T1(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!kf(e,_F))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!kf(o,Ip))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i||typeof s!="string"||!n[s]&&!r[s]||!kf(o,Ip))return null}return t}const yy=Object.create(null);function yF(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ns(e,t){const n=yy[e]||(yy[e]=Object.create(null));return n[t]||(n[t]=yF(e,t))}function k1(e,t){return T1(t)?x1(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function bF(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ua=!1;function O1(e){return typeof e=="boolean"&&(Ua=e),Ua}function wF(e){const t=typeof e=="string"?Tu(e,!0,Ua):e;if(t){const n=Ns(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function EF(e,t){const n=Tu(e,!0,Ua);if(!n)return!1;const r=Ns(n.provider,n.prefix);return t?bF(r,n.name,t):(r.missing.add(n.name),!0)}function SF(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ua&&!t&&!e.prefix){let r=!1;return T1(e)&&(e.prefix="",x1(e,(i,o)=>{EF(i,o)&&(r=!0)})),r}const n=e.prefix;return Uc({prefix:n,name:"a"})?!!k1(Ns(t,n),e):!1}const $1=Object.freeze({width:null,height:null}),A1=Object.freeze({...$1,...lu}),CF=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xF=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function by(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(CF);if(r===null||!r.length)return e;const i=[];let o=r.shift(),s=xF.test(o);for(;;){if(s){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function TF(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("</"+t);if(i===-1||o===-1)break;const s=e.indexOf(">",o);if(s===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:n,content:e}}function kF(e,t){return e?"<defs>"+e+"</defs>"+t:t}function OF(e,t,n){const r=TF(e);return kF(r.defs,t+r.content+n)}const $F=e=>e==="unset"||e==="undefined"||e==="none";function AF(e,t){const n={...ku,...e},r={...A1,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const b=[],x=m.hFlip,S=m.vFlip;let O=m.rotate;x?S?O+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):S&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let T;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:T=i.height/2+i.top,b.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:T=i.width/2+i.left,b.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}O%2===1&&(i.left!==i.top&&(T=i.left,i.left=i.top,i.top=T),i.width!==i.height&&(T=i.width,i.width=i.height,i.height=T)),b.length&&(o=OF(o,'<g transform="'+b.join(" ")+'">',"</g>"))});const s=r.width,l=r.height,c=i.width,d=i.height;let f,p;s===null?(p=l===null?"1em":l==="auto"?d:l,f=by(p,c/d)):(f=s==="auto"?c:s,p=l===null?by(f,d/c):l==="auto"?d:l);const v={},y=(m,b)=>{$F(b)||(v[m]=b.toString())};y("width",f),y("height",p);const g=[i.left,i.top,c,d];return v.viewBox=g.join(" "),{attributes:v,viewBox:g,body:o}}const RF=/\sid="(\S+)"/g,wy=new Map;function PF(e){e=e.replace(/[0-9]+$/,"")||"a";const t=wy.get(e)||0;return wy.set(e,t+1),t?`${e}${t}`:e}function IF(e){const t=[];let n;for(;n=RF.exec(e);)t.push(n[1]);if(!t.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const o=PF(i),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Mp=Object.create(null);function MF(e,t){Mp[e]=t}function Dp(e){return Mp[e]||Mp[""]}function Nh(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const zh=Object.create(null),wa=["https://api.simplesvg.com","https://api.unisvg.com"],Nc=[];for(;wa.length>0;)wa.length===1||Math.random()>.5?Nc.push(wa.shift()):Nc.push(wa.pop());zh[""]=Nh({resources:["https://api.iconify.design"].concat(Nc)});function DF(e,t){const n=Nh(t);return n===null?!1:(zh[e]=n,!0)}function Bh(e){return zh[e]}const FF=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ey=FF();function LF(e,t){const n=Bh(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function jF(e){return e===404}const UF=(e,t,n)=>{const r=[],i=LF(e,t),o="icons";let s={type:o,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,d)=>{l+=c.length+1,l>=i&&d>0&&(r.push(s),s={type:o,provider:e,prefix:t,icons:[]},l=c.length),s.icons.push(c)}),r.push(s),r};function NF(e){if(typeof e=="string"){const t=Bh(e);if(t)return t.path}return"/"}const zF=(e,t,n)=>{if(!Ey){n("abort",424);return}let r=NF(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),l=new URLSearchParams({icons:s});r+=o+".json?"+l.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Ey(e+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(jF(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},BF={prepare:UF,send:zF};function R1(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function VF(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const s=o.icons,l=s.pending.length;s.pending=s.pending.filter(c=>{if(c.prefix!==i)return!0;const d=c.name;if(e.icons[d])s.loaded.push({provider:r,prefix:i,name:d});else if(e.missing.has(d))s.missing.push({provider:r,prefix:i,name:d});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||R1([e],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let HF=0;function qF(e,t,n){const r=HF++,i=R1.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function WF(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,l=i.name,c=n[o]||(n[o]=Object.create(null)),d=c[s]||(c[s]=Ns(o,s));let f;l in d.icons?f=t.loaded:s===""||d.missing.has(l)?f=t.missing:f=t.pending;const p={provider:o,prefix:s,name:l};f.push(p)}),t}function YF(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?Tu(i,t,n):i;o&&r.push(o)}),r}const KF={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function GF(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let M=e.resources.slice(0);for(s=[];M.length>1;){const z=Math.floor(Math.random()*M.length);s.push(M[z]),M=M.slice(0,z).concat(M.slice(z+1))}s=s.concat(M)}else s=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let c="pending",d=0,f,p=null,v=[],y=[];typeof r=="function"&&y.push(r);function g(){p&&(clearTimeout(p),p=null)}function m(){c==="pending"&&(c="aborted"),g(),v.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),v=[]}function b(M,z){z&&(y=[]),typeof M=="function"&&y.push(M)}function x(){return{startTime:l,payload:t,status:c,queriesSent:d,queriesPending:v.length,subscribe:b,abort:m}}function S(){c="failed",y.forEach(M=>{M(void 0,f)})}function O(){v.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),v=[]}function T(M,z,Y){const ve=z!=="success";switch(v=v.filter(W=>W!==M),c){case"pending":break;case"failed":if(ve||!e.dataAfterTimeout)return;break;default:return}if(z==="abort"){f=Y,S();return}if(ve){f=Y,v.length||(s.length?A():S());return}if(g(),O(),!e.random){const W=e.resources.indexOf(M.resource);W!==-1&&W!==e.index&&(e.index=W)}c="completed",y.forEach(W=>{W(Y)})}function A(){if(c!=="pending")return;g();const M=s.shift();if(M===void 0){if(v.length){p=setTimeout(()=>{g(),c==="pending"&&(O(),S())},e.timeout);return}S();return}const z={status:"pending",resource:M,callback:(Y,ve)=>{T(z,Y,ve)}};v.push(z),d++,p=setTimeout(A,e.rotate),n(M,t,z.callback)}return setTimeout(A),x}function P1(e){const t={...KF,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const d=GF(t,s,l,(f,p)=>{r(),c&&c(f,p)});return n.push(d),d}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function Sy(){}const Of=Object.create(null);function QF(e){if(!Of[e]){const t=Bh(e);if(!t)return;Of[e]={config:t,redundancy:P1(t)}}return Of[e]}function XF(e,t,n){let r,i;if(typeof e=="string"){const o=Dp(e);if(!o)return n(void 0,424),Sy;i=o.send;const s=QF(e);s&&(r=s.redundancy)}else{const o=Nh(e);if(o){r=P1(o);const s=Dp(e.resources?e.resources[0]:"");s&&(i=s.send)}}return!r||!i?(n(void 0,424),Sy):r.query(t,i,n)().abort}function Cy(){}function JF(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,VF(e)}))}function ZF(e){const t=[],n=[];return e.forEach(r=>{(r.match(S1)?t:n).push(r)}),{valid:t,invalid:n}}function Ea(e,t,n){function r(){const i=e.pendingIcons;t.forEach(o=>{i&&i.delete(o),e.icons[o]||e.missing.add(o)})}if(n&&typeof n=="object")try{if(!k1(e,n).length){r();return}}catch(i){console.error(i)}r(),JF(e)}function xy(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function eL(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){xy(e.loadIcons(i,r,n),d=>{Ea(e,i,d)});return}if(o){i.forEach(d=>{xy(o(d,r,n),f=>{Ea(e,[d],f?{prefix:r,icons:{[d]:f}}:null)})});return}const{valid:s,invalid:l}=ZF(i);if(l.length&&Ea(e,l,null),!s.length)return;const c=r.match(S1)?Dp(n):null;if(!c){Ea(e,s,null);return}c.prepare(n,r,s).forEach(d=>{XF(n,d,f=>{Ea(e,d.icons,f)})})}))}const tL=(e,t)=>{const n=WF(YF(e,!0,O1()));if(!n.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(n.loaded,n.missing,n.pending,Cy)}),()=>{l=!1}}const r=Object.create(null),i=[];let o,s;return n.pending.forEach(l=>{const{provider:c,prefix:d}=l;if(d===s&&c===o)return;o=c,s=d,i.push(Ns(c,d));const f=r[c]||(r[c]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(l=>{const{provider:c,prefix:d,name:f}=l,p=Ns(c,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(f)||(v.add(f),r[c][d].push(f))}),i.forEach(l=>{const c=r[l.provider][l.prefix];c.length&&eL(l,c)}),t?qF(t,n,i):Cy};function nL(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in $1?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const rL=/[\s,]+/;function iL(e,t){t.split(rL).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function oL(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function sL(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function aL(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function lL(e){return"data:image/svg+xml,"+aL(e)}function cL(e){return'url("'+lL(e)+'")'}const Ty={...A1,inline:!1},uL={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},dL={display:"inline-block"},Fp={backgroundColor:"currentColor"},I1={backgroundColor:"transparent"},ky={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Oy={webkitMask:Fp,mask:Fp,background:I1};for(const e in Oy){const t=Oy[e];for(const n in ky)t[e+n]=ky[n]}const zc={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";zc[e+"-flip"]=t,zc[e.slice(0,1)+"-flip"]=t,zc[e+"Flip"]=t});function $y(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ay=(e,t)=>{const n=nL(Ty,t),r={...uL},i=t.mode||"svg",o={},s=t.style,l=typeof s=="object"&&!(s instanceof Array)?s:{};for(let m in t){const b=t[m];if(b!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[m]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&iL(n,b);break;case"color":o.color=b;break;case"rotate":typeof b=="string"?n[m]=oL(b):typeof b=="number"&&(n[m]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete r["aria-hidden"];break;default:{const x=zc[m];x?(b===!0||b==="true"||b===1)&&(n[x]=!0):Ty[m]===void 0&&(r[m]=b)}}}const c=AF(e,n),d=c.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),i==="svg")return r.style={...o,...l},Object.assign(r,d),r.innerHTML=IF(c.body),Ia("svg",r);const{body:f,width:p,height:v}=e,y=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),g=sL(f,{...d,width:p+"",height:v+""});return r.style={...o,"--svg":cL(g),width:$y(d.width),height:$y(d.height),...dL,...y?Fp:I1,...l},Ia("span",r)};O1(!0);MF("",BF);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!SF(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;DF(n,i)||console.error(r)}catch{console.error(r)}}}}const fL={...ku,body:""},pL=ze((e,{emit:t})=>{const n=re(null);function r(){n.value&&(n.value.abort?.(),n.value=null)}const i=re(!!e.ssr),o=re(""),s=yn(null);function l(){const d=e.icon;if(typeof d=="object"&&d!==null&&typeof d.body=="string")return o.value="",{data:d};let f;if(typeof d!="string"||(f=Tu(d,!1,!0))===null)return null;let p=wF(f);if(!p){const g=n.value;return(!g||g.name!==d)&&(p===null?n.value={name:d}:n.value={name:d,abort:tL([f],c)}),null}r(),o.value!==d&&(o.value=d,gt(()=>{t("load",d)}));const v=e.customise;if(v){p=Object.assign({},p);const g=v(p.body,f.name,f.prefix,f.provider);typeof g=="string"&&(p.body=g)}const y=["iconify"];return f.prefix!==""&&y.push("iconify--"+f.prefix),f.provider!==""&&y.push("iconify--"+f.provider),{data:p,classes:y}}function c(){const d=l();d?d.data!==s.value?.data&&(s.value=d):s.value=null}return i.value?c():xt(()=>{i.value=!0,c()}),He(()=>e.icon,c),Tn(r),()=>{const d=s.value;if(!d)return Ay(fL,e);let f=e;return d.classes&&(f={...e,class:d.classes.join(" ")}),Ay({...ku,...d.data},f)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});var pc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Bc={exports:{}},hL=Bc.exports,Ry;function mL(){return Ry||(Ry=1,(function(e,t){(function(){var n,r="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",c="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",v=1,y=2,g=4,m=1,b=2,x=1,S=2,O=4,T=8,A=16,M=32,z=64,Y=128,ve=256,W=512,X=30,K="...",L=800,D=16,ne=1,le=2,je=3,J=1/0,j=9007199254740991,de=17976931348623157e292,U=NaN,ee=4294967295,Q=ee-1,B=ee>>>1,oe=[["ary",Y],["bind",x],["bindKey",S],["curry",T],["curryRight",A],["flip",W],["partial",M],["partialRight",z],["rearg",ve]],V="[object Arguments]",P="[object Array]",F="[object AsyncFunction]",G="[object Boolean]",N="[object Date]",ie="[object DOMException]",ge="[object Error]",fe="[object Function]",pe="[object GeneratorFunction]",Ce="[object Map]",$e="[object Number]",Ke="[object Null]",Ne="[object Object]",tt="[object Promise]",Ge="[object Proxy]",Ze="[object RegExp]",Pt="[object Set]",St="[object String]",Nt="[object Symbol]",It="[object Undefined]",qt="[object WeakMap]",Gt="[object WeakSet]",Wt="[object ArrayBuffer]",nn="[object DataView]",Dn="[object Float32Array]",_e="[object Float64Array]",ce="[object Int8Array]",ye="[object Int16Array]",Fe="[object Int32Array]",qe="[object Uint8Array]",xe="[object Uint8ClampedArray]",et="[object Uint16Array]",be="[object Uint32Array]",ke=/\b__p \+= '';/g,Ie=/\b(__p \+=) '' \+/g,Oe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ue=/&(?:amp|lt|gt|quot|#39);/g,pr=/[&<>"']/g,Fn=RegExp(Ue.source),qn=RegExp(pr.source),On=/<%-([\s\S]+?)%>/g,dn=/<%([\s\S]+?)%>/g,ko=/<%=([\s\S]+?)%>/g,dd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bl=/^\w*$/,os=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yi=/[\\^$.*+?()[\]{}|]/g,ss=RegExp(Yi.source),Ki=/^\s+/,fd=/\s/,wl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,D2=/\{\n\/\* \[wrapped with (.+)\] \*/,F2=/,? & /,L2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dv=/[()=,{}\[\]\/\s]/,j2=/\\(\\)?/g,U2=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fv=/\w*$/,N2=/^[-+]0x[0-9a-f]+$/i,z2=/^0b[01]+$/i,B2=/^\[object .+?Constructor\]$/,V2=/^0o[0-7]+$/i,H2=/^(?:0|[1-9]\d*)$/,q2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,El=/($^)/,W2=/['\n\r\u2028\u2029\\]/g,Sl="\\ud800-\\udfff",Y2="\\u0300-\\u036f",K2="\\ufe20-\\ufe2f",G2="\\u20d0-\\u20ff",pv=Y2+K2+G2,hv="\\u2700-\\u27bf",mv="a-z\\xdf-\\xf6\\xf8-\\xff",Q2="\\xac\\xb1\\xd7\\xf7",X2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",J2="\\u2000-\\u206f",Z2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vv="A-Z\\xc0-\\xd6\\xd8-\\xde",gv="\\ufe0e\\ufe0f",_v=Q2+X2+J2+Z2,pd="['’]",ex="["+Sl+"]",yv="["+_v+"]",Cl="["+pv+"]",bv="\\d+",tx="["+hv+"]",wv="["+mv+"]",Ev="[^"+Sl+_v+bv+hv+mv+vv+"]",hd="\\ud83c[\\udffb-\\udfff]",nx="(?:"+Cl+"|"+hd+")",Sv="[^"+Sl+"]",md="(?:\\ud83c[\\udde6-\\uddff]){2}",vd="[\\ud800-\\udbff][\\udc00-\\udfff]",as="["+vv+"]",Cv="\\u200d",xv="(?:"+wv+"|"+Ev+")",rx="(?:"+as+"|"+Ev+")",Tv="(?:"+pd+"(?:d|ll|m|re|s|t|ve))?",kv="(?:"+pd+"(?:D|LL|M|RE|S|T|VE))?",Ov=nx+"?",$v="["+gv+"]?",ix="(?:"+Cv+"(?:"+[Sv,md,vd].join("|")+")"+$v+Ov+")*",ox="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Av=$v+Ov+ix,ax="(?:"+[tx,md,vd].join("|")+")"+Av,lx="(?:"+[Sv+Cl+"?",Cl,md,vd,ex].join("|")+")",cx=RegExp(pd,"g"),ux=RegExp(Cl,"g"),gd=RegExp(hd+"(?="+hd+")|"+lx+Av,"g"),dx=RegExp([as+"?"+wv+"+"+Tv+"(?="+[yv,as,"$"].join("|")+")",rx+"+"+kv+"(?="+[yv,as+xv,"$"].join("|")+")",as+"?"+xv+"+"+Tv,as+"+"+kv,sx,ox,bv,ax].join("|"),"g"),fx=RegExp("["+Cv+Sl+pv+gv+"]"),px=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hx=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mx=-1,Kt={};Kt[Dn]=Kt[_e]=Kt[ce]=Kt[ye]=Kt[Fe]=Kt[qe]=Kt[xe]=Kt[et]=Kt[be]=!0,Kt[V]=Kt[P]=Kt[Wt]=Kt[G]=Kt[nn]=Kt[N]=Kt[ge]=Kt[fe]=Kt[Ce]=Kt[$e]=Kt[Ne]=Kt[Ze]=Kt[Pt]=Kt[St]=Kt[qt]=!1;var Yt={};Yt[V]=Yt[P]=Yt[Wt]=Yt[nn]=Yt[G]=Yt[N]=Yt[Dn]=Yt[_e]=Yt[ce]=Yt[ye]=Yt[Fe]=Yt[Ce]=Yt[$e]=Yt[Ne]=Yt[Ze]=Yt[Pt]=Yt[St]=Yt[Nt]=Yt[qe]=Yt[xe]=Yt[et]=Yt[be]=!0,Yt[ge]=Yt[fe]=Yt[qt]=!1;var vx={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},gx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_x={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yx={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bx=parseFloat,wx=parseInt,Rv=typeof pc=="object"&&pc&&pc.Object===Object&&pc,Ex=typeof self=="object"&&self&&self.Object===Object&&self,wn=Rv||Ex||Function("return this")(),_d=t&&!t.nodeType&&t,Oo=_d&&!0&&e&&!e.nodeType&&e,Pv=Oo&&Oo.exports===_d,yd=Pv&&Rv.process,Tr=(function(){try{var ae=Oo&&Oo.require&&Oo.require("util").types;return ae||yd&&yd.binding&&yd.binding("util")}catch{}})(),Iv=Tr&&Tr.isArrayBuffer,Mv=Tr&&Tr.isDate,Dv=Tr&&Tr.isMap,Fv=Tr&&Tr.isRegExp,Lv=Tr&&Tr.isSet,jv=Tr&&Tr.isTypedArray;function hr(ae,Te,we){switch(we.length){case 0:return ae.call(Te);case 1:return ae.call(Te,we[0]);case 2:return ae.call(Te,we[0],we[1]);case 3:return ae.call(Te,we[0],we[1],we[2])}return ae.apply(Te,we)}function Sx(ae,Te,we,Ye){for(var pt=-1,Lt=ae==null?0:ae.length;++pt<Lt;){var fn=ae[pt];Te(Ye,fn,we(fn),ae)}return Ye}function mr(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye&&Te(ae[we],we,ae)!==!1;);return ae}function Cx(ae,Te){for(var we=ae==null?0:ae.length;we--&&Te(ae[we],we,ae)!==!1;);return ae}function Uv(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye;)if(!Te(ae[we],we,ae))return!1;return!0}function Gi(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length,pt=0,Lt=[];++we<Ye;){var fn=ae[we];Te(fn,we,ae)&&(Lt[pt++]=fn)}return Lt}function xl(ae,Te){var we=ae==null?0:ae.length;return!!we&&ls(ae,Te,0)>-1}function bd(ae,Te,we){for(var Ye=-1,pt=ae==null?0:ae.length;++Ye<pt;)if(we(Te,ae[Ye]))return!0;return!1}function Qt(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length,pt=Array(Ye);++we<Ye;)pt[we]=Te(ae[we],we,ae);return pt}function Qi(ae,Te){for(var we=-1,Ye=Te.length,pt=ae.length;++we<Ye;)ae[pt+we]=Te[we];return ae}function wd(ae,Te,we,Ye){var pt=-1,Lt=ae==null?0:ae.length;for(Ye&&Lt&&(we=ae[++pt]);++pt<Lt;)we=Te(we,ae[pt],pt,ae);return we}function xx(ae,Te,we,Ye){var pt=ae==null?0:ae.length;for(Ye&&pt&&(we=ae[--pt]);pt--;)we=Te(we,ae[pt],pt,ae);return we}function Ed(ae,Te){for(var we=-1,Ye=ae==null?0:ae.length;++we<Ye;)if(Te(ae[we],we,ae))return!0;return!1}var Tx=Sd("length");function kx(ae){return ae.split("")}function Ox(ae){return ae.match(L2)||[]}function Nv(ae,Te,we){var Ye;return we(ae,function(pt,Lt,fn){if(Te(pt,Lt,fn))return Ye=Lt,!1}),Ye}function Tl(ae,Te,we,Ye){for(var pt=ae.length,Lt=we+(Ye?1:-1);Ye?Lt--:++Lt<pt;)if(Te(ae[Lt],Lt,ae))return Lt;return-1}function ls(ae,Te,we){return Te===Te?Nx(ae,Te,we):Tl(ae,zv,we)}function $x(ae,Te,we,Ye){for(var pt=we-1,Lt=ae.length;++pt<Lt;)if(Ye(ae[pt],Te))return pt;return-1}function zv(ae){return ae!==ae}function Bv(ae,Te){var we=ae==null?0:ae.length;return we?xd(ae,Te)/we:U}function Sd(ae){return function(Te){return Te==null?n:Te[ae]}}function Cd(ae){return function(Te){return ae==null?n:ae[Te]}}function Vv(ae,Te,we,Ye,pt){return pt(ae,function(Lt,fn,Bt){we=Ye?(Ye=!1,Lt):Te(we,Lt,fn,Bt)}),we}function Ax(ae,Te){var we=ae.length;for(ae.sort(Te);we--;)ae[we]=ae[we].value;return ae}function xd(ae,Te){for(var we,Ye=-1,pt=ae.length;++Ye<pt;){var Lt=Te(ae[Ye]);Lt!==n&&(we=we===n?Lt:we+Lt)}return we}function Td(ae,Te){for(var we=-1,Ye=Array(ae);++we<ae;)Ye[we]=Te(we);return Ye}function Rx(ae,Te){return Qt(Te,function(we){return[we,ae[we]]})}function Hv(ae){return ae&&ae.slice(0,Kv(ae)+1).replace(Ki,"")}function vr(ae){return function(Te){return ae(Te)}}function kd(ae,Te){return Qt(Te,function(we){return ae[we]})}function sa(ae,Te){return ae.has(Te)}function qv(ae,Te){for(var we=-1,Ye=ae.length;++we<Ye&&ls(Te,ae[we],0)>-1;);return we}function Wv(ae,Te){for(var we=ae.length;we--&&ls(Te,ae[we],0)>-1;);return we}function Px(ae,Te){for(var we=ae.length,Ye=0;we--;)ae[we]===Te&&++Ye;return Ye}var Ix=Cd(vx),Mx=Cd(gx);function Dx(ae){return"\\"+yx[ae]}function Fx(ae,Te){return ae==null?n:ae[Te]}function cs(ae){return fx.test(ae)}function Lx(ae){return px.test(ae)}function jx(ae){for(var Te,we=[];!(Te=ae.next()).done;)we.push(Te.value);return we}function Od(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye,pt){we[++Te]=[pt,Ye]}),we}function Yv(ae,Te){return function(we){return ae(Te(we))}}function Xi(ae,Te){for(var we=-1,Ye=ae.length,pt=0,Lt=[];++we<Ye;){var fn=ae[we];(fn===Te||fn===p)&&(ae[we]=p,Lt[pt++]=we)}return Lt}function kl(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye){we[++Te]=Ye}),we}function Ux(ae){var Te=-1,we=Array(ae.size);return ae.forEach(function(Ye){we[++Te]=[Ye,Ye]}),we}function Nx(ae,Te,we){for(var Ye=we-1,pt=ae.length;++Ye<pt;)if(ae[Ye]===Te)return Ye;return-1}function zx(ae,Te,we){for(var Ye=we+1;Ye--;)if(ae[Ye]===Te)return Ye;return Ye}function us(ae){return cs(ae)?Vx(ae):Tx(ae)}function qr(ae){return cs(ae)?Hx(ae):kx(ae)}function Kv(ae){for(var Te=ae.length;Te--&&fd.test(ae.charAt(Te)););return Te}var Bx=Cd(_x);function Vx(ae){for(var Te=gd.lastIndex=0;gd.test(ae);)++Te;return Te}function Hx(ae){return ae.match(gd)||[]}function qx(ae){return ae.match(dx)||[]}var Wx=(function ae(Te){Te=Te==null?wn:ds.defaults(wn.Object(),Te,ds.pick(wn,hx));var we=Te.Array,Ye=Te.Date,pt=Te.Error,Lt=Te.Function,fn=Te.Math,Bt=Te.Object,$d=Te.RegExp,Yx=Te.String,kr=Te.TypeError,Ol=we.prototype,Kx=Lt.prototype,fs=Bt.prototype,$l=Te["__core-js_shared__"],Al=Kx.toString,jt=fs.hasOwnProperty,Gx=0,Gv=(function(){var a=/[^.]+$/.exec($l&&$l.keys&&$l.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})(),Rl=fs.toString,Qx=Al.call(Bt),Xx=wn._,Jx=$d("^"+Al.call(jt).replace(Yi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pl=Pv?Te.Buffer:n,Ji=Te.Symbol,Il=Te.Uint8Array,Qv=Pl?Pl.allocUnsafe:n,Ml=Yv(Bt.getPrototypeOf,Bt),Xv=Bt.create,Jv=fs.propertyIsEnumerable,Dl=Ol.splice,Zv=Ji?Ji.isConcatSpreadable:n,aa=Ji?Ji.iterator:n,$o=Ji?Ji.toStringTag:n,Fl=(function(){try{var a=Mo(Bt,"defineProperty");return a({},"",{}),a}catch{}})(),Zx=Te.clearTimeout!==wn.clearTimeout&&Te.clearTimeout,eT=Ye&&Ye.now!==wn.Date.now&&Ye.now,tT=Te.setTimeout!==wn.setTimeout&&Te.setTimeout,Ll=fn.ceil,jl=fn.floor,Ad=Bt.getOwnPropertySymbols,nT=Pl?Pl.isBuffer:n,eg=Te.isFinite,rT=Ol.join,iT=Yv(Bt.keys,Bt),pn=fn.max,$n=fn.min,oT=Ye.now,sT=Te.parseInt,tg=fn.random,aT=Ol.reverse,Rd=Mo(Te,"DataView"),la=Mo(Te,"Map"),Pd=Mo(Te,"Promise"),ps=Mo(Te,"Set"),ca=Mo(Te,"WeakMap"),ua=Mo(Bt,"create"),Ul=ca&&new ca,hs={},lT=Do(Rd),cT=Do(la),uT=Do(Pd),dT=Do(ps),fT=Do(ca),Nl=Ji?Ji.prototype:n,da=Nl?Nl.valueOf:n,ng=Nl?Nl.toString:n;function $(a){if(tn(a)&&!vt(a)&&!(a instanceof $t)){if(a instanceof Or)return a;if(jt.call(a,"__wrapped__"))return r_(a)}return new Or(a)}var ms=(function(){function a(){}return function(u){if(!Xt(u))return{};if(Xv)return Xv(u);a.prototype=u;var h=new a;return a.prototype=n,h}})();function zl(){}function Or(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=n}$.templateSettings={escape:On,evaluate:dn,interpolate:ko,variable:"",imports:{_:$}},$.prototype=zl.prototype,$.prototype.constructor=$,Or.prototype=ms(zl.prototype),Or.prototype.constructor=Or;function $t(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function pT(){var a=new $t(this.__wrapped__);return a.__actions__=Wn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Wn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Wn(this.__views__),a}function hT(){if(this.__filtered__){var a=new $t(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function mT(){var a=this.__wrapped__.value(),u=this.__dir__,h=vt(a),E=u<0,k=h?a.length:0,I=kk(0,k,this.__views__),H=I.start,te=I.end,ue=te-H,Ae=E?te:H-1,Re=this.__iteratees__,De=Re.length,Ve=0,Je=$n(ue,this.__takeCount__);if(!h||!E&&k==ue&&Je==ue)return Tg(a,this.__actions__);var ct=[];e:for(;ue--&&Ve<Je;){Ae+=u;for(var bt=-1,it=a[Ae];++bt<De;){var Tt=Re[bt],At=Tt.iteratee,yr=Tt.type,Un=At(it);if(yr==le)it=Un;else if(!Un){if(yr==ne)continue e;break e}}ct[Ve++]=it}return ct}$t.prototype=ms(zl.prototype),$t.prototype.constructor=$t;function Ao(a){var u=-1,h=a==null?0:a.length;for(this.clear();++u<h;){var E=a[u];this.set(E[0],E[1])}}function vT(){this.__data__=ua?ua(null):{},this.size=0}function gT(a){var u=this.has(a)&&delete this.__data__[a];return this.size-=u?1:0,u}function _T(a){var u=this.__data__;if(ua){var h=u[a];return h===d?n:h}return jt.call(u,a)?u[a]:n}function yT(a){var u=this.__data__;return ua?u[a]!==n:jt.call(u,a)}function bT(a,u){var h=this.__data__;return this.size+=this.has(a)?0:1,h[a]=ua&&u===n?d:u,this}Ao.prototype.clear=vT,Ao.prototype.delete=gT,Ao.prototype.get=_T,Ao.prototype.has=yT,Ao.prototype.set=bT;function Ti(a){var u=-1,h=a==null?0:a.length;for(this.clear();++u<h;){var E=a[u];this.set(E[0],E[1])}}function wT(){this.__data__=[],this.size=0}function ET(a){var u=this.__data__,h=Bl(u,a);if(h<0)return!1;var E=u.length-1;return h==E?u.pop():Dl.call(u,h,1),--this.size,!0}function ST(a){var u=this.__data__,h=Bl(u,a);return h<0?n:u[h][1]}function CT(a){return Bl(this.__data__,a)>-1}function xT(a,u){var h=this.__data__,E=Bl(h,a);return E<0?(++this.size,h.push([a,u])):h[E][1]=u,this}Ti.prototype.clear=wT,Ti.prototype.delete=ET,Ti.prototype.get=ST,Ti.prototype.has=CT,Ti.prototype.set=xT;function ki(a){var u=-1,h=a==null?0:a.length;for(this.clear();++u<h;){var E=a[u];this.set(E[0],E[1])}}function TT(){this.size=0,this.__data__={hash:new Ao,map:new(la||Ti),string:new Ao}}function kT(a){var u=ec(this,a).delete(a);return this.size-=u?1:0,u}function OT(a){return ec(this,a).get(a)}function $T(a){return ec(this,a).has(a)}function AT(a,u){var h=ec(this,a),E=h.size;return h.set(a,u),this.size+=h.size==E?0:1,this}ki.prototype.clear=TT,ki.prototype.delete=kT,ki.prototype.get=OT,ki.prototype.has=$T,ki.prototype.set=AT;function Ro(a){var u=-1,h=a==null?0:a.length;for(this.__data__=new ki;++u<h;)this.add(a[u])}function RT(a){return this.__data__.set(a,d),this}function PT(a){return this.__data__.has(a)}Ro.prototype.add=Ro.prototype.push=RT,Ro.prototype.has=PT;function Wr(a){var u=this.__data__=new Ti(a);this.size=u.size}function IT(){this.__data__=new Ti,this.size=0}function MT(a){var u=this.__data__,h=u.delete(a);return this.size=u.size,h}function DT(a){return this.__data__.get(a)}function FT(a){return this.__data__.has(a)}function LT(a,u){var h=this.__data__;if(h instanceof Ti){var E=h.__data__;if(!la||E.length<i-1)return E.push([a,u]),this.size=++h.size,this;h=this.__data__=new ki(E)}return h.set(a,u),this.size=h.size,this}Wr.prototype.clear=IT,Wr.prototype.delete=MT,Wr.prototype.get=DT,Wr.prototype.has=FT,Wr.prototype.set=LT;function rg(a,u){var h=vt(a),E=!h&&Fo(a),k=!h&&!E&&ro(a),I=!h&&!E&&!k&&ys(a),H=h||E||k||I,te=H?Td(a.length,Yx):[],ue=te.length;for(var Ae in a)(u||jt.call(a,Ae))&&!(H&&(Ae=="length"||k&&(Ae=="offset"||Ae=="parent")||I&&(Ae=="buffer"||Ae=="byteLength"||Ae=="byteOffset")||Ai(Ae,ue)))&&te.push(Ae);return te}function ig(a){var u=a.length;return u?a[Vd(0,u-1)]:n}function jT(a,u){return tc(Wn(a),Po(u,0,a.length))}function UT(a){return tc(Wn(a))}function Id(a,u,h){(h!==n&&!Kr(a[u],h)||h===n&&!(u in a))&&ui(a,u,h)}function fa(a,u,h){var E=a[u];(!(jt.call(a,u)&&Kr(E,h))||h===n&&!(u in a))&&ui(a,u,h)}function Bl(a,u){for(var h=a.length;h--;)if(Kr(a[h][0],u))return h;return-1}function NT(a,u,h,E){return Zi(a,function(k,I,H){u(E,k,h(k),H)}),E}function og(a,u){return a&&fi(u,gn(u),a)}function zT(a,u){return a&&fi(u,Kn(u),a)}function ui(a,u,h){u=="__proto__"&&Fl?Fl(a,u,{configurable:!0,enumerable:!0,value:h,writable:!0}):a[u]=h}function Md(a,u){for(var h=-1,E=u.length,k=we(E),I=a==null;++h<E;)k[h]=I?n:vf(a,u[h]);return k}function Po(a,u,h){return a===a&&(h!==n&&(a=a<=h?a:h),u!==n&&(a=a>=u?a:u)),a}function $r(a,u,h,E,k,I){var H,te=u&v,ue=u&y,Ae=u&g;if(h&&(H=k?h(a,E,k,I):h(a)),H!==n)return H;if(!Xt(a))return a;var Re=vt(a);if(Re){if(H=$k(a),!te)return Wn(a,H)}else{var De=An(a),Ve=De==fe||De==pe;if(ro(a))return $g(a,te);if(De==Ne||De==V||Ve&&!k){if(H=ue||Ve?{}:Kg(a),!te)return ue?_k(a,zT(H,a)):gk(a,og(H,a))}else{if(!Yt[De])return k?a:{};H=Ak(a,De,te)}}I||(I=new Wr);var Je=I.get(a);if(Je)return Je;I.set(a,H),S_(a)?a.forEach(function(it){H.add($r(it,u,h,it,a,I))}):w_(a)&&a.forEach(function(it,Tt){H.set(Tt,$r(it,u,h,Tt,a,I))});var ct=Ae?ue?ef:Zd:ue?Kn:gn,bt=Re?n:ct(a);return mr(bt||a,function(it,Tt){bt&&(Tt=it,it=a[Tt]),fa(H,Tt,$r(it,u,h,Tt,a,I))}),H}function BT(a){var u=gn(a);return function(h){return sg(h,a,u)}}function sg(a,u,h){var E=h.length;if(a==null)return!E;for(a=Bt(a);E--;){var k=h[E],I=u[k],H=a[k];if(H===n&&!(k in a)||!I(H))return!1}return!0}function ag(a,u,h){if(typeof a!="function")throw new kr(s);return ya(function(){a.apply(n,h)},u)}function pa(a,u,h,E){var k=-1,I=xl,H=!0,te=a.length,ue=[],Ae=u.length;if(!te)return ue;h&&(u=Qt(u,vr(h))),E?(I=bd,H=!1):u.length>=i&&(I=sa,H=!1,u=new Ro(u));e:for(;++k<te;){var Re=a[k],De=h==null?Re:h(Re);if(Re=E||Re!==0?Re:0,H&&De===De){for(var Ve=Ae;Ve--;)if(u[Ve]===De)continue e;ue.push(Re)}else I(u,De,E)||ue.push(Re)}return ue}var Zi=Mg(di),lg=Mg(Fd,!0);function VT(a,u){var h=!0;return Zi(a,function(E,k,I){return h=!!u(E,k,I),h}),h}function Vl(a,u,h){for(var E=-1,k=a.length;++E<k;){var I=a[E],H=u(I);if(H!=null&&(te===n?H===H&&!_r(H):h(H,te)))var te=H,ue=I}return ue}function HT(a,u,h,E){var k=a.length;for(h=yt(h),h<0&&(h=-h>k?0:k+h),E=E===n||E>k?k:yt(E),E<0&&(E+=k),E=h>E?0:x_(E);h<E;)a[h++]=u;return a}function cg(a,u){var h=[];return Zi(a,function(E,k,I){u(E,k,I)&&h.push(E)}),h}function En(a,u,h,E,k){var I=-1,H=a.length;for(h||(h=Pk),k||(k=[]);++I<H;){var te=a[I];u>0&&h(te)?u>1?En(te,u-1,h,E,k):Qi(k,te):E||(k[k.length]=te)}return k}var Dd=Dg(),ug=Dg(!0);function di(a,u){return a&&Dd(a,u,gn)}function Fd(a,u){return a&&ug(a,u,gn)}function Hl(a,u){return Gi(u,function(h){return Ri(a[h])})}function Io(a,u){u=to(u,a);for(var h=0,E=u.length;a!=null&&h<E;)a=a[Yr(u[h++])];return h&&h==E?a:n}function dg(a,u,h){var E=u(a);return vt(a)?E:Qi(E,h(a))}function Ln(a){return a==null?a===n?It:Ke:$o&&$o in Bt(a)?Tk(a):Uk(a)}function Ld(a,u){return a>u}function qT(a,u){return a!=null&&jt.call(a,u)}function WT(a,u){return a!=null&&u in Bt(a)}function YT(a,u,h){return a>=$n(u,h)&&a<pn(u,h)}function jd(a,u,h){for(var E=h?bd:xl,k=a[0].length,I=a.length,H=I,te=we(I),ue=1/0,Ae=[];H--;){var Re=a[H];H&&u&&(Re=Qt(Re,vr(u))),ue=$n(Re.length,ue),te[H]=!h&&(u||k>=120&&Re.length>=120)?new Ro(H&&Re):n}Re=a[0];var De=-1,Ve=te[0];e:for(;++De<k&&Ae.length<ue;){var Je=Re[De],ct=u?u(Je):Je;if(Je=h||Je!==0?Je:0,!(Ve?sa(Ve,ct):E(Ae,ct,h))){for(H=I;--H;){var bt=te[H];if(!(bt?sa(bt,ct):E(a[H],ct,h)))continue e}Ve&&Ve.push(ct),Ae.push(Je)}}return Ae}function KT(a,u,h,E){return di(a,function(k,I,H){u(E,h(k),I,H)}),E}function ha(a,u,h){u=to(u,a),a=Jg(a,u);var E=a==null?a:a[Yr(Rr(u))];return E==null?n:hr(E,a,h)}function fg(a){return tn(a)&&Ln(a)==V}function GT(a){return tn(a)&&Ln(a)==Wt}function QT(a){return tn(a)&&Ln(a)==N}function ma(a,u,h,E,k){return a===u?!0:a==null||u==null||!tn(a)&&!tn(u)?a!==a&&u!==u:XT(a,u,h,E,ma,k)}function XT(a,u,h,E,k,I){var H=vt(a),te=vt(u),ue=H?P:An(a),Ae=te?P:An(u);ue=ue==V?Ne:ue,Ae=Ae==V?Ne:Ae;var Re=ue==Ne,De=Ae==Ne,Ve=ue==Ae;if(Ve&&ro(a)){if(!ro(u))return!1;H=!0,Re=!1}if(Ve&&!Re)return I||(I=new Wr),H||ys(a)?qg(a,u,h,E,k,I):Ck(a,u,ue,h,E,k,I);if(!(h&m)){var Je=Re&&jt.call(a,"__wrapped__"),ct=De&&jt.call(u,"__wrapped__");if(Je||ct){var bt=Je?a.value():a,it=ct?u.value():u;return I||(I=new Wr),k(bt,it,h,E,I)}}return Ve?(I||(I=new Wr),xk(a,u,h,E,k,I)):!1}function JT(a){return tn(a)&&An(a)==Ce}function Ud(a,u,h,E){var k=h.length,I=k,H=!E;if(a==null)return!I;for(a=Bt(a);k--;){var te=h[k];if(H&&te[2]?te[1]!==a[te[0]]:!(te[0]in a))return!1}for(;++k<I;){te=h[k];var ue=te[0],Ae=a[ue],Re=te[1];if(H&&te[2]){if(Ae===n&&!(ue in a))return!1}else{var De=new Wr;if(E)var Ve=E(Ae,Re,ue,a,u,De);if(!(Ve===n?ma(Re,Ae,m|b,E,De):Ve))return!1}}return!0}function pg(a){if(!Xt(a)||Mk(a))return!1;var u=Ri(a)?Jx:B2;return u.test(Do(a))}function ZT(a){return tn(a)&&Ln(a)==Ze}function ek(a){return tn(a)&&An(a)==Pt}function tk(a){return tn(a)&&ac(a.length)&&!!Kt[Ln(a)]}function hg(a){return typeof a=="function"?a:a==null?Gn:typeof a=="object"?vt(a)?gg(a[0],a[1]):vg(a):L_(a)}function Nd(a){if(!_a(a))return iT(a);var u=[];for(var h in Bt(a))jt.call(a,h)&&h!="constructor"&&u.push(h);return u}function nk(a){if(!Xt(a))return jk(a);var u=_a(a),h=[];for(var E in a)E=="constructor"&&(u||!jt.call(a,E))||h.push(E);return h}function zd(a,u){return a<u}function mg(a,u){var h=-1,E=Yn(a)?we(a.length):[];return Zi(a,function(k,I,H){E[++h]=u(k,I,H)}),E}function vg(a){var u=nf(a);return u.length==1&&u[0][2]?Qg(u[0][0],u[0][1]):function(h){return h===a||Ud(h,a,u)}}function gg(a,u){return of(a)&&Gg(u)?Qg(Yr(a),u):function(h){var E=vf(h,a);return E===n&&E===u?gf(h,a):ma(u,E,m|b)}}function ql(a,u,h,E,k){a!==u&&Dd(u,function(I,H){if(k||(k=new Wr),Xt(I))rk(a,u,H,h,ql,E,k);else{var te=E?E(af(a,H),I,H+"",a,u,k):n;te===n&&(te=I),Id(a,H,te)}},Kn)}function rk(a,u,h,E,k,I,H){var te=af(a,h),ue=af(u,h),Ae=H.get(ue);if(Ae){Id(a,h,Ae);return}var Re=I?I(te,ue,h+"",a,u,H):n,De=Re===n;if(De){var Ve=vt(ue),Je=!Ve&&ro(ue),ct=!Ve&&!Je&&ys(ue);Re=ue,Ve||Je||ct?vt(te)?Re=te:rn(te)?Re=Wn(te):Je?(De=!1,Re=$g(ue,!0)):ct?(De=!1,Re=Ag(ue,!0)):Re=[]:ba(ue)||Fo(ue)?(Re=te,Fo(te)?Re=T_(te):(!Xt(te)||Ri(te))&&(Re=Kg(ue))):De=!1}De&&(H.set(ue,Re),k(Re,ue,E,I,H),H.delete(ue)),Id(a,h,Re)}function _g(a,u){var h=a.length;if(h)return u+=u<0?h:0,Ai(u,h)?a[u]:n}function yg(a,u,h){u.length?u=Qt(u,function(I){return vt(I)?function(H){return Io(H,I.length===1?I[0]:I)}:I}):u=[Gn];var E=-1;u=Qt(u,vr(ot()));var k=mg(a,function(I,H,te){var ue=Qt(u,function(Ae){return Ae(I)});return{criteria:ue,index:++E,value:I}});return Ax(k,function(I,H){return vk(I,H,h)})}function ik(a,u){return bg(a,u,function(h,E){return gf(a,E)})}function bg(a,u,h){for(var E=-1,k=u.length,I={};++E<k;){var H=u[E],te=Io(a,H);h(te,H)&&va(I,to(H,a),te)}return I}function ok(a){return function(u){return Io(u,a)}}function Bd(a,u,h,E){var k=E?$x:ls,I=-1,H=u.length,te=a;for(a===u&&(u=Wn(u)),h&&(te=Qt(a,vr(h)));++I<H;)for(var ue=0,Ae=u[I],Re=h?h(Ae):Ae;(ue=k(te,Re,ue,E))>-1;)te!==a&&Dl.call(te,ue,1),Dl.call(a,ue,1);return a}function wg(a,u){for(var h=a?u.length:0,E=h-1;h--;){var k=u[h];if(h==E||k!==I){var I=k;Ai(k)?Dl.call(a,k,1):Wd(a,k)}}return a}function Vd(a,u){return a+jl(tg()*(u-a+1))}function sk(a,u,h,E){for(var k=-1,I=pn(Ll((u-a)/(h||1)),0),H=we(I);I--;)H[E?I:++k]=a,a+=h;return H}function Hd(a,u){var h="";if(!a||u<1||u>j)return h;do u%2&&(h+=a),u=jl(u/2),u&&(a+=a);while(u);return h}function wt(a,u){return lf(Xg(a,u,Gn),a+"")}function ak(a){return ig(bs(a))}function lk(a,u){var h=bs(a);return tc(h,Po(u,0,h.length))}function va(a,u,h,E){if(!Xt(a))return a;u=to(u,a);for(var k=-1,I=u.length,H=I-1,te=a;te!=null&&++k<I;){var ue=Yr(u[k]),Ae=h;if(ue==="__proto__"||ue==="constructor"||ue==="prototype")return a;if(k!=H){var Re=te[ue];Ae=E?E(Re,ue,te):n,Ae===n&&(Ae=Xt(Re)?Re:Ai(u[k+1])?[]:{})}fa(te,ue,Ae),te=te[ue]}return a}var Eg=Ul?function(a,u){return Ul.set(a,u),a}:Gn,ck=Fl?function(a,u){return Fl(a,"toString",{configurable:!0,enumerable:!1,value:yf(u),writable:!0})}:Gn;function uk(a){return tc(bs(a))}function Ar(a,u,h){var E=-1,k=a.length;u<0&&(u=-u>k?0:k+u),h=h>k?k:h,h<0&&(h+=k),k=u>h?0:h-u>>>0,u>>>=0;for(var I=we(k);++E<k;)I[E]=a[E+u];return I}function dk(a,u){var h;return Zi(a,function(E,k,I){return h=u(E,k,I),!h}),!!h}function Wl(a,u,h){var E=0,k=a==null?E:a.length;if(typeof u=="number"&&u===u&&k<=B){for(;E<k;){var I=E+k>>>1,H=a[I];H!==null&&!_r(H)&&(h?H<=u:H<u)?E=I+1:k=I}return k}return qd(a,u,Gn,h)}function qd(a,u,h,E){var k=0,I=a==null?0:a.length;if(I===0)return 0;u=h(u);for(var H=u!==u,te=u===null,ue=_r(u),Ae=u===n;k<I;){var Re=jl((k+I)/2),De=h(a[Re]),Ve=De!==n,Je=De===null,ct=De===De,bt=_r(De);if(H)var it=E||ct;else Ae?it=ct&&(E||Ve):te?it=ct&&Ve&&(E||!Je):ue?it=ct&&Ve&&!Je&&(E||!bt):Je||bt?it=!1:it=E?De<=u:De<u;it?k=Re+1:I=Re}return $n(I,Q)}function Sg(a,u){for(var h=-1,E=a.length,k=0,I=[];++h<E;){var H=a[h],te=u?u(H):H;if(!h||!Kr(te,ue)){var ue=te;I[k++]=H===0?0:H}}return I}function Cg(a){return typeof a=="number"?a:_r(a)?U:+a}function gr(a){if(typeof a=="string")return a;if(vt(a))return Qt(a,gr)+"";if(_r(a))return ng?ng.call(a):"";var u=a+"";return u=="0"&&1/a==-J?"-0":u}function eo(a,u,h){var E=-1,k=xl,I=a.length,H=!0,te=[],ue=te;if(h)H=!1,k=bd;else if(I>=i){var Ae=u?null:Ek(a);if(Ae)return kl(Ae);H=!1,k=sa,ue=new Ro}else ue=u?[]:te;e:for(;++E<I;){var Re=a[E],De=u?u(Re):Re;if(Re=h||Re!==0?Re:0,H&&De===De){for(var Ve=ue.length;Ve--;)if(ue[Ve]===De)continue e;u&&ue.push(De),te.push(Re)}else k(ue,De,h)||(ue!==te&&ue.push(De),te.push(Re))}return te}function Wd(a,u){u=to(u,a);var h=-1,E=u.length;if(!E)return!0;for(;++h<E;){var k=Yr(u[h]);if(k==="__proto__"&&!jt.call(a,"__proto__")||(k==="constructor"||k==="prototype")&&h<E-1)return!1}var I=Jg(a,u);return I==null||delete I[Yr(Rr(u))]}function xg(a,u,h,E){return va(a,u,h(Io(a,u)),E)}function Yl(a,u,h,E){for(var k=a.length,I=E?k:-1;(E?I--:++I<k)&&u(a[I],I,a););return h?Ar(a,E?0:I,E?I+1:k):Ar(a,E?I+1:0,E?k:I)}function Tg(a,u){var h=a;return h instanceof $t&&(h=h.value()),wd(u,function(E,k){return k.func.apply(k.thisArg,Qi([E],k.args))},h)}function Yd(a,u,h){var E=a.length;if(E<2)return E?eo(a[0]):[];for(var k=-1,I=we(E);++k<E;)for(var H=a[k],te=-1;++te<E;)te!=k&&(I[k]=pa(I[k]||H,a[te],u,h));return eo(En(I,1),u,h)}function kg(a,u,h){for(var E=-1,k=a.length,I=u.length,H={};++E<k;){var te=E<I?u[E]:n;h(H,a[E],te)}return H}function Kd(a){return rn(a)?a:[]}function Gd(a){return typeof a=="function"?a:Gn}function to(a,u){return vt(a)?a:of(a,u)?[a]:n_(Ut(a))}var fk=wt;function no(a,u,h){var E=a.length;return h=h===n?E:h,!u&&h>=E?a:Ar(a,u,h)}var Og=Zx||function(a){return wn.clearTimeout(a)};function $g(a,u){if(u)return a.slice();var h=a.length,E=Qv?Qv(h):new a.constructor(h);return a.copy(E),E}function Qd(a){var u=new a.constructor(a.byteLength);return new Il(u).set(new Il(a)),u}function pk(a,u){var h=u?Qd(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.byteLength)}function hk(a){var u=new a.constructor(a.source,fv.exec(a));return u.lastIndex=a.lastIndex,u}function mk(a){return da?Bt(da.call(a)):{}}function Ag(a,u){var h=u?Qd(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.length)}function Rg(a,u){if(a!==u){var h=a!==n,E=a===null,k=a===a,I=_r(a),H=u!==n,te=u===null,ue=u===u,Ae=_r(u);if(!te&&!Ae&&!I&&a>u||I&&H&&ue&&!te&&!Ae||E&&H&&ue||!h&&ue||!k)return 1;if(!E&&!I&&!Ae&&a<u||Ae&&h&&k&&!E&&!I||te&&h&&k||!H&&k||!ue)return-1}return 0}function vk(a,u,h){for(var E=-1,k=a.criteria,I=u.criteria,H=k.length,te=h.length;++E<H;){var ue=Rg(k[E],I[E]);if(ue){if(E>=te)return ue;var Ae=h[E];return ue*(Ae=="desc"?-1:1)}}return a.index-u.index}function Pg(a,u,h,E){for(var k=-1,I=a.length,H=h.length,te=-1,ue=u.length,Ae=pn(I-H,0),Re=we(ue+Ae),De=!E;++te<ue;)Re[te]=u[te];for(;++k<H;)(De||k<I)&&(Re[h[k]]=a[k]);for(;Ae--;)Re[te++]=a[k++];return Re}function Ig(a,u,h,E){for(var k=-1,I=a.length,H=-1,te=h.length,ue=-1,Ae=u.length,Re=pn(I-te,0),De=we(Re+Ae),Ve=!E;++k<Re;)De[k]=a[k];for(var Je=k;++ue<Ae;)De[Je+ue]=u[ue];for(;++H<te;)(Ve||k<I)&&(De[Je+h[H]]=a[k++]);return De}function Wn(a,u){var h=-1,E=a.length;for(u||(u=we(E));++h<E;)u[h]=a[h];return u}function fi(a,u,h,E){var k=!h;h||(h={});for(var I=-1,H=u.length;++I<H;){var te=u[I],ue=E?E(h[te],a[te],te,h,a):n;ue===n&&(ue=a[te]),k?ui(h,te,ue):fa(h,te,ue)}return h}function gk(a,u){return fi(a,rf(a),u)}function _k(a,u){return fi(a,Wg(a),u)}function Kl(a,u){return function(h,E){var k=vt(h)?Sx:NT,I=u?u():{};return k(h,a,ot(E,2),I)}}function vs(a){return wt(function(u,h){var E=-1,k=h.length,I=k>1?h[k-1]:n,H=k>2?h[2]:n;for(I=a.length>3&&typeof I=="function"?(k--,I):n,H&&jn(h[0],h[1],H)&&(I=k<3?n:I,k=1),u=Bt(u);++E<k;){var te=h[E];te&&a(u,te,E,I)}return u})}function Mg(a,u){return function(h,E){if(h==null)return h;if(!Yn(h))return a(h,E);for(var k=h.length,I=u?k:-1,H=Bt(h);(u?I--:++I<k)&&E(H[I],I,H)!==!1;);return h}}function Dg(a){return function(u,h,E){for(var k=-1,I=Bt(u),H=E(u),te=H.length;te--;){var ue=H[a?te:++k];if(h(I[ue],ue,I)===!1)break}return u}}function yk(a,u,h){var E=u&x,k=ga(a);function I(){var H=this&&this!==wn&&this instanceof I?k:a;return H.apply(E?h:this,arguments)}return I}function Fg(a){return function(u){u=Ut(u);var h=cs(u)?qr(u):n,E=h?h[0]:u.charAt(0),k=h?no(h,1).join(""):u.slice(1);return E[a]()+k}}function gs(a){return function(u){return wd(D_(M_(u).replace(cx,"")),a,"")}}function ga(a){return function(){var u=arguments;switch(u.length){case 0:return new a;case 1:return new a(u[0]);case 2:return new a(u[0],u[1]);case 3:return new a(u[0],u[1],u[2]);case 4:return new a(u[0],u[1],u[2],u[3]);case 5:return new a(u[0],u[1],u[2],u[3],u[4]);case 6:return new a(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new a(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var h=ms(a.prototype),E=a.apply(h,u);return Xt(E)?E:h}}function bk(a,u,h){var E=ga(a);function k(){for(var I=arguments.length,H=we(I),te=I,ue=_s(k);te--;)H[te]=arguments[te];var Ae=I<3&&H[0]!==ue&&H[I-1]!==ue?[]:Xi(H,ue);if(I-=Ae.length,I<h)return zg(a,u,Gl,k.placeholder,n,H,Ae,n,n,h-I);var Re=this&&this!==wn&&this instanceof k?E:a;return hr(Re,this,H)}return k}function Lg(a){return function(u,h,E){var k=Bt(u);if(!Yn(u)){var I=ot(h,3);u=gn(u),h=function(te){return I(k[te],te,k)}}var H=a(u,h,E);return H>-1?k[I?u[H]:H]:n}}function jg(a){return $i(function(u){var h=u.length,E=h,k=Or.prototype.thru;for(a&&u.reverse();E--;){var I=u[E];if(typeof I!="function")throw new kr(s);if(k&&!H&&Zl(I)=="wrapper")var H=new Or([],!0)}for(E=H?E:h;++E<h;){I=u[E];var te=Zl(I),ue=te=="wrapper"?tf(I):n;ue&&sf(ue[0])&&ue[1]==(Y|T|M|ve)&&!ue[4].length&&ue[9]==1?H=H[Zl(ue[0])].apply(H,ue[3]):H=I.length==1&&sf(I)?H[te]():H.thru(I)}return function(){var Ae=arguments,Re=Ae[0];if(H&&Ae.length==1&&vt(Re))return H.plant(Re).value();for(var De=0,Ve=h?u[De].apply(this,Ae):Re;++De<h;)Ve=u[De].call(this,Ve);return Ve}})}function Gl(a,u,h,E,k,I,H,te,ue,Ae){var Re=u&Y,De=u&x,Ve=u&S,Je=u&(T|A),ct=u&W,bt=Ve?n:ga(a);function it(){for(var Tt=arguments.length,At=we(Tt),yr=Tt;yr--;)At[yr]=arguments[yr];if(Je)var Un=_s(it),br=Px(At,Un);if(E&&(At=Pg(At,E,k,Je)),I&&(At=Ig(At,I,H,Je)),Tt-=br,Je&&Tt<Ae){var on=Xi(At,Un);return zg(a,u,Gl,it.placeholder,h,At,on,te,ue,Ae-Tt)}var Gr=De?h:this,Ii=Ve?Gr[a]:a;return Tt=At.length,te?At=Nk(At,te):ct&&Tt>1&&At.reverse(),Re&&ue<Tt&&(At.length=ue),this&&this!==wn&&this instanceof it&&(Ii=bt||ga(Ii)),Ii.apply(Gr,At)}return it}function Ug(a,u){return function(h,E){return KT(h,a,u(E),{})}}function Ql(a,u){return function(h,E){var k;if(h===n&&E===n)return u;if(h!==n&&(k=h),E!==n){if(k===n)return E;typeof h=="string"||typeof E=="string"?(h=gr(h),E=gr(E)):(h=Cg(h),E=Cg(E)),k=a(h,E)}return k}}function Xd(a){return $i(function(u){return u=Qt(u,vr(ot())),wt(function(h){var E=this;return a(u,function(k){return hr(k,E,h)})})})}function Xl(a,u){u=u===n?" ":gr(u);var h=u.length;if(h<2)return h?Hd(u,a):u;var E=Hd(u,Ll(a/us(u)));return cs(u)?no(qr(E),0,a).join(""):E.slice(0,a)}function wk(a,u,h,E){var k=u&x,I=ga(a);function H(){for(var te=-1,ue=arguments.length,Ae=-1,Re=E.length,De=we(Re+ue),Ve=this&&this!==wn&&this instanceof H?I:a;++Ae<Re;)De[Ae]=E[Ae];for(;ue--;)De[Ae++]=arguments[++te];return hr(Ve,k?h:this,De)}return H}function Ng(a){return function(u,h,E){return E&&typeof E!="number"&&jn(u,h,E)&&(h=E=n),u=Pi(u),h===n?(h=u,u=0):h=Pi(h),E=E===n?u<h?1:-1:Pi(E),sk(u,h,E,a)}}function Jl(a){return function(u,h){return typeof u=="string"&&typeof h=="string"||(u=Pr(u),h=Pr(h)),a(u,h)}}function zg(a,u,h,E,k,I,H,te,ue,Ae){var Re=u&T,De=Re?H:n,Ve=Re?n:H,Je=Re?I:n,ct=Re?n:I;u|=Re?M:z,u&=~(Re?z:M),u&O||(u&=-4);var bt=[a,u,k,Je,De,ct,Ve,te,ue,Ae],it=h.apply(n,bt);return sf(a)&&Zg(it,bt),it.placeholder=E,e_(it,a,u)}function Jd(a){var u=fn[a];return function(h,E){if(h=Pr(h),E=E==null?0:$n(yt(E),292),E&&eg(h)){var k=(Ut(h)+"e").split("e"),I=u(k[0]+"e"+(+k[1]+E));return k=(Ut(I)+"e").split("e"),+(k[0]+"e"+(+k[1]-E))}return u(h)}}var Ek=ps&&1/kl(new ps([,-0]))[1]==J?function(a){return new ps(a)}:Ef;function Bg(a){return function(u){var h=An(u);return h==Ce?Od(u):h==Pt?Ux(u):Rx(u,a(u))}}function Oi(a,u,h,E,k,I,H,te){var ue=u&S;if(!ue&&typeof a!="function")throw new kr(s);var Ae=E?E.length:0;if(Ae||(u&=-97,E=k=n),H=H===n?H:pn(yt(H),0),te=te===n?te:yt(te),Ae-=k?k.length:0,u&z){var Re=E,De=k;E=k=n}var Ve=ue?n:tf(a),Je=[a,u,h,E,k,Re,De,I,H,te];if(Ve&&Lk(Je,Ve),a=Je[0],u=Je[1],h=Je[2],E=Je[3],k=Je[4],te=Je[9]=Je[9]===n?ue?0:a.length:pn(Je[9]-Ae,0),!te&&u&(T|A)&&(u&=-25),!u||u==x)var ct=yk(a,u,h);else u==T||u==A?ct=bk(a,u,te):(u==M||u==(x|M))&&!k.length?ct=wk(a,u,h,E):ct=Gl.apply(n,Je);var bt=Ve?Eg:Zg;return e_(bt(ct,Je),a,u)}function Vg(a,u,h,E){return a===n||Kr(a,fs[h])&&!jt.call(E,h)?u:a}function Hg(a,u,h,E,k,I){return Xt(a)&&Xt(u)&&(I.set(u,a),ql(a,u,n,Hg,I),I.delete(u)),a}function Sk(a){return ba(a)?n:a}function qg(a,u,h,E,k,I){var H=h&m,te=a.length,ue=u.length;if(te!=ue&&!(H&&ue>te))return!1;var Ae=I.get(a),Re=I.get(u);if(Ae&&Re)return Ae==u&&Re==a;var De=-1,Ve=!0,Je=h&b?new Ro:n;for(I.set(a,u),I.set(u,a);++De<te;){var ct=a[De],bt=u[De];if(E)var it=H?E(bt,ct,De,u,a,I):E(ct,bt,De,a,u,I);if(it!==n){if(it)continue;Ve=!1;break}if(Je){if(!Ed(u,function(Tt,At){if(!sa(Je,At)&&(ct===Tt||k(ct,Tt,h,E,I)))return Je.push(At)})){Ve=!1;break}}else if(!(ct===bt||k(ct,bt,h,E,I))){Ve=!1;break}}return I.delete(a),I.delete(u),Ve}function Ck(a,u,h,E,k,I,H){switch(h){case nn:if(a.byteLength!=u.byteLength||a.byteOffset!=u.byteOffset)return!1;a=a.buffer,u=u.buffer;case Wt:return!(a.byteLength!=u.byteLength||!I(new Il(a),new Il(u)));case G:case N:case $e:return Kr(+a,+u);case ge:return a.name==u.name&&a.message==u.message;case Ze:case St:return a==u+"";case Ce:var te=Od;case Pt:var ue=E&m;if(te||(te=kl),a.size!=u.size&&!ue)return!1;var Ae=H.get(a);if(Ae)return Ae==u;E|=b,H.set(a,u);var Re=qg(te(a),te(u),E,k,I,H);return H.delete(a),Re;case Nt:if(da)return da.call(a)==da.call(u)}return!1}function xk(a,u,h,E,k,I){var H=h&m,te=Zd(a),ue=te.length,Ae=Zd(u),Re=Ae.length;if(ue!=Re&&!H)return!1;for(var De=ue;De--;){var Ve=te[De];if(!(H?Ve in u:jt.call(u,Ve)))return!1}var Je=I.get(a),ct=I.get(u);if(Je&&ct)return Je==u&&ct==a;var bt=!0;I.set(a,u),I.set(u,a);for(var it=H;++De<ue;){Ve=te[De];var Tt=a[Ve],At=u[Ve];if(E)var yr=H?E(At,Tt,Ve,u,a,I):E(Tt,At,Ve,a,u,I);if(!(yr===n?Tt===At||k(Tt,At,h,E,I):yr)){bt=!1;break}it||(it=Ve=="constructor")}if(bt&&!it){var Un=a.constructor,br=u.constructor;Un!=br&&"constructor"in a&&"constructor"in u&&!(typeof Un=="function"&&Un instanceof Un&&typeof br=="function"&&br instanceof br)&&(bt=!1)}return I.delete(a),I.delete(u),bt}function $i(a){return lf(Xg(a,n,s_),a+"")}function Zd(a){return dg(a,gn,rf)}function ef(a){return dg(a,Kn,Wg)}var tf=Ul?function(a){return Ul.get(a)}:Ef;function Zl(a){for(var u=a.name+"",h=hs[u],E=jt.call(hs,u)?h.length:0;E--;){var k=h[E],I=k.func;if(I==null||I==a)return k.name}return u}function _s(a){var u=jt.call($,"placeholder")?$:a;return u.placeholder}function ot(){var a=$.iteratee||bf;return a=a===bf?hg:a,arguments.length?a(arguments[0],arguments[1]):a}function ec(a,u){var h=a.__data__;return Ik(u)?h[typeof u=="string"?"string":"hash"]:h.map}function nf(a){for(var u=gn(a),h=u.length;h--;){var E=u[h],k=a[E];u[h]=[E,k,Gg(k)]}return u}function Mo(a,u){var h=Fx(a,u);return pg(h)?h:n}function Tk(a){var u=jt.call(a,$o),h=a[$o];try{a[$o]=n;var E=!0}catch{}var k=Rl.call(a);return E&&(u?a[$o]=h:delete a[$o]),k}var rf=Ad?function(a){return a==null?[]:(a=Bt(a),Gi(Ad(a),function(u){return Jv.call(a,u)}))}:Sf,Wg=Ad?function(a){for(var u=[];a;)Qi(u,rf(a)),a=Ml(a);return u}:Sf,An=Ln;(Rd&&An(new Rd(new ArrayBuffer(1)))!=nn||la&&An(new la)!=Ce||Pd&&An(Pd.resolve())!=tt||ps&&An(new ps)!=Pt||ca&&An(new ca)!=qt)&&(An=function(a){var u=Ln(a),h=u==Ne?a.constructor:n,E=h?Do(h):"";if(E)switch(E){case lT:return nn;case cT:return Ce;case uT:return tt;case dT:return Pt;case fT:return qt}return u});function kk(a,u,h){for(var E=-1,k=h.length;++E<k;){var I=h[E],H=I.size;switch(I.type){case"drop":a+=H;break;case"dropRight":u-=H;break;case"take":u=$n(u,a+H);break;case"takeRight":a=pn(a,u-H);break}}return{start:a,end:u}}function Ok(a){var u=a.match(D2);return u?u[1].split(F2):[]}function Yg(a,u,h){u=to(u,a);for(var E=-1,k=u.length,I=!1;++E<k;){var H=Yr(u[E]);if(!(I=a!=null&&h(a,H)))break;a=a[H]}return I||++E!=k?I:(k=a==null?0:a.length,!!k&&ac(k)&&Ai(H,k)&&(vt(a)||Fo(a)))}function $k(a){var u=a.length,h=new a.constructor(u);return u&&typeof a[0]=="string"&&jt.call(a,"index")&&(h.index=a.index,h.input=a.input),h}function Kg(a){return typeof a.constructor=="function"&&!_a(a)?ms(Ml(a)):{}}function Ak(a,u,h){var E=a.constructor;switch(u){case Wt:return Qd(a);case G:case N:return new E(+a);case nn:return pk(a,h);case Dn:case _e:case ce:case ye:case Fe:case qe:case xe:case et:case be:return Ag(a,h);case Ce:return new E;case $e:case St:return new E(a);case Ze:return hk(a);case Pt:return new E;case Nt:return mk(a)}}function Rk(a,u){var h=u.length;if(!h)return a;var E=h-1;return u[E]=(h>1?"& ":"")+u[E],u=u.join(h>2?", ":" "),a.replace(wl,`{
3
- /* [wrapped with `+u+`] */
4
- `)}function Pk(a){return vt(a)||Fo(a)||!!(Zv&&a&&a[Zv])}function Ai(a,u){var h=typeof a;return u=u??j,!!u&&(h=="number"||h!="symbol"&&H2.test(a))&&a>-1&&a%1==0&&a<u}function jn(a,u,h){if(!Xt(h))return!1;var E=typeof u;return(E=="number"?Yn(h)&&Ai(u,h.length):E=="string"&&u in h)?Kr(h[u],a):!1}function of(a,u){if(vt(a))return!1;var h=typeof a;return h=="number"||h=="symbol"||h=="boolean"||a==null||_r(a)?!0:bl.test(a)||!dd.test(a)||u!=null&&a in Bt(u)}function Ik(a){var u=typeof a;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?a!=="__proto__":a===null}function sf(a){var u=Zl(a),h=$[u];if(typeof h!="function"||!(u in $t.prototype))return!1;if(a===h)return!0;var E=tf(h);return!!E&&a===E[0]}function Mk(a){return!!Gv&&Gv in a}var Dk=$l?Ri:Cf;function _a(a){var u=a&&a.constructor,h=typeof u=="function"&&u.prototype||fs;return a===h}function Gg(a){return a===a&&!Xt(a)}function Qg(a,u){return function(h){return h==null?!1:h[a]===u&&(u!==n||a in Bt(h))}}function Fk(a){var u=oc(a,function(E){return h.size===f&&h.clear(),E}),h=u.cache;return u}function Lk(a,u){var h=a[1],E=u[1],k=h|E,I=k<(x|S|Y),H=E==Y&&h==T||E==Y&&h==ve&&a[7].length<=u[8]||E==(Y|ve)&&u[7].length<=u[8]&&h==T;if(!(I||H))return a;E&x&&(a[2]=u[2],k|=h&x?0:O);var te=u[3];if(te){var ue=a[3];a[3]=ue?Pg(ue,te,u[4]):te,a[4]=ue?Xi(a[3],p):u[4]}return te=u[5],te&&(ue=a[5],a[5]=ue?Ig(ue,te,u[6]):te,a[6]=ue?Xi(a[5],p):u[6]),te=u[7],te&&(a[7]=te),E&Y&&(a[8]=a[8]==null?u[8]:$n(a[8],u[8])),a[9]==null&&(a[9]=u[9]),a[0]=u[0],a[1]=k,a}function jk(a){var u=[];if(a!=null)for(var h in Bt(a))u.push(h);return u}function Uk(a){return Rl.call(a)}function Xg(a,u,h){return u=pn(u===n?a.length-1:u,0),function(){for(var E=arguments,k=-1,I=pn(E.length-u,0),H=we(I);++k<I;)H[k]=E[u+k];k=-1;for(var te=we(u+1);++k<u;)te[k]=E[k];return te[u]=h(H),hr(a,this,te)}}function Jg(a,u){return u.length<2?a:Io(a,Ar(u,0,-1))}function Nk(a,u){for(var h=a.length,E=$n(u.length,h),k=Wn(a);E--;){var I=u[E];a[E]=Ai(I,h)?k[I]:n}return a}function af(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}var Zg=t_(Eg),ya=tT||function(a,u){return wn.setTimeout(a,u)},lf=t_(ck);function e_(a,u,h){var E=u+"";return lf(a,Rk(E,zk(Ok(E),h)))}function t_(a){var u=0,h=0;return function(){var E=oT(),k=D-(E-h);if(h=E,k>0){if(++u>=L)return arguments[0]}else u=0;return a.apply(n,arguments)}}function tc(a,u){var h=-1,E=a.length,k=E-1;for(u=u===n?E:u;++h<u;){var I=Vd(h,k),H=a[I];a[I]=a[h],a[h]=H}return a.length=u,a}var n_=Fk(function(a){var u=[];return a.charCodeAt(0)===46&&u.push(""),a.replace(os,function(h,E,k,I){u.push(k?I.replace(j2,"$1"):E||h)}),u});function Yr(a){if(typeof a=="string"||_r(a))return a;var u=a+"";return u=="0"&&1/a==-J?"-0":u}function Do(a){if(a!=null){try{return Al.call(a)}catch{}try{return a+""}catch{}}return""}function zk(a,u){return mr(oe,function(h){var E="_."+h[0];u&h[1]&&!xl(a,E)&&a.push(E)}),a.sort()}function r_(a){if(a instanceof $t)return a.clone();var u=new Or(a.__wrapped__,a.__chain__);return u.__actions__=Wn(a.__actions__),u.__index__=a.__index__,u.__values__=a.__values__,u}function Bk(a,u,h){(h?jn(a,u,h):u===n)?u=1:u=pn(yt(u),0);var E=a==null?0:a.length;if(!E||u<1)return[];for(var k=0,I=0,H=we(Ll(E/u));k<E;)H[I++]=Ar(a,k,k+=u);return H}function Vk(a){for(var u=-1,h=a==null?0:a.length,E=0,k=[];++u<h;){var I=a[u];I&&(k[E++]=I)}return k}function Hk(){var a=arguments.length;if(!a)return[];for(var u=we(a-1),h=arguments[0],E=a;E--;)u[E-1]=arguments[E];return Qi(vt(h)?Wn(h):[h],En(u,1))}var qk=wt(function(a,u){return rn(a)?pa(a,En(u,1,rn,!0)):[]}),Wk=wt(function(a,u){var h=Rr(u);return rn(h)&&(h=n),rn(a)?pa(a,En(u,1,rn,!0),ot(h,2)):[]}),Yk=wt(function(a,u){var h=Rr(u);return rn(h)&&(h=n),rn(a)?pa(a,En(u,1,rn,!0),n,h):[]});function Kk(a,u,h){var E=a==null?0:a.length;return E?(u=h||u===n?1:yt(u),Ar(a,u<0?0:u,E)):[]}function Gk(a,u,h){var E=a==null?0:a.length;return E?(u=h||u===n?1:yt(u),u=E-u,Ar(a,0,u<0?0:u)):[]}function Qk(a,u){return a&&a.length?Yl(a,ot(u,3),!0,!0):[]}function Xk(a,u){return a&&a.length?Yl(a,ot(u,3),!0):[]}function Jk(a,u,h,E){var k=a==null?0:a.length;return k?(h&&typeof h!="number"&&jn(a,u,h)&&(h=0,E=k),HT(a,u,h,E)):[]}function i_(a,u,h){var E=a==null?0:a.length;if(!E)return-1;var k=h==null?0:yt(h);return k<0&&(k=pn(E+k,0)),Tl(a,ot(u,3),k)}function o_(a,u,h){var E=a==null?0:a.length;if(!E)return-1;var k=E-1;return h!==n&&(k=yt(h),k=h<0?pn(E+k,0):$n(k,E-1)),Tl(a,ot(u,3),k,!0)}function s_(a){var u=a==null?0:a.length;return u?En(a,1):[]}function Zk(a){var u=a==null?0:a.length;return u?En(a,J):[]}function eO(a,u){var h=a==null?0:a.length;return h?(u=u===n?1:yt(u),En(a,u)):[]}function tO(a){for(var u=-1,h=a==null?0:a.length,E={};++u<h;){var k=a[u];ui(E,k[0],k[1])}return E}function a_(a){return a&&a.length?a[0]:n}function nO(a,u,h){var E=a==null?0:a.length;if(!E)return-1;var k=h==null?0:yt(h);return k<0&&(k=pn(E+k,0)),ls(a,u,k)}function rO(a){var u=a==null?0:a.length;return u?Ar(a,0,-1):[]}var iO=wt(function(a){var u=Qt(a,Kd);return u.length&&u[0]===a[0]?jd(u):[]}),oO=wt(function(a){var u=Rr(a),h=Qt(a,Kd);return u===Rr(h)?u=n:h.pop(),h.length&&h[0]===a[0]?jd(h,ot(u,2)):[]}),sO=wt(function(a){var u=Rr(a),h=Qt(a,Kd);return u=typeof u=="function"?u:n,u&&h.pop(),h.length&&h[0]===a[0]?jd(h,n,u):[]});function aO(a,u){return a==null?"":rT.call(a,u)}function Rr(a){var u=a==null?0:a.length;return u?a[u-1]:n}function lO(a,u,h){var E=a==null?0:a.length;if(!E)return-1;var k=E;return h!==n&&(k=yt(h),k=k<0?pn(E+k,0):$n(k,E-1)),u===u?zx(a,u,k):Tl(a,zv,k,!0)}function cO(a,u){return a&&a.length?_g(a,yt(u)):n}var uO=wt(l_);function l_(a,u){return a&&a.length&&u&&u.length?Bd(a,u):a}function dO(a,u,h){return a&&a.length&&u&&u.length?Bd(a,u,ot(h,2)):a}function fO(a,u,h){return a&&a.length&&u&&u.length?Bd(a,u,n,h):a}var pO=$i(function(a,u){var h=a==null?0:a.length,E=Md(a,u);return wg(a,Qt(u,function(k){return Ai(k,h)?+k:k}).sort(Rg)),E});function hO(a,u){var h=[];if(!(a&&a.length))return h;var E=-1,k=[],I=a.length;for(u=ot(u,3);++E<I;){var H=a[E];u(H,E,a)&&(h.push(H),k.push(E))}return wg(a,k),h}function cf(a){return a==null?a:aT.call(a)}function mO(a,u,h){var E=a==null?0:a.length;return E?(h&&typeof h!="number"&&jn(a,u,h)?(u=0,h=E):(u=u==null?0:yt(u),h=h===n?E:yt(h)),Ar(a,u,h)):[]}function vO(a,u){return Wl(a,u)}function gO(a,u,h){return qd(a,u,ot(h,2))}function _O(a,u){var h=a==null?0:a.length;if(h){var E=Wl(a,u);if(E<h&&Kr(a[E],u))return E}return-1}function yO(a,u){return Wl(a,u,!0)}function bO(a,u,h){return qd(a,u,ot(h,2),!0)}function wO(a,u){var h=a==null?0:a.length;if(h){var E=Wl(a,u,!0)-1;if(Kr(a[E],u))return E}return-1}function EO(a){return a&&a.length?Sg(a):[]}function SO(a,u){return a&&a.length?Sg(a,ot(u,2)):[]}function CO(a){var u=a==null?0:a.length;return u?Ar(a,1,u):[]}function xO(a,u,h){return a&&a.length?(u=h||u===n?1:yt(u),Ar(a,0,u<0?0:u)):[]}function TO(a,u,h){var E=a==null?0:a.length;return E?(u=h||u===n?1:yt(u),u=E-u,Ar(a,u<0?0:u,E)):[]}function kO(a,u){return a&&a.length?Yl(a,ot(u,3),!1,!0):[]}function OO(a,u){return a&&a.length?Yl(a,ot(u,3)):[]}var $O=wt(function(a){return eo(En(a,1,rn,!0))}),AO=wt(function(a){var u=Rr(a);return rn(u)&&(u=n),eo(En(a,1,rn,!0),ot(u,2))}),RO=wt(function(a){var u=Rr(a);return u=typeof u=="function"?u:n,eo(En(a,1,rn,!0),n,u)});function PO(a){return a&&a.length?eo(a):[]}function IO(a,u){return a&&a.length?eo(a,ot(u,2)):[]}function MO(a,u){return u=typeof u=="function"?u:n,a&&a.length?eo(a,n,u):[]}function uf(a){if(!(a&&a.length))return[];var u=0;return a=Gi(a,function(h){if(rn(h))return u=pn(h.length,u),!0}),Td(u,function(h){return Qt(a,Sd(h))})}function c_(a,u){if(!(a&&a.length))return[];var h=uf(a);return u==null?h:Qt(h,function(E){return hr(u,n,E)})}var DO=wt(function(a,u){return rn(a)?pa(a,u):[]}),FO=wt(function(a){return Yd(Gi(a,rn))}),LO=wt(function(a){var u=Rr(a);return rn(u)&&(u=n),Yd(Gi(a,rn),ot(u,2))}),jO=wt(function(a){var u=Rr(a);return u=typeof u=="function"?u:n,Yd(Gi(a,rn),n,u)}),UO=wt(uf);function NO(a,u){return kg(a||[],u||[],fa)}function zO(a,u){return kg(a||[],u||[],va)}var BO=wt(function(a){var u=a.length,h=u>1?a[u-1]:n;return h=typeof h=="function"?(a.pop(),h):n,c_(a,h)});function u_(a){var u=$(a);return u.__chain__=!0,u}function VO(a,u){return u(a),a}function nc(a,u){return u(a)}var HO=$i(function(a){var u=a.length,h=u?a[0]:0,E=this.__wrapped__,k=function(I){return Md(I,a)};return u>1||this.__actions__.length||!(E instanceof $t)||!Ai(h)?this.thru(k):(E=E.slice(h,+h+(u?1:0)),E.__actions__.push({func:nc,args:[k],thisArg:n}),new Or(E,this.__chain__).thru(function(I){return u&&!I.length&&I.push(n),I}))});function qO(){return u_(this)}function WO(){return new Or(this.value(),this.__chain__)}function YO(){this.__values__===n&&(this.__values__=C_(this.value()));var a=this.__index__>=this.__values__.length,u=a?n:this.__values__[this.__index__++];return{done:a,value:u}}function KO(){return this}function GO(a){for(var u,h=this;h instanceof zl;){var E=r_(h);E.__index__=0,E.__values__=n,u?k.__wrapped__=E:u=E;var k=E;h=h.__wrapped__}return k.__wrapped__=a,u}function QO(){var a=this.__wrapped__;if(a instanceof $t){var u=a;return this.__actions__.length&&(u=new $t(this)),u=u.reverse(),u.__actions__.push({func:nc,args:[cf],thisArg:n}),new Or(u,this.__chain__)}return this.thru(cf)}function XO(){return Tg(this.__wrapped__,this.__actions__)}var JO=Kl(function(a,u,h){jt.call(a,h)?++a[h]:ui(a,h,1)});function ZO(a,u,h){var E=vt(a)?Uv:VT;return h&&jn(a,u,h)&&(u=n),E(a,ot(u,3))}function e$(a,u){var h=vt(a)?Gi:cg;return h(a,ot(u,3))}var t$=Lg(i_),n$=Lg(o_);function r$(a,u){return En(rc(a,u),1)}function i$(a,u){return En(rc(a,u),J)}function o$(a,u,h){return h=h===n?1:yt(h),En(rc(a,u),h)}function d_(a,u){var h=vt(a)?mr:Zi;return h(a,ot(u,3))}function f_(a,u){var h=vt(a)?Cx:lg;return h(a,ot(u,3))}var s$=Kl(function(a,u,h){jt.call(a,h)?a[h].push(u):ui(a,h,[u])});function a$(a,u,h,E){a=Yn(a)?a:bs(a),h=h&&!E?yt(h):0;var k=a.length;return h<0&&(h=pn(k+h,0)),lc(a)?h<=k&&a.indexOf(u,h)>-1:!!k&&ls(a,u,h)>-1}var l$=wt(function(a,u,h){var E=-1,k=typeof u=="function",I=Yn(a)?we(a.length):[];return Zi(a,function(H){I[++E]=k?hr(u,H,h):ha(H,u,h)}),I}),c$=Kl(function(a,u,h){ui(a,h,u)});function rc(a,u){var h=vt(a)?Qt:mg;return h(a,ot(u,3))}function u$(a,u,h,E){return a==null?[]:(vt(u)||(u=u==null?[]:[u]),h=E?n:h,vt(h)||(h=h==null?[]:[h]),yg(a,u,h))}var d$=Kl(function(a,u,h){a[h?0:1].push(u)},function(){return[[],[]]});function f$(a,u,h){var E=vt(a)?wd:Vv,k=arguments.length<3;return E(a,ot(u,4),h,k,Zi)}function p$(a,u,h){var E=vt(a)?xx:Vv,k=arguments.length<3;return E(a,ot(u,4),h,k,lg)}function h$(a,u){var h=vt(a)?Gi:cg;return h(a,sc(ot(u,3)))}function m$(a){var u=vt(a)?ig:ak;return u(a)}function v$(a,u,h){(h?jn(a,u,h):u===n)?u=1:u=yt(u);var E=vt(a)?jT:lk;return E(a,u)}function g$(a){var u=vt(a)?UT:uk;return u(a)}function _$(a){if(a==null)return 0;if(Yn(a))return lc(a)?us(a):a.length;var u=An(a);return u==Ce||u==Pt?a.size:Nd(a).length}function y$(a,u,h){var E=vt(a)?Ed:dk;return h&&jn(a,u,h)&&(u=n),E(a,ot(u,3))}var b$=wt(function(a,u){if(a==null)return[];var h=u.length;return h>1&&jn(a,u[0],u[1])?u=[]:h>2&&jn(u[0],u[1],u[2])&&(u=[u[0]]),yg(a,En(u,1),[])}),ic=eT||function(){return wn.Date.now()};function w$(a,u){if(typeof u!="function")throw new kr(s);return a=yt(a),function(){if(--a<1)return u.apply(this,arguments)}}function p_(a,u,h){return u=h?n:u,u=a&&u==null?a.length:u,Oi(a,Y,n,n,n,n,u)}function h_(a,u){var h;if(typeof u!="function")throw new kr(s);return a=yt(a),function(){return--a>0&&(h=u.apply(this,arguments)),a<=1&&(u=n),h}}var df=wt(function(a,u,h){var E=x;if(h.length){var k=Xi(h,_s(df));E|=M}return Oi(a,E,u,h,k)}),m_=wt(function(a,u,h){var E=x|S;if(h.length){var k=Xi(h,_s(m_));E|=M}return Oi(u,E,a,h,k)});function v_(a,u,h){u=h?n:u;var E=Oi(a,T,n,n,n,n,n,u);return E.placeholder=v_.placeholder,E}function g_(a,u,h){u=h?n:u;var E=Oi(a,A,n,n,n,n,n,u);return E.placeholder=g_.placeholder,E}function __(a,u,h){var E,k,I,H,te,ue,Ae=0,Re=!1,De=!1,Ve=!0;if(typeof a!="function")throw new kr(s);u=Pr(u)||0,Xt(h)&&(Re=!!h.leading,De="maxWait"in h,I=De?pn(Pr(h.maxWait)||0,u):I,Ve="trailing"in h?!!h.trailing:Ve);function Je(on){var Gr=E,Ii=k;return E=k=n,Ae=on,H=a.apply(Ii,Gr),H}function ct(on){return Ae=on,te=ya(Tt,u),Re?Je(on):H}function bt(on){var Gr=on-ue,Ii=on-Ae,j_=u-Gr;return De?$n(j_,I-Ii):j_}function it(on){var Gr=on-ue,Ii=on-Ae;return ue===n||Gr>=u||Gr<0||De&&Ii>=I}function Tt(){var on=ic();if(it(on))return At(on);te=ya(Tt,bt(on))}function At(on){return te=n,Ve&&E?Je(on):(E=k=n,H)}function yr(){te!==n&&Og(te),Ae=0,E=ue=k=te=n}function Un(){return te===n?H:At(ic())}function br(){var on=ic(),Gr=it(on);if(E=arguments,k=this,ue=on,Gr){if(te===n)return ct(ue);if(De)return Og(te),te=ya(Tt,u),Je(ue)}return te===n&&(te=ya(Tt,u)),H}return br.cancel=yr,br.flush=Un,br}var E$=wt(function(a,u){return ag(a,1,u)}),S$=wt(function(a,u,h){return ag(a,Pr(u)||0,h)});function C$(a){return Oi(a,W)}function oc(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new kr(s);var h=function(){var E=arguments,k=u?u.apply(this,E):E[0],I=h.cache;if(I.has(k))return I.get(k);var H=a.apply(this,E);return h.cache=I.set(k,H)||I,H};return h.cache=new(oc.Cache||ki),h}oc.Cache=ki;function sc(a){if(typeof a!="function")throw new kr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}function x$(a){return h_(2,a)}var T$=fk(function(a,u){u=u.length==1&&vt(u[0])?Qt(u[0],vr(ot())):Qt(En(u,1),vr(ot()));var h=u.length;return wt(function(E){for(var k=-1,I=$n(E.length,h);++k<I;)E[k]=u[k].call(this,E[k]);return hr(a,this,E)})}),ff=wt(function(a,u){var h=Xi(u,_s(ff));return Oi(a,M,n,u,h)}),y_=wt(function(a,u){var h=Xi(u,_s(y_));return Oi(a,z,n,u,h)}),k$=$i(function(a,u){return Oi(a,ve,n,n,n,u)});function O$(a,u){if(typeof a!="function")throw new kr(s);return u=u===n?u:yt(u),wt(a,u)}function $$(a,u){if(typeof a!="function")throw new kr(s);return u=u==null?0:pn(yt(u),0),wt(function(h){var E=h[u],k=no(h,0,u);return E&&Qi(k,E),hr(a,this,k)})}function A$(a,u,h){var E=!0,k=!0;if(typeof a!="function")throw new kr(s);return Xt(h)&&(E="leading"in h?!!h.leading:E,k="trailing"in h?!!h.trailing:k),__(a,u,{leading:E,maxWait:u,trailing:k})}function R$(a){return p_(a,1)}function P$(a,u){return ff(Gd(u),a)}function I$(){if(!arguments.length)return[];var a=arguments[0];return vt(a)?a:[a]}function M$(a){return $r(a,g)}function D$(a,u){return u=typeof u=="function"?u:n,$r(a,g,u)}function F$(a){return $r(a,v|g)}function L$(a,u){return u=typeof u=="function"?u:n,$r(a,v|g,u)}function j$(a,u){return u==null||sg(a,u,gn(u))}function Kr(a,u){return a===u||a!==a&&u!==u}var U$=Jl(Ld),N$=Jl(function(a,u){return a>=u}),Fo=fg((function(){return arguments})())?fg:function(a){return tn(a)&&jt.call(a,"callee")&&!Jv.call(a,"callee")},vt=we.isArray,z$=Iv?vr(Iv):GT;function Yn(a){return a!=null&&ac(a.length)&&!Ri(a)}function rn(a){return tn(a)&&Yn(a)}function B$(a){return a===!0||a===!1||tn(a)&&Ln(a)==G}var ro=nT||Cf,V$=Mv?vr(Mv):QT;function H$(a){return tn(a)&&a.nodeType===1&&!ba(a)}function q$(a){if(a==null)return!0;if(Yn(a)&&(vt(a)||typeof a=="string"||typeof a.splice=="function"||ro(a)||ys(a)||Fo(a)))return!a.length;var u=An(a);if(u==Ce||u==Pt)return!a.size;if(_a(a))return!Nd(a).length;for(var h in a)if(jt.call(a,h))return!1;return!0}function W$(a,u){return ma(a,u)}function Y$(a,u,h){h=typeof h=="function"?h:n;var E=h?h(a,u):n;return E===n?ma(a,u,n,h):!!E}function pf(a){if(!tn(a))return!1;var u=Ln(a);return u==ge||u==ie||typeof a.message=="string"&&typeof a.name=="string"&&!ba(a)}function K$(a){return typeof a=="number"&&eg(a)}function Ri(a){if(!Xt(a))return!1;var u=Ln(a);return u==fe||u==pe||u==F||u==Ge}function b_(a){return typeof a=="number"&&a==yt(a)}function ac(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=j}function Xt(a){var u=typeof a;return a!=null&&(u=="object"||u=="function")}function tn(a){return a!=null&&typeof a=="object"}var w_=Dv?vr(Dv):JT;function G$(a,u){return a===u||Ud(a,u,nf(u))}function Q$(a,u,h){return h=typeof h=="function"?h:n,Ud(a,u,nf(u),h)}function X$(a){return E_(a)&&a!=+a}function J$(a){if(Dk(a))throw new pt(o);return pg(a)}function Z$(a){return a===null}function eA(a){return a==null}function E_(a){return typeof a=="number"||tn(a)&&Ln(a)==$e}function ba(a){if(!tn(a)||Ln(a)!=Ne)return!1;var u=Ml(a);if(u===null)return!0;var h=jt.call(u,"constructor")&&u.constructor;return typeof h=="function"&&h instanceof h&&Al.call(h)==Qx}var hf=Fv?vr(Fv):ZT;function tA(a){return b_(a)&&a>=-j&&a<=j}var S_=Lv?vr(Lv):ek;function lc(a){return typeof a=="string"||!vt(a)&&tn(a)&&Ln(a)==St}function _r(a){return typeof a=="symbol"||tn(a)&&Ln(a)==Nt}var ys=jv?vr(jv):tk;function nA(a){return a===n}function rA(a){return tn(a)&&An(a)==qt}function iA(a){return tn(a)&&Ln(a)==Gt}var oA=Jl(zd),sA=Jl(function(a,u){return a<=u});function C_(a){if(!a)return[];if(Yn(a))return lc(a)?qr(a):Wn(a);if(aa&&a[aa])return jx(a[aa]());var u=An(a),h=u==Ce?Od:u==Pt?kl:bs;return h(a)}function Pi(a){if(!a)return a===0?a:0;if(a=Pr(a),a===J||a===-J){var u=a<0?-1:1;return u*de}return a===a?a:0}function yt(a){var u=Pi(a),h=u%1;return u===u?h?u-h:u:0}function x_(a){return a?Po(yt(a),0,ee):0}function Pr(a){if(typeof a=="number")return a;if(_r(a))return U;if(Xt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Xt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=Hv(a);var h=z2.test(a);return h||V2.test(a)?wx(a.slice(2),h?2:8):N2.test(a)?U:+a}function T_(a){return fi(a,Kn(a))}function aA(a){return a?Po(yt(a),-j,j):a===0?a:0}function Ut(a){return a==null?"":gr(a)}var lA=vs(function(a,u){if(_a(u)||Yn(u)){fi(u,gn(u),a);return}for(var h in u)jt.call(u,h)&&fa(a,h,u[h])}),k_=vs(function(a,u){fi(u,Kn(u),a)}),O_=vs(function(a,u,h,E){fi(u,Kn(u),a,E)}),mf=vs(function(a,u,h,E){fi(u,gn(u),a,E)}),cA=$i(Md);function uA(a,u){var h=ms(a);return u==null?h:og(h,u)}var dA=wt(function(a,u){a=Bt(a);var h=-1,E=u.length,k=E>2?u[2]:n;for(k&&jn(u[0],u[1],k)&&(E=1);++h<E;)for(var I=u[h],H=Kn(I),te=-1,ue=H.length;++te<ue;){var Ae=H[te],Re=a[Ae];(Re===n||Kr(Re,fs[Ae])&&!jt.call(a,Ae))&&(a[Ae]=I[Ae])}return a}),fA=wt(function(a){return a.push(n,Hg),hr($_,n,a)});function pA(a,u){return Nv(a,ot(u,3),di)}function hA(a,u){return Nv(a,ot(u,3),Fd)}function mA(a,u){return a==null?a:Dd(a,ot(u,3),Kn)}function vA(a,u){return a==null?a:ug(a,ot(u,3),Kn)}function gA(a,u){return a&&di(a,ot(u,3))}function _A(a,u){return a&&Fd(a,ot(u,3))}function yA(a){return a==null?[]:Hl(a,gn(a))}function bA(a){return a==null?[]:Hl(a,Kn(a))}function vf(a,u,h){var E=a==null?n:Io(a,u);return E===n?h:E}function wA(a,u){return a!=null&&Yg(a,u,qT)}function gf(a,u){return a!=null&&Yg(a,u,WT)}var EA=Ug(function(a,u,h){u!=null&&typeof u.toString!="function"&&(u=Rl.call(u)),a[u]=h},yf(Gn)),SA=Ug(function(a,u,h){u!=null&&typeof u.toString!="function"&&(u=Rl.call(u)),jt.call(a,u)?a[u].push(h):a[u]=[h]},ot),CA=wt(ha);function gn(a){return Yn(a)?rg(a):Nd(a)}function Kn(a){return Yn(a)?rg(a,!0):nk(a)}function xA(a,u){var h={};return u=ot(u,3),di(a,function(E,k,I){ui(h,u(E,k,I),E)}),h}function TA(a,u){var h={};return u=ot(u,3),di(a,function(E,k,I){ui(h,k,u(E,k,I))}),h}var kA=vs(function(a,u,h){ql(a,u,h)}),$_=vs(function(a,u,h,E){ql(a,u,h,E)}),OA=$i(function(a,u){var h={};if(a==null)return h;var E=!1;u=Qt(u,function(I){return I=to(I,a),E||(E=I.length>1),I}),fi(a,ef(a),h),E&&(h=$r(h,v|y|g,Sk));for(var k=u.length;k--;)Wd(h,u[k]);return h});function $A(a,u){return A_(a,sc(ot(u)))}var AA=$i(function(a,u){return a==null?{}:ik(a,u)});function A_(a,u){if(a==null)return{};var h=Qt(ef(a),function(E){return[E]});return u=ot(u),bg(a,h,function(E,k){return u(E,k[0])})}function RA(a,u,h){u=to(u,a);var E=-1,k=u.length;for(k||(k=1,a=n);++E<k;){var I=a==null?n:a[Yr(u[E])];I===n&&(E=k,I=h),a=Ri(I)?I.call(a):I}return a}function PA(a,u,h){return a==null?a:va(a,u,h)}function IA(a,u,h,E){return E=typeof E=="function"?E:n,a==null?a:va(a,u,h,E)}var R_=Bg(gn),P_=Bg(Kn);function MA(a,u,h){var E=vt(a),k=E||ro(a)||ys(a);if(u=ot(u,4),h==null){var I=a&&a.constructor;k?h=E?new I:[]:Xt(a)?h=Ri(I)?ms(Ml(a)):{}:h={}}return(k?mr:di)(a,function(H,te,ue){return u(h,H,te,ue)}),h}function DA(a,u){return a==null?!0:Wd(a,u)}function FA(a,u,h){return a==null?a:xg(a,u,Gd(h))}function LA(a,u,h,E){return E=typeof E=="function"?E:n,a==null?a:xg(a,u,Gd(h),E)}function bs(a){return a==null?[]:kd(a,gn(a))}function jA(a){return a==null?[]:kd(a,Kn(a))}function UA(a,u,h){return h===n&&(h=u,u=n),h!==n&&(h=Pr(h),h=h===h?h:0),u!==n&&(u=Pr(u),u=u===u?u:0),Po(Pr(a),u,h)}function NA(a,u,h){return u=Pi(u),h===n?(h=u,u=0):h=Pi(h),a=Pr(a),YT(a,u,h)}function zA(a,u,h){if(h&&typeof h!="boolean"&&jn(a,u,h)&&(u=h=n),h===n&&(typeof u=="boolean"?(h=u,u=n):typeof a=="boolean"&&(h=a,a=n)),a===n&&u===n?(a=0,u=1):(a=Pi(a),u===n?(u=a,a=0):u=Pi(u)),a>u){var E=a;a=u,u=E}if(h||a%1||u%1){var k=tg();return $n(a+k*(u-a+bx("1e-"+((k+"").length-1))),u)}return Vd(a,u)}var BA=gs(function(a,u,h){return u=u.toLowerCase(),a+(h?I_(u):u)});function I_(a){return _f(Ut(a).toLowerCase())}function M_(a){return a=Ut(a),a&&a.replace(q2,Ix).replace(ux,"")}function VA(a,u,h){a=Ut(a),u=gr(u);var E=a.length;h=h===n?E:Po(yt(h),0,E);var k=h;return h-=u.length,h>=0&&a.slice(h,k)==u}function HA(a){return a=Ut(a),a&&qn.test(a)?a.replace(pr,Mx):a}function qA(a){return a=Ut(a),a&&ss.test(a)?a.replace(Yi,"\\$&"):a}var WA=gs(function(a,u,h){return a+(h?"-":"")+u.toLowerCase()}),YA=gs(function(a,u,h){return a+(h?" ":"")+u.toLowerCase()}),KA=Fg("toLowerCase");function GA(a,u,h){a=Ut(a),u=yt(u);var E=u?us(a):0;if(!u||E>=u)return a;var k=(u-E)/2;return Xl(jl(k),h)+a+Xl(Ll(k),h)}function QA(a,u,h){a=Ut(a),u=yt(u);var E=u?us(a):0;return u&&E<u?a+Xl(u-E,h):a}function XA(a,u,h){a=Ut(a),u=yt(u);var E=u?us(a):0;return u&&E<u?Xl(u-E,h)+a:a}function JA(a,u,h){return h||u==null?u=0:u&&(u=+u),sT(Ut(a).replace(Ki,""),u||0)}function ZA(a,u,h){return(h?jn(a,u,h):u===n)?u=1:u=yt(u),Hd(Ut(a),u)}function eR(){var a=arguments,u=Ut(a[0]);return a.length<3?u:u.replace(a[1],a[2])}var tR=gs(function(a,u,h){return a+(h?"_":"")+u.toLowerCase()});function nR(a,u,h){return h&&typeof h!="number"&&jn(a,u,h)&&(u=h=n),h=h===n?ee:h>>>0,h?(a=Ut(a),a&&(typeof u=="string"||u!=null&&!hf(u))&&(u=gr(u),!u&&cs(a))?no(qr(a),0,h):a.split(u,h)):[]}var rR=gs(function(a,u,h){return a+(h?" ":"")+_f(u)});function iR(a,u,h){return a=Ut(a),h=h==null?0:Po(yt(h),0,a.length),u=gr(u),a.slice(h,h+u.length)==u}function oR(a,u,h){var E=$.templateSettings;h&&jn(a,u,h)&&(u=n),a=Ut(a),u=mf({},u,E,Vg);var k=mf({},u.imports,E.imports,Vg),I=gn(k),H=kd(k,I);mr(I,function(it){if(dv.test(it))throw new pt(c)});var te,ue,Ae=0,Re=u.interpolate||El,De="__p += '",Ve=$d((u.escape||El).source+"|"+Re.source+"|"+(Re===ko?U2:El).source+"|"+(u.evaluate||El).source+"|$","g"),Je="//# sourceURL="+(jt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mx+"]")+`
5
- `;a.replace(Ve,function(it,Tt,At,yr,Un,br){return At||(At=yr),De+=a.slice(Ae,br).replace(W2,Dx),Tt&&(te=!0,De+=`' +
6
- __e(`+Tt+`) +
7
- '`),Un&&(ue=!0,De+=`';
8
- `+Un+`;
9
- __p += '`),At&&(De+=`' +
10
- ((__t = (`+At+`)) == null ? '' : __t) +
11
- '`),Ae=br+it.length,it}),De+=`';
12
- `;var ct=jt.call(u,"variable")&&u.variable;if(!ct)De=`with (obj) {
13
- `+De+`
14
- }
15
- `;else if(dv.test(ct))throw new pt(l);De=(ue?De.replace(ke,""):De).replace(Ie,"$1").replace(Oe,"$1;"),De="function("+(ct||"obj")+`) {
16
- `+(ct?"":`obj || (obj = {});
17
- `)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ue?`, __j = Array.prototype.join;
18
- function print() { __p += __j.call(arguments, '') }
19
- `:`;
20
- `)+De+`return __p
21
- }`;var bt=F_(function(){return Lt(I,Je+"return "+De).apply(n,H)});if(bt.source=De,pf(bt))throw bt;return bt}function sR(a){return Ut(a).toLowerCase()}function aR(a){return Ut(a).toUpperCase()}function lR(a,u,h){if(a=Ut(a),a&&(h||u===n))return Hv(a);if(!a||!(u=gr(u)))return a;var E=qr(a),k=qr(u),I=qv(E,k),H=Wv(E,k)+1;return no(E,I,H).join("")}function cR(a,u,h){if(a=Ut(a),a&&(h||u===n))return a.slice(0,Kv(a)+1);if(!a||!(u=gr(u)))return a;var E=qr(a),k=Wv(E,qr(u))+1;return no(E,0,k).join("")}function uR(a,u,h){if(a=Ut(a),a&&(h||u===n))return a.replace(Ki,"");if(!a||!(u=gr(u)))return a;var E=qr(a),k=qv(E,qr(u));return no(E,k).join("")}function dR(a,u){var h=X,E=K;if(Xt(u)){var k="separator"in u?u.separator:k;h="length"in u?yt(u.length):h,E="omission"in u?gr(u.omission):E}a=Ut(a);var I=a.length;if(cs(a)){var H=qr(a);I=H.length}if(h>=I)return a;var te=h-us(E);if(te<1)return E;var ue=H?no(H,0,te).join(""):a.slice(0,te);if(k===n)return ue+E;if(H&&(te+=ue.length-te),hf(k)){if(a.slice(te).search(k)){var Ae,Re=ue;for(k.global||(k=$d(k.source,Ut(fv.exec(k))+"g")),k.lastIndex=0;Ae=k.exec(Re);)var De=Ae.index;ue=ue.slice(0,De===n?te:De)}}else if(a.indexOf(gr(k),te)!=te){var Ve=ue.lastIndexOf(k);Ve>-1&&(ue=ue.slice(0,Ve))}return ue+E}function fR(a){return a=Ut(a),a&&Fn.test(a)?a.replace(Ue,Bx):a}var pR=gs(function(a,u,h){return a+(h?" ":"")+u.toUpperCase()}),_f=Fg("toUpperCase");function D_(a,u,h){return a=Ut(a),u=h?n:u,u===n?Lx(a)?qx(a):Ox(a):a.match(u)||[]}var F_=wt(function(a,u){try{return hr(a,n,u)}catch(h){return pf(h)?h:new pt(h)}}),hR=$i(function(a,u){return mr(u,function(h){h=Yr(h),ui(a,h,df(a[h],a))}),a});function mR(a){var u=a==null?0:a.length,h=ot();return a=u?Qt(a,function(E){if(typeof E[1]!="function")throw new kr(s);return[h(E[0]),E[1]]}):[],wt(function(E){for(var k=-1;++k<u;){var I=a[k];if(hr(I[0],this,E))return hr(I[1],this,E)}})}function vR(a){return BT($r(a,v))}function yf(a){return function(){return a}}function gR(a,u){return a==null||a!==a?u:a}var _R=jg(),yR=jg(!0);function Gn(a){return a}function bf(a){return hg(typeof a=="function"?a:$r(a,v))}function bR(a){return vg($r(a,v))}function wR(a,u){return gg(a,$r(u,v))}var ER=wt(function(a,u){return function(h){return ha(h,a,u)}}),SR=wt(function(a,u){return function(h){return ha(a,h,u)}});function wf(a,u,h){var E=gn(u),k=Hl(u,E);h==null&&!(Xt(u)&&(k.length||!E.length))&&(h=u,u=a,a=this,k=Hl(u,gn(u)));var I=!(Xt(h)&&"chain"in h)||!!h.chain,H=Ri(a);return mr(k,function(te){var ue=u[te];a[te]=ue,H&&(a.prototype[te]=function(){var Ae=this.__chain__;if(I||Ae){var Re=a(this.__wrapped__),De=Re.__actions__=Wn(this.__actions__);return De.push({func:ue,args:arguments,thisArg:a}),Re.__chain__=Ae,Re}return ue.apply(a,Qi([this.value()],arguments))})}),a}function CR(){return wn._===this&&(wn._=Xx),this}function Ef(){}function xR(a){return a=yt(a),wt(function(u){return _g(u,a)})}var TR=Xd(Qt),kR=Xd(Uv),OR=Xd(Ed);function L_(a){return of(a)?Sd(Yr(a)):ok(a)}function $R(a){return function(u){return a==null?n:Io(a,u)}}var AR=Ng(),RR=Ng(!0);function Sf(){return[]}function Cf(){return!1}function PR(){return{}}function IR(){return""}function MR(){return!0}function DR(a,u){if(a=yt(a),a<1||a>j)return[];var h=ee,E=$n(a,ee);u=ot(u),a-=ee;for(var k=Td(E,u);++h<a;)u(h);return k}function FR(a){return vt(a)?Qt(a,Yr):_r(a)?[a]:Wn(n_(Ut(a)))}function LR(a){var u=++Gx;return Ut(a)+u}var jR=Ql(function(a,u){return a+u},0),UR=Jd("ceil"),NR=Ql(function(a,u){return a/u},1),zR=Jd("floor");function BR(a){return a&&a.length?Vl(a,Gn,Ld):n}function VR(a,u){return a&&a.length?Vl(a,ot(u,2),Ld):n}function HR(a){return Bv(a,Gn)}function qR(a,u){return Bv(a,ot(u,2))}function WR(a){return a&&a.length?Vl(a,Gn,zd):n}function YR(a,u){return a&&a.length?Vl(a,ot(u,2),zd):n}var KR=Ql(function(a,u){return a*u},1),GR=Jd("round"),QR=Ql(function(a,u){return a-u},0);function XR(a){return a&&a.length?xd(a,Gn):0}function JR(a,u){return a&&a.length?xd(a,ot(u,2)):0}return $.after=w$,$.ary=p_,$.assign=lA,$.assignIn=k_,$.assignInWith=O_,$.assignWith=mf,$.at=cA,$.before=h_,$.bind=df,$.bindAll=hR,$.bindKey=m_,$.castArray=I$,$.chain=u_,$.chunk=Bk,$.compact=Vk,$.concat=Hk,$.cond=mR,$.conforms=vR,$.constant=yf,$.countBy=JO,$.create=uA,$.curry=v_,$.curryRight=g_,$.debounce=__,$.defaults=dA,$.defaultsDeep=fA,$.defer=E$,$.delay=S$,$.difference=qk,$.differenceBy=Wk,$.differenceWith=Yk,$.drop=Kk,$.dropRight=Gk,$.dropRightWhile=Qk,$.dropWhile=Xk,$.fill=Jk,$.filter=e$,$.flatMap=r$,$.flatMapDeep=i$,$.flatMapDepth=o$,$.flatten=s_,$.flattenDeep=Zk,$.flattenDepth=eO,$.flip=C$,$.flow=_R,$.flowRight=yR,$.fromPairs=tO,$.functions=yA,$.functionsIn=bA,$.groupBy=s$,$.initial=rO,$.intersection=iO,$.intersectionBy=oO,$.intersectionWith=sO,$.invert=EA,$.invertBy=SA,$.invokeMap=l$,$.iteratee=bf,$.keyBy=c$,$.keys=gn,$.keysIn=Kn,$.map=rc,$.mapKeys=xA,$.mapValues=TA,$.matches=bR,$.matchesProperty=wR,$.memoize=oc,$.merge=kA,$.mergeWith=$_,$.method=ER,$.methodOf=SR,$.mixin=wf,$.negate=sc,$.nthArg=xR,$.omit=OA,$.omitBy=$A,$.once=x$,$.orderBy=u$,$.over=TR,$.overArgs=T$,$.overEvery=kR,$.overSome=OR,$.partial=ff,$.partialRight=y_,$.partition=d$,$.pick=AA,$.pickBy=A_,$.property=L_,$.propertyOf=$R,$.pull=uO,$.pullAll=l_,$.pullAllBy=dO,$.pullAllWith=fO,$.pullAt=pO,$.range=AR,$.rangeRight=RR,$.rearg=k$,$.reject=h$,$.remove=hO,$.rest=O$,$.reverse=cf,$.sampleSize=v$,$.set=PA,$.setWith=IA,$.shuffle=g$,$.slice=mO,$.sortBy=b$,$.sortedUniq=EO,$.sortedUniqBy=SO,$.split=nR,$.spread=$$,$.tail=CO,$.take=xO,$.takeRight=TO,$.takeRightWhile=kO,$.takeWhile=OO,$.tap=VO,$.throttle=A$,$.thru=nc,$.toArray=C_,$.toPairs=R_,$.toPairsIn=P_,$.toPath=FR,$.toPlainObject=T_,$.transform=MA,$.unary=R$,$.union=$O,$.unionBy=AO,$.unionWith=RO,$.uniq=PO,$.uniqBy=IO,$.uniqWith=MO,$.unset=DA,$.unzip=uf,$.unzipWith=c_,$.update=FA,$.updateWith=LA,$.values=bs,$.valuesIn=jA,$.without=DO,$.words=D_,$.wrap=P$,$.xor=FO,$.xorBy=LO,$.xorWith=jO,$.zip=UO,$.zipObject=NO,$.zipObjectDeep=zO,$.zipWith=BO,$.entries=R_,$.entriesIn=P_,$.extend=k_,$.extendWith=O_,wf($,$),$.add=jR,$.attempt=F_,$.camelCase=BA,$.capitalize=I_,$.ceil=UR,$.clamp=UA,$.clone=M$,$.cloneDeep=F$,$.cloneDeepWith=L$,$.cloneWith=D$,$.conformsTo=j$,$.deburr=M_,$.defaultTo=gR,$.divide=NR,$.endsWith=VA,$.eq=Kr,$.escape=HA,$.escapeRegExp=qA,$.every=ZO,$.find=t$,$.findIndex=i_,$.findKey=pA,$.findLast=n$,$.findLastIndex=o_,$.findLastKey=hA,$.floor=zR,$.forEach=d_,$.forEachRight=f_,$.forIn=mA,$.forInRight=vA,$.forOwn=gA,$.forOwnRight=_A,$.get=vf,$.gt=U$,$.gte=N$,$.has=wA,$.hasIn=gf,$.head=a_,$.identity=Gn,$.includes=a$,$.indexOf=nO,$.inRange=NA,$.invoke=CA,$.isArguments=Fo,$.isArray=vt,$.isArrayBuffer=z$,$.isArrayLike=Yn,$.isArrayLikeObject=rn,$.isBoolean=B$,$.isBuffer=ro,$.isDate=V$,$.isElement=H$,$.isEmpty=q$,$.isEqual=W$,$.isEqualWith=Y$,$.isError=pf,$.isFinite=K$,$.isFunction=Ri,$.isInteger=b_,$.isLength=ac,$.isMap=w_,$.isMatch=G$,$.isMatchWith=Q$,$.isNaN=X$,$.isNative=J$,$.isNil=eA,$.isNull=Z$,$.isNumber=E_,$.isObject=Xt,$.isObjectLike=tn,$.isPlainObject=ba,$.isRegExp=hf,$.isSafeInteger=tA,$.isSet=S_,$.isString=lc,$.isSymbol=_r,$.isTypedArray=ys,$.isUndefined=nA,$.isWeakMap=rA,$.isWeakSet=iA,$.join=aO,$.kebabCase=WA,$.last=Rr,$.lastIndexOf=lO,$.lowerCase=YA,$.lowerFirst=KA,$.lt=oA,$.lte=sA,$.max=BR,$.maxBy=VR,$.mean=HR,$.meanBy=qR,$.min=WR,$.minBy=YR,$.stubArray=Sf,$.stubFalse=Cf,$.stubObject=PR,$.stubString=IR,$.stubTrue=MR,$.multiply=KR,$.nth=cO,$.noConflict=CR,$.noop=Ef,$.now=ic,$.pad=GA,$.padEnd=QA,$.padStart=XA,$.parseInt=JA,$.random=zA,$.reduce=f$,$.reduceRight=p$,$.repeat=ZA,$.replace=eR,$.result=RA,$.round=GR,$.runInContext=ae,$.sample=m$,$.size=_$,$.snakeCase=tR,$.some=y$,$.sortedIndex=vO,$.sortedIndexBy=gO,$.sortedIndexOf=_O,$.sortedLastIndex=yO,$.sortedLastIndexBy=bO,$.sortedLastIndexOf=wO,$.startCase=rR,$.startsWith=iR,$.subtract=QR,$.sum=XR,$.sumBy=JR,$.template=oR,$.times=DR,$.toFinite=Pi,$.toInteger=yt,$.toLength=x_,$.toLower=sR,$.toNumber=Pr,$.toSafeInteger=aA,$.toString=Ut,$.toUpper=aR,$.trim=lR,$.trimEnd=cR,$.trimStart=uR,$.truncate=dR,$.unescape=fR,$.uniqueId=LR,$.upperCase=pR,$.upperFirst=_f,$.each=d_,$.eachRight=f_,$.first=a_,wf($,(function(){var a={};return di($,function(u,h){jt.call($.prototype,h)||(a[h]=u)}),a})(),{chain:!1}),$.VERSION=r,mr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){$[a].placeholder=$}),mr(["drop","take"],function(a,u){$t.prototype[a]=function(h){h=h===n?1:pn(yt(h),0);var E=this.__filtered__&&!u?new $t(this):this.clone();return E.__filtered__?E.__takeCount__=$n(h,E.__takeCount__):E.__views__.push({size:$n(h,ee),type:a+(E.__dir__<0?"Right":"")}),E},$t.prototype[a+"Right"]=function(h){return this.reverse()[a](h).reverse()}}),mr(["filter","map","takeWhile"],function(a,u){var h=u+1,E=h==ne||h==je;$t.prototype[a]=function(k){var I=this.clone();return I.__iteratees__.push({iteratee:ot(k,3),type:h}),I.__filtered__=I.__filtered__||E,I}}),mr(["head","last"],function(a,u){var h="take"+(u?"Right":"");$t.prototype[a]=function(){return this[h](1).value()[0]}}),mr(["initial","tail"],function(a,u){var h="drop"+(u?"":"Right");$t.prototype[a]=function(){return this.__filtered__?new $t(this):this[h](1)}}),$t.prototype.compact=function(){return this.filter(Gn)},$t.prototype.find=function(a){return this.filter(a).head()},$t.prototype.findLast=function(a){return this.reverse().find(a)},$t.prototype.invokeMap=wt(function(a,u){return typeof a=="function"?new $t(this):this.map(function(h){return ha(h,a,u)})}),$t.prototype.reject=function(a){return this.filter(sc(ot(a)))},$t.prototype.slice=function(a,u){a=yt(a);var h=this;return h.__filtered__&&(a>0||u<0)?new $t(h):(a<0?h=h.takeRight(-a):a&&(h=h.drop(a)),u!==n&&(u=yt(u),h=u<0?h.dropRight(-u):h.take(u-a)),h)},$t.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},$t.prototype.toArray=function(){return this.take(ee)},di($t.prototype,function(a,u){var h=/^(?:filter|find|map|reject)|While$/.test(u),E=/^(?:head|last)$/.test(u),k=$[E?"take"+(u=="last"?"Right":""):u],I=E||/^find/.test(u);k&&($.prototype[u]=function(){var H=this.__wrapped__,te=E?[1]:arguments,ue=H instanceof $t,Ae=te[0],Re=ue||vt(H),De=function(Tt){var At=k.apply($,Qi([Tt],te));return E&&Ve?At[0]:At};Re&&h&&typeof Ae=="function"&&Ae.length!=1&&(ue=Re=!1);var Ve=this.__chain__,Je=!!this.__actions__.length,ct=I&&!Ve,bt=ue&&!Je;if(!I&&Re){H=bt?H:new $t(this);var it=a.apply(H,te);return it.__actions__.push({func:nc,args:[De],thisArg:n}),new Or(it,Ve)}return ct&&bt?a.apply(this,te):(it=this.thru(De),ct?E?it.value()[0]:it.value():it)})}),mr(["pop","push","shift","sort","splice","unshift"],function(a){var u=Ol[a],h=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",E=/^(?:pop|shift)$/.test(a);$.prototype[a]=function(){var k=arguments;if(E&&!this.__chain__){var I=this.value();return u.apply(vt(I)?I:[],k)}return this[h](function(H){return u.apply(vt(H)?H:[],k)})}}),di($t.prototype,function(a,u){var h=$[u];if(h){var E=h.name+"";jt.call(hs,E)||(hs[E]=[]),hs[E].push({name:u,func:h})}}),hs[Gl(n,S).name]=[{name:"wrapper",func:n}],$t.prototype.clone=pT,$t.prototype.reverse=hT,$t.prototype.value=mT,$.prototype.at=HO,$.prototype.chain=qO,$.prototype.commit=WO,$.prototype.next=YO,$.prototype.plant=GO,$.prototype.reverse=QO,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=XO,$.prototype.first=$.prototype.head,aa&&($.prototype[aa]=KO),$}),ds=Wx();Oo?((Oo.exports=ds)._=ds,_d._=ds):wn._=ds}).call(hL)})(Bc,Bc.exports)),Bc.exports}var Xn=mL();function vL(e,t,n="_id"){const r=Xn.differenceBy(e,t,n).filter(Boolean),i=Xn.differenceBy(t,e,n).filter(Boolean),o=Xn.intersectionWith(e,t,(s,l)=>s[n]===l[n]&&!Xn.isEqual(s,l));return{addedItems:r,deletedItems:i,modifiedItems:o}}const Aie=Object.freeze(Object.defineProperty({__proto__:null,findChangedArrayItems:vL},Symbol.toStringTag,{value:"Module"}));function Vh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gL(e,t){if(!t?.trim())return[{text:e,isMatch:!1}];const n=new RegExp(`(${Vh(t)})`,"gi");return e.split(n).map(r=>({text:r,isMatch:n.test(r)&&r.toLowerCase()===t.toLowerCase()}))}function _L(e,t,n="hl"){if(!t?.trim())return e;const r=Vh(t.trim());return e.replace(new RegExp(`(${r})`,"gi"),`<mark class="${n}">$1</mark>`)}function yL(e,t){const n=t?.trim().toLowerCase();return n?e.findIndex(r=>r.toLowerCase().includes(n)):-1}const M1=e=>e.replace(/[/\\]/g,"/"),bL=(e,t="/")=>e.replace(/[\\/]+/g,t);function wL(){return"#"+Xn.random(0,16777215).toString(16).padStart(6,"0")}const EL=e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e),D1=e=>e.replace(/[-_]([a-z])/g,(t,n)=>n.toUpperCase()).replace(/^[A-Z]/,t=>t.toLowerCase()),Lp=e=>{if(Array.isArray(e))return e.map(n=>Lp(n));if(e===null||typeof e!="object")return e;const t={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=D1(n);t[r]=Lp(e[n])}return t};function SL(e){return/(^[A-Z][a-z][a-zA-Z0-9]*$)|(^[a-z]+(-[a-z0-9]+)+$)/.test(e.trim())}function CL(e){if(e<=0)throw new Error("长度必须大于0");let t="";for(;t.length<e;){const n=Math.floor(Math.random()*10);t.length===0&&n===0||(t+=n)}return t}function F1(e){if(e==null)return{valid:!1,reason:"validateHash.empty"};if(typeof e!="string")return{valid:!1,reason:"validateHash.notString",reasonParams:{type:typeof e}};const t=e.startsWith("#")?e.slice(1):e;if(t.length===0)return{valid:!1,reason:"validateHash.contentEmpty"};if(/^\d/.test(t))return{valid:!1,reason:"validateHash.startsWithNumber",reasonParams:{char:t[0]}};const n=t.match(/[^\p{L}\p{N}_\-() ]/u);if(n){const r=n[0],i=r.charCodeAt(0);return r==="`"?{valid:!1,reason:"validateHash.invalidCharBacktick"}:r===`
22
- `?{valid:!1,reason:"validateHash.invalidCharNewline"}:r==="\r"?{valid:!1,reason:"validateHash.invalidCharCarriageReturn"}:r===" "?{valid:!1,reason:"validateHash.invalidCharTab"}:r==="\f"?{valid:!1,reason:"validateHash.invalidCharFormFeed"}:r==="\v"?{valid:!1,reason:"validateHash.invalidCharVerticalTab"}:r==="#"?{valid:!1,reason:"validateHash.invalidCharHash"}:/[<>\\"'&]/.test(r)?{valid:!1,reason:"validateHash.invalidCharHtmlSpecial",reasonParams:{char:r}}:{valid:!1,reason:"validateHash.invalidCharUnknown",reasonParams:{char:r,code:i.toString(16).toUpperCase().padStart(4,"0")}}}return{valid:!0,normalized:t}}function xL(e){return F1(e).valid}function TL(e){return!e||!Array.isArray(e)?[]:[...new Set(e.map(t=>(t||"").trim().toLowerCase()).filter(Boolean))]}function kL(e){if(!e||e.length===0)return{valid:!0};if(e.length>5)return{valid:!1,error:"tagsMaxCount"};for(const t of e){if(!t)return{valid:!1,error:"tagsEmpty"};if(t.length>20)return{valid:!1,error:"tagsTooLong",tag:t};if(!/^[一-龥a-zA-Z0-9\-_]+$/.test(t))return{valid:!1,error:"tagsInvalidChars",tag:t}}return{valid:!0}}const Rie=Object.freeze(Object.defineProperty({__proto__:null,convertKeysToCamelCase:Lp,escapeRegExp:Vh,findKeywordLineIndex:yL,generateNumberString:CL,highlightText:_L,isEmail:EL,isValidHash:xL,normalizeTags:TL,randomColor:wL,replaceBackslashWithSlash:M1,replaceSlashWithSpecifiedSeparator:bL,splitTextByKeyword:gL,toCamelCase:D1,validateCompName:SL,validateHash:F1,validateTags:kL},Symbol.toStringTag,{value:"Module"}));function OL(e,t){if(!e||!t.length)throw new Error("组件路径或入口路径为空");const[n]=t.slice(-1);if(!n)throw new Error("入口路径最后一项无效");const r=M1(n);return`${e.replace(mn.FILE_MANAGER_DIRNAME,"")}${r}`}function $L(e){const t={};return e.forEach(n=>{n?.parent?t[n?.parent?.name]=n?.parent?.version:t[n.name]=n.version}),Object.entries(t).map(([n,r])=>({name:n,version:r}))}const Pie=Object.freeze(Object.defineProperty({__proto__:null,getPreviewUrl:OL,handleDepData:$L},Symbol.toStringTag,{value:"Module"})),AL=e=>`Bearer ${e}`,RL=e=>e.replace("Bearer ",""),Lo=Object.freeze(Object.defineProperty({__proto__:null,extractBearerToken:RL,generateBearerToken:AL},Symbol.toStringTag,{value:"Module"}));function PL(e,t,n={}){const{idKey:r="id",childrenKey:i="children"}=n,o=Array.isArray(e)?e:[e],s=[];let l=!1;const c=f=>{const p=f[i];Array.isArray(p)&&(s.push(...p),p.forEach(v=>c(v)))},d=f=>{if(l)return!0;for(const p of f){if(p?.[r]===t)return l=!0,c(p),!0;const v=p?.[i];if(Array.isArray(v)&&v.length>0&&d(v))return!0}return!1};return d(o),s}function L1(e,t){const n=JSON.parse(JSON.stringify(e));return n.children?.length&&(n.children=n.children.map(r=>L1(r,t))),t(n)}function IL(e,t,n={}){const{idKey:r="id",childrenKey:i="children"}=n,o=Array.isArray(e)?e:[e],s=c=>{const{[i]:d,...f}=c;return f},l=(c,d)=>{for(const f of c){if(f[r]===t)return[s(f),...d];const p=f[i];if(Array.isArray(p)&&p.length>0){const v=l(p,[s(f),...d]);if(v)return v}}return null};return l(o,[])??[]}function ML(e,t){const{createNode:n,pathSeparator:r="/",skipInvalid:i=!0}=t,o=new Map,s=r,l=n("directory","",s);l.children=[],o.set(s,l);const c=f=>{let p=f.replace(/\\/g,"/");return p=p.replace(/^\.\//,""),p=p.replace(/^\/+|\/+$/g,""),p.replace(/\//g,r)};for(const f of e){const p=c(f.path);if(!p)continue;const v=p.split(r).filter(Boolean);if(v.length===0)continue;let y=s,g="";for(let S=0;S<v.length-1;S++){const O=v[S];if(g=g?`${g}${r}${O}`:O,!o.has(g)){const T=n("directory",O,g);T.children=[],o.set(g,T),o.get(y)?.children?.push(T)}y=g}const m=v[v.length-1];if(!m){if(!i)throw new Error(`无效路径: ${f.path}`);continue}const b=g?`${g}${r}${m}`:m,x=n("file",m,b);o.get(y)?.children?.push(x)}const d=f=>{f.sort((p,v)=>p.type!==v.type?p.type==="directory"?-1:1:p.name.localeCompare(v.name)),f.forEach(p=>p.children?.length&&d(p.children))};return l.children?.length&&d(l.children),l}const Iie=Object.freeze(Object.defineProperty({__proto__:null,convertFlatToTree:ML,findTreeNodePathToRoot:IL,getTreeAllChildren:PL,mapTree:L1},Symbol.toStringTag,{value:"Module"}));var j1=(e=>(e.Added="added",e.Deleted="deleted",e.Unchanged="unchanged",e.Changed="modified",e))(j1||{}),U1=(e=>(e.Directory="directory",e.File="file",e))(U1||{});function N1(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}function cu(e,t){for(const n of e)t.set(n.path,n),n.type==="directory"&&n.children?.length&&cu(n.children,t)}function Py(e){const t=new Map;return cu(e,t),t}function Hh(e,t){const n=[];for(const r of e)if(!t.has(r.path)){const i=N1(r);i.status="deleted",r.type==="directory"&&r.children?.length&&(i.children=Hh(r.children,t)),n.push(i)}return n}function DL(e,t,n){return n?n(e,t):e.hash&&t.hash?e.hash===t.hash:!0}function Vc(e,t,n,r){return e.map(i=>{const o=N1(i),s=t.get(i.path);if(s){if(i.type==="file"){const l=DL(s,i,r?.contentCompare);o.status=l?"unchanged":"modified"}else o.status="unchanged";if(i.type==="directory"&&i.children&&s.children){const l=Py(s.children),c=Vc(i.children,l,n,r),d=Py(c),f=Hh(s.children,d);o.children=[...c,...f]}else i.type==="directory"&&i.children&&(o.children=Vc(i.children,new Map,"added",r))}else o.status=n,i.type==="directory"&&i.children?.length&&(o.children=Vc(i.children,new Map,n,r));return o.type==="directory"&&qh(o),o})}function qh(e){if(e.type!=="directory"||!e.children?.length)return;for(const n of e.children)n.type==="directory"&&qh(n);if(e.status==="added"||e.status==="deleted")return;const t=e.children.some(n=>n.status==="added"||n.status==="deleted"||n.status==="modified");e.status=t?"modified":"unchanged"}function z1(e){const t=[...e].sort((n,r)=>n.type!==r.type?n.type==="directory"?-1:1:n.name.localeCompare(r.name));for(const n of t)n.type==="directory"&&n.children?.length&&(n.children=z1(n.children));return t}function FL(e,t,n){const r=new Map,i=new Map;cu(t,r),cu(e,i);const o=Vc(e,r,"added",n),s=Hh(t,i),l=[...o,...s],c=n?.skipSort?l:z1(l);for(const d of c)d.type==="directory"&&qh(d);return c}const Mie=Object.freeze(Object.defineProperty({__proto__:null,NodeStatus:j1,NodeType:U1,mergeAndMarkTree:FL},Symbol.toStringTag,{value:"Module"})),LL=(e,t)=>{const n=Array.isArray(t)?t:[t];let r;return Xn.isString(e)?r="string":Xn.isNumber(e)?r="number":Xn.isBoolean(e)?r="boolean":Xn.isArray(e)?r="array":Xn.isFunction(e)?r="function":Xn.isSymbol(e)?r="symbol":Xn.isNull(e)?r="null":Xn.isUndefined(e)?r="undefined":Xn.isObject(e)?r="object":r="undefined",n.includes(r)},Die=Object.freeze(Object.defineProperty({__proto__:null,isType:LL},Symbol.toStringTag,{value:"Module"})),Iy=/^[\^~>=<]+/,B1=/^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9.]+))?(?:\+([a-zA-Z0-9.]+))?$/;function jL(e){return B1.test(e)}function bi(e){if(!e||typeof e!="string")throw new Error(`Invalid version string: ${e}`);const t=e.match(Iy),n=t?t[0]:"",r=e.replace(Iy,"").match(B1);if(!r)throw new Error(`Invalid semver format: ${e}`);const[,i="0",o="0",s="0",l]=r,c=parseInt(i,10),d=parseInt(o,10),f=parseInt(s,10);return{raw:e,prefix:n,major:c,minor:d,patch:f,prerelease:l||null,majorVersion:i,version:`${c}.${d}.${f}`}}function UL(e,t){const n=bi(e),r=bi(t);return n.major===r.major&&n.minor===r.minor&&n.patch===r.patch}function NL(e){return bi(e).majorVersion}function zL(e){const t={};for(const[n,r]of Object.entries(e))try{t[n]=bi(r)}catch(i){console.warn(`Failed to parse version for ${n}: ${r}`,i)}return t}function ks(e,t){const n=bi(e),r=bi(t),{VERSION_COMPARE_SAME:i,VERSION_COMPARE_LESS:o,VERSION_COMPARE_GREATER:s}=mn;return n.major!==r.major?n.major>r.major?s:o:n.minor!==r.minor?n.minor>r.minor?s:o:n.patch!==r.patch?n.patch>r.patch?s:o:i}function BL(e,t){const n=bi(e),r=bi(t);switch(r.prefix){case"^":return n.major===r.major;case"~":return n.major===r.major&&n.minor===r.minor;case">=":return ks(e,t.replace(">=",""))>=0;case">":return ks(e,t.replace(">",""))>0;case"<=":return ks(e,t.replace("<=",""))<=0;case"<":return ks(e,t.replace("<",""))<0;case"=":case"":return ks(e,t.replace("=",""))===0;default:return!1}}function VL(e){if(!e||typeof e!="string")throw new Error("版本号必须是非空字符串");const t=bi(e),n=(l,c)=>{if(l<0||l>999)throw new Error(`版本号${c}位必须在 0-999 之间,当前值:${l}(原始输入:${e})`);return l},r=n(t.major,"主版本"),i=n(t.minor,"次版本"),o=n(t.patch,"补丁版本"),s=r*1e6+i*1e3+o;if(!Number.isSafeInteger(s))throw new Error(`版本号转换后超出 JavaScript 安全整数范围,结果:${s}(原始输入:${e})`);return s}const Fie=Object.freeze(Object.defineProperty({__proto__:null,compareVersions:ks,getMajorVersion:NL,isVersionEqual:UL,parseDependencies:zL,parseVersion:bi,satisfiesRange:BL,validateVersion:jL,versionToNumber:VL},Symbol.toStringTag,{value:"Module"})),HL={};function qL(e,t){return C(),Ee(Tw,{name:"transition-fade",mode:"out-in",appear:""},{default:Le(()=>[mt(e.$slots,"default")]),_:3})}const WL=Uh(HL,[["render",qL]]),YL={key:0,class:"fixed top-0 left-0 w-screen bg-[rgb(94,9,11)] text-white font-sans z-[99999] break-all overflow-auto max-h-[50vh] p-[10px] box-border"},KL={class:"clear-both"},GL={class:"whitespace-pre-wrap m-0"},QL={key:0},XL={class:"whitespace-pre-wrap m-0"},JL=ze({__name:"ErrorOverlay",props:{errors:{}},setup(e){const t=re(!1),n=e,r=()=>{t.value=!1};return He(()=>n.errors,i=>{t.value=i.length>0},{immediate:!0,deep:!0}),(i,o)=>t.value?(C(),R("div",YL,[_("button",{class:"sticky top-[10px] right-[10px] float-right bg-white/20 border-none text-white text-lg cursor-pointer w-[30px] h-[30px] rounded-full flex items-center justify-center p-0 ml-[10px] transition-colors duration-200 hover:bg-white/30",onClick:r}," × "),_("div",KL,[(C(!0),R(We,null,ut(e.errors,(s,l)=>(C(),R("div",{key:l,class:"mb-5"},[_("pre",GL,q(s?.message||s),1),s?.stack?(C(),R("div",QL,[_("pre",XL,q(s.stack),1)])):Se("",!0)]))),128))])])):Se("",!0)}}),ZL=ze({__name:"index",props:kw({config:{}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Ja(),n=e,r=se(()=>{const f={};return n.config?.column?.forEach(p=>{f[p.prop]=p.value}),f}),i=Ph(e,"modelValue"),o=Ih();async function s(){o?.onRefresh?.()}async function l(){n.config?.column?.forEach(f=>{f.value=""}),await gt(),o?.onReset?.()}function c(f){return f??!0}function d(){o?.onSearch?.()}return zn(()=>{i.value=r.value}),(f,p)=>{const v=ft("Icon");return C(),Ee(w(Ap),{inline:!0,onSubmit:p[3]||(p[3]=ht(()=>{},["prevent"])),onKeyup:p[4]||(p[4]=Lr(y=>d(),["enter"]))},{default:Le(()=>[(C(!0),R(We,null,ut(e.config?.column||[],(y,g)=>(C(),Ee(w(N_),{key:g,label:w(y.label)??""},{default:Le(()=>[c(y.useVModel)?(C(),Ee(Pn(y.component),Ot({key:1,modelValue:y.value,"onUpdate:modelValue":m=>y.value=m},{ref_for:!0},y?.attributes||{},ni(y?.events||{})),null,16,["modelValue","onUpdate:modelValue"])):(C(),Ee(Pn(y.component),Ot({key:0,"model-value":y.value},{ref_for:!0},y?.attributes||{},ni(y?.events||{})),null,16,["model-value"]))]),_:2},1032,["label"]))),128)),e.config?.column?.length?(C(),Ee(w(N_),{key:0},{default:Le(()=>[Z(w(Is),{type:"success",onClick:p[0]||(p[0]=y=>d())},{default:Le(()=>[Et(q(w(t)("common.search")),1)]),_:1}),Z(w(Is),{type:"primary",onClick:p[1]||(p[1]=y=>l())},{default:Le(()=>[Et(q(w(t)("common.reset")),1)]),_:1}),Z(w(Is),{onClick:p[2]||(p[2]=y=>s())},{default:Le(()=>[Z(v,{icon:"material-symbols:refresh-rounded"})]),_:1})]),_:1})):Se("",!0)]),_:1})}}}),e4={key:0},t4={ref:"tableContainer",class:"flex-1 overflow-hidden"},n4={key:1,class:"mt-2"},r4=ze({__name:"index",props:{tableConfig:{}},setup(e,{expose:t}){const n=Ih(),r=e,i=_i("tableContainer"),o=_i("table"),{height:s}=jh(i),l=ZR(),c=se(()=>{if(r.tableConfig?.pagination?.getPageSize||r.tableConfig?.pagination?.setPageSize)return{get:r.tableConfig.pagination.getPageSize,set:r.tableConfig.pagination.setPageSize};const J=o4().paginationStorage;return J?{get:()=>{const j=J.get();return j?Number(j):10},set:j=>J.set(String(j))}:null}),d=re(c.value?.get?.()??10),f=re(!1),p=re(1),v=re(W()),y=re("UNKNOWN"),g=se(()=>Object.keys(l)),m=se(()=>r.tableConfig.size??"default"),b=se(()=>r.tableConfig?.fixedHeight??!0),x=se(()=>b.value?Math.max(s.value,100):"auto"),S=se(()=>r.tableConfig?.autoLoading??!0),O=se(()=>({"--pagination-location":r.tableConfig?.pagination?.location||"center"})),T=se(()=>r.tableConfig?.isPagination??!0),A=se(()=>r.tableConfig?.paginationMap?r.tableConfig.paginationMap:{page:"page",pageSize:"pageSize"}),M=se(()=>({[A.value.page]:p.value,[A.value.pageSize]:d.value})),z=se(()=>({background:!0,pageSizes:[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",...r.tableConfig?.pagination?.attributes,total:r.tableConfig?.pagination?.total||0,pageSize:d.value,currentPage:p.value})),Y=se(()=>({...M.value,...v.value})),ve=se(()=>r.tableConfig?.search?.column.filter(J=>J.autoQuery??!0).map(J=>J.prop));function W(){const J={};return r.tableConfig?.search?.column?.forEach(j=>{J[j.prop]=j.value}),J}async function X(){y.value!=="NOT_CHANGE"&&(S.value&&(f.value=!0),r.tableConfig?.fetchData?.(Y.value)?.finally(()=>{y.value="NOT_CHANGE",f.value=!1}))}async function K(){await X()}async function L(){y.value="UNKNOWN",await X()}async function D(){p.value=1,y.value!=="AUTO_QUERY"&&await X()}async function ne(J){p.value=1,d.value=J}async function le(J){p.value=J}function je(){y.value="UNKNOWN",X()}return He(()=>JSON.stringify(v.value),(J,j)=>{y.value="UNKNOWN";const de=JSON.parse(J??"{}"),U=JSON.parse(j??"{}"),ee=Object.keys(de),Q=Object.keys(U);let B=[];ee.length===Q.length?B=Object.keys(de).filter(oe=>de[oe]!==U[oe]):B=mP(ee,Q),ve.value?.length&&vP(B,[...ve.value]).length&&(y.value="AUTO_QUERY",X())}),He(()=>JSON.stringify(M.value),()=>{y.value="UNKNOWN",X()}),zn(()=>{c.value?.set?.(d.value)}),xt(()=>{X()}),t({getTableRef:()=>o.value,forceRefreshData:je}),(J,j)=>{const de=Rw;return Ct((C(),R("div",{class:"w-full h-full flex flex-col overflow-hidden",style:an(O.value)},[e.tableConfig.search?(C(),R("div",e4,[mt(J.$slots,"search",{},()=>[Z(ZL,{modelValue:v.value,"onUpdate:modelValue":j[0]||(j[0]=U=>v.value=U),config:e.tableConfig.search,size:m.value,onSearch:K,onRefresh:L,onReset:D},null,8,["modelValue","config","size"])],!0)])):Se("",!0),mt(J.$slots,"tableBefore",{},void 0,!0),_("div",t4,[mt(J.$slots,"table",{},()=>[Z(w(pP),Ot({ref:"table",size:m.value,data:e.tableConfig.data,height:x.value},w(n)),Ow({default:Le(()=>[(C(!0),R(We,null,ut(e.tableConfig.column,(U,ee)=>(C(),R(We,null,[U.slot?mt(J.$slots,U.slot,{col:U,index:ee},void 0,!0,0):(C(),Ee(w(fP),Ot({key:`default-${ee}`},{ref_for:!0},U),null,16))],64))),256))]),_:2},[ut(g.value,U=>({name:U,fn:Le(ee=>[mt(J.$slots,U,ii(Vi(ee)),void 0,!0)])}))]),1040,["size","data","height"])],!0)],512),T.value?(C(),R("div",n4,[mt(J.$slots,"pagination",{},()=>[Z(w(hP),Ot({size:m.value},z.value,{onSizeChange:ne,onCurrentChange:le},ni(e.tableConfig?.pagination?.events||{})),null,16,["size"])],!0)])):Se("",!0)],4)),[[de,f.value]])}}}),i4=Uh(r4,[["__scopeId","data-v-ce25225b"]]);let jp={};const o4=()=>jp,s4={install(e,t){t&&(jp={...jp,...t}),e.component("BaseTable",i4)}},a4={class:"overflow-hidden size-full"},l4=ze({__name:"Main",setup(e){const t=tl(),n=new Map,r=se(()=>t.visitedViews.map(s=>i(s)));function i(s){const{path:l}=s,{[mn.ROUTE_STATE_KEY_VERSION]:c}=s.query;return c?`${l}?${mn.ROUTE_STATE_KEY_VERSION}=${c}`:l}function o(s,l){const c=i(l);if(!n.has(c)){const d=ze({name:c,setup(){return()=>Ia(s)}});n.set(c,d)}return n.get(c)}return He(()=>r.value,(s,l)=>{const c=l.filter(d=>!s.includes(d));c.length&&n.delete(c[0])},{deep:!0}),(s,l)=>{const c=ft("router-view");return C(),R("div",a4,[Z(c,null,{default:Le(({Component:d,route:f})=>[Z(w(WL),null,{default:Le(()=>[(C(),Ee(eP,{include:r.value},[(C(),Ee(Pn(o(d,f))))],1032,["include"]))]),_:2},1024)]),_:1})])}}});var $f,My;function c4(){if(My)return $f;My=1;function e(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function t(i,o){for(var s="",l=0,c=-1,d=0,f,p=0;p<=i.length;++p){if(p<i.length)f=i.charCodeAt(p);else{if(f===47)break;f=47}if(f===47){if(!(c===p-1||d===1))if(c!==p-1&&d===2){if(s.length<2||l!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var v=s.lastIndexOf("/");if(v!==s.length-1){v===-1?(s="",l=0):(s=s.slice(0,v),l=s.length-1-s.lastIndexOf("/")),c=p,d=0;continue}}else if(s.length===2||s.length===1){s="",l=0,c=p,d=0;continue}}o&&(s.length>0?s+="/..":s="..",l=2)}else s.length>0?s+="/"+i.slice(c+1,p):s=i.slice(c+1,p),l=p-c-1;c=p,d=0}else f===46&&d!==-1?++d:d=-1}return s}function n(i,o){var s=o.dir||o.root,l=o.base||(o.name||"")+(o.ext||"");return s?s===o.root?s+l:s+i+l:l}var r={resolve:function(){for(var o="",s=!1,l,c=arguments.length-1;c>=-1&&!s;c--){var d;c>=0?d=arguments[c]:(l===void 0&&(l=process.cwd()),d=l),e(d),d.length!==0&&(o=d+"/"+o,s=d.charCodeAt(0)===47)}return o=t(o,!s),s?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(e(o),o.length===0)return".";var s=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return o=t(o,!s),o.length===0&&!s&&(o="."),o.length>0&&l&&(o+="/"),s?"/"+o:o},isAbsolute:function(o){return e(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,s=0;s<arguments.length;++s){var l=arguments[s];e(l),l.length>0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":r.normalize(o)},relative:function(o,s){if(e(o),e(s),o===s||(o=r.resolve(o),s=r.resolve(s),o===s))return"";for(var l=1;l<o.length&&o.charCodeAt(l)===47;++l);for(var c=o.length,d=c-l,f=1;f<s.length&&s.charCodeAt(f)===47;++f);for(var p=s.length,v=p-f,y=d<v?d:v,g=-1,m=0;m<=y;++m){if(m===y){if(v>y){if(s.charCodeAt(f+m)===47)return s.slice(f+m+1);if(m===0)return s.slice(f+m)}else d>y&&(o.charCodeAt(l+m)===47?g=m:m===0&&(g=0));break}var b=o.charCodeAt(l+m),x=s.charCodeAt(f+m);if(b!==x)break;b===47&&(g=m)}var S="";for(m=l+g+1;m<=c;++m)(m===c||o.charCodeAt(m)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+s.slice(f+g):(f+=g,s.charCodeAt(f)===47&&++f,s.slice(f))},_makeLong:function(o){return o},dirname:function(o){if(e(o),o.length===0)return".";for(var s=o.charCodeAt(0),l=s===47,c=-1,d=!0,f=o.length-1;f>=1;--f)if(s=o.charCodeAt(f),s===47){if(!d){c=f;break}}else d=!1;return c===-1?l?"/":".":l&&c===1?"//":o.slice(0,c)},basename:function(o,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');e(o);var l=0,c=-1,d=!0,f;if(s!==void 0&&s.length>0&&s.length<=o.length){if(s.length===o.length&&s===o)return"";var p=s.length-1,v=-1;for(f=o.length-1;f>=0;--f){var y=o.charCodeAt(f);if(y===47){if(!d){l=f+1;break}}else v===-1&&(d=!1,v=f+1),p>=0&&(y===s.charCodeAt(p)?--p===-1&&(c=f):(p=-1,c=v))}return l===c?c=v:c===-1&&(c=o.length),o.slice(l,c)}else{for(f=o.length-1;f>=0;--f)if(o.charCodeAt(f)===47){if(!d){l=f+1;break}}else c===-1&&(d=!1,c=f+1);return c===-1?"":o.slice(l,c)}},extname:function(o){e(o);for(var s=-1,l=0,c=-1,d=!0,f=0,p=o.length-1;p>=0;--p){var v=o.charCodeAt(p);if(v===47){if(!d){l=p+1;break}continue}c===-1&&(d=!1,c=p+1),v===46?s===-1?s=p:f!==1&&(f=1):s!==-1&&(f=-1)}return s===-1||c===-1||f===0||f===1&&s===c-1&&s===l+1?"":o.slice(s,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return n("/",o)},parse:function(o){e(o);var s={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return s;var l=o.charCodeAt(0),c=l===47,d;c?(s.root="/",d=1):d=0;for(var f=-1,p=0,v=-1,y=!0,g=o.length-1,m=0;g>=d;--g){if(l=o.charCodeAt(g),l===47){if(!y){p=g+1;break}continue}v===-1&&(y=!1,v=g+1),l===46?f===-1?f=g:m!==1&&(m=1):f!==-1&&(m=-1)}return f===-1||v===-1||m===0||m===1&&f===v-1&&f===p+1?v!==-1&&(p===0&&c?s.base=s.name=o.slice(1,v):s.base=s.name=o.slice(p,v)):(p===0&&c?(s.name=o.slice(1,f),s.base=o.slice(1,v)):(s.name=o.slice(p,f),s.base=o.slice(p,v)),s.ext=o.slice(f,v)),p>0?s.dir=o.slice(0,p-1):c&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,$f=r,$f}var u4=c4();const d4=rs(u4);function Wh(){const{t:e}=Ja();return{getTitle:n=>n?n.includes(".")&&!n.startsWith("http")?e(n):n:""}}const f4={class:"truncate"},p4=ze({__name:"MenuItem",props:{route:{},fullPath:{}},setup(e){const{getTitle:t}=Wh(),n=Cu(),r=e;function i(){n.push({path:r.fullPath})}return(o,s)=>{const l=Ma,c=gP;return C(),R("span",{onClick:i},[Z(c,{index:e.fullPath},{title:Le(()=>[_("span",f4,q(w(t)(e.route.meta?.title)),1)]),default:Le(()=>[Z(l,null,{default:Le(()=>[(C(),Ee(Pn(e.route.meta?.icon)))]),_:1})]),_:1},8,["index"])])}}});function V1(e,t){return function(){return e.apply(t,arguments)}}const{toString:h4}=Object.prototype,{getPrototypeOf:Ou}=Object,{iterator:$u,toStringTag:H1}=Symbol,Au=(e=>t=>{const n=h4.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),si=e=>(e=e.toLowerCase(),t=>Au(t)===e),Ru=e=>t=>typeof t===e,{isArray:ea}=Array,zs=Ru("undefined");function nl(e){return e!==null&&!zs(e)&&e.constructor!==null&&!zs(e.constructor)&&rr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const q1=si("ArrayBuffer");function m4(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&q1(e.buffer),t}const v4=Ru("string"),rr=Ru("function"),W1=Ru("number"),rl=e=>e!==null&&typeof e=="object",g4=e=>e===!0||e===!1,Hc=e=>{if(Au(e)!=="object")return!1;const t=Ou(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(H1 in e)&&!($u in e)},_4=e=>{if(!rl(e)||nl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},y4=si("Date"),b4=si("File"),w4=e=>!!(e&&typeof e.uri<"u"),E4=e=>e&&typeof e.getParts<"u",S4=si("Blob"),C4=si("FileList"),x4=e=>rl(e)&&rr(e.pipe);function T4(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Dy=T4(),Fy=typeof Dy.FormData<"u"?Dy.FormData:void 0,k4=e=>{if(!e)return!1;if(Fy&&e instanceof Fy)return!0;const t=Ou(e);if(!t||t===Object.prototype||!rr(e.append))return!1;const n=Au(e);return n==="formdata"||n==="object"&&rr(e.toString)&&e.toString()==="[object FormData]"},O4=si("URLSearchParams"),[$4,A4,R4,P4]=["ReadableStream","Request","Response","Headers"].map(si),I4=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function il(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ea(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(nl(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let l;for(r=0;r<s;r++)l=o[r],t.call(null,e[l],l,e)}}function Y1(e,t){if(nl(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,K1=e=>!zs(e)&&e!==Vo;function Up(){const{caseless:e,skipUndefined:t}=K1(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&Y1(n,o)||o;Hc(n[s])&&Hc(i)?n[s]=Up(n[s],i):Hc(i)?n[s]=Up({},i):ea(i)?n[s]=i.slice():(!t||!zs(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&il(arguments[i],r);return n}const M4=(e,t,n,{allOwnKeys:r}={})=>(il(t,(i,o)=>{n&&rr(i)?Object.defineProperty(e,o,{value:V1(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),D4=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F4=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},L4=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Ou(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},j4=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},U4=e=>{if(!e)return null;if(ea(e))return e;let t=e.length;if(!W1(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},N4=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ou(Uint8Array)),z4=(e,t)=>{const n=(e&&e[$u]).call(e);let r;for(;(r=n.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},B4=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},V4=si("HTMLFormElement"),H4=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),Ly=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),q4=si("RegExp"),G1=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};il(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},W4=e=>{G1(e,(t,n)=>{if(rr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(rr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Y4=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ea(e)?r(e):r(String(e).split(t)),n},K4=()=>{},G4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Q4(e){return!!(e&&rr(e.append)&&e[H1]==="FormData"&&e[$u])}const X4=e=>{const t=new Array(10),n=(r,i)=>{if(rl(r)){if(t.indexOf(r)>=0)return;if(nl(r))return r;if(!("toJSON"in r)){t[i]=r;const o=ea(r)?[]:{};return il(r,(s,l)=>{const c=n(s,i+1);!zs(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},J4=si("AsyncFunction"),Z4=e=>e&&(rl(e)||rr(e))&&rr(e.then)&&rr(e.catch),Q1=((e,t)=>e?setImmediate:t?((n,r)=>(Vo.addEventListener("message",({source:i,data:o})=>{i===Vo&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Vo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",rr(Vo.postMessage)),e5=typeof queueMicrotask<"u"?queueMicrotask.bind(Vo):typeof process<"u"&&process.nextTick||Q1,t5=e=>e!=null&&rr(e[$u]),he={isArray:ea,isArrayBuffer:q1,isBuffer:nl,isFormData:k4,isArrayBufferView:m4,isString:v4,isNumber:W1,isBoolean:g4,isObject:rl,isPlainObject:Hc,isEmptyObject:_4,isReadableStream:$4,isRequest:A4,isResponse:R4,isHeaders:P4,isUndefined:zs,isDate:y4,isFile:b4,isReactNativeBlob:w4,isReactNative:E4,isBlob:S4,isRegExp:q4,isFunction:rr,isStream:x4,isURLSearchParams:O4,isTypedArray:N4,isFileList:C4,forEach:il,merge:Up,extend:M4,trim:I4,stripBOM:D4,inherits:F4,toFlatObject:L4,kindOf:Au,kindOfTest:si,endsWith:j4,toArray:U4,forEachEntry:z4,matchAll:B4,isHTMLForm:V4,hasOwnProperty:Ly,hasOwnProp:Ly,reduceDescriptors:G1,freezeMethods:W4,toObjectSet:Y4,toCamelCase:H4,noop:K4,toFiniteNumber:G4,findKey:Y1,global:Vo,isContextDefined:K1,isSpecCompliantForm:Q4,toJSONObject:X4,isAsyncFn:J4,isThenable:Z4,setImmediate:Q1,asap:e5,isIterable:t5};let at=class X1 extends Error{static from(t,n,r,i,o,s){const l=new X1(t.message,n||t.code,r,i,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:he.toJSONObject(this.config),code:this.code,status:this.status}}};at.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";at.ERR_BAD_OPTION="ERR_BAD_OPTION";at.ECONNABORTED="ECONNABORTED";at.ETIMEDOUT="ETIMEDOUT";at.ERR_NETWORK="ERR_NETWORK";at.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";at.ERR_DEPRECATED="ERR_DEPRECATED";at.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";at.ERR_BAD_REQUEST="ERR_BAD_REQUEST";at.ERR_CANCELED="ERR_CANCELED";at.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";at.ERR_INVALID_URL="ERR_INVALID_URL";at.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const n5=null;function Np(e){return he.isPlainObject(e)||he.isArray(e)}function J1(e){return he.endsWith(e,"[]")?e.slice(0,-2):e}function Af(e,t,n){return e?e.concat(t).map(function(r,i){return r=J1(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function r5(e){return he.isArray(e)&&!e.some(Np)}const i5=he.toFlatObject(he,{},null,function(e){return/^is[A-Z]/.test(e)});function Pu(e,t,n){if(!he.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=he.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!he.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,d=l&&he.isSpecCompliantForm(t);if(!he.isFunction(i))throw new TypeError("visitor must be a function");function f(m){if(m===null)return"";if(he.isDate(m))return m.toISOString();if(he.isBoolean(m))return m.toString();if(!d&&he.isBlob(m))throw new at("Blob is not supported. Use a Buffer instead.");return he.isArrayBuffer(m)||he.isTypedArray(m)?d&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,b,x){let S=m;if(he.isReactNative(t)&&he.isReactNativeBlob(m))return t.append(Af(x,b,o),f(m)),!1;if(m&&!x&&typeof m=="object"){if(he.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=JSON.stringify(m);else if(he.isArray(m)&&r5(m)||(he.isFileList(m)||he.endsWith(b,"[]"))&&(S=he.toArray(m)))return b=J1(b),S.forEach(function(O,T){!(he.isUndefined(O)||O===null)&&t.append(s===!0?Af([b],T,o):s===null?b:b+"[]",f(O))}),!1}return Np(m)?!0:(t.append(Af(x,b,o),f(m)),!1)}const v=[],y=Object.assign(i5,{defaultVisitor:p,convertValue:f,isVisitable:Np});function g(m,b,x=0){if(!he.isUndefined(m)){if(x>c)throw new at("Object is too deeply nested ("+x+" levels). Max depth: "+c,at.ERR_FORM_DATA_DEPTH_EXCEEDED);if(v.indexOf(m)!==-1)throw Error("Circular reference detected in "+b.join("."));v.push(m),he.forEach(m,function(S,O){(!(he.isUndefined(S)||S===null)&&i.call(t,S,he.isString(O)?O.trim():O,b,y))===!0&&g(S,b?b.concat(O):[O],x+1)}),v.pop()}}if(!he.isObject(e))throw new TypeError("data must be an object");return g(e),t}function jy(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Yh(e,t){this._pairs=[],e&&Pu(e,this,t)}const Z1=Yh.prototype;Z1.append=function(e,t){this._pairs.push([e,t])};Z1.toString=function(e){const t=e?function(n){return e.call(this,n,jy)}:jy;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function o5(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eE(e,t,n){if(!t)return e;const r=n&&n.encode||o5,i=he.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let s;if(o?s=o(t,i):s=he.isURLSearchParams(t)?t.toString():new Yh(t,i).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}let Uy=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){he.forEach(this.handlers,function(n){n!==null&&t(n)})}};const Kh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},s5=typeof URLSearchParams<"u"?URLSearchParams:Yh,a5=typeof FormData<"u"?FormData:null,l5=typeof Blob<"u"?Blob:null,c5={isBrowser:!0,classes:{URLSearchParams:s5,FormData:a5,Blob:l5},protocols:["http","https","file","blob","url","data"]},Gh=typeof window<"u"&&typeof document<"u",zp=typeof navigator=="object"&&navigator||void 0,u5=Gh&&(!zp||["ReactNative","NativeScript","NS"].indexOf(zp.product)<0),d5=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",f5=Gh&&window.location.href||"http://localhost",p5=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Gh,hasStandardBrowserEnv:u5,hasStandardBrowserWebWorkerEnv:d5,navigator:zp,origin:f5},Symbol.toStringTag,{value:"Module"})),In={...p5,...c5};function h5(e,t){return Pu(e,new In.classes.URLSearchParams,{visitor:function(n,r,i,o){return In.isNode&&he.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function m5(e){return he.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function v5(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function tE(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=o>=n.length;return s=!s&&he.isArray(i)?i.length:s,c?(he.hasOwnProp(i,s)?i[s]=he.isArray(i[s])?i[s].concat(r):[i[s],r]:i[s]=r,!l):((!i[s]||!he.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&he.isArray(i[s])&&(i[s]=v5(i[s])),!l)}if(he.isFormData(e)&&he.isFunction(e.entries)){const n={};return he.forEachEntry(e,(r,i)=>{t(m5(r),i,n,0)}),n}return null}const ws=(e,t)=>e!=null&&he.hasOwnProp(e,t)?e[t]:void 0;function g5(e,t,n){if(he.isString(e))try{return(t||JSON.parse)(e),he.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ol={transitional:Kh,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=he.isObject(e);if(i&&he.isHTMLForm(e)&&(e=new FormData(e)),he.isFormData(e))return r?JSON.stringify(tE(e)):e;if(he.isArrayBuffer(e)||he.isBuffer(e)||he.isStream(e)||he.isFile(e)||he.isBlob(e)||he.isReadableStream(e))return e;if(he.isArrayBufferView(e))return e.buffer;if(he.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){const s=ws(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return h5(e,s).toString();if((o=he.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=ws(this,"env"),c=l&&l.FormData;return Pu(o?{"files[]":e}:e,c&&new c,s)}}return i||r?(t.setContentType("application/json",!1),g5(e)):e}],transformResponse:[function(e){const t=ws(this,"transitional")||ol.transitional,n=t&&t.forcedJSONParsing,r=ws(this,"responseType"),i=r==="json";if(he.isResponse(e)||he.isReadableStream(e))return e;if(e&&he.isString(e)&&(n&&!r||i)){const o=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,ws(this,"parseReviver"))}catch(s){if(o)throw s.name==="SyntaxError"?at.from(s,at.ERR_BAD_RESPONSE,this,null,ws(this,"response")):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:In.classes.FormData,Blob:In.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(["delete","get","head","post","put","patch"],e=>{ol.headers[e]={}});const _5=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),y5=e=>{const t={};let n,r,i;return e&&e.split(`
23
- `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&_5[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ny=Symbol("internals"),b5=/[^\x09\x20-\x7E\x80-\xFF]/g;function w5(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Sa(e){return e&&String(e).trim().toLowerCase()}function E5(e){return w5(e.replace(b5,""))}function qc(e){return e===!1||e==null?e:he.isArray(e)?e.map(qc):E5(String(e))}function S5(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const C5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rf(e,t,n,r,i){if(he.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!he.isString(t)){if(he.isString(r))return t.indexOf(r)!==-1;if(he.isRegExp(r))return r.test(t)}}function x5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function T5(e,t){const n=he.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let ir=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,c,d){const f=Sa(c);if(!f)throw new Error("header name must be a non-empty string");const p=he.findKey(i,f);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||c]=qc(l))}const s=(l,c)=>he.forEach(l,(d,f)=>o(d,f,c));if(he.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(he.isString(t)&&(t=t.trim())&&!C5(t))s(y5(t),n);else if(he.isObject(t)&&he.isIterable(t)){let l={},c,d;for(const f of t){if(!he.isArray(f))throw TypeError("Object iterator must return a key-value pair");l[d=f[0]]=(c=l[d])?he.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Sa(t),t){const r=he.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return S5(i);if(he.isFunction(n))return n.call(this,i,r);if(he.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Sa(t),t){const r=he.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Rf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Sa(s),s){const l=he.findKey(r,s);l&&(!n||Rf(r,r[l],l,n))&&(delete r[l],i=!0)}}return he.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Rf(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return he.forEach(this,(i,o)=>{const s=he.findKey(r,o);if(s){n[s]=qc(i),delete n[o];return}const l=t?x5(o):String(o).trim();l!==o&&delete n[o],n[l]=qc(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return he.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&he.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
24
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const n=(this[Ny]=this[Ny]={accessors:{}}).accessors,r=this.prototype;function i(o){const s=Sa(o);n[s]||(T5(r,o),n[s]=!0)}return he.isArray(t)?t.forEach(i):i(t),this}};ir.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);he.reduceDescriptors(ir.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});he.freezeMethods(ir);function Pf(e,t){const n=this||ol,r=t||n,i=ir.from(r.headers);let o=r.data;return he.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function nE(e){return!!(e&&e.__CANCEL__)}let sl=class extends at{constructor(t,n,r){super(t??"canceled",at.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function rE(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new at("Request failed with status code "+n.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function k5(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function O5(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const v=d&&c-d;return v?Math.round(p*1e3/v):void 0}}function $5(e,t){let n=0,r=1e3/t,i,o;const s=(l,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?s(l,c):(i=l,o||(o=setTimeout(()=>{o=null,s(i)},r-d)))},()=>i&&s(i)]}const uu=(e,t,n=3)=>{let r=0;const i=O5(50,250);return $5(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,c=l!=null?Math.min(s,l):s,d=Math.max(0,c-r),f=i(d);r=Math.max(r,c);const p={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:f||void 0,estimated:f&&l?(l-c)/f:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},zy=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},By=e=>(...t)=>he.asap(()=>e(...t)),A5=In.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,In.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(In.origin),In.navigator&&/(msie|trident)/i.test(In.navigator.userAgent)):()=>!0,R5=In.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];he.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),he.isString(r)&&l.push(`path=${r}`),he.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),he.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function P5(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function I5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function iE(e,t,n){let r=!P5(t);return e&&(r||n===!1)?I5(e,t):t}const Vy=e=>e instanceof ir?{...e}:e;function Jo(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,f,p,v){return he.isPlainObject(d)&&he.isPlainObject(f)?he.merge.call({caseless:v},d,f):he.isPlainObject(f)?he.merge({},f):he.isArray(f)?f.slice():f}function i(d,f,p,v){if(he.isUndefined(f)){if(!he.isUndefined(d))return r(void 0,d,p,v)}else return r(d,f,p,v)}function o(d,f){if(!he.isUndefined(f))return r(void 0,f)}function s(d,f){if(he.isUndefined(f)){if(!he.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function l(d,f,p){if(he.hasOwnProp(t,p))return r(d,f);if(he.hasOwnProp(e,p))return r(void 0,d)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:l,headers:(d,f,p)=>i(Vy(d),Vy(f),p,!0)};return he.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=he.hasOwnProp(c,d)?c[d]:i,p=he.hasOwnProp(e,d)?e[d]:void 0,v=he.hasOwnProp(t,d)?t[d]:void 0,y=f(p,v,d);he.isUndefined(y)&&f!==l||(n[d]=y)}),n}const oE=e=>{const t=Jo({},e),n=v=>he.hasOwnProp(t,v)?t[v]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),s=n("xsrfCookieName");let l=n("headers");const c=n("auth"),d=n("baseURL"),f=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=ir.from(l),t.url=eE(iE(d,p,f),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),he.isFormData(r)){if(In.hasStandardBrowserEnv||In.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(he.isFunction(r.getHeaders)){const v=r.getHeaders(),y=["content-type","content-length"];Object.entries(v).forEach(([g,m])=>{y.includes(g.toLowerCase())&&l.set(g,m)})}}if(In.hasStandardBrowserEnv&&(he.isFunction(i)&&(i=i(t)),i===!0||i==null&&A5(t.url))){const v=o&&s&&R5.read(s);v&&l.set(o,v)}return t},M5=typeof XMLHttpRequest<"u",D5=M5&&function(e){return new Promise(function(t,n){const r=oE(e);let i=r.data;const o=ir.from(r.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=r,d,f,p,v,y;function g(){v&&v(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function b(){if(!m)return;const S=ir.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),O={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:S,config:e,request:m};rE(function(T){t(T),g()},function(T){n(T),g()},O),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){m&&(n(new at("Request aborted",at.ECONNABORTED,e,m)),m=null)},m.onerror=function(S){const O=S&&S.message?S.message:"Network Error",T=new at(O,at.ERR_NETWORK,e,m);T.event=S||null,n(T),m=null},m.ontimeout=function(){let S=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const O=r.transitional||Kh;r.timeoutErrorMessage&&(S=r.timeoutErrorMessage),n(new at(S,O.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,e,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&he.forEach(o.toJSON(),function(S,O){m.setRequestHeader(O,S)}),he.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),s&&s!=="json"&&(m.responseType=r.responseType),c&&([p,y]=uu(c,!0),m.addEventListener("progress",p)),l&&m.upload&&([f,v]=uu(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",v)),(r.cancelToken||r.signal)&&(d=S=>{m&&(n(!S||S.type?new sl(null,e,m):S),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const x=k5(r.url);if(x&&In.protocols.indexOf(x)===-1){n(new at("Unsupported protocol "+x+":",at.ERR_BAD_REQUEST,e));return}m.send(i||null)})},F5=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(d){if(!i){i=!0,l();const f=d instanceof Error?d:this.reason;r.abort(f instanceof at?f:new sl(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,o(new at(`timeout of ${t}ms exceeded`,at.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>he.asap(l),c}},L5=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},j5=async function*(e,t){for await(const n of U5(e))yield*L5(n,t)},U5=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Hy=(e,t,n,r)=>{const i=j5(e,t);let o=0,s,l=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await i.next();if(d){l(),c.close();return}let p=f.byteLength;if(n){let v=o+=p;n(v)}c.enqueue(new Uint8Array(f))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},qy=64*1024,{isFunction:hc}=he,N5=(({Request:e,Response:t})=>({Request:e,Response:t}))(he.global),{ReadableStream:Wy,TextEncoder:Yy}=he.global,Ky=(e,...t)=>{try{return!!e(...t)}catch{return!1}},z5=e=>{e=he.merge.call({skipUndefined:!0},N5,e);const{fetch:t,Request:n,Response:r}=e,i=t?hc(t):typeof fetch=="function",o=hc(n),s=hc(r);if(!i)return!1;const l=i&&hc(Wy),c=i&&(typeof Yy=="function"?(g=>m=>g.encode(m))(new Yy):async g=>new Uint8Array(await new n(g).arrayBuffer())),d=o&&l&&Ky(()=>{let g=!1;const m=new n(In.origin,{body:new Wy,method:"POST",get duplex(){return g=!0,"half"}}),b=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),g&&!b}),f=s&&l&&Ky(()=>he.isReadableStream(new r("").body)),p={stream:f&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!p[g]&&(p[g]=(m,b)=>{let x=m&&m[g];if(x)return x.call(m);throw new at(`Response type '${g}' is not supported`,at.ERR_NOT_SUPPORT,b)})});const v=async g=>{if(g==null)return 0;if(he.isBlob(g))return g.size;if(he.isSpecCompliantForm(g))return(await new n(In.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(he.isArrayBufferView(g)||he.isArrayBuffer(g))return g.byteLength;if(he.isURLSearchParams(g)&&(g=g+""),he.isString(g))return(await c(g)).byteLength},y=async(g,m)=>he.toFiniteNumber(g.getContentLength())??v(m);return async g=>{let{url:m,method:b,data:x,signal:S,cancelToken:O,timeout:T,onDownloadProgress:A,onUploadProgress:M,responseType:z,headers:Y,withCredentials:ve="same-origin",fetchOptions:W}=oE(g),X=t||fetch;z=z?(z+"").toLowerCase():"text";let K=F5([S,O&&O.toAbortSignal()],T),L=null;const D=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let ne;try{if(M&&d&&b!=="get"&&b!=="head"&&(ne=await y(Y,x))!==0){let U=new n(m,{method:"POST",body:x,duplex:"half"}),ee;if(he.isFormData(x)&&(ee=U.headers.get("content-type"))&&Y.setContentType(ee),U.body){const[Q,B]=zy(ne,uu(By(M)));x=Hy(U.body,qy,Q,B)}}he.isString(ve)||(ve=ve?"include":"omit");const le=o&&"credentials"in n.prototype;if(he.isFormData(x)){const U=Y.getContentType();U&&/^multipart\/form-data/i.test(U)&&!/boundary=/i.test(U)&&Y.delete("content-type")}const je={...W,signal:K,method:b.toUpperCase(),headers:Y.normalize().toJSON(),body:x,duplex:"half",credentials:le?ve:void 0};L=o&&new n(m,je);let J=await(o?X(L,W):X(m,je));const j=f&&(z==="stream"||z==="response");if(f&&(A||j&&D)){const U={};["status","statusText","headers"].forEach(oe=>{U[oe]=J[oe]});const ee=he.toFiniteNumber(J.headers.get("content-length")),[Q,B]=A&&zy(ee,uu(By(A),!0))||[];J=new r(Hy(J.body,qy,Q,()=>{B&&B(),D&&D()}),U)}z=z||"text";let de=await p[he.findKey(p,z)||"text"](J,g);return!j&&D&&D(),await new Promise((U,ee)=>{rE(U,ee,{data:de,headers:ir.from(J.headers),status:J.status,statusText:J.statusText,config:g,request:L})})}catch(le){throw D&&D(),le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,g,L,le&&le.response),{cause:le.cause||le}):at.from(le,le&&le.code,g,L,le&&le.response)}}},B5=new Map,sE=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,c,d,f=B5;for(;l--;)c=o[l],d=f.get(c),d===void 0&&f.set(c,d=l?new Map:z5(t)),f=d;return d};sE();const Qh={http:n5,xhr:D5,fetch:{get:sE}};he.forEach(Qh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Gy=e=>`- ${e}`,V5=e=>he.isFunction(e)||e===null||e===!1;function H5(e,t){e=he.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let l;if(i=r,!V5(r)&&(i=Qh[(l=String(r)).toLowerCase()],i===void 0))throw new at(`Unknown adapter '${l}'`);if(i&&(he.isFunction(i)||(i=i.get(t))))break;o[l||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since :
25
- `+s.map(Gy).join(`
26
- `):" "+Gy(s[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const aE={getAdapter:H5,adapters:Qh};function If(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sl(null,e)}function Qy(e){return If(e),e.headers=ir.from(e.headers),e.data=Pf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),aE.getAdapter(e.adapter||ol.adapter,e)(e).then(function(t){return If(e),t.data=Pf.call(e,e.transformResponse,t),t.headers=ir.from(t.headers),t},function(t){return nE(t)||(If(e),t&&t.response&&(t.response.data=Pf.call(e,e.transformResponse,t.response),t.response.headers=ir.from(t.response.headers))),Promise.reject(t)})}const lE="1.15.2",Iu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Iu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Xy={};Iu.transitional=function(e,t,n){function r(i,o){return"[Axios v"+lE+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(e===!1)throw new at(r(o," has been removed"+(t?" in "+t:"")),at.ERR_DEPRECATED);return t&&!Xy[o]&&(Xy[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,s):!0}};Iu.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function q5(e,t,n){if(typeof e!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(s){const l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new at("option "+o+" must be "+c,at.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new at("Unknown option "+o,at.ERR_BAD_OPTION)}}const Wc={assertOptions:q5,validators:Iu},Ir=Wc.validators;let Wo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Uy,response:new Uy}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const s=i.stack.indexOf(`
27
- `);return s===-1?"":i.stack.slice(s+1)})();try{if(!r.stack)r.stack=o;else if(o){const s=o.indexOf(`
28
- `),l=s===-1?-1:o.indexOf(`
29
- `,s+1),c=l===-1?"":o.slice(l+1);String(r.stack).endsWith(c)||(r.stack+=`
30
- `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Wc.assertOptions(r,{silentJSONParsing:Ir.transitional(Ir.boolean),forcedJSONParsing:Ir.transitional(Ir.boolean),clarifyTimeoutError:Ir.transitional(Ir.boolean),legacyInterceptorReqResOrdering:Ir.transitional(Ir.boolean)},!1),i!=null&&(he.isFunction(i)?n.paramsSerializer={serialize:i}:Wc.assertOptions(i,{encode:Ir.function,serialize:Ir.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wc.assertOptions(n,{baseUrl:Ir.spelling("baseURL"),withXsrfToken:Ir.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&he.merge(o.common,o[n.method]);o&&he.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ir.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;c=c&&g.synchronous;const m=n.transitional||Kh;m&&m.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let f,p=0,v;if(!c){const g=[Qy.bind(this),void 0];for(g.unshift(...l),g.push(...d),v=g.length,f=Promise.resolve(n);p<v;)f=f.then(g[p++],g[p++]);return f}v=l.length;let y=n;for(;p<v;){const g=l[p++],m=l[p++];try{y=g(y)}catch(b){m.call(this,b);break}}try{f=Qy.call(this,y)}catch(g){return Promise.reject(g)}for(p=0,v=d.length;p<v;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=Jo(this.defaults,t);const n=iE(t.baseURL,t.url,t.allowAbsoluteUrls);return eE(n,t.params,t.paramsSerializer)}};he.forEach(["delete","get","head","options"],function(e){Wo.prototype[e]=function(t,n){return this.request(Jo(n||{},{method:e,url:t,data:(n||{}).data}))}});he.forEach(["post","put","patch"],function(e){function t(n){return function(r,i,o){return this.request(Jo(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Wo.prototype[e]=t(),Wo.prototype[e+"Form"]=t(!0)});let W5=class cE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(i,o,s){r.reason||(r.reason=new sl(i,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cE(function(n){t=n}),cancel:t}}};function Y5(e){return function(t){return e.apply(null,t)}}function K5(e){return he.isObject(e)&&e.isAxiosError===!0}const Bp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bp).forEach(([e,t])=>{Bp[t]=e});function uE(e){const t=new Wo(e),n=V1(Wo.prototype.request,t);return he.extend(n,Wo.prototype,t,{allOwnKeys:!0}),he.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return uE(Jo(e,r))},n}const ln=uE(ol);ln.Axios=Wo;ln.CanceledError=sl;ln.CancelToken=W5;ln.isCancel=nE;ln.VERSION=lE;ln.toFormData=Pu;ln.AxiosError=at;ln.Cancel=ln.CanceledError;ln.all=function(e){return Promise.all(e)};ln.spread=Y5;ln.isAxiosError=K5;ln.mergeConfig=Jo;ln.AxiosHeaders=ir;ln.formToJSON=e=>tE(he.isHTMLForm(e)?new FormData(e):e);ln.getAdapter=aE.getAdapter;ln.HttpStatusCode=Bp;ln.default=ln;const{Axios:zie,AxiosError:Bie,CanceledError:Vie,isCancel:Hie,CancelToken:qie,VERSION:Wie,all:Yie,Cancel:Kie,isAxiosError:Gie,spread:Qie,toFormData:Xie,AxiosHeaders:Jie,HttpStatusCode:Zie,formToJSON:eoe,getAdapter:toe,mergeConfig:noe}=ln,dE=new Map,G5={baseURL:"",timeout:1e4};function Jy(e,t,n){const r=ln.create({...G5,...t});return dE.set(e,{instance:r,urlResolver:n}),r}async function Pe(e,t){const n=e.split("/")[0];if(!n)throw new Error("Instance name could not be extracted from url.");const r=dE.get(n);if(!r)throw new Error(`Instance "${n}" not initialized. Call initInstance() first.`);if(!r.urlResolver)throw new Error(`Instance "${n}" has no urlResolver. Pass one to initInstance().`);return e=r.urlResolver(e),r.instance.request({url:e,...t})}async function Q5(e,t){return Pe("__local__/api/comp/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function X5(e,t){return Pe("__local__/api/comp/checkCompRepeat",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function J5(e,t){return Pe("__local__/api/comp/compFileHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Z5(e,t){return Pe("__local__/api/comp/compFilesOssSignedUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function ej(e,t){return Pe("__local__/api/comp/dep",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function tj(e,t){return Pe("__local__/api/comp/dir",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function nj(e,t){return Pe("__local__/api/comp/download",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function rj(e,t){return Pe("__local__/api/comp/file",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function ij(e,t){return Pe("__local__/api/comp/generateCompJson",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function oj(e,t){return Pe("__local__/api/comp/localCompDetailByPathHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function sj(e,t){return Pe("__local__/api/comp/localComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function aj(e,t){return Pe("__local__/api/comp/localCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function lj(e,t){return Pe("__local__/api/comp/openCompPathInExplorer",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function cj(e,t){return Pe("__local__/api/comp/openCompPathInVscode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function uj(e){return Pe("__local__/api/comp/packageJson",{method:"POST",...e||{}})}async function dj(e,t){return Pe("__local__/api/comp/renameDir",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function fj(e,t){return Pe("__local__/api/comp/submit",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function pj(e,t){return Pe("__local__/api/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function hj(e,t){return Pe("__local__/api/comp/updateVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function mj(e,t){return Pe("__local__/api/comp/writeFile",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const vj=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheck:Q5,compcontrollerCheckcomprepeat:X5,compcontrollerCompfilehash:J5,compcontrollerCompfilesosssignedurl:Z5,compcontrollerDep:ej,compcontrollerDir:tj,compcontrollerDownload:nj,compcontrollerFile:rj,compcontrollerGeneratecompjson:ij,compcontrollerLocalcompdetailbypathhash:oj,compcontrollerLocalcomps:sj,compcontrollerLocalcompsbyids:aj,compcontrollerOpencomppathinexplorer:lj,compcontrollerOpencomppathinvscode:cj,compcontrollerPackagejson:uj,compcontrollerRenamedir:dj,compcontrollerSubmit:fj,compcontrollerUpdate:pj,compcontrollerUpdateversion:hj,compcontrollerWritefile:mj},Symbol.toStringTag,{value:"Module"}));async function gj(e,t){return Pe("__local__/api/module/buildTemplateCompiler",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function _j(e){return Pe("__local__/api/module/clearPreBuild",{method:"POST",...e||{}})}async function yj(e,t){return Pe("__local__/api/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function bj(e){return Pe("__local__/api/module/preBuildSize",{method:"POST",...e||{}})}const wj=Object.freeze(Object.defineProperty({__proto__:null,modulecontrollerBuildtemplatecompiler:gj,modulecontrollerClearprebuild:_j,modulecontrollerPrebuild:yj,modulecontrollerPrebuildsize:bj},Symbol.toStringTag,{value:"Module"}));async function Ej(e,t){return Pe("__local__/api/oss/fileSignUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const Sj=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerFilesignurl:Ej},Symbol.toStringTag,{value:"Module"}));async function Cj(e,t){return Pe("__local__/api/vuefinder/list",{method:"GET",params:{...e},...t||{}})}const xj=Object.freeze(Object.defineProperty({__proto__:null,vuefindercontrollerList:Cj},Symbol.toStringTag,{value:"Module"})),Tj={comp:vj,module:wj,oss:Sj,vuefinder:xj};async function kj(e){return Pe("__remote__/api/v1/auth/github",{method:"GET",...e||{}})}async function Oj(e){return Pe("__remote__/api/v1/auth/github/callback",{method:"GET",...e||{}})}const $j=Object.freeze(Object.defineProperty({__proto__:null,authcontrollerGithuboauth:kj,authcontrollerGithuboauthcallback:Oj},Symbol.toStringTag,{value:"Module"}));async function Aj(e,t){return Pe("__remote__/api/v1/comment/create",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Rj(e,t){return Pe("__remote__/api/v1/comment/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Pj(e,t){return Pe("__remote__/api/v1/comment/list",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Ij(e,t){return Pe("__remote__/api/v1/comment/markRead",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Mj(e,t){return Pe("__remote__/api/v1/comment/myCompsComments",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Dj(e,t){return Pe("__remote__/api/v1/comment/replies",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Fj(e){return Pe("__remote__/api/v1/comment/unreadCount",{method:"POST",...e||{}})}const Lj=Object.freeze(Object.defineProperty({__proto__:null,commentcontrollerCreate:Aj,commentcontrollerDelete:Rj,commentcontrollerList:Pj,commentcontrollerMarkread:Ij,commentcontrollerMycompscomments:Mj,commentcontrollerReplies:Dj,commentcontrollerUnreadcount:Fj},Symbol.toStringTag,{value:"Module"}));async function jj(e,t){return Pe("__remote__/api/v1/comp/checkCompExistByHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Uj(e,t){return Pe("__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Nj(e,t){return Pe("__remote__/api/v1/comp/checkVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function zj(e,t){return Pe("__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Bj(e,t){return Pe("__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Vj(e,t){return Pe("__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Hj(e,t){return Pe("__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function qj(e,t){return Pe("__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Wj(e,t){return Pe("__remote__/api/v1/comp/compsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Yj(e,t){return Pe("__remote__/api/v1/comp/deleteFailedComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Kj(e,t){return Pe("__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Gj(e,t){return Pe("__remote__/api/v1/comp/existCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Qj(e,t){return Pe("__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Xj(e,t){return Pe("__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Jj(e,t){return Pe("__remote__/api/v1/comp/softDelete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Zj(e,t){return Pe("__remote__/api/v1/comp/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function e3(e,t){return Pe("__remote__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function t3(e,t){return Pe("__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function n3(e,t){return Pe("__remote__/api/v1/comp/updateCompDownloadCount",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function r3(e,t){return Pe("__remote__/api/v1/comp/updateObjectId",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function i3(e,t){return Pe("__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function o3(e,t){return Pe("__remote__/api/v1/comp/upload",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function s3(e,t){return Pe("__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const a3=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheckcompexistbyhash:jj,compcontrollerCheckcompexistbyid:Uj,compcontrollerCheckversion:Nj,compcontrollerCollect:zj,compcontrollerCollectedcomps:Bj,compcontrollerCompdetail:Vj,compcontrollerComphash:Hj,compcontrollerComps:qj,compcontrollerCompsbyids:Wj,compcontrollerDeletefailedcomp:Yj,compcontrollerDeletemycomp:Kj,compcontrollerExistcompsbyids:Gj,compcontrollerMycomps:Qj,compcontrollerSimilarcomps:Xj,compcontrollerSoftdelete:Jj,compcontrollerTags:Zj,compcontrollerUpdate:e3,compcontrollerUpdatebasicinfo:t3,compcontrollerUpdatecompdownloadcount:n3,compcontrollerUpdateobjectid:r3,compcontrollerUpgraderecords:i3,compcontrollerUpload:o3,compcontrollerVersions:s3},Symbol.toStringTag,{value:"Module"}));async function l3(e){return Pe("__remote__/api/v1/csrf/csrf",{method:"GET",...e||{}})}const c3=Object.freeze(Object.defineProperty({__proto__:null,csrfcontrollerGetcsrftoken:l3},Symbol.toStringTag,{value:"Module"}));async function u3(e,t){return Pe("__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const d3=Object.freeze(Object.defineProperty({__proto__:null,emailcontrollerSendcode:u3},Symbol.toStringTag,{value:"Module"}));async function f3(e,t){return Pe("__remote__/api/v1/extranet/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function p3(e,t){return Pe("__remote__/api/v1/extranet/comps/detail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function h3(e,t){return Pe("__remote__/api/v1/extranet/tags",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const m3=Object.freeze(Object.defineProperty({__proto__:null,extranetcontrollerCompdetail:p3,extranetcontrollerComps:f3,extranetcontrollerTags:h3},Symbol.toStringTag,{value:"Module"}));async function v3(e,t){return Pe("__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const g3=Object.freeze(Object.defineProperty({__proto__:null,keywordcontrollerQuerykeywordscomp:v3},Symbol.toStringTag,{value:"Module"}));async function _3(e){return Pe("__remote__/api/v1/oss/compOssDir",{method:"POST",...e||{}})}async function y3(e){return Pe("__remote__/api/v1/oss/getSts",{method:"POST",...e||{}})}async function b3(e){return Pe("__remote__/api/v1/oss/prebuildPutPolicy",{method:"POST",...e||{}})}async function w3(e,t){return Pe("__remote__/api/v1/oss/putPolicy",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const E3=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerCompossdir:_3,osscontrollerGetsts:y3,osscontrollerPrebuildputpolicy:b3,osscontrollerPutpolicy:w3},Symbol.toStringTag,{value:"Module"}));async function S3(e,t){return Pe("__remote__/api/v1/rating/my",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function C3(e,t){return Pe("__remote__/api/v1/rating/remove",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function x3(e,t){return Pe("__remote__/api/v1/rating/set",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const T3=Object.freeze(Object.defineProperty({__proto__:null,ratingcontrollerMy:S3,ratingcontrollerRemove:C3,ratingcontrollerSet:x3},Symbol.toStringTag,{value:"Module"}));async function k3(e,t){return Pe("__remote__/api/v1/team/addToTeamMyComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function O3(e){return Pe("__remote__/api/v1/team/allMember",{method:"POST",...e||{}})}async function $3(e,t){return Pe("__remote__/api/v1/team/applyList",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function A3(e,t){return Pe("__remote__/api/v1/team/checkCompUpdatePermission",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function R3(e,t){return Pe("__remote__/api/v1/team/copyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function P3(e,t){return Pe("__remote__/api/v1/team/create",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function I3(e){return Pe("__remote__/api/v1/team/created",{method:"POST",...e||{}})}async function M3(e,t){return Pe("__remote__/api/v1/team/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function D3(e){return Pe("__remote__/api/v1/team/detail",{method:"POST",...e||{}})}async function F3(e){return Pe("__remote__/api/v1/team/exit",{method:"POST",...e||{}})}async function L3(e,t){return Pe("__remote__/api/v1/team/findByCode",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function j3(e,t){return Pe("__remote__/api/v1/team/handleApply",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function U3(e,t){return Pe("__remote__/api/v1/team/join",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function N3(e){return Pe("__remote__/api/v1/team/joined",{method:"POST",...e||{}})}async function z3(e,t){return Pe("__remote__/api/v1/team/kickOut",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function B3(e,t){return Pe("__remote__/api/v1/team/member",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function V3(e,t){return Pe("__remote__/api/v1/team/myTeamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function H3(e,t){return Pe("__remote__/api/v1/team/removeComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function q3(e,t){return Pe("__remote__/api/v1/team/removeMyTeamComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function W3(e,t){return Pe("__remote__/api/v1/team/teamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Y3(e,t){return Pe("__remote__/api/v1/team/update",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function K3(e,t){return Pe("__remote__/api/v1/team/updateCompCanUpdateUsers",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function G3(e,t){return Pe("__remote__/api/v1/team/updateMenu",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function Q3(e,t){return Pe("__remote__/api/v1/team/updateTeamUserNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const X3=Object.freeze(Object.defineProperty({__proto__:null,teamcontrollerAddtoteammycomps:k3,teamcontrollerAllmember:O3,teamcontrollerApplylist:$3,teamcontrollerCheckcompupdatepermission:A3,teamcontrollerCopycomp:R3,teamcontrollerCreate:P3,teamcontrollerCreated:I3,teamcontrollerDelete:M3,teamcontrollerDetail:D3,teamcontrollerExit:F3,teamcontrollerFindbycode:L3,teamcontrollerHandleapply:j3,teamcontrollerJoin:U3,teamcontrollerJoined:N3,teamcontrollerKickout:z3,teamcontrollerMember:B3,teamcontrollerMyteamcomps:V3,teamcontrollerRemovecompfromteam:H3,teamcontrollerRemovemyteamcomp:q3,teamcontrollerTeamcomps:W3,teamcontrollerUpdate:Y3,teamcontrollerUpdatecompcanupdateusers:K3,teamcontrollerUpdatemenu:G3,teamcontrollerUpdateteamusernickname:Q3},Symbol.toStringTag,{value:"Module"}));async function J3(e){return Pe("__remote__/api/v1/token/approachExpire",{method:"POST",...e||{}})}async function Z3(e){return Pe("__remote__/api/v1/token/refresh",{method:"POST",...e||{}})}const eU=Object.freeze(Object.defineProperty({__proto__:null,tokencontrollerApproachexpire:J3,tokencontrollerRefresh:Z3},Symbol.toStringTag,{value:"Module"}));async function tU(e,t){return Pe("__remote__/api/v1/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function nU(e){return Pe("__remote__/api/v1/upgrade/logs",{method:"POST",...e||{}})}const rU=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerCheck:tU,upgradecontrollerLogs:nU},Symbol.toStringTag,{value:"Module"}));async function iU(e,t){return Pe("__remote__/api/v1/user/bindEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function oU(e,t){return Pe("__remote__/api/v1/user/changeAvatar",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function sU(e,t){return Pe("__remote__/api/v1/user/changeNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function aU(e,t){return Pe("__remote__/api/v1/user/changePassword",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function lU(e){return Pe("__remote__/api/v1/user/checkPassword",{method:"POST",...e||{}})}async function cU(e,t){return Pe("__remote__/api/v1/user/login",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function uU(e,t){return Pe("__remote__/api/v1/user/setAllowEmailLogin",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function dU(e,t){return Pe("__remote__/api/v1/user/updateEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}async function fU(e){return Pe("__remote__/api/v1/user/userInfo",{method:"POST",...e||{}})}async function pU(e){return Pe("__remote__/api/v1/user/whoAmI",{method:"POST",...e||{}})}const hU=Object.freeze(Object.defineProperty({__proto__:null,usercontrollerBindemail:iU,usercontrollerChangeavatar:oU,usercontrollerChangenickname:sU,usercontrollerChangepassword:aU,usercontrollerCheckpassword:lU,usercontrollerLogin:cU,usercontrollerSetallowemaillogin:uU,usercontrollerUpdateemail:dU,usercontrollerUserinfo:fU,usercontrollerWhoami:pU},Symbol.toStringTag,{value:"Module"}));async function mU(e,t){return Pe("__remote__/api/v2/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...t||{}})}const vU=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerv2Check:mU},Symbol.toStringTag,{value:"Module"})),Yo={v1Auth:$j,v1Comment:Lj,v1Comp:a3,v1Csrf:c3,v1Email:d3,v1Extranet:m3,v1Keyword:g3,v1Oss:E3,v1Rating:T3,v1Team:X3,v1Token:eU,v1Upgrade:rU,v1User:hU,v2Upgrade:vU},gU=Eo("personalStore",{state:()=>({userInfo:{},isPasswordSet:!1}),getters:{email(e){return e.userInfo?.email??""},isAllowEmailLogin(e){return e.userInfo?.isAllowEmailLogin??!1}},actions:{setUserInfo(e){this.$patch(t=>{t.userInfo=e})},setIsPasswordSet(e){this.$patch(t=>{t.isPasswordSet=e})},async initUserInfo(){const e=await Yo.v1User.usercontrollerUserinfo();e.code===0&&this.setUserInfo(e.data)},async setEmail(e){this.$patch(t=>{t.userInfo.email=e})},async setNickname(e){this.$patch(t=>{t.userInfo.nickname=e})},async setAllowEmailLogin(e){await Yo.v1User.usercontrollerSetallowemaillogin({allow:e}).then(()=>{this.$patch(t=>{t.userInfo.isAllowEmailLogin=e})})}}}),_U=Eo("moduleStore",{state:()=>({modules:{}}),actions:{setModules(e,t){this.$patch(n=>{n.modules[e]=t})},async loadModule(e){if(this.modules[e])return this.modules[e];const t=await import(e);return this.setModules(e,t),t}}}),mc=js(DD,!0),Xh=Eo("appStore",{state:()=>({}),getters:{collapse(){return mc.value}},actions:{toggleSideBar(){mc.value=!mc.value},setSideBarCollapse(e){e!==this.collapse&&(mc.value=e)}}}),yU=Eo("team",{state:()=>({joinedTeams:[],createdTeams:[]}),actions:{setJoinedTeams(e){this.$patch(t=>{t.joinedTeams=e})},setCreatedTeams(e){this.$patch(t=>{t.createdTeams=e})},removeCreatedTeam(e){this.$patch(t=>{t.createdTeams=t.createdTeams.filter(n=>n._id!==e)})},addCreatedTeam(e){this.$patch(t=>{t.createdTeams.some(r=>r._id===e._id)||t.createdTeams.push(e)})},addJoinedTeam(e){this.$patch(t=>{t.joinedTeams.some(r=>r._id===e._id)||t.joinedTeams.push(e)})},removeJoinedTeam(e){this.$patch(t=>{t.joinedTeams=t.joinedTeams.filter(n=>n._id!==e)})},updateCreatedTeamItemById(e,t){this.$patch(n=>{const r=n.createdTeams.findIndex(i=>i._id===e);r!==-1&&(n.createdTeams[r]=t)})},getTeamDetail(e){return this.joinedTeams.find(n=>n._id===e)||this.createdTeams.find(n=>n._id===e)}}});function vc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!=="__proto__"&&(e[r]=n[r])}return e}var bU={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Vp(e,t){function n(i,o,s){if(!(typeof document>"u")){s=vc({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in s)s[c]&&(l+="; "+c,s[c]!==!0&&(l+="="+s[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+l}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},l=0;l<o.length;l++){var c=o[l].split("="),d=c.slice(1).join("=");try{var f=decodeURIComponent(c[0]);if(f in s||(s[f]=e.read(d,f)),i===f)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",vc({},o,{expires:-1}))},withAttributes:function(i){return Vp(this.converter,vc({},this.attributes,i))},withConverter:function(i){return Vp(vc({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var fE=Vp(bU,{path:"/"});const wU={keyword:"关键词",confirm:"确定",cancel:"取消",close:"关闭",save:"保存",submit:"提交",delete:"删除",edit:"编辑",add:"添加",update:"更新",upload:"上传",download:"下载",refresh:"刷新",loadingText:"加载中",success:"成功",error:"错误",warning:"警告",info:"提示",copy:"复制",copied:"已复制",copySuccess:"复制成功",copyFailed:"复制失败",open:"打开",search:"搜索",reset:"重置",clear:"清空",back:"返回",next:"下一步",prev:"上一步",finish:"完成",operation:"操作",status:"状态",yes:"是",no:"否",name:"名称",description:"描述",version:"版本",time:"时间",date:"日期",author:"作者",type:"类型",category:"分类",tag:"标签",content:"内容",setting:"设置",cache:"缓存",cacheSize:"已使用",clearCache:"清空缓存",clearCacheConfirm:"将清空浏览器单文件编译结果以及模块预编译文件,确认清空缓存吗?",cacheCleared:"缓存已清空",newPage:"新页面打开",terminal:"终端",preview:"预览",doc:"文档",readme:"README.md",upgradeRecord:"更新记录",ratingReview:"评分评论",openInNewPage:"新页面打开",depInstall:"依赖安装",fullscreen:"全屏",exitFullscreen:"退出全屏",maximizeRestore:"最大化/还原",siteSlogan:"原子化组件社区,让组件流通更简单。",siteSubtitle:"Vue 组件共享平台",adminSlogan:"组件管理平台 · 后台管理系统",docsTutorial:"文档教程",empty:"暂无数据",noReadme:"组件没有配置README.md文件",dragSort:"拖拽排序",filter:"筛选",apply:"应用",person:"人",unit:"个",pleaseSelect:"请选择",pleaseInput:"请输入",me:"我",generate:"生成",regenerate:"重新生成",generateSuccess:"生成成功",moreOperations:"更多操作",more:"更多",maxTagCount:"最大标签数量",or:"或"},EU={keywordPlaceholder:"请输入组件名称/描述",title:"组件",name:"组件名称",fieldId:"组件ID",fieldName:"组件名称",fieldVersion:"版本号",desc:"组件描述",remarksDesc:"备注说明",remarksDescRequired:"请输入备注说明",pleaseInputCompName:"请输入组件名称",pleaseInputRemarks:"请输入备注,有助于组件市场检索",pleaseInputTags:"请选择或输入标签",tags:"组件标签",tagsMaxCount:"标签数量不能超过5个",tagsEmpty:"标签不能为空",tagsTooLong:"标签「{tag}」长度不能超过20个字符",tagsInvalidChars:"标签「{tag}」包含非法字符,仅允许中文、英文、数字、连字符和下划线",tagsHelp:"输入文字后按回车键创建新标签,最多5个",compNameRequired:"组件名称不能为空",compNameNamingRule:"组件名只能是「大驼峰(PascalCase)」或「短横线(kebab-case)」命名法",lengthBetween:"长度在 {min} 到 {max} 个字符",previewImage:"预览图",previewImageRequired:"请上传或生成预览图",previewImageHint:"在小窗预览面板展示的截图,用于组件市场封面。如自动截图失败,请手动上传 PNG 图片",uploadPreviewImage:"上传预览图",generateScreenshot:"生成截图",previewImageFallbackHint:"预览图仅在组件无法渲染时生效",version:"组件版本",detail:"组件详情",preview:"组件预览",previewConfig:"预览配置",previewList:"预览列表",uploadPreview:"组件上传预览",updatePreview:"组件更新预览",download:"下载组件",update:"更新组件",upload:"上传组件",submit:"提交组件",edit:"编辑组件",add:"添加组件",delete:"删除组件",local:"本地组件",remote:"远程组件",online:"在线组件",similar:"相似组件",similarFound:"检测到相似组件",similarTeam:"团队内相似组件",dir:"组件目录",file:"组件文件",entry:"入口文件",previewEntry:"预览入口地址",previewEntryFull:"预览入口地址(全屏窗口)",addPreviewEntry:"添加预览入口",maxPreviewEntry:"最多添加{n}个预览入口",pleaseAddPreviewEntry:"请添加预览入口",miniPreviewFile:"小窗预览文件",fullPreviewFile:"全屏预览文件",pleaseSelectPreviewFile:"请选择预览文件",remarkDesc:"备注说明",dep:"组件依赖",localDep:"组件依赖(本地)",onlineDep:"组件依赖(线上)",finalDep:"最终依赖",localVersion:"本地:",onlineVersion:"线上:",onlineDepEmpty:"线上依赖暂无数据!",versionConsistent:"版本一致",versionChange:"版本变化,请手动选择最终版本",versionChangeConfirmed:"已确认",newDep:"新增依赖",miniPanel:"小窗面板",fullPanel:"全屏面板",reload:"重新加载",uploadProtocol:"组件发布协议",bgPanel:"背景板",compLocation:"组件位置",pleaseSelectFolderFirst:"请先选择文件夹",compAlreadyUploaded:"组件已经上传,更新操作请前往我的组件或团队组件",affirmDep:"组件依赖(确认的版本)",checkConfig:"配置检查",checkError:"报错信息",extraInfo:"附加信息",baseInfo:"基础信息",upgradeLog:"更新说明",pleaseInputUpgradeLog:"请填写更新说明",config:"组件配置",configStatus:"组件配置检查状态",configError:"配置异常",configCheckError:"配置检查报错",needUpgrade:"需要升级",fileChanged:"组件文件有变化",versionChanged:"版本号变化",fileNoChange:"文件没有变化",markdownValid:"Markdown预览校验通过",noMarkdown:"没有md文件",hash:"文件哈希",localHash:"本地组件文件hash",remoteHash:"线上组件文件hash",remoteVersion:"线上组件版本号",remoteVersionPrefix:"线上:",localVersionPrefix:"本地:",versionCompare:"版本号比较结果",carouselIndex:"组件预览走马灯index",bgColor:"组件背景颜色",dialogType:"组件弹窗类型",repeat:"组件重复检查",existLocal:"组件在本地存在",scopeId:"作用域id",tempDir:"组件临时目录",submitLimit:"组件提交限制",maxSize:"总大小限制",maxCount:"文件数量限制",matchType:"匹配类型",updateType:"更新类型",updateOnline:"在线更新",updateOffline:"离线更新",compOfflineUpdate:"组件离线更新",compOnlineUpdate:"组件在线更新",folder:"文件夹",compNotInLocal:"组件不在本地,继续更新只能更新组件描述,预览配置等基础信息,是否继续?",selectUpdateFolder:"请选择要更新的文件夹",openInVscode:"在编辑器中打开",openingInEditor:"在编辑器中打开...",openInExplorer:"在文件管理器中打开",openingInExplorer:"正在打开文件管理器...",updateSuccess:"更新成功",downloadVersionConfirm:"当前选择的版本为:{version},确认下载吗?",downloading:"组件下载中...",downloadPathConfirm:"是否下载组件到【{path}】路径下",downloadCoverConfirm:"组件【{name}】已经下载或者有同名组件,是否覆盖?",downloadCoverTitle:"组件覆盖确认",coverConfirm:"确认覆盖",uncollectConfirm:"是否取消收藏组件【{name}】,取消收藏后组件将不再显示在收藏列表中,是否继续?",deleteConfirm:"是否删除组件【{name}】,删除组件后会释放占用的组件名称,是否继续?",collect:"收藏",uncollect:"取消收藏",collected:"已收藏",uncollected:"未收藏",entryFile:"入口文件",configFile:"配置文件",fileChangedNeedVersion:"文件内容改变,请增加版本号",viewFileChanges:"查看文件变化",versionChangedButFileSame:"版本号改变,但文件内容未改变,请还原版本号",errorMsg:"错误信息",versionCannotBeLessThanLatest:"版本号不能小于最新版本{version}",uploadAnyway:"仍然上传",compileError:"组件编译失败",compileWarn:"组件编译警告",formatCode:"格式化代码:",formatCodeTooltip:"仅格式化对比时的文件,不会格式化原始文件",noChanges:"暂无变更",diff:{changed:"M 改变",unchanged:"U 未改变",added:"A 新增",deleted:"D 删除"},uploadConfirmTitle:"上传确认",renameFolderTitle:"文件夹名称不一致",renameFolderTip:"组件名称「{editedName}」与文件夹名称「{folderName}」不一致。",renameFolderQuestion:"是否在上传成功后同步修改文件夹名称?",renameSyncYes:"同步修改文件夹名称",renameSyncNo:"仅上传,不修改文件夹名称"},SU={title:"团队",name:"团队名称",code:"团队码",desc:"团队描述",create:"创建团队",join:"加入团队",exit:"退出团队",exitConfirm:"退出确认",manage:"团队管理",setting:"团队设置",member:"团队成员",memberCount:"成员数",maxMember:"最大成员数",compCount:"组件数量",maxCompCount:"最大组件数量",creator:"创建者",downloadCount:"下载量",collectCount:"收藏量",createTime:"创建时间",myTeam:"我的团队",joinedTeam:"已加入团队",space:"团队空间",noJoined:"暂无加入的团队",noCreated:"暂无创建的团队",createCountLimit:"最大允许创建的团队数量",joinCountLimit:"允许最多加入的团队数量",compList:"团队组件列表",myCompList:"我的组件",compGroup:"团队组件分组",compGroupList:"团队组件分组列表",addMyComp:"团队添加我的组件",compUpdate:"团队我的组件更新",addFromMine:"去我的组件添加",applyList:"申请列表",nickname:"团队昵称",noTeamInfo:"暂无团队信息",compLib:"组件库",groupConfig:"分组配置",compManage:"组件管理",unsavedDataLeave:"分组配置数据未保存,确定要离开吗?",leave:"离开",disbandTeam:"解散团队",applyAudit:"申请审核",teamName:"团队名称",fillTeamCode:"填写团队码",pleaseInputTeamCode:"请输入团队码",teamIdNotExist:"团队ID不存在",joinSuccess:"加入团队成功",applyJoinTeam:"申请加入团队",showRepeatComp:"展示重复组件",allowAuthorDelete:"作者删除组件权限",teamIntro:"团队介绍",fillTeamName:"填写团队名称",pleaseInputTeamName:"请输入团队名称",pleaseInputTeamDesc:"请输入团队介绍",createSuccess:"创建团队成功",charLength:"长度在 {min} 到 {max} 个字符",disbandConfirm:"确定解散团队吗,解散后所有成员和组件将被移除,并且无法恢复?",deleteConfirm:"删除确认",inputAuthCode:"请输入验证码",disbandSuccess:"解散团队成功",reject:"拒绝",agree:"同意",approved:"已同意",rejected:"已拒绝",kickOut:"踢出",teamUserNickname:"团队内昵称",pleaseInputTeamNickname:"请输入你在团队的昵称",normalUser:"普通用户",kickOutConfirm:"确定踢出用户【{name}】吗?",kickOutSuccess:"踢出成功",selectCanUpdateUser:"选择可更新用户",authorAutoAuth:"作者自带授权",updateAuth:"更新授权",updateTime:"更新时间",expandAll:"展开全部",createGroup:"创建分组",unsaved:"未保存",pleaseInputGroupName:"请输入分组名称",addComp:"添加组件",added:"已添加",notAdded:"未添加",defaultGroup:"默认分组",deleteGroupConfirm:"确认删除该分组吗?删除后该分组下的所有组件将被移除分组",addSuccess:"添加成功",isGrouped:"是否分组",grouped:"已分组",ungrouped:"未分组",group:"分组",prevVersion:"升级前版本",newVersion:"升级后版本",upgradeDesc:"升级描述",similarCompInTeam:"团队内相似组件",similarComp:"相似组件",deleteCompConfirm:"是否删除团队组件【{name}】,删除组件后团队成员将无法使用该组件,是否继续?",descTitle:"为业务团队打造专属组件空间",descItem1:"创建私密团队,组件仅对成员可见,保护核心资产",descItem2:"每个账号最多可创建 {count} 个团队",descItem3:"每个账号最多可加入 {count} 个团队",descItem4:"基础版团队支持最多 {count} 名成员",descItem5:"基础版团队可管理最多 {count} 个组件",descItem6:"支持创建分组菜单,灵活组织团队组件"},CU={title:"用户",username:"用户名",account:"账号",password:"密码",newPassword:"新密码",confirmPassword:"确认密码",confirmNewPassword:"确认新密码",pleaseInputNewPassword:"请输入新密码",pleaseConfirmNewPassword:"请确认新密码",passwordModified:"密码修改成功",email:"邮箱",oldEmail:"旧邮箱",newEmail:"新邮箱",phone:"手机号",avatar:"头像",nickname:"昵称",login:"登录",logout:"退出登录",register:"注册",forgotPassword:"忘记密码",resetPassword:"重置密码",changePassword:"修改密码",changeNickname:"修改昵称",pleaseInputNickname:"请输入昵称",changeAvatar:"修改头像",avatarModified:"头像修改成功",changeEmail:"修改邮箱",bindEmail:"绑定邮箱",emailBound:"邮箱绑定成功",basicInfo:"基本信息",securitySettings:"安全设置",loginPassword:"登录密码",passwordTip:"建议定期更换密码,确保账号安全",setPassword:"设置密码",emailLogin:"邮箱登录",emailLoginTip:"允许使用邮箱作为登录账号",pleaseSetPasswordFirst:"请先设置登录密码",pleaseBindEmailFirst:"请先绑定邮箱",emailLoginEnabled:"邮箱登录已开启",emailLoginDisabled:"邮箱登录已关闭",registerTime:"注册时间",notBound:"未绑定",change:"更换",bind:"绑定",authCode:"验证码",oldAuthCode:"旧验证码",newAuthCode:"新验证码",sendAuthCode:"发送验证码",resendAuthCode:"重新发送",getAuthCode:"获取验证码",pleaseInputAuthCode:"请输入验证码",pleaseInputNewAuthCode:"请输入新验证码",resendAfterSeconds:"{n}秒后重新获取",accountLogin:"账号登录",pleaseInputAccount:"请输入账号",pleaseInputUsername:"请输入用户名",pleaseInputPassword:"请输入密码",pleaseInputEmail:"请输入邮箱",pleaseInputOldEmail:"请输入旧邮箱",pleaseInputNewEmail:"请输入新邮箱",pleaseInputCorrectEmail:"请输入正确的邮箱",emailModified:"邮箱修改成功",newAuthCodeSent:"新验证码已发送",authCodeSent:"验证码已发送",skip:"跳过",loginSuccess:"登录成功",loggingIn:"登录中…",pleaseInputAccountAndPassword:"请输入您的账号和密码",invalidAccountOrPassword:"账号或密码错误",userInfo:"用户信息",personalCenter:"个人中心",myComp:"我的组件",notLoggedIn:"未登录",goLogin:"去登录",loginWithGithub:"使用 GitHub 登录",githubLoggingIn:"GitHub 登录中…",githubLoginFailed:"GitHub 登录失败",missingToken:"未获取到授权令牌",returnToLogin:"返回登录"},xU={title:"文件",name:"文件名",path:"文件路径",size:"文件大小",type:"文件类型",dir:"文件夹",selectDir:"选择文件夹",upload:"文件上传",download:"文件下载",select:"选择",multiSelect:"不支持多选",onlyDir:"只能选择文件夹",rootDir:"根目录",projectPath:"项目路径",currentDir:"当前目录",parentDir:"上级目录",refreshDir:"刷新文件夹列表"},TU={success:{download:"下载成功",update:"更新成功",delete:"删除成功",collect:"收藏成功",uncollect:"取消收藏成功",save:"保存成功",submit:"提交成功",upload:"上传成功",copy:"复制成功",operation:"操作成功",sendAuthCode:"验证码已发送",exitTeam:"退出成功",renameFolder:"文件夹名称修改成功"},error:{download:"下载失败",update:"更新失败",delete:"删除失败",collect:"收藏失败",uncollect:"取消收藏失败",save:"保存失败",submit:"提交失败",upload:"上传失败",copy:"复制失败",operation:"操作失败",load:"加载失败",network:"网络错误",timeout:"请求超时",unknown:"未知错误",pleaseFixCompileError:"请先处理编译错误",loginExpired:"登录已过期,请重新登录",refreshFailed:"刷新失败",requestFailed:"请求失败,请联系管理员",storageNotSupported:"浏览器不支持 storage.estimate API",renameFolder:"文件夹重命名失败,但组件已上传成功"},noUpdatePermission:"当前组件您没有更新权限,请联系管理员获取权限",confirm:{delete:"确定删除吗?",submit:"确定提交吗?",update:"确定更新吗?",exit:"确定退出吗?",cancel:"确定取消吗?"},loginRequired:"请先登录",fileExceed:"最多只能选择 {limit} 个文件,本次已选择 {selected} 个,共将上传 {total} 个文件",validate:{required:"必填项",format:"格式不正确",min:"不能小于最小值",max:"不能超过最大值",length:"长度不正确",email:"邮箱格式不正确",phone:"手机号格式不正确",imageFormat:"上传文件只能是图片格式",pleaseSelectFile:"请先选择文件",fileMaxSize:"上传文件大小不能超过 {size}MB!"}},kU={404:"页面不存在",share:"组件市场",collect:"收藏组件",collectSimple:"收藏",myComments:"我的评论",mine:"我的组件",mineSimple:"我的",local:"本地组件",localSimple:"本地",team:"团队",upload:"上传组件",uploadSimple:"上传",uploadTeam:"上传团队组件",setting:"设置",userInfo:"用户信息",upgrade:"更新",terminal:"终端",preview:"组件预览",previewLocal:"本地组件预览",previewTeam:"团队组件预览",previewBlank:"预览",similarPreview:"相似组件预览",login:"登录",githubCallback:"GitHub 登录回调",unknownTag:"未知标签"},OU={parse:"解析 Markdown",loading:"加载 Markdown",error:"加载失败",toc:"目录",anchor:"锚点"},$U={title:"终端",open:"打开终端",close:"关闭终端",execute:"执行命令",shutdown:"关闭进程",timeout:"超时时间",disconnected:"终端已断开连接"},AU={title:"依赖",name:"依赖名称",version:"依赖版本",install:"安装依赖",installing:"安装中",installed:"已安装",prebuild:"预构建",prebuildSize:"预构建大小",clearPrebuild:"清空预构建",batchSetting:"批量设置",dependencies:"dependencies",devDependencies:"devDependencies",match:{auto:"自动",onlyInstall:"仅安装",majorVersion:"主版本",minorVersion:"主次版本",exactVersion:"完全一致"},matchDesc:{auto:"不限制版本,使用当前环境直接渲染",onlyInstall:"不限制版本,仅需模块已安装",majorVersion:"主版本号一致即可(如 2.x)",minorVersion:"主版本和次版本一致(如 2.7.x)",exactVersion:"版本号完全匹配(如 2.7.14)"}},RU={title:"设置",previewRule:"预览规则",other:"其他设置",theme:"主题",language:"语言",darkMode:"暗黑模式",lightMode:"明亮模式"},PU={title:"版本更新",current:"当前版本",latest:"最新版本",check:"检查更新",upgrading:"更新中",upgraded:"已更新",publish:"发布更新",record:"更新记录",log:"更新日志",hasUpdate:"有更新",betaVersion:"内测版",noUpdate:"暂无更新",updateMethod:"更新方式",openTerminalAndRun:"打开终端,执行以下命令:",cannotIgnoreUpdate:"不可忽略此次更新"},IU={systemRecommended:"系统推荐",all:"全部",latest:"最新",hottest:"最热"},MU={submit:"提交"},DU={empty:"不能为空",notString:"必须是字符串类型,当前类型为: {type}",contentEmpty:"内容不能为空",startsWithNumber:'内容不能以数字开头,当前以 "{char}" 开头',invalidCharBacktick:"内容包含反引号(Markdown 语法标记),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharNewline:"内容包含换行符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharCarriageReturn:"内容包含回车符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharTab:"内容包含制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharFormFeed:"内容包含换页符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharVerticalTab:"内容包含垂直制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHash:"内容包含 # 字符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHtmlSpecial:'内容包含 HTML 特殊字符 "{char}",特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格',invalidCharUnknown:'内容包含非法字符 "{char}"(Unicode: U+{code}),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格'},FU={openInEditor:"在编辑器中打开",current:"当前",noRegistered:"暂无已注册项目",deregisterTitle:"注销项目",deregisterConfirm:"确定要注销项目 {hash} ({cwd}) 吗?",deregisterSuccess:"已注销项目 {hash}",deregisterFailed:"注销失败"},LU={myCommentsTitle:"我的评论",tabReceived:"收到的评论",tabMyDiscussions:"我的讨论",noMyCompsComments:"暂无评论",noReceivedComments:"暂无收到的评论",noMyDiscussions:"暂无参与讨论",new:"新",rating:"评分",ratingSuccess:"评分成功",ratingCancelSuccess:"已取消评分",ratingError:"评分失败,请重试",ratingDialogDesc:"正确的评分有助组件曝光,帮助更多人发现优秀组件",ratingThanks:"感谢你的打分,有什么意见请在评论区留言",writePlaceholder:"写下你的评论...",loginPlaceholder:"请先登录后再评论",post:"发表评论",allComments:"全部评论",empty:"暂无评论,来说两句吧",loadError:"加载评论失败",postSuccess:"评论发表成功",postError:"评论失败,请重试",anonymous:"匿名",self:"自己",cancelReply:"取消回复",reply:"回复",replyTo:"回复 {'@'}{name}...",replySuccess:"回复成功",replyError:"回复失败,请重试",expandReplies:"展开 {count} 条回复",collapseReplies:"收起回复",deleteConfirm:"确定删除这条评论吗?删除后不可恢复。",deleteTitle:"确认删除",deleteSuccess:"删除成功",deleteError:"删除失败,请重试",viewAllReplies:"查看全部 {count} 条回复",time:{justNow:"刚刚",minutesAgo:"{n}分钟前",hoursAgo:"{n}小时前",daysAgo:"{n}天前"}},jU={common:wU,comp:EU,team:SU,user:CU,file:xU,message:TU,route:kU,markdown:OU,terminal:$U,deps:AU,setting:RU,upgrade:PU,tag:IU,formCreate:MU,validateHash:DU,project:FU,comment:LU},UU={keyword:"Keyword",confirm:"Confirm",cancel:"Cancel",close:"Close",save:"Save",submit:"Submit",delete:"Delete",edit:"Edit",add:"Add",update:"Update",upload:"Upload",download:"Download",refresh:"Refresh",loadingText:"Loading",success:"Success",error:"Error",warning:"Warning",info:"Info",copy:"Copy",copied:"Copied",copySuccess:"Copy successful",copyFailed:"Copy failed",open:"Open",search:"Search",reset:"Reset",clear:"Clear",back:"Back",next:"Next",prev:"Previous",finish:"Finish",operation:"Operation",status:"Status",yes:"Yes",no:"No",name:"Name",description:"Description",version:"Version",time:"Time",date:"Date",author:"Author",type:"Type",category:"Category",tag:"Tag",content:"Content",setting:"Setting",cache:"Cache",cacheSize:"Used",clearCache:"Clear Cache",clearCacheConfirm:"This will clear browser single-file compilation results and module pre-compilation files. Confirm to clear cache?",cacheCleared:"Cache cleared",newPage:"Open in new page",terminal:"Terminal",preview:"Preview",doc:"Documentation",readme:"README.md",upgradeRecord:"Update Record",ratingReview:"Ratings & Reviews",openInNewPage:"Open in new page",depInstall:"Dependency Installation",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",maximizeRestore:"Maximize/Restore",siteSlogan:"Atomic Component Community, Making Component Sharing Easier.",siteSubtitle:"Vue Component Sharing Platform",adminSlogan:"Component Management Platform · Admin System",docsTutorial:"Documentation",empty:"No data",noReadme:"Component has no README.md file configured",dragSort:"Drag to sort",filter:"Filter",apply:"Apply",person:"people",unit:"items",pleaseSelect:"Please select",pleaseInput:"Please input",me:"Me",generate:"Generate",regenerate:"Regenerate",generateSuccess:"Generated successfully",moreOperations:"More Operations",more:"More",maxTagCount:"Max Tag Count",or:"or"},NU={keywordPlaceholder:"Please input component name or description",title:"Component",name:"Component Name",fieldId:"Component ID",fieldName:"Component Name",fieldVersion:"Version",desc:"Component Description",remarksDesc:"Remarks",remarksDescRequired:"Please enter remarks",pleaseInputCompName:"Please enter component name",pleaseInputRemarks:"Please enter remarks to help with component market search",pleaseInputTags:"Select or enter tags",tags:"Tags",tagsMaxCount:"No more than 5 tags allowed",tagsEmpty:"Tag cannot be empty",tagsTooLong:'Tag "{tag}" cannot exceed 20 characters',tagsInvalidChars:'Tag "{tag}" contains invalid characters, only Chinese, English, numbers, hyphens and underscores are allowed',tagsHelp:"Type and press Enter to create a new tag, max 5",compNameRequired:"Component name is required",compNameNamingRule:"Component name must be in PascalCase or kebab-case",lengthBetween:"Length must be between {min} and {max} characters",previewImage:"Preview Image",previewImageRequired:"Please upload or generate a preview image",previewImageHint:"Screenshot displayed in the mini preview panel, used as the component market cover. If auto-screenshot fails, please manually upload a PNG image",uploadPreviewImage:"Upload Preview Image",generateScreenshot:"Generate Screenshot",previewImageFallbackHint:"Preview image only takes effect when the component fails to render",version:"Component Version",detail:"Component Detail",preview:"Component Preview",previewConfig:"Preview Config",previewList:"Preview List",uploadPreview:"Component Upload Preview",updatePreview:"Component Update Preview",download:"Download Component",update:"Update Component",upload:"Upload Component",submit:"Submit Component",edit:"Edit Component",add:"Add Component",delete:"Delete Component",local:"Local Component",remote:"Remote Component",online:"Online Component",similar:"Similar Components",similarFound:"Similar Components Detected",similarTeam:"Similar Components in Team",dir:"Component Directory",file:"Component File",entry:"Entry File",previewEntry:"Preview Entry Address",previewEntryFull:"Preview Entry Address (Fullscreen)",addPreviewEntry:"Add Preview Entry",maxPreviewEntry:"Maximum {n} preview entries allowed",pleaseAddPreviewEntry:"Please add a preview entry",miniPreviewFile:"Mini Preview File",fullPreviewFile:"Full Preview File",pleaseSelectPreviewFile:"Please select preview file",remarkDesc:"Remarks",dep:"Component Dependencies",localDep:"Component Dependencies (Local)",onlineDep:"Component Dependencies (Online)",finalDep:"Final Dependencies",localVersion:"Local: ",onlineVersion:"Online: ",onlineDepEmpty:"No online dependency data!",versionConsistent:"Version Consistent",versionChange:"Version changed, please select final version",versionChangeConfirmed:"Confirmed",newDep:"New Dependency",miniPanel:"Mini Panel",fullPanel:"Full Panel",reload:"Reload",uploadProtocol:"Upload Protocol",bgPanel:"Background",compLocation:"Component Location",pleaseSelectFolderFirst:"Please select a folder first",compAlreadyUploaded:"Component already uploaded, please go to My Components or Team Components to update",affirmDep:"Component Dependencies (Confirmed Version)",checkConfig:"Config Check",checkError:"Error Info",extraInfo:"Extra Info",baseInfo:"Basic Info",upgradeLog:"Upgrade Log",pleaseInputUpgradeLog:"Please enter upgrade description",config:"Component Config",configStatus:"Component Config Check Status",configError:"Config Error",configCheckError:"Config Check Error",needUpgrade:"Needs Upgrade",fileChanged:"Component files changed",versionChanged:"Version changed",fileNoChange:"Files unchanged",markdownValid:"Markdown preview validation passed",noMarkdown:"No markdown file",hash:"File Hash",localHash:"Local Component File Hash",remoteHash:"Remote Component File Hash",remoteVersion:"Remote Component Version",remoteVersionPrefix:"Online: ",localVersionPrefix:"Local: ",versionCompare:"Version Comparison Result",carouselIndex:"Component Preview Carousel Index",bgColor:"Component Background Color",dialogType:"Component Dialog Type",repeat:"Component Repeat Check",existLocal:"Component exists locally",scopeId:"Scope ID",tempDir:"Component Temp Directory",submitLimit:"Component Submit Limit",maxSize:"Total Size Limit",maxCount:"File Count Limit",matchType:"Match Type",updateType:"Update Type",updateOnline:"Online Update",updateOffline:"Offline Update",compOfflineUpdate:"Component Offline Update",compOnlineUpdate:"Component Online Update",folder:"Folder",compNotInLocal:"Component is not local. Continuing will only update basic information like description and preview config. Continue?",selectUpdateFolder:"Please select folder to update",openInVscode:"Open in editor",openingInEditor:"Opening in editor...",openInExplorer:"Open in File Explorer",openingInExplorer:"Opening file explorer...",updateSuccess:"Update successful",downloadVersionConfirm:"The currently selected version is: {version}, confirm download?",downloading:"Downloading component...",downloadPathConfirm:"Download component to path [{path}]?",downloadCoverConfirm:"Component [{name}] already exists or has a duplicate name, overwrite?",downloadCoverTitle:"Overwrite Confirmation",coverConfirm:"Confirm Overwrite",uncollectConfirm:"Are you sure you want to uncollect component [{name}]? It will no longer appear in your collection list.",deleteConfirm:"Are you sure you want to delete component [{name}]? This will free up the component name and cannot be undone.",collect:"Collect",uncollect:"Uncollect",collected:"Collected",uncollected:"Not Collected",entryFile:"Entry File",configFile:"Config File",fileChangedNeedVersion:"File content changed, please increment version",viewFileChanges:"View File Changes",versionChangedButFileSame:"Version changed but file content unchanged, please revert version",errorMsg:"Error Message",versionCannotBeLessThanLatest:"Version cannot be less than latest version {version}",uploadAnyway:"Upload Anyway",compileError:"Component compilation failed",compileWarn:"Component compilation warning",formatCode:"Format Code:",formatCodeTooltip:"Only formats files during comparison, original files remain unchanged",noChanges:"No changes",diff:{changed:"M Changed",unchanged:"U Unchanged",added:"A Added",deleted:"D Deleted"},uploadConfirmTitle:"Upload Confirmation",renameFolderTitle:"Folder Name Mismatch",renameFolderTip:'Component name "{editedName}" does not match folder name "{folderName}".',renameFolderQuestion:"Do you want to sync the folder name after upload?",renameSyncYes:"Sync folder name",renameSyncNo:"Upload only, do not modify folder name"},zU={title:"Team",name:"Team Name",code:"Team Code",desc:"Team Description",create:"Create Team",join:"Join Team",exit:"Exit Team",exitConfirm:"Exit Confirmation",manage:"Team Management",setting:"Team Settings",member:"Team Members",memberCount:"Member Count",maxMember:"Max Members",compCount:"Component Count",maxCompCount:"Max Components",creator:"Creator",downloadCount:"Downloads",collectCount:"Collections",createTime:"Create Time",myTeam:"My Teams",joinedTeam:"Joined Teams",space:"Team Space",noJoined:"No joined teams",noCreated:"No created teams",createCountLimit:"Max teams allowed to create",joinCountLimit:"Max teams allowed to join",compList:"Team Component List",myCompList:"My Component List",compGroup:"Team Component Group",compGroupList:"Team Component Group List",addMyComp:"Team Add My Component",compUpdate:"Team My Component Update",addFromMine:"Add from My Components",applyList:"Apply List",nickname:"Team Nickname",noTeamInfo:"No team information",compLib:"Component Library",groupConfig:"Group Config",compManage:"Component Management",unsavedDataLeave:"Group configuration data is not saved, are you sure you want to leave?",leave:"Leave",disbandTeam:"Disband Team",applyAudit:"Apply Audit",teamName:"Team Name",fillTeamCode:"Fill in Team Code",pleaseInputTeamCode:"Please enter team code",teamIdNotExist:"Team ID does not exist",joinSuccess:"Joined team successfully",applyJoinTeam:"Apply to Join Team",showRepeatComp:"Show Duplicate Components",allowAuthorDelete:"Allow Author Delete",teamIntro:"Team Introduction",fillTeamName:"Fill in Team Name",pleaseInputTeamName:"Please enter team name",pleaseInputTeamDesc:"Please enter team description",createSuccess:"Team created successfully",charLength:"Length must be between {min} and {max} characters",disbandConfirm:"Are you sure you want to disband the team? All members and components will be removed and cannot be recovered.",deleteConfirm:"Delete Confirmation",inputAuthCode:"Please enter verification code",disbandSuccess:"Team disbanded successfully",reject:"Reject",agree:"Agree",approved:"Approved",rejected:"Rejected",kickOut:"Kick Out",teamUserNickname:"Team Nickname",pleaseInputTeamNickname:"Please enter your team nickname",normalUser:"Normal User",kickOutConfirm:"Are you sure you want to kick out user [{name}]?",kickOutSuccess:"Kicked out successfully",selectCanUpdateUser:"Select users who can update",authorAutoAuth:"Author has default authorization",updateAuth:"Update Authorization",updateTime:"Update Time",expandAll:"Expand All",createGroup:"Create Group",unsaved:"Unsaved",pleaseInputGroupName:"Please enter group name",addComp:"Add Component",added:"Added",notAdded:"Not Added",defaultGroup:"Default Group",deleteGroupConfirm:"Are you sure you want to delete this group? All components in this group will be removed from the group.",addSuccess:"Added successfully",isGrouped:"Is Grouped",grouped:"Grouped",ungrouped:"Ungrouped",group:"Group",prevVersion:"Previous Version",newVersion:"New Version",upgradeDesc:"Upgrade Description",similarCompInTeam:"Similar Components in Team",similarComp:"Similar Components",deleteCompConfirm:"Are you sure you want to delete team component [{name}]? Team members will no longer be able to use this component.",descTitle:"Create an Exclusive Component Space for Your Team",descItem1:"Create a private team where components are only visible to members, protecting core assets",descItem2:"Each account can create up to {count} teams",descItem3:"Each account can join up to {count} teams",descItem4:"Basic team supports up to {count} members",descItem5:"Basic team can manage up to {count} components",descItem6:"Support creating group menus to organize team components flexibly"},BU={title:"User",username:"Username",account:"Account",password:"Password",newPassword:"New Password",confirmPassword:"Confirm Password",confirmNewPassword:"Confirm New Password",pleaseInputNewPassword:"Please enter new password",pleaseConfirmNewPassword:"Please confirm new password",passwordModified:"Password modified successfully",email:"Email",oldEmail:"Old Email",newEmail:"New Email",phone:"Phone",avatar:"Avatar",nickname:"Nickname",login:"Login",logout:"Logout",register:"Register",forgotPassword:"Forgot Password",resetPassword:"Reset Password",changePassword:"Change Password",changeNickname:"Change Nickname",pleaseInputNickname:"Please enter nickname",changeAvatar:"Change Avatar",avatarModified:"Avatar updated successfully",changeEmail:"Change Email",bindEmail:"Bind Email",emailBound:"Email bound successfully",basicInfo:"Basic Information",securitySettings:"Security Settings",loginPassword:"Login Password",passwordTip:"Regularly change your password to ensure account security",setPassword:"Set Password",emailLogin:"Email Login",emailLoginTip:"Allow using email as login account",pleaseSetPasswordFirst:"Please set login password first",pleaseBindEmailFirst:"Please bind an email first",emailLoginEnabled:"Email login enabled",emailLoginDisabled:"Email login disabled",registerTime:"Registration Time",notBound:"Not Bound",change:"Change",bind:"Bind",authCode:"Verification Code",oldAuthCode:"Old Verification Code",newAuthCode:"New Verification Code",sendAuthCode:"Send Auth Code",resendAuthCode:"Resend",getAuthCode:"Get Code",pleaseInputAuthCode:"Please enter code",pleaseInputNewAuthCode:"Please enter new code",resendAfterSeconds:"Resend in {n}s",accountLogin:"Account Login",pleaseInputAccount:"Please enter account",pleaseInputUsername:"Please enter username",pleaseInputPassword:"Please enter password",pleaseInputEmail:"Please enter email",pleaseInputOldEmail:"Please enter old email",pleaseInputNewEmail:"Please enter new email",pleaseInputCorrectEmail:"Please enter correct email",emailModified:"Email modified successfully",newAuthCodeSent:"New verification code sent",authCodeSent:"Verification code sent",skip:"Skip",loginSuccess:"Login successful",loggingIn:"Logging in...",pleaseInputAccountAndPassword:"Please enter your account and password",invalidAccountOrPassword:"Invalid account or password",userInfo:"User Info",personalCenter:"Personal Center",myComp:"My Components",notLoggedIn:"Not logged in",goLogin:"Go to Login",loginWithGithub:"Login with GitHub",githubLoggingIn:"Logging in with GitHub...",githubLoginFailed:"GitHub Login Failed",missingToken:"Authorization token not received",returnToLogin:"Return to Login"},VU={title:"File",name:"Filename",path:"File Path",size:"File Size",type:"File Type",dir:"Directory",selectDir:"Select Directory",upload:"File Upload",download:"File Download",select:"Select",multiSelect:"Multiple selection not supported",onlyDir:"Only directories can be selected",rootDir:"Root Directory",projectPath:"Project Path",currentDir:"Current Directory",parentDir:"Parent Directory",refreshDir:"Refresh Directory List"},HU={success:{download:"Download successful",update:"Update successful",delete:"Delete successful",collect:"Collect successful",uncollect:"Uncollect successful",save:"Save successful",submit:"Submit successful",upload:"Upload successful",copy:"Copy successful",operation:"Operation successful",sendAuthCode:"Verification code sent",exitTeam:"Exit successful",renameFolder:"Folder name updated successfully"},error:{download:"Download failed",update:"Update failed",delete:"Delete failed",collect:"Collect failed",uncollect:"Uncollect failed",save:"Save failed",submit:"Submit failed",upload:"Upload failed",copy:"Copy failed",operation:"Operation failed",load:"Load failed",network:"Network error",timeout:"Request timeout",unknown:"Unknown error",pleaseFixCompileError:"Please fix compilation errors first",loginExpired:"Login expired, please log in again",refreshFailed:"Refresh failed",requestFailed:"Request failed, please contact administrator",storageNotSupported:"Browser does not support storage.estimate API",renameFolder:"Folder rename failed, but component was uploaded successfully"},noUpdatePermission:"You do not have permission to update this component. Please contact the administrator for access.",confirm:{delete:"Are you sure to delete?",submit:"Are you sure to submit?",update:"Are you sure to update?",exit:"Are you sure to exit?",cancel:"Are you sure to cancel?"},loginRequired:"Please login first",fileExceed:"You can select at most {limit} files, {selected} selected this time, {total} total to be uploaded",validate:{required:"Required field",format:"Invalid format",min:"Cannot be less than minimum value",max:"Cannot exceed maximum value",length:"Invalid length",email:"Invalid email format",phone:"Invalid phone format",imageFormat:"Only image files are allowed",pleaseSelectFile:"Please select a file first",fileMaxSize:"File size cannot exceed {size}MB!"}},qU={404:"Page Not Found",share:"Component Market",collect:"Collected Components",collectSimple:"Collection",myComments:"My Comments",mine:"My Components",mineSimple:"Mine",local:"Local Components",localSimple:"Local",team:"Team",upload:"Upload Component",uploadSimple:"Upload",uploadTeam:"Upload Team Component",setting:"Settings",userInfo:"User Info",upgrade:"Upgrade",terminal:"Terminal",preview:"Component Preview",previewLocal:"Local Component Preview",previewTeam:"Team Component Preview",previewBlank:"Preview",similarPreview:"Similar Component Preview",login:"Login",githubCallback:"GitHub Login Callback",unknownTag:"Unknown Tag"},WU={parse:"Parse Markdown",loading:"Loading Markdown",error:"Load failed",toc:"Table of Contents",anchor:"Anchor"},YU={title:"Terminal",open:"Open Terminal",close:"Close Terminal",execute:"Execute Command",shutdown:"Shutdown Process",timeout:"Timeout",disconnected:"Terminal disconnected"},KU={title:"Dependencies",name:"Dependency Name",version:"Dependency Version",install:"Install Dependencies",installing:"Installing",installed:"Installed",prebuild:"Prebuild",prebuildSize:"Prebuild Size",clearPrebuild:"Clear Prebuild",batchSetting:"Batch Setting",dependencies:"dependencies",devDependencies:"devDependencies",match:{auto:"Auto",onlyInstall:"Install Only",majorVersion:"Major Version",minorVersion:"Major + Minor",exactVersion:"Exact Match"},matchDesc:{auto:"No version restriction, render with current environment",onlyInstall:"No version restriction, only requires installation",majorVersion:"Major version match (e.g. 2.x)",minorVersion:"Major and minor version match (e.g. 2.7.x)",exactVersion:"Exact version match (e.g. 2.7.14)"}},GU={title:"Settings",previewRule:"Preview Rule",other:"Other Settings",theme:"Theme",language:"Language",darkMode:"Dark Mode",lightMode:"Light Mode"},QU={title:"Version Update",current:"Current Version",latest:"Latest Version",check:"Check for Updates",upgrading:"Updating",upgraded:"Updated",publish:"Publish Update",record:"Update Record",log:"Changelog",hasUpdate:"Update Available",betaVersion:"Beta",noUpdate:"No updates available",updateMethod:"Update Method",openTerminalAndRun:"Open terminal and run:",cannotIgnoreUpdate:"This update cannot be ignored"},XU={systemRecommended:"System Recommended",all:"All",latest:"Latest",hottest:"Hottest"},JU={submit:"Submit"},ZU={empty:"Cannot be empty",notString:"Must be a string type, current type: {type}",contentEmpty:"Content cannot be empty",startsWithNumber:'Content cannot start with a number, currently starts with "{char}"',invalidCharBacktick:"Content contains backtick (Markdown syntax marker), only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharNewline:"Content contains newline character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharCarriageReturn:"Content contains carriage return, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharTab:"Content contains tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharFormFeed:"Content contains form feed character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharVerticalTab:"Content contains vertical tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHash:"Content contains # character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHtmlSpecial:'Content contains HTML special character "{char}", only hyphen(-), underscore(_), parentheses(), and spaces are allowed',invalidCharUnknown:'Content contains invalid character "{char}" (Unicode: U+{code}), only hyphen(-), underscore(_), parentheses(), and spaces are allowed'},eN={openInEditor:"Open in Editor",current:"Current",noRegistered:"No registered projects",deregisterTitle:"Deregister Project",deregisterConfirm:"Are you sure you want to deregister project {hash} ({cwd})?",deregisterSuccess:"Deregistered project {hash}",deregisterFailed:"Deregister failed"},tN={myCommentsTitle:"My Comments",tabReceived:"Received",tabMyDiscussions:"My Discussions",noMyCompsComments:"No comments yet",noReceivedComments:"No comments received",noMyDiscussions:"No discussions yet",new:"New",rating:"Rating",ratingSuccess:"Rating submitted",ratingCancelSuccess:"Rating removed",ratingError:"Failed to rate, please try again",ratingDialogDesc:"Accurate ratings help components get more exposure",ratingThanks:"Thank you for your rating! Feel free to leave a comment below.",writePlaceholder:"Write a comment...",loginPlaceholder:"Please login to comment",post:"Post Comment",allComments:"All Comments",empty:"No comments yet. Be the first to comment!",loadError:"Failed to load comments",postSuccess:"Comment posted successfully",postError:"Failed to post comment, please try again",anonymous:"Anonymous",self:"Me",cancelReply:"Cancel Reply",reply:"Reply",replyTo:"Reply to {'@'}{name}...",replySuccess:"Reply posted successfully",replyError:"Failed to reply, please try again",expandReplies:"Expand {count} replies",collapseReplies:"Collapse replies",deleteConfirm:"Are you sure you want to delete this comment? This action cannot be undone.",deleteTitle:"Confirm Delete",deleteSuccess:"Deleted successfully",deleteError:"Failed to delete, please try again",viewAllReplies:"View all {count} replies",time:{justNow:"just now",minutesAgo:"{n} minutes ago",hoursAgo:"{n} hours ago",daysAgo:"{n} days ago"}},nN={common:UU,comp:NU,team:zU,user:BU,file:VU,message:HU,route:qU,markdown:WU,terminal:YU,deps:KU,setting:GU,upgrade:QU,tag:XU,formCreate:JU,validateHash:ZU,project:eN,comment:tN},rN={zh:jU,en:nN},iN=localStorage.getItem(bM.LOCALE_KEY)||"zh",pE=tP({locale:iN,messages:rN,legacy:!1});function hE(e){e.use(pE)}const Jh=Object.freeze(Object.defineProperty({__proto__:null,i18n:pE,setup:hE},Symbol.toStringTag,{value:"Module"}));function oN({store:e}){e.$subscribe((...t)=>{const[n]=t;if(n.type==="direct")throw new Error("不允许直接修改store,建议使用action修改")})}const Hp=nP();function mE(e){Hp.use(oN),e.use(Hp)}const sN=Object.freeze(Object.defineProperty({__proto__:null,pinia:Hp,setup:mE},Symbol.toStringTag,{value:"Module"}));function aN(e){e.directive("loading",Rw)}function lN(e){e.component("Icon",pL)}const{i18n:gc}=Jh,{pinia:Mf}=sN,Ms=Eo("userStore",{state:()=>({userInfo:{},logoutDialogOpen:!1}),getters:{userId:e=>e.userInfo._id,displayName(e){return e.userInfo.nickname||e.userInfo.account||gc.global.t("user.notLoggedIn")},avatar:e=>e.userInfo.avatar,avatarStr(e){return e.userInfo.nickname?.[0]||e.userInfo.account?.[0]||""}},actions:{async fetchCsrfToken(){fE.get(mn.CSRF_KEY)||await Yo.v1Csrf.csrfcontrollerGetcsrftoken()},updateAvatar(e){this.$patch(t=>{t.userInfo&&(t.userInfo.avatar=e)})},updateNickname(e){this.$patch(t=>{t.userInfo&&(t.userInfo.nickname=e)})},setLogoutDialogOpen(e){this.$patch(t=>{t.logoutDialogOpen=e})},setUserInfo(e){this.$patch(t=>{t.userInfo=e})},login(e){return Yo.v1User.usercontrollerLogin({...e})},async fetchWhoAmI(){const e=await Yo.v1User.usercontrollerWhoami();e.data&&this.setUserInfo(e.data)},logout(){Bs.push("/login?type=logout").then(e=>{e||(this.clearLocalStorage(),this.resetAll(),this.$reset())})},resetAll(){const e=tl(),t=gU(),n=_U(),r=Xh(),i=yU();e?.$reset(),t?.$reset(),n?.$reset(),r?.$reset(),i?.$reset(),this.clearTeamHomeStores(),this.clearCompListStores(),this.clearCompEditStore()},clearLocalStorage(){RD(),MD()},clearTeamHomeStores(){for(const[e,t]of Mf._s.entries())e.startsWith("teamHome")&&t.$reset()},clearCompListStores(){for(const[e,t]of Mf._s.entries())e.startsWith("compList")&&t.$reset()},clearCompEditStore(){for(const[e,t]of Mf._s.entries())e.startsWith("compEdit")&&t.$reset()},isRealUserLogin(){const e=Object.keys(this.userInfo),t=au();return e.length>0&&t!==null},isAccessTokenExist(){return au()!==null},logoutDialog(){if(this.logoutDialogOpen)return;this.setLogoutDialogOpen(!0);const e={confirmButtonText:gc.global.t("user.goLogin"),showClose:!0,callback:t=>{this.setLogoutDialogOpen(!1),t==="confirm"&&this.logout()}};_P.alert(gc.global.t("message.loginRequired"),gc.global.t("common.info"),e)}}}),cN=ze({__name:"SubMenu",props:{route:{},basePath:{}},setup(e){const{getTitle:t}=Wh(),n=e,r=Ms(),i=(d,f="")=>d4.resolve(d,f),o=se(()=>i(n.basePath||"",n.route.path)),s=se(()=>(n.route.children||[]).some(d=>!d.meta?.hidden)),l=se(()=>{const{children:d=[]}=n.route;return d.length===0||d.length===1&&!d[0]?.children?.length}),c=se(()=>{const{children:d=[],meta:f={}}=n.route;return f?.hidden?!1:r.isRealUserLogin()||d.length>0?!0:!r.isAccessTokenExist()&&n.route.meta?.noAuth});return(d,f)=>{const p=ft("SubMenu",!0),v=Ma,y=yP;return c.value?(C(),R(We,{key:0},[e.route.meta?.hideParent&&s.value?(C(!0),R(We,{key:0},ut(e.route.children,g=>(C(),Ee(p,{key:i(o.value,g.path),route:g,"base-path":i(o.value,g.path)},null,8,["route","base-path"]))),128)):(C(),R(We,{key:1},[l.value?(C(),Ee(p4,{key:0,route:e.route,"full-path":o.value},null,8,["route","full-path"])):(C(),Ee(y,{key:1,index:o.value},{title:Le(()=>[Z(v,null,{default:Le(()=>[(C(),Ee(Pn(e.route?.meta?.icon)))]),_:1}),_("span",null,q(w(t)(e.route?.meta?.title)),1)]),default:Le(()=>[(C(!0),R(We,null,ut(e.route.children,g=>(C(),Ee(p,{key:i(o.value,g.path),route:g,"base-path":i(o.value,g.path)},null,8,["route","base-path"]))),128))]),_:1},8,["index"]))],64))],64)):Se("",!0)}}}),uN=ze({__name:"index",setup(e){const t=Xh(),n=Cu(),r=Mh(),i=se(()=>n.options.routes),o=se(()=>r.path);return(s,l)=>{const c=bP;return C(),Ee(c,{class:"dark:!bg-gray-800 border-t border-gray-200 dark:border-gray-700",collapse:w(t).collapse,"default-active":o.value},{default:Le(()=>[(C(!0),R(We,null,ut(i.value,d=>(C(),R(We,null,[d?.meta?.hidden?Se("",!0):(C(),Ee(cN,{key:d.path,basePath:d.path,route:d},null,8,["basePath","route"]))],64))),256))]),_:1},8,["collapse","default-active"])}}}),dN={class:"flex gap-[20px] items-center pl-[10px] pr-[10px]"},fN=["title"],pN=["title"],hN=["title"],mN={class:"flex items-center gap-[10px]"},vN=ze({__name:"index",setup(e){const{t}=Ja(),n=tl(),r=Cu(),i=Mh(),o=js(m1,10),s=re(n.maxCache),l=()=>{r.back()},c=()=>{r.replace({path:i.path,query:{...i.query,[mn.ROUTE_STATE_KEY_VERSION]:Date.now()}})};function d(f){f&&n.setMaxCache(f)}return zn(()=>{o.value=n.maxCache}),(f,p)=>{const v=ft("Icon"),y=Pp,g=Rp;return C(),R("div",dN,[_("span",{title:w(t)("common.back")},[Z(v,{icon:"material-symbols:arrow-back-rounded",class:"cursor-pointer",onClick:l})],8,fN),_("span",{title:w(t)("common.refresh")},[Z(v,{icon:"material-symbols:refresh-rounded",class:"cursor-pointer",onClick:c})],8,pN),Z(g,{placement:"bottom",trigger:"hover",width:"auto"},{reference:Le(()=>[_("span",{title:w(t)("common.moreOperations")},[Z(v,{icon:"material-symbols:article-outline",class:"cursor-pointer"})],8,hN)]),default:Le(()=>[_("div",mN,[_("div",null,q(w(t)("common.maxTagCount"))+":",1),_("div",null,[Z(y,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=m=>s.value=m),min:1,style:{width:"90px"},"controls-position":"right",onChange:d},null,8,["modelValue"])])])]),_:1})])}}}),gN={class:"flex dark:bg-gray-800 py-[2px] h-[40px] border border-gray-200 dark:border-gray-700"},_N=ze({__name:"index",setup(e){const{t}=Ja(),n=Cu(),r=Mh(),i=tl(),{getTitle:o}=Wh();He(()=>r,()=>{i.addView(r)},{immediate:!0,deep:!0});const s=se(()=>i.visitedViews),l=se(()=>s.value.length===1);function c(v){const y=d(v);i.delViewAndJumpToPrev(v.path,y,n)}function d(v){return v.path===r.path}function f(v){n.push(v)}function p(v){const y=v?.meta?.title||t("route.unknownTag"),g=i.getPayLoad(v.path);return o(g?.name||y)}return(v,y)=>{const g=ft("Icon"),m=Ma,b=Is,x=wP;return C(),R("div",gN,[Z(vN),Z(w(hF),{class:"flex-1 overflow-hidden",list:s.value,getKey:S=>S.path},{display:Le(({visibleList:S,overflow:O})=>[Z(rP,{tag:"ul",name:"fade",class:"flex gap-[5px] p-[2px] items-center"},{default:Le(()=>[(C(!0),R(We,null,ut(S,T=>(C(),R("div",{key:T.path},[Z(b,{type:d(T)?"primary":"default",onClick:A=>f(T)},{default:Le(()=>[Et(q(p(T))+" ",1),l.value?Se("",!0):(C(),Ee(m,{key:0,style:{"font-size":"16px"},class:"ml-[5px]",onClick:ht(A=>c(T),["stop"])},{default:Le(()=>[Z(g,{icon:"material-symbols:close"})]),_:1},8,["onClick"]))]),_:2},1032,["type","onClick"])]))),128)),O>0?(C(),Ee(x,{key:0,type:"info"},{default:Le(()=>[Et("+"+q(O)+" "+q(w(t)("common.more")),1)]),_:2},1024)):Se("",!0)]),_:2},1024)]),measure:Le(({item:S})=>[Z(b,{type:"primary"},{default:Le(()=>[Et(q(p(S))+" ",1),l.value?Se("",!0):(C(),Ee(m,{key:0,style:{"font-size":"16px"},class:"ml-[5px]"},{default:Le(()=>[Z(g,{icon:"material-symbols:close"})]),_:1}))]),_:2},1024)]),_:1},8,["list","getKey"])])}}}),yN=Uh(_N,[["__scopeId","data-v-72cc4b44"]]),bN={class:"size-full overflow-hidden"},wN={class:"h-[60px] dark:bg-gray-800"},EN={class:"size-full overflow-hidden flex flex-col dark:bg-gray-800"},SN={class:"dark:bg-gray-800"},CN={class:"size-full flex flex-col"},xN={class:""},TN={class:"flex-1 overflow-auto"},kN=ze({__name:"index",setup(e){const t=Jr(()=>Rt(()=>import("./index-B4Denke_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),n=Jr(()=>Rt(()=>import("./index-CGL710hV.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,14,15,16,17,18,19,20,6]),import.meta.url)),r=re(68),i=re(200),o=re(60),s=re(""),l=re(""),c=se(()=>s.value?"transition-width duration-400":""),d=se(()=>l.value?"transition-height duration-300":""),f=se(()=>({class:d.value,size:y.value,collapsible:!0,resizable:!1})),p=se(()=>({class:c.value,min:r.value,max:300,collapsible:!0})),v=js(FD,r.value),y=js(LD,o.value),g=Xh(),m=Ms(),b=async(O,T)=>{s.value=T,T==="end"&&v.value===0?(v.value=i.value,window?.umami?.track(hy.SIDEBAR_TOGGLE,{state:"expanded"})):T==="start"&&window?.umami?.track(hy.SIDEBAR_TOGGLE,{state:"collapsed"})},x=(O,T)=>{l.value=T,T==="start"?y.value=0:T==="end"&&(y.value=o.value)},S=O=>{O==="header"?l.value="":O==="side"&&(s.value="")};return zn(()=>{g.setSideBarCollapse(v.value===r.value)}),(O,T)=>{const A=EP,M=CP,z=SP;return C(),R("div",bN,[Z(z,{layout:"vertical",onCollapse:x},{default:Le(()=>[Z(A,Ot({class:"!overflow-hidden transform-gpu isolate will-change-height"},f.value,{onTransitionend:T[0]||(T[0]=Y=>S("header")),onWebkitTransitionEnd:T[1]||(T[1]=Y=>S("header"))}),{default:Le(()=>[_("div",wN,[Z(w(n))])]),_:1},16),Z(A,{class:Be(["transform-gpu isolate",d.value])},{default:Le(()=>[Z(z,{onCollapse:b},{default:Le(()=>[Z(A,Ot(p.value,{size:w(v),"onUpdate:size":T[2]||(T[2]=Y=>Za(v)?v.value=Y:null),class:"transform-gpu isolate will-change-width",onTransitionend:T[3]||(T[3]=Y=>S("side")),onWebkitTransitionEnd:T[4]||(T[4]=Y=>S("side"))}),{default:Le(()=>[_("div",EN,[Z(uN),w(m).isRealUserLogin()?(C(),R(We,{key:0},[_("div",SN,[Z(M)]),Z(w(t))],64)):Se("",!0)])]),_:1},16,["size"]),Z(A,{class:Be(["transform-gpu isolate !overflow-hidden",c.value])},{default:Le(()=>[_("div",CN,[_("div",xN,[Z(yN)]),_("div",TN,[(C(),Ee(Dh,null,{default:Le(()=>[Z(l4)]),_:1}))])])]),_:1},8,["class"])]),_:1})]),_:1},8,["class"])]),_:1})])}}});let Bs;function ON(){const e=window.__GLOBAL_CONFIG__?.projectHash,t=e?`/${e}/main/`:`/${mn.WEBSITE_PATH_MAIN}/`;return Bs=iP({history:oP(t),routes:[{path:"/login",name:"login",component:()=>Rt(()=>import("./index-DRLluzuR.js"),__vite__mapDeps([21,1,2,13,14,16,17,22,23,3,24,25,26,20]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.login"}},{path:"/github-callback",name:"githubCallback",component:()=>Rt(()=>import("./GithubCallback-DRfvlj0J.js"),__vite__mapDeps([27,1,2,24]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.githubCallback"}},{path:"/upgrade",name:"upgrade",component:()=>Rt(()=>import("./index-3thCh3qq.js"),__vite__mapDeps([28,1,2,29,25,16,17,7,30]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.upgrade"}},{path:"/previewBlank/:compId/:version?",name:"previewBlank",component:()=>Rt(()=>import("./index-BLCWm3Fn.js"),__vite__mapDeps([31,2,32,33,1,34,4]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.preview"}},{path:"/previewLocalBlank/:compId",name:"previewLocalBlank",component:()=>Rt(()=>import("./index-sFKst8yj.js"),__vite__mapDeps([35,2,36,37,1,15,34,4]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.previewLocal"}},{path:"/similarPreview/:compId",name:"similarPreview",component:()=>Rt(()=>import("./index-Cp8ViCIR.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url),meta:{hidden:!0,noAuth:!0,title:"route.similarPreview"}},{path:"/",component:kN,redirect:"/share",meta:{hideParent:!0},children:[{path:"/share",name:"share",meta:{title:"route.share",icon:Jr(()=>Rt(()=>import("./home-rounded-CN0qCDnE.js"),__vite__mapDeps([54,18,2,55]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-Cey7IuDj.js"),__vite__mapDeps([56,1,2,45,32,36,11,15,46,5,47,6,20,4,34,57]),import.meta.url)},{path:"/mine",name:"mine",meta:{title:"route.mine",icon:Jr(()=>Rt(()=>import("./supervised-user-circle-BwUSx6w_.js"),__vite__mapDeps([58,18,2,59]),import.meta.url))},component:()=>Rt(()=>import("./index-DvXl2xci.js"),__vite__mapDeps([60,1,2,45,32,36,11,15,46,5,47,6,20,4,34,61,62,63,29,49,52,64,65,3,66,7,67,57]),import.meta.url)},{path:"/collect",name:"collect",meta:{title:"route.collect",icon:Jr(()=>Rt(()=>import("./kid-star-CiMfD7Sa.js"),__vite__mapDeps([68,18,2,69]),import.meta.url))},component:()=>Rt(()=>import("./index-_FSb4t-p.js"),__vite__mapDeps([70,1,2,45,32,36,11,15,46,5,47,6,20,4,34,57]),import.meta.url)},{path:"/myComments",name:"myComments",meta:{title:"route.myComments",hidden:!0},component:()=>Rt(()=>import("./index-BIIfOsTM.js"),__vite__mapDeps([71,1,2,9,10,11,12,51,52,64,65,7,20]),import.meta.url)},{path:"/local",name:"local",meta:{title:"route.local",icon:Jr(()=>Rt(()=>import("./sync-saved-locally-rounded-DyESI323.js"),__vite__mapDeps([72,18,2,73]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-F2VTlbBR.js"),__vite__mapDeps([74,1,2,45,32,36,11,15,46,5,47,6,20,4,34]),import.meta.url)},{path:"/upload",name:"upload",meta:{title:"route.upload",icon:Jr(()=>Rt(()=>import("./cloud-upload-BqJFdj_J.js"),__vite__mapDeps([75,18,2,76]),import.meta.url)),noAuth:!0,hidden:!0},component:()=>Rt(()=>import("./index-DGc9WQeN.js"),__vite__mapDeps([77,1,2,62,32,4,63,34,29,49,5,15,46,47,6,20,52,64,65,3,66,7,44,78,30]),import.meta.url)},{path:"/uploadTeam/:teamId",name:"uploadTeam",meta:{title:"route.uploadTeam",hidden:!0},component:()=>Rt(()=>import("./index-DGc9WQeN.js"),__vite__mapDeps([77,1,2,62,32,4,63,34,29,49,5,15,46,47,6,20,52,64,65,3,66,7,44,78,30]),import.meta.url)},{path:"/userInfo",name:"userInfo",meta:{title:"route.userInfo",hidden:!0},component:()=>Rt(()=>import("./index-BZrH5MtZ.js"),__vite__mapDeps([79,1,2,23,3,5,22,80,10,11,12,81,7]),import.meta.url)},{path:"/preview/:compId",name:"preview",meta:{title:"route.preview",noAuth:!0,hidden:!0},component:()=>Rt(()=>import("./index-Cp8ViCIR.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url)},{path:"/previewLocal/:compId",meta:{title:"route.previewLocal",hidden:!0,noAuth:!0},component:()=>Rt(()=>import("./index-GF-tJPqO.js"),__vite__mapDeps([82,1,2,36,48,24,45,32,11,15,46,5,47,6,20,4,34,29,49,50,7,37]),import.meta.url)},{path:"/previewTeam/:teamId/:compId",meta:{title:"route.previewTeam",noAuth:!0,hidden:!0},props:{isTeamPreview:!0},component:()=>Rt(()=>import("./index-Cp8ViCIR.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,32,36,11,15,46,5,47,6,20,4,34,48,24,29,49,50,7,10,12,51,33,52,53]),import.meta.url)},{path:"/terminal",name:"terminal",meta:{title:"route.terminal",icon:Jr(()=>Rt(()=>import("./terminal-DAZ0JqKA.js"),__vite__mapDeps([83,18,2,84]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index-BiXGgf9p.js"),__vite__mapDeps([85,41,2,42,1,43]),import.meta.url)},{path:"/setting",name:"setting",meta:{title:"route.setting",icon:Jr(()=>Rt(()=>import("./settings-CSr4nQM1.js"),__vite__mapDeps([86,18,2,87]),import.meta.url)),noAuth:!0},component:()=>Rt(()=>import("./index--Gl7kxRA.js"),__vite__mapDeps([88,1,2,52,89,7]),import.meta.url)},{path:"/team/:teamId",name:"team",meta:{title:"route.team",hidden:!0},component:()=>Rt(()=>import("./index-ruR13HOB.js"),__vite__mapDeps([90,1,2,39,40,10,11,12,45,32,36,15,46,5,47,6,20,4,34,3,57,18,52,91,7]),import.meta.url)}]},{path:"/:pathMatch(.*)*",name:"404",meta:{hidden:!0,noAuth:!0,title:"route.404"},component:()=>Rt(()=>import("./index-D6zFRika.js"),__vite__mapDeps([92,2]),import.meta.url)}]}),Bs}function $N(e){ON(),e.use(Bs)}const AN=re([]);function RN(e){const t=Fh(JL,{errors:AN.value}),n=document.createElement("div");n.id="error-container",t.mount(n),document.body.appendChild(n)}var Yc={exports:{}},PN=Yc.exports,Zy;function IN(){return Zy||(Zy=1,(function(e,t){(function(n,r){e.exports=r()})(PN,function(){function n(_e){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ce){return typeof ce}:function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce})(_e)}function r(_e,ce){if(!(_e instanceof ce))throw new TypeError("Cannot call a class as a function")}function i(_e,ce){for(var ye=0;ye<ce.length;ye++){var Fe=ce[ye];Fe.enumerable=Fe.enumerable||!1,Fe.configurable=!0,"value"in Fe&&(Fe.writable=!0),Object.defineProperty(_e,Fe.key,Fe)}}function o(_e,ce,ye){ce&&i(_e.prototype,ce),ye&&i(_e,ye),Object.defineProperty(_e,"prototype",{writable:!1})}function s(_e,ce,ye){ce in _e?Object.defineProperty(_e,ce,{value:ye,enumerable:!0,configurable:!0,writable:!0}):_e[ce]=ye}function l(_e,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Super expression must either be null or a function");_e.prototype=Object.create(ce&&ce.prototype,{constructor:{value:_e,writable:!0,configurable:!0}}),Object.defineProperty(_e,"prototype",{writable:!1}),ce&&d(_e,ce)}function c(_e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ce){return ce.__proto__||Object.getPrototypeOf(ce)})(_e)}function d(_e,ce){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ye,Fe){return ye.__proto__=Fe,ye})(_e,ce)}function f(_e,ce){if(ce&&(typeof ce=="object"||typeof ce=="function"))return ce;if(ce!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(ce=_e,ce===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ce}function p(_e){var ce=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}})();return function(){var ye,Fe=c(_e);return f(this,ce?(ye=c(this).constructor,Reflect.construct(Fe,arguments,ye)):Fe.apply(this,arguments))}}function v(_e,ce){(ce==null||ce>_e.length)&&(ce=_e.length);for(var ye=0,Fe=new Array(ce);ye<ce;ye++)Fe[ye]=_e[ye];return Fe}function y(_e,ce){var ye,Fe=typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(!Fe){if(Array.isArray(_e)||(Fe=(function(be,ke){if(be){if(typeof be=="string")return v(be,ke);var Ie=Object.prototype.toString.call(be).slice(8,-1);return(Ie=Ie==="Object"&&be.constructor?be.constructor.name:Ie)==="Map"||Ie==="Set"?Array.from(be):Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie)?v(be,ke):void 0}})(_e))||ce&&_e&&typeof _e.length=="number")return Fe&&(_e=Fe),ye=0,{s:ce=function(){},n:function(){return ye>=_e.length?{done:!0}:{done:!1,value:_e[ye++]}},e:function(be){throw be},f:ce};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qe,xe=!0,et=!1;return{s:function(){Fe=Fe.call(_e)},n:function(){var be=Fe.next();return xe=be.done,be},e:function(be){et=!0,qe=be},f:function(){try{xe||Fe.return==null||Fe.return()}finally{if(et)throw qe}}}}function g(){if(m.url)window.location.href=m.url;else if(m.rewriteHTML)try{document.documentElement.innerHTML=m.rewriteHTML}catch{document.documentElement.innerText=m.rewriteHTML}else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(_e){console.log(_e)}setTimeout(function(){window.location.href=m.timeOutUrl||"https://theajack.github.io/disable-devtool/404.html?h=".concat(encodeURIComponent(location.host))},500)}}var m={md5:"",ondevtoolopen:g,ondevtoolclose:null,url:"",timeOutUrl:"",tkName:"ddtk",interval:500,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:[1,3,4,5,6,7],clearLog:!0,disableSelect:!1,disableInputSelect:!1,disableCopy:!1,disableCut:!1,disablePaste:!1,ignore:null,disableIframeParents:!0,seo:!0,rewriteHTML:""},b=["detectors","ondevtoolclose","ignore"];function x(_e){var ce,ye=0<arguments.length&&_e!==void 0?_e:{};for(ce in ye.onDevtoolOpen&&(ye.ondevtoolopen=ye.onDevtoolOpen),ye.onDevtoolClose&&(ye.ondevtoolclose=ye.onDevtoolClose),m){var Fe=ce;ye[Fe]===void 0||n(m[Fe])!==n(ye[Fe])&&b.indexOf(Fe)===-1||(m[Fe]=ye[Fe])}typeof m.ondevtoolclose=="function"&&m.clearIntervalWhenDevOpenTrigger===!0&&(m.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}function S(){return new Date().getTime()}function O(_e){var ce=S();return _e(),S()-ce}function T(_e,ce){function ye(et){return function(){_e&&_e();var be=et.apply(void 0,arguments);return ce&&ce(),be}}var Fe=window.alert,qe=window.confirm,xe=window.prompt;try{window.alert=ye(Fe),window.confirm=ye(qe),window.prompt=ye(xe)}catch{}}var A,M,z,Y={iframe:!1,pc:!1,qqBrowser:!1,firefox:!1,macos:!1,edge:!1,oldEdge:!1,ie:!1,iosChrome:!1,iosEdge:!1,chrome:!1,seoBot:!1,mobile:!1};function ve(){function _e(On){return ce.indexOf(On)!==-1}var ce=navigator.userAgent.toLowerCase(),ye=(function(){var dn=navigator,On=dn.platform,dn=dn.maxTouchPoints;if(typeof dn=="number")return 1<dn;if(typeof On=="string"){if(dn=On.toLowerCase(),/(mac|win)/i.test(dn))return!1;if(/(android|iphone|ipad|ipod|arch)/i.test(dn))return!0}return/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())})(),Fe=!!window.top&&window!==window.top,qe=!ye,xe=_e("qqbrowser"),et=_e("firefox"),be=_e("macintosh"),ke=_e("edge"),Ie=ke&&!_e("chrome"),Oe=Ie||_e("trident")||_e("msie"),Ue=_e("crios"),pr=_e("edgios"),Fn=_e("chrome")||Ue,qn=!ye&&/(googlebot|baiduspider|bingbot|applebot|petalbot|yandexbot|bytespider|chrome\-lighthouse|moto g power)/i.test(ce);Object.assign(Y,{iframe:Fe,pc:qe,qqBrowser:xe,firefox:et,macos:be,edge:ke,oldEdge:Ie,ie:Oe,iosChrome:Ue,iosEdge:pr,chrome:Fn,seoBot:qn,mobile:ye})}function W(){for(var _e=(function(){for(var Fe={},qe=0;qe<500;qe++)Fe["".concat(qe)]="".concat(qe);return Fe})(),ce=[],ye=0;ye<50;ye++)ce.push(_e);return ce}function X(){m.clearLog&&z()}var K="",L=!1;function D(){var _e=m.ignore;if(_e){if(typeof _e=="function")return _e();if(_e.length!==0){var ce=location.href;if(K===ce)return L;K=ce;var ye,Fe=!1,qe=y(_e);try{for(qe.s();!(ye=qe.n()).done;){var xe=ye.value;if(typeof xe=="string"){if(ce.indexOf(xe)!==-1){Fe=!0;break}}else if(xe.test(ce)){Fe=!0;break}}}catch(et){qe.e(et)}finally{qe.f()}return L=Fe}}}var ne=function(){return!1};function le(_e){var ce,ye,Fe=74,qe=73,xe=85,et=83,be=123,ke=Y.macos?function(Oe,Ue){return Oe.metaKey&&Oe.altKey&&(Ue===qe||Ue===Fe)}:function(Oe,Ue){return Oe.ctrlKey&&Oe.shiftKey&&(Ue===qe||Ue===Fe)},Ie=Y.macos?function(Oe,Ue){return Oe.metaKey&&Oe.altKey&&Ue===xe||Oe.metaKey&&Ue===et}:function(Oe,Ue){return Oe.ctrlKey&&(Ue===et||Ue===xe)};_e.addEventListener("keydown",function(Oe){var Ue=(Oe=Oe||_e.event).keyCode||Oe.which;if(Ue===be||ke(Oe,Ue)||Ie(Oe,Ue))return J(_e,Oe)},!0),ce=_e,m.disableMenu&&ce.addEventListener("contextmenu",function(Oe){if(Oe.pointerType!=="touch")return J(ce,Oe)}),ye=_e,(m.disableSelect||m.disableInputSelect)&&je(ye,"selectstart"),ye=_e,m.disableCopy&&je(ye,"copy"),ye=_e,m.disableCut&&je(ye,"cut"),ye=_e,m.disablePaste&&je(ye,"paste")}function je(_e,ce){_e.addEventListener(ce,function(ye){if(!(Fe=ye.target)||Fe.tagName!=="INPUT"&&Fe.tagName!=="TEXTAREA"&&((qe=Fe.getAttribute)==null?void 0:qe.call(Fe,"contenteditable"))!=="true"){if(m.disableSelect)return J(_e,ye)}else if(m.disableInputSelect)return J(_e,ye);var Fe,qe})}function J(_e,ce){if(!D()&&!ne())return(ce=ce||_e.event).returnValue=!1,ce.preventDefault(),!1}var j,de=!1,U={};function ee(_e){U[_e]=!1}function Q(){for(var _e in U)if(U[_e])return de=!0;return de=!1}(Ge=j=j||{})[Ge.Unknown=-1]="Unknown",Ge[Ge.RegToString=0]="RegToString",Ge[Ge.DefineId=1]="DefineId",Ge[Ge.Size=2]="Size",Ge[Ge.DateToString=3]="DateToString",Ge[Ge.FuncToString=4]="FuncToString",Ge[Ge.Debugger=5]="Debugger",Ge[Ge.Performance=6]="Performance",Ge[Ge.DebugLib=7]="DebugLib";var B=(function(){function _e(Fe){var ye=Fe.type,Fe=Fe.enabled,Fe=Fe===void 0||Fe;r(this,_e),this.type=j.Unknown,this.enabled=!0,this.type=ye,this.enabled=Fe,this.enabled&&(ye=this,F.push(ye),this.init())}return o(_e,[{key:"onDevToolOpen",value:function(){var ce;console.warn("You don't have permission to use DEVTOOL!【type = ".concat(this.type,"】")),m.clearIntervalWhenDevOpenTrigger&&ie(),window.clearTimeout(P),m.ondevtoolopen(this.type,g),ce=this.type,U[ce]=!0}},{key:"init",value:function(){}}]),_e})(),oe=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.DebugLib})}return o(ce,[{key:"init",value:function(){}},{key:"detect",value:function(){var ye;(((ye=(ye=window.eruda)==null?void 0:ye._devTools)==null?void 0:ye._isShow)===!0||window._vcOrigConsole&&window.document.querySelector("#__vconsole.vc-toggle"))&&this.onDevToolOpen()}}],[{key:"isUsing",value:function(){return!!window.eruda||!!window._vcOrigConsole}}]),ce})(),V=0,P=0,F=[],G=0;function N(_e){function ce(){Ie=!0}function ye(){Ie=!1}var Fe,qe,xe,et,be,ke,Ie=!1;function Oe(){(ke[et]===xe?qe:Fe)()}T(ce,ye),Fe=ye,qe=ce,(ke=document).hidden!==void 0?(xe="hidden",be="visibilitychange",et="visibilityState"):ke.mozHidden!==void 0?(xe="mozHidden",be="mozvisibilitychange",et="mozVisibilityState"):ke.msHidden!==void 0?(xe="msHidden",be="msvisibilitychange",et="msVisibilityState"):ke.webkitHidden!==void 0&&(xe="webkitHidden",be="webkitvisibilitychange",et="webkitVisibilityState"),ke.removeEventListener(be,Oe,!1),ke.addEventListener(be,Oe,!1),V=window.setInterval(function(){if(!(_e.isSuspend||Ie||D())){var Ue,pr,Fn=y(F);try{for(Fn.s();!(Ue=Fn.n()).done;){var qn=Ue.value;ee(qn.type),qn.detect(G++)}}catch(On){Fn.e(On)}finally{Fn.f()}X(),typeof m.ondevtoolclose=="function"&&(pr=de,!Q()&&pr&&m.ondevtoolclose())}},m.interval),P=setTimeout(function(){Y.pc||oe.isUsing()||ie()},m.stopIntervalTime)}function ie(){window.clearInterval(V)}var ge=8;function fe(_e){for(var ce=(function(xe,et){xe[et>>5]|=128<<et%32,xe[14+(et+64>>>9<<4)]=et;for(var be=1732584193,ke=-271733879,Ie=-1732584194,Oe=271733878,Ue=0;Ue<xe.length;Ue+=16){var pr=be,Fn=ke,qn=Ie,On=Oe;be=Ce(be,ke,Ie,Oe,xe[Ue+0],7,-680876936),Oe=Ce(Oe,be,ke,Ie,xe[Ue+1],12,-389564586),Ie=Ce(Ie,Oe,be,ke,xe[Ue+2],17,606105819),ke=Ce(ke,Ie,Oe,be,xe[Ue+3],22,-1044525330),be=Ce(be,ke,Ie,Oe,xe[Ue+4],7,-176418897),Oe=Ce(Oe,be,ke,Ie,xe[Ue+5],12,1200080426),Ie=Ce(Ie,Oe,be,ke,xe[Ue+6],17,-1473231341),ke=Ce(ke,Ie,Oe,be,xe[Ue+7],22,-45705983),be=Ce(be,ke,Ie,Oe,xe[Ue+8],7,1770035416),Oe=Ce(Oe,be,ke,Ie,xe[Ue+9],12,-1958414417),Ie=Ce(Ie,Oe,be,ke,xe[Ue+10],17,-42063),ke=Ce(ke,Ie,Oe,be,xe[Ue+11],22,-1990404162),be=Ce(be,ke,Ie,Oe,xe[Ue+12],7,1804603682),Oe=Ce(Oe,be,ke,Ie,xe[Ue+13],12,-40341101),Ie=Ce(Ie,Oe,be,ke,xe[Ue+14],17,-1502002290),ke=Ce(ke,Ie,Oe,be,xe[Ue+15],22,1236535329),be=$e(be,ke,Ie,Oe,xe[Ue+1],5,-165796510),Oe=$e(Oe,be,ke,Ie,xe[Ue+6],9,-1069501632),Ie=$e(Ie,Oe,be,ke,xe[Ue+11],14,643717713),ke=$e(ke,Ie,Oe,be,xe[Ue+0],20,-373897302),be=$e(be,ke,Ie,Oe,xe[Ue+5],5,-701558691),Oe=$e(Oe,be,ke,Ie,xe[Ue+10],9,38016083),Ie=$e(Ie,Oe,be,ke,xe[Ue+15],14,-660478335),ke=$e(ke,Ie,Oe,be,xe[Ue+4],20,-405537848),be=$e(be,ke,Ie,Oe,xe[Ue+9],5,568446438),Oe=$e(Oe,be,ke,Ie,xe[Ue+14],9,-1019803690),Ie=$e(Ie,Oe,be,ke,xe[Ue+3],14,-187363961),ke=$e(ke,Ie,Oe,be,xe[Ue+8],20,1163531501),be=$e(be,ke,Ie,Oe,xe[Ue+13],5,-1444681467),Oe=$e(Oe,be,ke,Ie,xe[Ue+2],9,-51403784),Ie=$e(Ie,Oe,be,ke,xe[Ue+7],14,1735328473),ke=$e(ke,Ie,Oe,be,xe[Ue+12],20,-1926607734),be=Ke(be,ke,Ie,Oe,xe[Ue+5],4,-378558),Oe=Ke(Oe,be,ke,Ie,xe[Ue+8],11,-2022574463),Ie=Ke(Ie,Oe,be,ke,xe[Ue+11],16,1839030562),ke=Ke(ke,Ie,Oe,be,xe[Ue+14],23,-35309556),be=Ke(be,ke,Ie,Oe,xe[Ue+1],4,-1530992060),Oe=Ke(Oe,be,ke,Ie,xe[Ue+4],11,1272893353),Ie=Ke(Ie,Oe,be,ke,xe[Ue+7],16,-155497632),ke=Ke(ke,Ie,Oe,be,xe[Ue+10],23,-1094730640),be=Ke(be,ke,Ie,Oe,xe[Ue+13],4,681279174),Oe=Ke(Oe,be,ke,Ie,xe[Ue+0],11,-358537222),Ie=Ke(Ie,Oe,be,ke,xe[Ue+3],16,-722521979),ke=Ke(ke,Ie,Oe,be,xe[Ue+6],23,76029189),be=Ke(be,ke,Ie,Oe,xe[Ue+9],4,-640364487),Oe=Ke(Oe,be,ke,Ie,xe[Ue+12],11,-421815835),Ie=Ke(Ie,Oe,be,ke,xe[Ue+15],16,530742520),ke=Ke(ke,Ie,Oe,be,xe[Ue+2],23,-995338651),be=Ne(be,ke,Ie,Oe,xe[Ue+0],6,-198630844),Oe=Ne(Oe,be,ke,Ie,xe[Ue+7],10,1126891415),Ie=Ne(Ie,Oe,be,ke,xe[Ue+14],15,-1416354905),ke=Ne(ke,Ie,Oe,be,xe[Ue+5],21,-57434055),be=Ne(be,ke,Ie,Oe,xe[Ue+12],6,1700485571),Oe=Ne(Oe,be,ke,Ie,xe[Ue+3],10,-1894986606),Ie=Ne(Ie,Oe,be,ke,xe[Ue+10],15,-1051523),ke=Ne(ke,Ie,Oe,be,xe[Ue+1],21,-2054922799),be=Ne(be,ke,Ie,Oe,xe[Ue+8],6,1873313359),Oe=Ne(Oe,be,ke,Ie,xe[Ue+15],10,-30611744),Ie=Ne(Ie,Oe,be,ke,xe[Ue+6],15,-1560198380),ke=Ne(ke,Ie,Oe,be,xe[Ue+13],21,1309151649),be=Ne(be,ke,Ie,Oe,xe[Ue+4],6,-145523070),Oe=Ne(Oe,be,ke,Ie,xe[Ue+11],10,-1120210379),Ie=Ne(Ie,Oe,be,ke,xe[Ue+2],15,718787259),ke=Ne(ke,Ie,Oe,be,xe[Ue+9],21,-343485551),be=tt(be,pr),ke=tt(ke,Fn),Ie=tt(Ie,qn),Oe=tt(Oe,On)}return Array(be,ke,Ie,Oe)})((function(xe){for(var et=Array(),be=(1<<ge)-1,ke=0;ke<xe.length*ge;ke+=ge)et[ke>>5]|=(xe.charCodeAt(ke/ge)&be)<<ke%32;return et})(_e),_e.length*ge),ye="0123456789abcdef",Fe="",qe=0;qe<4*ce.length;qe++)Fe+=ye.charAt(ce[qe>>2]>>qe%4*8+4&15)+ye.charAt(ce[qe>>2]>>qe%4*8&15);return Fe}function pe(_e,ce,ye,Fe,qe,xe){return tt((ce=tt(tt(ce,_e),tt(Fe,xe)))<<qe|ce>>>32-qe,ye)}function Ce(_e,ce,ye,Fe,qe,xe,et){return pe(ce&ye|~ce&Fe,_e,ce,qe,xe,et)}function $e(_e,ce,ye,Fe,qe,xe,et){return pe(ce&Fe|ye&~Fe,_e,ce,qe,xe,et)}function Ke(_e,ce,ye,Fe,qe,xe,et){return pe(ce^ye^Fe,_e,ce,qe,xe,et)}function Ne(_e,ce,ye,Fe,qe,xe,et){return pe(ye^(ce|~Fe),_e,ce,qe,xe,et)}function tt(_e,ce){var ye=(65535&_e)+(65535&ce);return(_e>>16)+(ce>>16)+(ye>>16)<<16|65535&ye}var Ge=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.RegToString,enabled:Y.qqBrowser||Y.firefox})}return o(ce,[{key:"init",value:function(){var ye=this;this.lastTime=0,this.reg=/./,A(this.reg),this.reg.toString=function(){var Fe;return Y.qqBrowser?(Fe=new Date().getTime(),ye.lastTime&&Fe-ye.lastTime<100?ye.onDevToolOpen():ye.lastTime=Fe):Y.firefox&&ye.onDevToolOpen(),""}}},{key:"detect",value:function(){A(this.reg)}}]),ce})(),Ze=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.DefineId})}return o(ce,[{key:"init",value:function(){var ye=this;this.div=document.createElement("div"),this.div.__defineGetter__("id",function(){ye.onDevToolOpen()}),Object.defineProperty(this.div,"id",{get:function(){ye.onDevToolOpen()}})}},{key:"detect",value:function(){A(this.div)}}]),ce})(),Pt=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.Size,enabled:!Y.iframe&&!Y.edge})}return o(ce,[{key:"init",value:function(){var ye=this;this.checkWindowSizeUneven(),window.addEventListener("resize",function(){setTimeout(function(){ye.checkWindowSizeUneven()},100)},!0)}},{key:"detect",value:function(){}},{key:"checkWindowSizeUneven",value:function(){var ye=(function(){if(St(window.devicePixelRatio))return window.devicePixelRatio;var qe=window.screen;return!!(St(qe)&&qe.deviceXDPI&&qe.logicalXDPI)&&qe.deviceXDPI/qe.logicalXDPI})();if(ye!==!1){var Fe=200<window.outerWidth-window.innerWidth*ye,ye=300<window.outerHeight-window.innerHeight*ye;if(Fe||ye)return this.onDevToolOpen(),!1;ee(this.type)}return!0}}]),ce})();function St(_e){return _e!=null}var Nt,It=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.DateToString,enabled:!Y.iosChrome&&!Y.iosEdge})}return o(ce,[{key:"init",value:function(){var ye=this;this.count=0,this.date=new Date,this.date.toString=function(){return ye.count++,""}}},{key:"detect",value:function(){this.count=0,A(this.date),X(),2<=this.count&&this.onDevToolOpen()}}]),ce})(),qt=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.FuncToString,enabled:!Y.iosChrome&&!Y.iosEdge})}return o(ce,[{key:"init",value:function(){var ye=this;this.count=0,this.func=function(){},this.func.toString=function(){return ye.count++,""}}},{key:"detect",value:function(){this.count=0,A(this.func),X(),2<=this.count&&this.onDevToolOpen()}}]),ce})(),Gt=(function(){l(ce,B);var _e=p(ce);function ce(){return r(this,ce),_e.call(this,{type:j.Debugger,enabled:Y.iosChrome||Y.iosEdge})}return o(ce,[{key:"detect",value:function(){var ye=S();100<S()-ye&&this.onDevToolOpen()}}]),ce})(),Wt=(function(){l(ce,B);var _e=p(ce);function ce(){var ye;return r(this,ce),(ye=_e.call(this,{type:j.Performance,enabled:Y.chrome||!Y.mobile})).count=0,ye}return o(ce,[{key:"init",value:function(){this.maxPrintTime=0,this.largeObjectArray=W()}},{key:"detect",value:function(){var ye=this,Fe=O(function(){M(ye.largeObjectArray)}),qe=O(function(){A(ye.largeObjectArray)});if(this.maxPrintTime=Math.max(this.maxPrintTime,qe),X(),Fe===0||this.maxPrintTime===0)return!1;Fe>10*this.maxPrintTime&&(2<=this.count?this.onDevToolOpen():(this.count++,this.detect()))}}]),ce})(),nn=(s(Nt={},j.RegToString,Ge),s(Nt,j.DefineId,Ze),s(Nt,j.Size,Pt),s(Nt,j.DateToString,It),s(Nt,j.FuncToString,qt),s(Nt,j.Debugger,Gt),s(Nt,j.Performance,Wt),s(Nt,j.DebugLib,oe),Nt),Dn=Object.assign(function(_e){function ce(){var et=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return{success:!et,reason:et}}var ye;if(Dn.isRunning)return ce("already running");if(ve(),ye=window.console||{log:function(){},table:function(){},clear:function(){}},z=Y.ie?(A=function(){return ye.log.apply(ye,arguments)},M=function(){return ye.table.apply(ye,arguments)},function(){return ye.clear()}):(A=ye.log,M=ye.table,ye.clear),x(_e),m.md5&&fe((function(et){var be=window.location.search,ke=window.location.hash;return(be=be===""&&ke!==""?"?".concat(ke.split("?")[1]):be)!==""&&be!==void 0&&(ke=new RegExp("(^|&)"+et+"=([^&]*)(&|$)","i"),et=be.substr(1).match(ke),et!=null)?unescape(et[2]):""})(m.tkName))===m.md5)return ce("token passed");if(m.seo&&Y.seoBot)return ce("seobot");Dn.isRunning=!0,N(Dn);var Fe=Dn,qe=(ne=function(){return Fe.isSuspend},window.top),xe=window.parent;if(le(window),m.disableIframeParents&&qe&&xe&&qe!==window){for(;xe!==qe;)le(xe),xe=xe.parent;le(qe)}return(m.detectors==="all"?Object.keys(nn):m.detectors).forEach(function(et){new nn[et]}),ce()},{isRunning:!1,isSuspend:!1,md5:fe,version:"0.3.9",DetectorType:j,isDevToolOpened:Q});return Ge=(function(){if(typeof window>"u"||!window.document)return null;var _e=document.querySelector("[disable-devtool-auto]");if(!_e)return null;var ce=["disable-menu","disable-select","disable-copy","disable-cut","disable-paste","clear-log"],ye=["interval"],Fe={};return["md5","url","tk-name","detectors"].concat(ce,ye).forEach(function(qe){var xe=_e.getAttribute(qe);xe!==null&&(ye.indexOf(qe)!==-1?xe=parseInt(xe):ce.indexOf(qe)!==-1?xe=xe!=="false":qe==="detector"&&xe!=="all"&&(xe=xe.split(" ")),Fe[(function(et){if(et.indexOf("-")===-1)return et;var be=!1;return et.split("").map(function(ke){return ke==="-"?(be=!0,""):be?(be=!1,ke.toUpperCase()):ke}).join("")})(qe)]=xe)}),Fe})(),Ge&&Dn(Ge),Dn})})(Yc)),Yc.exports}var MN=IN();const DN=rs(MN);function FN(){window.__GLOBAL_CONFIG__.allowDebug||DN({disableMenu:!1})}(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._fc-frame ._fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{cursor:not-allowed!important;color:#999}._fc-frame ._fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame ._fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-frame ._fc-upload-btn,._fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}._fc-group{display:flex;min-height:38px;justify-content:center;flex-direction:column;width:100%}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;border-radius:5px;margin:5px 5px 25px;padding:20px 20px 25px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}._fc-group._fc-group-card{display:flex;flex-direction:column;width:100%;gap:16px}._fc-group._fc-group-card._fc-group-disabled ._fc-group-btn,._fc-group._fc-group-card._fc-group-disabled ._fc-group-add{cursor:not-allowed;opacity:.5}._fc-group._fc-group-card ._fc-group-container{position:relative;background:#fff;border:1px solid #f0f0f0;border-radius:6px;overflow:hidden;display:flex;flex-direction:column;padding:0;margin:0}._fc-group._fc-group-card ._fc-group-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0;background:#fafafa}._fc-group._fc-group-card ._fc-group-idx{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#f0f0f0;color:#666;border-radius:6px;font-size:12px;font-weight:500;margin-right:12px;flex-shrink:0;position:static;border:1px solid #e0e0e0}._fc-group._fc-group-card ._fc-group-title{flex:1;font-size:14px;font-weight:500;color:#000000d9;line-height:1.5715}._fc-group._fc-group-card ._fc-group-handle{display:flex;align-items:center;gap:4px;margin-left:12px;flex-shrink:0;position:static;bottom:auto;right:auto;border-radius:0;border:none;padding:0;background-color:transparent;flex-direction:row}._fc-group._fc-group-card ._fc-group-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;border:1px solid #d9d9d9;background:#fff;color:#00000073;position:relative}._fc-group._fc-group-card ._fc-group-btn:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}._fc-group._fc-group-card ._fc-group-btn:active{color:#096dd9;border-color:#096dd9}._fc-group._fc-group-card ._fc-group-arrow{position:relative}._fc-group._fc-group-card ._fc-group-arrow:before{content:"";position:absolute;top:50%;left:50%;width:5px;height:5px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:translate(-50%,-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group._fc-group-card ._fc-group-sort{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:24px}._fc-group._fc-group-card ._fc-group-sort:before,._fc-group._fc-group-card ._fc-group-sort:after{content:"";position:absolute;left:50%;width:4px;height:4px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:translate(-50%)}._fc-group._fc-group-card ._fc-group-sort:before{top:6px;transform:translate(-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-sort:after{bottom:6px;transform:translate(-50%) rotate(225deg)}._fc-group._fc-group-card ._fc-group-sort-up,._fc-group._fc-group-card ._fc-group-sort-down{position:absolute;left:0;right:0;height:12px;cursor:pointer;z-index:1}._fc-group._fc-group-card ._fc-group-sort-up{top:0}._fc-group._fc-group-card ._fc-group-sort-down{bottom:0}._fc-group._fc-group-card ._fc-group-sort-up:hover,._fc-group._fc-group-card ._fc-group-sort-down:hover{background:#1890ff1a}._fc-group._fc-group-card ._fc-group-plus-minus{position:relative;background:#409eff;border-color:#409eff;color:#fff;width:24px;height:24px}._fc-group._fc-group-card ._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-plus-minus:before,._fc-group._fc-group-card ._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1px;background-color:currentColor;transform:translate(-50%,-50%)}._fc-group._fc-group-card ._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus{background:#f56c6c;border-color:#f56c6c}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:hover{background:#f78989;border-color:#f78989}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group._fc-group-card ._fc-group-content{padding:20px}._fc-group._fc-group-card ._fc-group-add{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;border:1px solid #d9d9d9;background:#fff;color:#00000073;position:relative}._fc-group._fc-group-card ._fc-group-add:hover{color:#409eff;border-color:#409eff;background:#f0f8ff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus{width:24px;height:24px;background:#409eff;border-color:#409eff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before,._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:1px;background-color:currentColor;transform:translate(-50%,-50%)}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-empty{text-align:center;padding:40px 20px;color:#00000073;font-size:14px}@media (max-width: 768px){._fc-group._fc-group-card ._fc-group-container{margin:0 -8px;border-radius:0;border-left:none;border-right:none}._fc-group._fc-group-card ._fc-group-header{padding:12px 16px 8px}._fc-group._fc-group-card ._fc-group-content{padding:16px}._fc-group._fc-group-card ._fc-group-handle{gap:2px}._fc-group._fc-group-card ._fc-group-btn{width:22px;height:22px}}.form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left;float:unset}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();var LN=Object.defineProperty,jN=Object.defineProperties,UN=Object.getOwnPropertyDescriptors,eb=Object.getOwnPropertySymbols,NN=Object.prototype.hasOwnProperty,zN=Object.prototype.propertyIsEnumerable,tb=(e,t,n)=>t in e?LN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t)=>{for(var n in t||(t={}))NN.call(t,n)&&tb(e,n,t[n]);if(eb)for(var n of eb(t))zN.call(t,n)&&tb(e,n,t[n]);return e},Br=(e,t)=>jN(e,UN(t));function Zh(e,t){return Object.keys(e).reduce((n,r)=>((!t||t.indexOf(r)===-1)&&(n[r]=e[r]),n),{})}function er(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}const BN="fcCheckbox",VN=ze({name:BN,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,t){const n=Sn(e.formCreateInject,"options",[]),r=Sn(e,"options"),i=Sn(e,"modelValue"),o=Sn(e,"inputValue",""),s=re(o.value),l=Sn(e,"input",!1),c=p=>{const v=[...er(i.value)],y=v.indexOf(s.value);s.value=p,y>-1&&(v.splice(y,1),v.push(p),f(v))};He(o,p=>{if(!l.value){s.value=p;return}c(p)});const d=se(()=>{let p=n.value||[];return r.value&&(p=r.value||[]),Array.isArray(p)?p:[]});He(i,p=>{let v=null;if(!o.value&&p!=null&&Array.isArray(p)&&p.length>0&&l.value){const y=d.value.map(g=>g.value);p.forEach(g=>{y.indexOf(g)===-1&&(v=g)})}v!=null&&(s.value=v)},{immediate:!0});const f=p=>{t.emit("update:modelValue",p)};return{options:d,value:i,onInput:f,updateCustomValue:c,makeInput(p){if(l.value)return Z(p,{value:s.value||void 0,label:s.value||void 0},{default:()=>[Z(ft("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":c},null)]})}}},render(){const e=this.type==="button"?"ElCheckboxButton":"ElCheckbox",t=ft(e);return Z(ft("ElCheckboxGroup"),Ot(this.$attrs,{modelValue:this.value===null?void 0:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Xe({default:()=>{var n,r;return[this.options.map((i,o)=>{const s=Xe({},i),l=s.value,c=s.label;return delete s.value,delete s.label,Z(t,Ot(s,{label:l,value:l,key:e+o+"-"+l}),{default:()=>[c||l||""]})}),(r=(n=this.$slots).default)==null?void 0:r.call(n),this.makeInput(t)]}},Zh(this.$slots,["default"])))},mounted(){this.$emit("fc.el",this.$refs.el)}});function vE(e){e=e||new Map;const t={$on(n,r){const i=e.get(n);i&&i.push(r)||e.set(n,[r])},$once(n,r){r._once=!0,t.$on(n,r)},$off(n,r){const i=e.get(n);i&&i.splice(i.indexOf(r)>>>0,1)},$emit(n,...r){(e.get(n)||[]).slice().map(i=>{i._once&&(t.$off(n,i),delete i._once),i(...r)}),(e.get("*")||[]).slice().map(i=>{i(n,r)})}};return t}const So=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},HN={name:"IconCircleClose"},qN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function WN(e,t,n,r,i,o){return C(),R("svg",qN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"},null,-1),_("path",{fill:"currentColor",d:"M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"},null,-1)])])}const YN=So(HN,[["render",WN]]),KN={name:"IconDocument"},GN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function QN(e,t,n,r,i,o){return C(),R("svg",GN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,-1)])])}const XN=So(KN,[["render",QN]]),JN={name:"IconDelete"},ZN={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function ez(e,t,n,r,i,o){return C(),R("svg",ZN,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"},null,-1)])])}const tz=So(JN,[["render",ez]]),nz={name:"IconView"},rz={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function iz(e,t,n,r,i,o){return C(),R("svg",rz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"},null,-1)])])}const oz=So(nz,[["render",iz]]),sz={name:"IconFolderOpened"},az={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function lz(e,t,n,r,i,o){return C(),R("svg",az,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"},null,-1)])])}const cz=So(sz,[["render",lz]]),uz="fcFrame",dz=ze({name:uz,props:{type:{type:String,default:"input"},field:String,helper:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},src:{type:String,required:!0},icon:{type:String,default:"IconFolderOpened"},width:{type:String,default:"500px"},height:{type:String,default:"370px"},maxLength:{type:Number,default:0},okBtnText:{type:String,default:""},closeBtnText:{type:String,default:""},modalTitle:String,handleIcon:{type:[String,Boolean],default:void 0},title:String,allowRemove:{type:Boolean,default:!0},onOpen:{type:Function,default:()=>{}},onOk:{type:Function,default:()=>{}},onCancel:{type:Function,default:()=>{}},onLoad:{type:Function,default:()=>{}},onBeforeRemove:{type:Function,default:()=>{}},onRemove:{type:Function,default:()=>{}},onHandle:Function,modal:{type:Object,default:()=>({})},srcKey:[String,Number],modelValue:[Array,String,Number,Object],previewMask:void 0,footer:{type:Boolean,default:!0},reload:{type:Boolean,default:!0},closeBtn:{type:Boolean,default:!0},okBtn:{type:Boolean,default:!0},formCreateInject:Object},emits:["update:modelValue","change"],components:{IconFolderOpened:cz,IconView:oz},data(){return{fileList:er(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new vE}},watch:{modelValue(e){this.fileList=er(e)}},methods:{close(){this.closeModel(!0)},closeModel(e){this.bus.$emit(e?"$close":"$ok"),this.reload&&(this.bus.$off("$ok"),this.bus.$off("$close")),this.frameVisible=!1},handleCancel(){this.previewVisible=!1},showModel(){this.disabled||this.onOpen()===!1||(this.frameVisible=!0)},input(){const e=this.fileList,t=this.maxLength===1?e[0]||"":e;this.$emit("update:modelValue",t),this.$emit("change",t)},makeInput(){return Z(ft("ElInput"),Ot({type:"text",modelValue:this.fileList.map(e=>this.getSrc(e)).toString(),readonly:!0},{key:1}),{append:()=>Z(ft("ElButton"),{icon:ft(this.icon),onClick:()=>this.showModel()},null),suffix:()=>this.fileList.length&&!this.disabled?Z(ft("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:()=>{this.fileList=[],this.input()}},{default:()=>[Z(YN,null,null)]}):null})},makeGroup(e){return(!this.maxLength||this.fileList.length<this.maxLength)&&e.push(this.makeBtn()),Z("div",{key:2},[e])},makeItem(e,t){return Z("div",{class:"_fc-files",key:"3"+e},[t])},valid(e){const t=this.formCreateInject.field||this.field;if(t&&e!==t)throw new Error("[frame]无效的字段值")},makeIcons(e,t){if(this.handleIcon!==!1||this.allowRemove===!0){const n=[];return(this.type!=="file"&&this.handleIcon!==!1||this.type==="file"&&this.handleIcon)&&n.push(this.makeHandleIcon(e,t)),this.allowRemove&&n.push(this.makeRemoveIcon(e,t)),Z("div",{class:"_fc-upload-cover",key:4},[n])}},makeHandleIcon(e,t){const n=ft(this.handleIcon===!0||this.handleIcon===void 0?"icon-view":this.handleIcon);return Z(ft("ElIcon"),{onClick:()=>this.handleClick(e),key:"5"+t},{default:()=>[Z(n,null,null)]})},makeRemoveIcon(e,t){return Z(ft("ElIcon"),{onClick:()=>this.handleRemove(e),key:"6"+t},{default:()=>[Z(tz,null,null)]})},makeFiles(){return this.makeGroup(this.fileList.map((e,t)=>this.makeItem(t,[Z(ft("ElIcon"),{onClick:()=>this.handleClick(e)},{default:()=>[Z(XN,null,null)]}),this.makeIcons(e,t)])))},makeImages(){return this.makeGroup(this.fileList.map((e,t)=>this.makeItem(t,[Z("img",{src:this.getSrc(e)},null),this.makeIcons(e,t)])))},makeBtn(){const e=ft(this.icon);return Z("div",{class:"_fc-upload-btn",onClick:()=>this.showModel(),key:7},[Z(ft("ElIcon"),null,{default:()=>[Z(e,null,null)]})])},handleClick(e){if(this.onHandle)return this.onHandle(e);this.previewImage=this.getSrc(e),this.previewVisible=!0},handleRemove(e){this.disabled||this.onBeforeRemove(e)!==!1&&(this.fileList.splice(this.fileList.indexOf(e),1),this.input(),this.onRemove(e))},getSrc(e){return this.srcKey?e[this.srcKey]:e},frameLoad(e){this.onLoad(e);try{this.helper===!0&&(e.form_create_helper={api:this.formCreateInject.api,close:t=>{this.valid(t),this.closeModel()},set:(t,n)=>{this.valid(t),!this.disabled&&this.$emit("update:modelValue",n)},get:t=>(this.valid(t),this.modelValue),onOk:t=>this.bus.$on("$ok",t),onClose:t=>this.bus.$on("$close",t)})}catch(t){console.error(t)}},makeFooter(){const{okBtnText:e,closeBtnText:t,closeBtn:n,okBtn:r,footer:i}=this.$props;if(i)return Z("div",null,[n?Z(ft("ElButton"),{onClick:()=>this.onCancel()!==!1&&(this.frameVisible=!1)},{default:()=>[t||this.formCreateInject.t("close")||"关闭"]}):null,r?Z(ft("ElButton"),{type:"primary",onClick:()=>this.onOk()!==!1&&this.closeModel()},{default:()=>[e||this.formCreateInject.t("ok")||"确定"]}):null])}},render(){const e=this.type;let t;e==="input"?t=this.makeInput():e==="image"?t=this.makeImages():t=this.makeFiles();const{width:n="30%",height:r,src:i,title:o,modalTitle:s}=this.$props;return gt(()=>{this.$refs.frame&&this.frameLoad(this.$refs.frame.contentWindow||{})}),Z("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[t,Z(ft("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:s,modelValue:this.previewVisible,onClose:this.handleCancel},{default:()=>[Z("img",{style:"width: 100%",src:this.previewImage},null)]}),Z(ft("ElDialog"),Ot({appendToBody:!0},Xe({width:n,title:o},this.modal),{modelValue:this.frameVisible,onClose:()=>this.closeModel(!0)}),{default:()=>[this.frameVisible||!this.reload?Z("iframe",{ref:"frame",src:i,frameBorder:"0",style:{height:r,border:"0 none",width:"100%"}},null):null],footer:()=>this.makeFooter()})])},beforeMount(){const{name:e,field:t,api:n}=this.formCreateInject;e&&n.on("fc:closeModal:"+e,this.close),t&&n.on("fc:closeModal:"+t,this.close)},beforeUnmount(){const{name:e,field:t,api:n}=this.formCreateInject;e&&n.off("fc:closeModal:"+e,this.close),t&&n.off("fc:closeModal:"+t,this.close)}}),fz="fcRadio",pz=ze({name:fz,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,t){const n=Sn(e.formCreateInject,"options",[]),r=Sn(e,"options"),i=Sn(e,"modelValue"),o=Sn(e,"inputValue",""),s=re(o.value),l=Sn(e,"input",!1);He(o,p=>{if(!l.value){s.value=p;return}f(p)});const c=se(()=>{let p=n.value||[];return r.value&&(p=r.value||[]),Array.isArray(p)?p:[]});He(i,p=>{let v=!1;!o.value&&p!=null&&l.value&&(v=c.value.map(y=>y.value).indexOf(p)===-1),v&&(s.value=p)},{immediate:!0});const d=p=>{t.emit("update:modelValue",p)},f=p=>{const v=s.value;s.value=p,i.value===v&&d(p)};return{options:c,value:i,onInput:d,updateCustomValue:f,customValue:s,makeInput(p){if(l.value)return Z(p,{checked:!1,value:s.value||void 0,label:s.value||void 0},{default:()=>[Z(ft("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":f},null)]})}}},render(){const e=this.type==="button"?"ElRadioButton":"ElRadio",t=ft(e);return Z(ft("ElRadioGroup"),Ot(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Xe({default:()=>{var n,r;return[this.options.map((i,o)=>{const s=Xe({},i),l=s.value,c=s.label;return delete s.value,delete s.label,Z(t,Ot(s,{label:l,value:l,key:e+o+"-"+l}),{default:()=>[c||l||""]})}),(r=(n=this.$slots).default)==null?void 0:r.call(n),this.makeInput(t)]}},Zh(this.$slots,["default"])))},mounted(){this.$emit("fc.el",this.$refs.el)}}),Me={type(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef(e){return e==null},Element(e){return typeof e=="object"&&e!==null&&e.nodeType===1&&!Me.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){const t=this.getType(e);return t==="Function"||t==="AsyncFunction"},getType(e){const t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e}};["Date","Object","String","Boolean","Array","Number"].forEach(e=>{Me[e]=function(t){return Me.type(t,e)}});function Zt(e,t){return{}.hasOwnProperty.call(e,t)}const hz="fcSelect",mz=ze({name:hz,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const n=Sn(e.formCreateInject,"options",[]),r=Sn(e,"modelValue");return{options:se(()=>Array.isArray(n.value)?n.value:[]),value:r,handleUpdate:i=>{t("update:modelValue",i)},hasProperty:Zt,is:Me}},mounted(){this.$emit("fc.el",this.$refs.el)}});function vz(e,t,n,r,i,o){const s=ft("el-option"),l=ft("el-option-group"),c=ft("el-select");return C(),Ee(c,Ot(e.$attrs,{"model-value":e.value,"onUpdate:modelValue":e.handleUpdate,ref:"el"}),{default:Le(()=>[(C(!0),R(We,null,ut(e.options,(d,f)=>(C(),R(We,null,[e.hasProperty(d,"options")?(C(),Ee(l,{label:d.label,key:`${f}-${d.label}`},{default:Le(()=>[(C(!0),R(We,null,ut(e.is.trueArray(d.options)?d.options:[],(p,v)=>(C(),Ee(s,Ot({key:`${v}-${p.value}`},{ref_for:!0},p),null,16))),128))]),_:2},1032,["label"])):(C(),Ee(s,Ot({key:`${f}-${d.value}`},{ref_for:!0},d),null,16))],64))),256)),mt(e.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"])}const gz=So(mz,[["render",vz]]),_z="fcTree",yz=ze({name:_z,inheritAttrs:!1,formCreateParser:{mergeProp(e){const t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:()=>[]}},emits:["update:modelValue","fc.el"],watch:{modelValue(){this.setValue()}},methods:{updateValue(){if(!this.$refs.tree)return;let e;this.type==="selected"?e=this.$refs.tree.getCurrentKey():e=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e)},setValue(){this.$refs.tree&&(this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(er(this.modelValue)))}},render(){return Z(ft("ElTree"),Ot(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),bz={name:"IconUpload"},wz={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function Ez(e,t,n,r,i,o){return C(),R("svg",wz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)])])}const Sz=So(bz,[["render",Ez]]);function nb(e,t){return typeof e=="object"?e:{url:e,is_string:!0,name:Cz(e),uid:t}}function rb(e){return Br(Xe({},e),{file:e,value:e})}function Cz(e){return(""+e).split("/").pop()}const xz="fcUpload",Tz=ze({name:xz,inheritAttrs:!1,formCreateParser:{toFormValue(e){return er(e)},toValue(e,t){return t.prop.props.limit===1?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,httpRequest:Function,modalTitle:String,listType:String,uploadText:String,formCreateInject:Object,modelValue:[Array,String,Object]},emits:["update:modelValue","change","remove","fc.el"],data(){return{previewVisible:!1,previewImage:"",fileList:[]}},created(){this.fileList=er(this.modelValue).map(nb).map(rb)},watch:{modelValue(e){this.fileList=er(e).map(nb).map(rb)}},methods:{handlePreview(e){this.onPreview?this.onPreview(...arguments):this.listType==="text"?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update(e){let t=e.map(n=>n.is_string?n.url:n.value||n.url).filter(n=>n!==void 0);this.$emit("update:modelValue",t)},handleCancel(){this.previewVisible=!1},handleChange(e,t){this.$emit("change",...arguments),e.status==="success"&&this.update(t)},handleRemove(e,t){this.$emit("remove",...arguments),this.update(t)},doHttpRequest(e){if(this.httpRequest)return this.httpRequest(e);e.source="upload",this.formCreateInject.api.fetch(e)}},render(){const e=er(this.modelValue).length;return Z("div",{class:"_fc-upload"},[Z(ft("ElUpload"),Ot({key:e},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":this.$attrs.limit?this.$attrs.limit<=e:!1},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),Xe({default:()=>{var t,n;return[((n=(t=this.$slots).default)==null?void 0:n.call(t))||(["text","picture"].indexOf(this.listType)===-1?Z(ft("ElIcon"),null,{default:()=>[Z(Sz,null,null)]}):Z(ft("ElButton"),{type:"primary"},{default:()=>[this.formCreateInject.t("clickToUpload")||this.uploadText||"点击上传"]}))]}},Zh(this.$slots,["default"]))),Z(ft("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:()=>[Z("img",{style:"width: 100%",src:this.previewImage},null)]})])},mounted(){this.$emit("fc.el",this.$refs.upload)}});function Fr(e,t,n){e[t]=n}function jo(e,t){delete e[t]}function al(e,t={},n){let r=!1;for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i)){let o=t[i];if((r=Array.isArray(o))||Me.Object(o)){let s=e[i]===void 0;if(r)r=!1,s&&Fr(e,i,[]);else if(o._clone&&n!==void 0)if(n)o=o.getRule(),s&&Fr(e,i,{});else{Fr(e,i,o._clone());continue}else s&&Fr(e,i,{});e[i]=al(e[i],o,n)}else Fr(e,i,o),Me.Undef(o)||(Me.Undef(o.__json)||(e[i].__json=o.__json),Me.Undef(o.__origin)||(e[i].__origin=o.__origin))}return n!==void 0&&Array.isArray(e)?e.filter(i=>!i||!i.__ctrl):e}function yi(e){return al({},{value:e}).value}const kz=Object.assign||function(e){for(let t,n=1;n<arguments.length;n++)for(let r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&Fr(e,r,t[r]);return e};function st(){return kz.apply(this,arguments)}function qp(e){return typeof e!="object"||e===null?e:e instanceof Array?[...e]:Xe({},e)}function ho(e,t){var n=null;return function(...r){n!==null&&clearTimeout(n),n=setTimeout(()=>e.call(this,...r),t)}}function gE(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function Oz(e){return e&&typeof e=="object"&&typeof e.then=="function"}function du(e){return Oz(e)?e:Promise.resolve(e)}function Na(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}function _E(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function yE(e,t,n){return`[form-create ${e}]: ${t}`}function em(e,t){console.error(yE("err",e))}function $z(e){em(e.toString()),console.error(e)}const Wp="[[FORM-CREATE-PREFIX-",Yp="-FORM-CREATE-SUFFIX]]";function za(e,t){return JSON.stringify(al(Array.isArray(e)?[]:{},e,!0),function(n,r){if(!(r&&r._isVue===!0)){if(typeof r!="function")return r;if(r.__json)return r.__json;if(r.__origin&&(r=r.__origin),!r.__emit)return Wp+r+Yp}},t)}function Df(e){return new Function("return "+e)()}function wi(e,t){if(e&&Me.String(e)&&e.length>4){let n=e.trim(),r=!1;try{if(n.indexOf(Yp)>0&&n.indexOf(Wp)===0)n=n.replace(Yp,"").replace(Wp,""),r=!0;else if(n.indexOf("$FN:")===0)n=n.substring(4),r=!0;else if(n.indexOf("$EXEC:")===0)n=n.substring(6),r=!0;else if(n.indexOf("$GLOBAL:")===0){const o=n.substring(8);return n=function(...s){const l=s[0].api.getGlobalEvent(o);if(l)return l.call(this,...s)},n.__json=e,n.__inject=!0,n}else{if(n.indexOf("$FNX:")===0)return n=Df(`function($inject){
32
- `+n.substring(5)+`
33
- }`),n.__json=e,n.__inject=!0,n;(!t&&n.indexOf("function ")===0&&n!=="function "||!t&&n.indexOf("function(")===0&&n!=="function(")&&(r=!0)}if(!r)return e;let i;try{i=Df(n)}catch{i=Df("function "+n)}return i.__json=e,i}catch(i){em(`解析失败:${n}
34
-
35
- err: ${i}`);return}}return e}function bE(e,t){return JSON.parse(e,function(n,r){return Me.Undef(r)||!r.indexOf?r:wi(r,t)})}let Az=0;function Mu(){const e=370+ ++Az;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+e.toString(36)+"c"}function bo(e,t,n){let r=e,i;return(t||"").split(".").forEach(o=>{i&&((!r[i]||typeof r[i]!="object")&&(r[i]={}),r=r[i]),i=o}),r[i]=n,r}const Rz="fcGroup",Pz=ze({name:Rz,props:{field:String,rule:Array,expand:Number,options:Object,button:{type:Boolean,default:!0},max:{type:Number,default:0},min:{type:Number,default:0},modelValue:{type:Array,default:()=>[]},defaultValue:Object,sortBtn:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},title:{type:[String,Function],default:null},type:{type:String,default:"default"},onBeforeRemove:{type:Function,default:()=>{}},onBeforeAdd:{type:Function,default:()=>{}},formCreateInject:Object,parse:Function},data(){return{len:0,cacheRule:{},cacheValue:{},sort:[],form:Ni(this.formCreateInject.form.$form())}},emits:["update:modelValue","change","itemMounted","remove","add"],watch:{rule:{handler(e,t){Object.keys(this.cacheRule).forEach(n=>{const r=this.cacheRule[n];if(r.$f){const i=r.$f.formData();if(e===t)r.$f.deferSyncValue(()=>{al(r.rule,e),r.$f.setValue(i)},!0);else{const o=r.$f.formData();r.$f.once("reloading",()=>{r.$f.setValue(o)}),r.rule=yi(e)}}})},deep:!0},expand(e){let t=e-this.modelValue.length;t>0&&this.expandRule(t)},modelValue:{handler(e){e=e||[];let t=this.sort,n=t.length,r=n-e.length;if(r<0){for(let i=r;i<0;i++)this.addRule(e.length+i,!0);for(let i=0;i<n;i++)this.setValue(t[i],e[i])}else{if(r>0)for(let i=0;i<r;i++)this.removeRule(t[n-i-1]);e.forEach((i,o)=>{this.setValue(t[o],e[o])})}},deep:!0}},methods:{_value(e){return e&&Zt(e,this.field)?e[this.field]:e},cache(e,t){this.cacheValue[e]=JSON.stringify(t)},input(e){this.$emit("update:modelValue",e),this.$emit("change",e)},formData(e,t){const n=this.cacheRule,r=this.sort;if(r.filter(o=>n[o]&&n[o].$f).length!==r.length)return;const i=r.map(o=>{const s=e===o?t:Xe({},this.cacheRule[o].$f.form),l=this.field?Me.Undef(s[this.field])?null:s[this.field]:s;return this.cache(o,l),l});this.input(i)},setValue(e,t){const n=this.field;n&&(t={[n]:this._value(t)}),this.cacheValue[e]!==JSON.stringify(n?t[n]:t)&&(this.cacheRule[e].$f&&this.cacheRule[e].$f.coverValue(t),this.cache(e,t))},addRule(e,t){const n=this.formCreateInject.form.copyRules(this.rule||[]),r=this.options?Xe({},this.options):{submitBtn:!1,resetBtn:!1};if(this.defaultValue){r.formData||(r.formData={});const i=yi(this.defaultValue);st(r.formData,this.field?{[this.field]:i}:i)}this.parse&&this.parse({rule:n,options:r,index:this.sort.length}),this.cacheRule[++this.len]={rule:n,options:r},this.sort=Object.keys(this.cacheRule),t&&gt(()=>this.$emit("add",n,Object.keys(this.cacheRule).length-1))},add$f(e,t,n){this.cacheRule[t].$f=n,gt(()=>{this.$emit("itemMounted",n,Object.keys(this.cacheRule).indexOf(t))})},removeRule(e,t){const n=Object.keys(this.cacheRule).indexOf(e);delete this.cacheRule[e],delete this.cacheValue[e],this.sort=Object.keys(this.cacheRule),t&&gt(()=>this.$emit("remove",n))},add(e){if(this.disabled||this.onBeforeAdd(this.modelValue)===!1)return;const t=[...this.modelValue];t.push(this.defaultValue?yi(this.defaultValue):this.field?null:{}),this.input(t)},del(e,t){if(this.disabled)return;const n=()=>{this.removeRule(t,!0);const r=[...this.modelValue];r.splice(e,1),this.input(r)};du(this.onBeforeRemove(this.modelValue,e)).then(r=>{r!==!1&&n()})},addIcon(e){return Z("div",{class:"_fc-group-btn _fc-group-plus-minus",onClick:this.add},null)},delIcon(e,t){return Z("div",{class:"_fc-group-btn _fc-group-plus-minus _fc-group-minus",onClick:()=>this.del(e,t)},null)},sortUpIcon(e){return Z("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-up",onClick:()=>this.changeSort(e,-1)},null)},sortDownIcon(e){return Z("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-down",onClick:()=>this.changeSort(e,1)},null)},changeSort(e,t){const n=this.sort[e];this.sort[e]=this.sort[e+t],this.sort[e+t]=n,this.formCreateInject.subForm(this.sort.map(r=>this.cacheRule[r].$f)),this.formData(0)},sortIcon(e,t){const n=e>0,r=e<t-1,i=[];return!n&&!r?i:this.type==="card"&&n&&r?(i.push(Z("div",{class:"_fc-group-btn _fc-group-sort"},[Z("div",{class:" _fc-group-sort-up",onClick:()=>this.changeSort(e,-1)},null),Z("div",{class:" _fc-group-sort-down",onClick:()=>this.changeSort(e,1)},null)])),i):(n&&i.push(this.sortUpIcon(e)),r&&i.push(this.sortDownIcon(e)),i)},makeIcon(e,t,n){if(this.$slots.button)return this.$slots.button({total:e,index:t,vm:this,key:n,del:()=>this.del(t,n),add:this.add});const r=[];if((!this.max||e<this.max)&&e===t+1&&r.push(this.addIcon(n)),e>this.min&&r.push(this.delIcon(t,n)),this.sortBtn){const i=this.sortIcon(t,e);i&&r.push(...i)}return r},expandRule(e){for(let t=0;t<e;t++)this.modelValue.push(this.field?null:{});this.input([...this.modelValue])},getTitle(e,t){return typeof this.title=="function"?this.title(e,this.modelValue[e],t):typeof this.title=="string"?this.title.replace("{index}",e+1):!1}},created(){const e=(this.expand||0)-this.modelValue.length;for(let t=0;t<this.modelValue.length;t++)this.addRule(t);e>0&&this.expandRule(e)},render(){const e=this.sort,t=this.button,n=this.form,r=this.disabled,i=this.type==="card",o=e.length===0?this.$slots.default?this.$slots.default({vm:this,add:this.add}):Z("div",{key:"a_def",class:"_fc-group-plus-minus _fc-group-add fc-clock",onClick:this.add},null):e.map((s,l)=>{const{rule:c,options:d}=this.cacheRule[s],f=t&&!r?this.makeIcon(e.length,l,s):[],p=this.getTitle(l,s);return i?Z("div",{class:"_fc-group-container",key:s},[Z("div",{class:"_fc-group-header"},[p===!1?Z("div",{class:"_fc-group-idx"},[l+1]):null,p!==!1?Z("div",{class:"_fc-group-title"},[p]):null,Z("div",{class:"_fc-group-handle fc-clock"},[f.length?f:null])]),Z("div",{class:"_fc-group-content"},[Z(n,Ot({key:s},Br(Xe({},this.$attrs),{disabled:r,"onUpdate:modelValue":v=>this.formData(s,v),"onUpdate:api":v=>this.add$f(l,s,v),inFor:!0,modelValue:this.field?{[this.field]:this._value(this.modelValue[l])}:this.modelValue[l],rule:c,option:d,extendOption:!0})),null)])]):Z("div",{class:"_fc-group-container",key:s},[Z(n,Ot({key:s},Br(Xe({},this.$attrs),{disabled:r,"onUpdate:modelValue":v=>this.formData(s,v),"onUpdate:api":v=>this.add$f(l,s,v),inFor:!0,modelValue:this.field?{[this.field]:this._value(this.modelValue[l])}:this.modelValue[l],rule:c,option:d,extendOption:!0})),null),Z("div",{class:"_fc-group-idx"},[l+1]),f.length?Z("div",{class:"_fc-group-handle fc-clock"},[f]):null])});return Z("div",{key:"con",class:"_fc-group "+(r?"_fc-group-disabled":"")+(i?" _fc-group-card":"")},[o])}}),Iz="fcSubForm",Mz=ze({name:Iz,props:{rule:Array,options:{type:Object,default:()=>Hn({submitBtn:!1,resetBtn:!1})},modelValue:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},formCreateInject:Object},data(){return{cacheValue:{},subApi:{},form:Ni(this.formCreateInject.form.$form())}},emits:["fc:subform","update:modelValue","change","itemMounted"],watch:{modelValue(e){this.setValue(e)}},methods:{formData(e){this.cacheValue=JSON.stringify(e),this.$emit("update:modelValue",e),this.$emit("change",e)},setValue(e){const t=JSON.stringify(e);this.cacheValue!==t&&(this.cacheValue=t,this.subApi.coverValue(e||{}))},add$f(e){this.subApi=e,gt(()=>{this.$emit("itemMounted",e)})}},render(){const e=this.form;return Z(e,{disabled:this.disabled,"onUpdate:modelValue":this.formData,modelValue:this.modelValue,"onUpdate:api":this.add$f,rule:this.rule,option:this.options,extendOption:!0},null)}}),Dz={name:"IconWarning"},Fz={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function Lz(e,t,n,r,i,o){return C(),R("svg",Fz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z"},null,-1)])])}const jz=So(Dz,[["render",Lz]]),Uz=[VN,dz,pz,gz,yz,Tz,Pz,Mz,jz],wE=["props"],EE=["class","style","directives"],SE=["on","hook"],zi=(e,t={},n={})=>{const r=[...wE,...n.normal||[]],i=[...EE,...n.array||[]],o=[...SE,...n.functional||[]],s=n.props||[];return e.reduce((l,c)=>{for(const d in c)if(l[d])if(s.indexOf(d)>-1)l[d]=zi([c[d]],l[d]);else if(r.indexOf(d)>-1)l[d]=Xe(Xe({},l[d]),c[d]);else if(i.indexOf(d)>-1){const f=l[d]instanceof Array?l[d]:[l[d]],p=c[d]instanceof Array?c[d]:[c[d]];l[d]=[...f,...p]}else if(o.indexOf(d)>-1)for(const f in c[d])if(l[d][f]){const p=l[d][f]instanceof Array?l[d][f]:[l[d][f]],v=c[d][f]instanceof Array?c[d][f]:[c[d][f]];l[d][f]=[...p,...v]}else l[d][f]=c[d][f];else if(d==="hook")for(let f in c[d])l[d][f]?l[d][f]=Nz(l[d][f],c[d][f]):l[d][f]=c[d][f];else l[d]=c[d];else r.indexOf(d)>-1||o.indexOf(d)>-1||s.indexOf(d)>-1?l[d]=Xe({},c[d]):i.indexOf(d)>-1?l[d]=c[d]instanceof Array?[...c[d]]:typeof c[d]=="object"?Xe({},c[d]):c[d]:l[d]=c[d];return l},t)},Nz=(e,t)=>function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)},CE=["type","slot","ignore","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],tm=["validate","children","control"],nm=["effect","deep","renderSlots"];function xE(){return[...CE,...wE,...EE,...SE,...tm,...nm]}function tr(e){const t=e.replace(/(-[a-z])/g,function(n){return n.replace("-","").toLocaleUpperCase()});return TE(t)}function TE(e){return e.replace(e[0],e[0].toLowerCase())}function Kp(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function kE(e,t){return OE([e],t||!1)[0]}function OE(e,t){return al([],[...e],t||!1)}function Hi(e,t){return zi(Array.isArray(t)?t:[t],e,{array:tm,normal:nm}),e}function ib(e){const t=Me.Function(e.getRule)?e.getRule():e;return t.type||(t.type="input"),t}function zz(e,t){return e?(Object.keys(t||{}).forEach(n=>{t[n]&&(e[n]=Hi(e[n]||{},t[n]))}),e):t}function $E(e,t){Object.defineProperties(e,Object.keys(t).reduce((n,r)=>(n[r]={get(){return t[r]()}},n),{}))}function hi(e){return e.__fc__||(e.__origin__?e.__origin__.__fc__:null)}function _t(e,t){try{t=e()}catch(n){$z(n)}return t}function _c(){const e={},t=n=>n||"default";return{setSlot(n,r){n=t(n),!(!r||Array.isArray(r)&&r.length)&&(e[n]||(e[n]=[]),e[n].push(r))},getSlot(n,r){n=t(n);const i=[];return(e[n]||[]).forEach(o=>{if(Array.isArray(o))i.push(...o);else if(Me.Function(o)){const s=o(...r||[]);Array.isArray(s)?i.push(...s):i.push(s)}else Me.Undef(o)||i.push(o)}),i},getSlots(){const n={};return Object.keys(e).forEach(r=>{n[r]=(...i)=>this.getSlot(r,i)}),n},slotLen(n){return n=t(n),e[n]?e[n].length:0},mergeBag(n){if(!n)return this;const r=Me.Function(n.getSlots)?n.getSlots():n;return Array.isArray(n)||Ts(n)?this.setSlot(void 0,()=>n):Object.keys(r).forEach(i=>{this.setSlot(i,r[i])}),this}}}function ob(e){const t=Xe({},e.props||{});return Object.keys(e.on||{}).forEach(n=>{n.indexOf("-")>0&&(n=tr(n));const r=`on${_E(n)}`;Array.isArray(t[r])?t[r]=[...t[r],e.on[n]]:t[r]?t[r]=[t[r],e.on[n]]:t[r]=e.on[n]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function yc(e,t){return Object.setPrototypeOf(e,t),e}const sb=(e,t)=>typeof e=="string"?String(t):typeof e=="number"?Number(t):t,Ko={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(sb(e,t)),"!=":(e,t)=>!Ko["=="](e,t),">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,on(e,t){return e&&e.indexOf&&e.indexOf(sb(e[0],t))>-1},notOn(e,t){return!Ko.on(e,t)},in(e,t){return t&&t.indexOf&&t.indexOf(e)>-1},notIn(e,t){return!Ko.in(e,t)},between(e,t){return e>t[0]&&e<t[1]},notBetween(e,t){return e<t[0]||e>t[1]},empty(e){return Me.empty(e)},notEmpty(e){return!Me.empty(e)},pattern(e,t){return new RegExp(t,"g").test(e)}};function Nn(e,t){return(Array.isArray(t)?t:(t||"").split(".")).forEach(n=>{e!=null&&(e=e[n])}),e}function Bz(e){const t=/{{\s*(.*?)\s*}}/g;let n;const r={};for(;(n=t.exec(e))!==null;)n[1]&&(r[n[1]]=!0);return Object.keys(r)}function ab(e){let t=e.split("."),n=[],r="";return t.forEach((i,o)=>{o===0?r=i:r+="."+i,n.push(r)}),n.join(" && ")}function AE(e){const t=[];let n="",r=0;for(let i=0;i<e.length;i++){const o=e[i];o==="["?(r===0&&n&&(t.push({type:"key",value:n}),n=""),r++,n+=o):o==="]"?(r--,n+=o,r===0&&(t.push({type:"bracket",value:AE(n.slice(1,-1))}),n="")):o==="."&&r===0?n&&(t.push({type:"key",value:n}),n=""):n+=o}return n&&t.push({type:"key",value:n}),t.map(i=>i.type==="key"?{key:i.value}:{children:i.value})}const Kc=(e,t)=>{if(!(!e||e===t)){if(e.props.formCreateInject)return e.props.formCreateInject;if(e.parent)return Kc(e.parent,t)}};function Vz(e,t,n){return ze({name:"FormCreate"+(e.isMobile?"Mobile":""),components:t,directives:n,props:{rule:{type:Array,required:!0,default:()=>[]},option:{type:Object,default:()=>({})},extendOption:Boolean,driver:[String,Object],modelValue:Object,disabled:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","beforeUnmount","submit","reset","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render(){return this.fc.render()},setup(r){const i=Fs();Aw("parentFC",i);const o=Ls("parentFC",null);let s=o;if(o)for(;s.setupState.parent;)s=s.setupState.parent;else s=i;const{rule:l,modelValue:c,subForm:d,inFor:f}=U_(r),p=Hn({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...l.value||[]],updateValue:JSON.stringify(c.value||{})}),v=new e(i),y=v.api(),g=f.value,m=()=>{if(o){const M=Kc(i,o);if(M){let z;g?(z=er(M.getSubForm()),z.push(y)):z=y,M.subForm(z)}}},b=()=>{const M=Kc(i,o);if(M)if(g){const z=er(M.getSubForm()),Y=z.indexOf(y);Y>-1&&z.splice(Y,1)}else M.subForm()};let x=null;sP(()=>{zn(()=>{let M="";const z=r.option&&r.option.globalClass||{};Object.keys(z).forEach(Y=>{let ve="";z[Y].style&&Object.keys(z[Y].style).forEach(W=>{ve+=Na(W)+":"+z[Y].style[W]+";"}),z[Y].content&&(ve+=z[Y].content+";"),ve&&(M+=`.${Y}{${ve}}`)}),r.option&&r.option.style&&(M+=r.option.style),x||(x=document.createElement("style"),x.type="text/css",document.head.appendChild(x)),x.innerHTML=M||""})});const S=ho(()=>{v.bus.$emit("$loadData.$topForm")},100),O=ho(function(){v.bus.$emit("$loadData.$scopeForm")},100),T=ho(()=>{v.bus.$emit("$loadData.$form")},100),A=M=>{v.bus.$emit("change-$form."+M)};return xt(()=>{o&&(y.top.bus.$on("$loadData.$form",S),y.top.bus.$on("change",A)),y!==y.scope&&y.scope.bus.$on("$loadData.$scopeForm",O),v.mounted()}),ns(()=>{o&&(y.top.bus.$off("$loadData.$form",S),y.top.bus.$off("change",A)),y!==y.scope&&y.scope.bus.$off("$loadData.$scopeForm",O),b(),p.destroyed=!0,v.unmount(),x&&(x.parentNode||x.parentElement)&&document.head.removeChild(x)}),$w(()=>{v.updated()}),m(),He(()=>r.option,()=>{v.initOptions(),y.refresh()},{deep:!0,flush:"sync"}),He(()=>[...l.value],M=>{v.$handle.isBreakWatch()||M.length===p.renderRule.length&&M.every(z=>p.renderRule.indexOf(z)>-1)||(v.$handle.updateAppendData(),v.$handle.reloadRule(l.value),i.setupState.renderRule())}),He(()=>[r.disabled,r.preview],()=>{y.refresh()}),He(c,M=>{za(M||{})!==p.updateValue&&(y.config.forceCoverValue?y.coverValue(M||{}):y.setValue(M||{}))},{deep:!0,flush:"post"}),He(()=>r.index,()=>{y.coverValue({}),v.$handle.updateAppendData(),gt(()=>{gt(()=>{y.clearValidateState()})})},{flush:"sync"}),Br(Xe({fc:Ni(v),parent:o&&Ni(o),top:Ni(s),fapi:Ni(y)},U_(p)),{getGroupInject:()=>Kc(i,o),refresh(){++p.unique},renderRule(){p.renderRule=[...l.value||[]]},updateValue(M){if(p.destroyed)return;const z=za(M);p.updateValue!==z&&(p.updateValue=z,i.emit("update:modelValue",M),gt(()=>{T(),o?d.value||O():(S(),O())}))}})},created(){const r=Fs();r.emit("update:api",r.setupState.fapi),r.setupState.fc.init()}})}function RE(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}function kn(e,t){return(n,r,i,o={})=>{const s=new rm(e,n,r,i,o);return t&&(Me.Function(t)?t(s):s.props(t)),s}}function rm(e,t,n,r,i){this._data=st(RE(),{type:e,title:t,field:n,value:r,props:i||{}}),this.event=this.on}st(rm.prototype,{getRule(){return this._data},setProp(e,t){return Fr(this._data,e,t),this},modelField(e){return this._data.modelField=e,this},_clone(){const e=new this.constructor;return e._data=kE(this._data),e}});function PE(e){e.forEach(t=>{rm.prototype[t]=function(n){return Hi(this._data,{[t]:arguments.length<2?n:{[n]:arguments[1]}}),this}})}PE(xE());const Hz=kn("");function qz(e,t,n){let r=Hz("",t);return r._data.type=e,r._data.title=n,r}function Wz(){return{create:qz,factory:kn}}function Yz(e,t,n){const r=`fail to ${e} ${n.status}'`,i=new Error(r);return i.status=n.status,i.url=e,i}function lb(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function IE(e){if(typeof XMLHttpRequest>"u")return;const t=new XMLHttpRequest;let n=e.action||"";if(t.upload&&e.onProgress&&t.upload.addEventListener("progress",o=>{o.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(o)}),e.query){const o=Me.String(e.query)?e.query:Object.keys(e.query).reduce((l,c)=>(l[c]=e.query[c]===null||e.query[c]===void 0?"":e.query[c],l),{}),s=new URLSearchParams(o).toString();s&&(n.includes("?")?n+=`&${s}`:n+=`?${s}`)}t.onerror=function(o){e.onError(o)},t.onload=function(){if(t.status<200||t.status>=300)return e.onError(Yz(n,e,t),lb(t));e.onSuccess(lb(t))},t.open(e.method||"get",n,!0);let r;(e.data||e.file)&&(e.file||(e.dataType||"").toLowerCase()!=="json"?(r=new FormData,Object.keys(e.data||{}).map(o=>{r.append(o,e.data[o])})):(r=JSON.stringify(e.data||{}),t.setRequestHeader("content-type","application/json"))),e.file&&r.append(e.filename,e.file,e.file.name),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const i=e.headers||{};Object.keys(i).forEach(o=>{i[o]!=null&&t.setRequestHeader(o,i[o])}),t.send(r)}function cb(e,t,n){return new Promise((r,i)=>{(t||IE)(Br(Xe({},e),{onSuccess(o){let s=c=>c;const l=wi(e.parse);Me.Function(l)?s=l:l&&Me.String(l)&&(s=c=>Nn(c,l)),du(s(o,e.targetRule,n)).then(c=>{r(c)})},onError(o){i(o)}}))})}function Ca(e){return yi(e)}function Kz(e){function t(o){return Me.Undef(o)?o=e.fields():Array.isArray(o)||(o=[o]),o}function n(o,s,l){Me.Undef(o)?o=Object.keys(Xe(Xe({},e.fieldCtx),e.nameCtx)):Array.isArray(o)||(o=[o]),o.forEach(c=>{const d=e.fieldCtx[c]||e.nameCtx[c];d&&d.forEach(f=>{Fr(f.rule,s,l),e.$render.clearCache(f)})})}function r(){const o=e.subForm;return Object.keys(o).reduce((s,l)=>{const c=o[l];return c&&(Array.isArray(c)?s.push(...c):s.push(c)),s},[])}const i={get isScope(){return e.vm.props.subForm===!1},get isPreview(){return e.preview},get config(){return e.options},set config(o){e.fc.options.value=o},get options(){return e.options},set options(o){e.fc.options.value=o},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return i.parent?i.parent.top:i},get scope(){let o=e.vm;for(;o&&o.setupState.fapi;)if(o.props.subForm)o=o.setupState.parent;else return o.setupState.fapi;return i.top},get children(){return r()},get siblings(){const o=e.vm.setupState.getGroupInject();if(o){const s=o.getSubForm();if(Array.isArray(s))return[...s]}},get index(){const o=i.siblings;if(o){const s=o.indexOf(i);return s>-1?s:void 0}},get formulas(){return Xe({},e.fc.formulas)},formData(o){if(o==null||typeof o=="boolean"){const s={};return Object.keys(e.form).forEach(l=>{(o===!0||e.ignoreFields.indexOf(l)===-1)&&(s[l]=Ca(e.form[l]))}),s}else return t(o).reduce((s,l)=>(s[l]=i.getValue(l),s),{})},getValue(o){const s=e.getFieldCtx(o);return s?Ca(s.rule.value):e.options.appendValue!==!1&&Zt(e.appendData,o)?Ca(e.appendData[o]):void 0},coverValue(o){const s=Xe({},o||{});e.deferSyncValue(()=>{e.appendData={},i.fields().forEach(l=>{const c=e.fieldCtx[l];if(c){const d=Zt(o,l);c.forEach(f=>{f.rule.value=d?o[l]:void 0}),delete s[l]}}),st(e.appendData,s)},!0)},setValue(o){let s=o;arguments.length>=2&&(s={[o]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(s).forEach(l=>{const c=e.fieldCtx[l];if(!c)return e.appendData[l]=s[l];c.forEach(d=>{d.rule.value=s[l]})})},!0)},removeField(o){const s=e.getCtx(o);return e.deferSyncValue(()=>{e.getCtxs(o).forEach(l=>{l.rm()})},!0),s?s.origin:void 0},removeRule(o){const s=o&&hi(o);if(s)return s.rm(),s.origin},fields:()=>e.fields(),append:(o,s,l)=>{let c=e.sort.length-1,d;const f=e.getCtx(s);if(f)if(l){if(d=f.getPending("children",f.rule.children),!Array.isArray(d))return;c=f.rule.children.length-1}else c=f.root.indexOf(f.origin),d=f.root;else d=e.rules;d.splice(c+1,0,o)},prepend:(o,s,l)=>{let c=0,d;const f=e.getCtx(s);if(f)if(l){if(d=f.getPending("children",f.rule.children),!Array.isArray(d))return}else c=f.root.indexOf(f.origin),d=f.root;else d=e.rules;d.splice(c,0,o)},hidden(o,s){n(s,"hidden",!!o),e.refresh()},hiddenStatus(o){const s=e.getCtx(o);if(s)return!!s.rule.hidden},display(o,s){n(s,"display",!!o),e.refresh()},displayStatus(o){const s=e.getCtx(o);if(s)return!!s.rule.display},disabled(o,s){t(s).forEach(l=>{e.getCtxs(l).forEach(c=>{Fr(c.rule.props,"disabled",!!o)})}),e.refresh()},all(o){return Object.keys(e.ctxs).map(s=>{const l=e.ctxs[s];return o?l.origin:l.rule})},model(o){return e.fields().reduce((s,l)=>{const c=e.fieldCtx[l][0];return s[l]=o?c.origin:c.rule,s},{})},component(o){return Object.keys(e.nameCtx).reduce((s,l)=>{const c=e.nameCtx[l].map(d=>o?d.origin:d.rule);return s[l]=c.length===1?c[0]:c,s},{})},bind(){return i.form},reload:o=>{e.reloadRule(o)},updateOptions(o){e.fc.updateOptions(o),i.refresh()},onSubmit(o){i.updateOptions({onSubmit:o})},sync:o=>{if(Array.isArray(o)){o.forEach(l=>i.sync(l));return}let s=Me.Object(o)?hi(o):e.getCtxs(o);s&&(s=Array.isArray(s)?s:[s],s.forEach(l=>{if(!l.deleted){const c=e.subForm[l.id];c&&(Array.isArray(c)?c.forEach(d=>{d.refresh()}):c&&c.refresh()),e.$render.clearCache(l)}}),e.refresh())},refresh:()=>{r().forEach(o=>{o.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions(){e.$manager.updateOptions(e.options),i.refresh()},hideForm:o=>{e.vm.setupState.isShow=!o},changeStatus:()=>e.changeStatus,clearChangeStatus:()=>{e.changeStatus=!1},updateRule(o,s){e.getCtxs(o).forEach(l=>{st(l.rule,s)})},updateRules(o){Object.keys(o).forEach(s=>{i.updateRule(s,o[s])})},mergeRule:(o,s)=>{e.getCtxs(o).forEach(l=>{Hi(l.rule,s)})},mergeRules(o){Object.keys(o).forEach(s=>{i.mergeRule(s,o[s])})},getRule:(o,s)=>{const l=e.getCtx(o);if(l)return s?l.origin:l.rule},findType(o,s){let l;return Object.keys(e.ctxs).forEach(c=>{const d=e.ctxs[c];d.rule.type===o&&(l=s?d.origin:d.rule)}),l},findTypes(o,s){let l=[];return Object.keys(e.ctxs).forEach(c=>{const d=e.ctxs[c];d.rule.type===o&&l.push(s?d.origin:d.rule)}),l},getRenderRule:o=>{const s=e.getCtx(o);if(s)return s.prop},getRefRule:o=>{const s=e.getCtxs(o);if(s){const l=s.map(c=>c.rule);return l.length===1?l[0]:l}},setEffect(o,s,l){const c=e.getCtx(o);c&&s&&(s[0]==="$"&&(s=s.substr(1)),Zt(c.rule,"$"+s)&&Fr(c.rule,"$"+s,l),Zt(c.rule,"effect")||(c.rule.effect={}),Fr(c.rule.effect,s,l))},clearEffectData(o,s){const l=e.getCtx(o);l&&(s&&s[0]==="$"&&(s=s.substr(1)),l.clearEffectData(s),i.sync(o))},updateValidate(o,s,l){l?i.mergeRule(o,{validate:s}):n(o,"validate",s)},updateValidates(o,s){Object.keys(o).forEach(l=>{i.updateValidate(l,o[l],s)})},refreshValidate(){i.refresh()},resetFields(o){t(o).forEach(s=>{e.getCtxs(s).forEach(l=>{e.$render.clearCache(l),l.rule.value=Ca(l.defaultValue)})}),gt(()=>{gt(()=>{gt(()=>{i.clearValidateState(o)})})}),o==null&&(Me.Function(e.options.onReset)&&_t(()=>e.options.onReset(i)),e.vm.emit("reset",i))},method(o,s){const l=i.el(o);if(!l||!l[s])throw new Error(yE("err",`${s} 方法不存在`));return(...c)=>l[s](...c)},exec(o,s,...l){return _t(()=>i.method(o,s)(...l))},toJson(o){return za(i.rule,o)},trigger(o,s,...l){const c=i.el(o);c&&c.$emit(s,...l)},el(o){const s=e.getCtx(o);if(s)return s.el||e.vm.refs[s.ref]},scrollTo(o,s={block:"center",inline:"nearest",behavior:"smooth"}){const l=i.el(o);if(!l)return;const c=l.$el!==void 0?l.$el:l;if(!c)return;const d=c.nodeType===1?c:c.firstElementChild;d&&typeof d.scrollIntoView=="function"&&d.scrollIntoView(s)},focus(o){const s=i.el(o);if(!s)return;const l=p=>!p||typeof p.focus!="function"?!1:(_t(()=>p.focus()),!0);if(l(s))return;const c=s.$el!==void 0?s.$el:s;if(l(c))return;const d=c&&(c.nodeType===1?c:c.firstElementChild);if(l(d)||!d||!d.querySelector)return;const f=d.querySelector('input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])');l(f)},closeModal:o=>{e.bus.$emit("fc:closeModal:"+o)},getSubForm(o){const s=e.getCtx(o);return s?e.subForm[s.id]:void 0},getChildrenRuleList(o){const s=typeof o=="object",l=s?hi(o):e.getCtx(o),c=l?l.rule:s?o:i.getRule(o);if(!c)return[];const d=[];return(f=>{f&&f.forEach(p=>{typeof p=="object"&&(p.field&&d.push(p),d.push(...i.getChildrenRuleList(p)))})})(l?l.loadChildrenPending():c.children),d},getParentRule(o){return(typeof o=="object"?hi(o):e.getCtx(o)).parent.rule},getParentSubRule(o){const s=typeof o=="object"?hi(o):e.getCtx(o);if(s){const l=s.getParentGroup();if(l)return l.rule}},getChildrenFormData(o,s){return i.getChildrenRuleList(o).reduce((l,c)=>((c.ignore!==!0||s===!0)&&(l[c.field]=Ca(c.value)),l),{})},setChildrenFormData(o,s,l){const c=i.getChildrenRuleList(o);e.deferSyncValue(()=>{c.forEach(d=>{Zt(s,d.field)?d.value=s[d.field]:l&&(d.value=void 0)})})},getGlobalEvent(o){let s=i.options.globalEvent[o];if(s)return typeof s=="object"&&(s=s.handle),wi(s)},getGlobalData(o){return new Promise((s,l)=>{let c=i.options.globalData[o];c?c.type==="fetch"?i.fetch(c).then(d=>{s(d)}).catch(l):s(c.data):s(e.fc.loadData[o])})},emitGlobalEvent(o,...s){const l=i.getGlobalEvent(o);if(l){const c=e.getInjectData({},void 0);return c.args=[...s],s.unshift(c),l.apply(null,s)}},setGlobalData(o,s){i.setData("$globalData."+o,s)},setGlobalVar(o,s){i.setData("$var."+o,s)},renderRule(o,s,l){const c=typeof o=="object"?hi(o):e.getCtx(o);return c?e.$render.createRuleVnode(c,s,l):void 0},renderChildren(o,s,l){const c=typeof o=="object"?hi(o):e.getCtx(o);return c?e.$render.createChildrenVnodes(c,s,l):void 0},nextTick(o){e.bus.$once("next-tick",o),e.refresh()},nextRefresh(o){e.nextRefresh(),o&&_t(o)},deferSyncValue(o,s){e.deferSyncValue(o,s)},emit(o,...s){e.vm.emitsOptions&&!e.vm.emitsOptions[o]&&(e.vm.emitsOptions[o]=null),e.vm.emit(o,...s)},bus:e.bus,getCurrentFormRule(){var o;return(o=e.vm.setupState.getGroupInject())==null?void 0:o.rule},fetch(o){return new Promise((s,l)=>{let c=Xe({},o);c=e.loadFetchVar(c);const d=f=>{_t(()=>c.onError&&c.onError(f)),l(f)};e.beforeFetch(c).then(()=>cb(c,e.fc.create.fetch,i).then(f=>{_t(()=>c.onSuccess&&c.onSuccess(f)),s(f)}).catch(f=>{d(f)})).catch(f=>{d(f)})})},watchFetch(o,s,l,c){return e.fc.watchLoadData((d,f)=>{let p=Xe({},o);if(p=e.loadFetchVar(p,d),c&&c(p,f)===!1)return;const v=y=>{_t(()=>p.onError&&p.onError(y)),l&&l(y)};e.beforeFetch(p).then(()=>cb(p,e.fc.create.fetch,i).then(y=>{_t(()=>p.onSuccess&&p.onSuccess(y)),s&&s(y,f)}).catch(y=>{v(y)})).catch(y=>{v(y)})},o.wait==null?1e3:o.wait)},getData(o,s){return e.fc.get?e.fc.get(o,s):e.fc.getLoadData(o,s)},watchData(o){return e.fc.watchLoadData((s,l)=>{_t(()=>o(s,l))})},setData(o,s,l){return e.fc.setData(o,s,l)},refreshData(o){return e.fc.refreshData(o)},t(o,s){return e.fc.t(o,s)},getLocale(){return e.fc.getLocale()},helper:{tidyFields:t,props:n}};return["on","once","off"].forEach(o=>{i[o]=function(...s){e.bus[`$${o}`](...s)}}),i.changeValue=i.changeField=i.setValue,i}function Gz(e){st(e.prototype,{initCache(){this.clearCacheAll()},clearCache(t){if(!t.rule.cache){if(!this.cache[t.id]){t.parent&&this.clearCache(t.parent);return}(this.cache[t.id].use===!0||this.cache[t.id].parent)&&this.$handle.refresh(),this.cache[t.id].parent&&this.clearCache(this.cache[t.id].parent),this.cache[t.id]=null}},clearCacheAll(){this.cache={}},setCache(t,n,r){this.cache[t.id]={vnode:n,use:!1,parent:r,slot:t.rule.slot}},getCache(t){const n=this.cache[t.id];if(n)return n.use=!0,n.vnode}})}function Qz(e){st(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(t){const n=r=>{if(r){let i;return t.rule.field&&(i=r.slots["field-"+Na(t.rule.field)]||r.slots["field-"+t.rule.field]),i||(i=r.slots["type-"+Na(t.type)]||r.slots["type-"+t.type]),i||n(r.setupState.parent)}};return n(this.vm)},render(){if(!this.vm.setupState.isShow)return;this.$manager.beforeRender();const t=_c();return this.sort.forEach(n=>{this.renderSlot(t,this.$handle.ctxs[n])}),this.$manager.render(t)},renderSlot(t,n,r){if(this.isFragment(n)){n.initProp(),this.mergeGlobal(n),n.initNone();const i=this.renderChildren(n.loadChildrenPending(),n),o=i.default;o&&t.setSlot(n.rule.slot,()=>o()),delete i.default,t.mergeBag(i)}else t.setSlot(n.rule.slot,this.renderCtx(n,r))},mergeGlobal(t){this.$handle.options.global&&(this.cacheConfig[t.trueType]||(this.cacheConfig[t.trueType]=se(()=>{const n=this.$handle.options.global;return Hi({},[n["*"]||n.default||{},n[t.originType]||n[t.type]||n[t.type]||{}])})),t.prop=Hi({},[this.cacheConfig[t.trueType].value,t.prop]))},setOptions(t){const n=t.loadPending({key:"options",origin:t.prop.options,def:[]});t.prop.options=n,t.prop.optionsTo&&n&&bo(t.prop,t.prop.optionsTo,n)},deepSet(t){const n=t.prop.deep;n&&Object.keys(n).sort((r,i)=>r.length<i.length?-1:1).forEach(r=>{bo(t.prop,r,n[r])})},parseSide(t,n){return Me.Object(t)?Hi({props:{formCreateInject:n.prop.props.formCreateInject}},t):t},renderSides(t,n,r){const i=n[r?"rule":"prop"];return[this.renderRule(this.parseSide(i.prefix,n)),t,this.renderRule(this.parseSide(i.suffix,n))]},renderId(t,n){const r=this.$handle[n==="field"?"fieldCtx":"nameCtx"][t];return r?r.map(i=>this.renderCtx(i,i.parent)):void 0},renderCtx(t,n){try{if(t.type==="hidden")return;const r=t.rule;if(this.force||!this.cache[t.id]||this.cache[t.id].slot!==r.slot){let i;t.initProp(),this.mergeGlobal(t),t.initNone(),this.$manager.tidyRule(t),this.deepSet(t),this.setOptions(t),this.ctxProp(t);let o=t.prop;o.preview=!!(o.preview!=null?o.preview:this.$handle.preview),o.props.formCreateInject=this.injectProp(t);let s=o.cache!==!1;const l=o.preview;if(o.hidden){this.setCache(t,void 0,n);return}i=(...c)=>{var d,f;const p={rule:r,prop:o,preview:l,api:this.$handle.api,model:o.model||{},slotValue:c};c.length&&r.slotUpdate&&_t(()=>r.slotUpdate(p));let v={};const y=t.loadChildrenPending();t.parser.renderChildren?v=t.parser.renderChildren(y,t):t.parser.loadChildren!==!1&&(v=this.renderChildren(y,t)),Object.keys(o.renderSlots||{}).forEach(b=>{v[b]=(...x)=>{if(Me.Function(o.renderSlots[b]))return _t(()=>o.renderSlots[b](...x));const S=this.parseSide(o.renderSlots[b],t);return this.renderRule(S)}});const g=this.getTypeSlot(t);let m;return g?(p.children=v,m=g(p)):m=l?t.parser.preview(qp(v),t):t.parser.render(qp(v),t),m=this.renderSides(m,t),(d=o.title)!=null&&d.show&&(o.wrap=Xe({show:!0},o.wrap||{}),o.native||(o.native=!1)),(!(!t.input&&Me.Undef(o.native))||((f=o.col)==null?void 0:f.show)===!0)&&o.native!==!0&&(this.fc.targetFormDriver("updateWrap",t),m=this.$manager.makeWrap(t,m)),t.none&&(Array.isArray(m)?m=m.map(b=>!b||!b.__v_isVNode?b:this.none(b)):m=this.none(m)),s&&this.setCache(t,()=>this.stable(m),n),m},this.setCache(t,i,n)}return(...i)=>{const o=this.getCache(t);if(o)return o(...i);if(this.cache[t.id])return;const s=this.renderCtx(t,t.parent);if(s)return s()}}catch(r){console.error(r);return}},none(t){if(t)return t.props.class=this.mergeClass(t.props.class,"fc-none"),t},mergeClass(t,n){if(Array.isArray(t))t.push(n);else return t?[t,n]:n;return t},stable(t){return(Array.isArray(t)?t:[t]).forEach(n=>{n&&n.__v_isVNode&&n.children&&typeof n.children=="object"&&(n.children.$stable=!0,this.stable(n.children))}),t},getModelField(t){return t.prop.modelField||t.parser.modelField||this.fc.modelFields[this.vNode.aliasMap[t.type]]||this.fc.modelFields[t.type]||this.fc.modelFields[t.originType]||"modelValue"},isFragment(t){return t.type==="fragment"||t.type==="template"},injectProp(t){const n=this.vm.setupState;n.ctxInject[t.id]||(n.ctxInject[t.id]={api:this.$handle.api,form:this.fc.create,subForm:i=>{this.$handle.addSubForm(t,i)},getSubForm:()=>this.$handle.subForm[t.id],slots:()=>this.vm.setupState.top.slots,getWrap:()=>this.vm.refs[t.wrapRef],options:[],children:[],preview:!1,id:t.id,field:t.field,rule:t.rule,input:t.input,t:(...i)=>this.$handle.api.t(...i),updateValue:i=>{this.$handle.onUpdateValue(t,i)}});const r=n.ctxInject[t.id];return st(r,{preview:t.prop.preview,options:t.prop.options,children:t.loadChildrenPending()}),r},ctxProp(t){const{ref:n,key:r,rule:i}=t;this.$manager.mergeProp(t),t.parser.mergeProp(t);const o=[{ref:n,key:i.key||`${r}fc`,slot:void 0,on:{vnodeMounted:s=>{s.el.__rule__=t.rule,this.onMounted(t,s.el)},vnodeBeforeUnmount:()=>{this.$handle.effect(t,"beforeUnmount"),this.$handle.targetHook(t,"beforeUnmount")},"fc.updateValue":s=>{this.$handle.onUpdateValue(t,s)},"fc.el":s=>{t.exportEl=s,s&&((s.$el||s).__rule__=t.rule)}}}];if(t.input){const s=this.tmpInput;this.vm.props.disabled===!0&&(t.prop.props.disabled=!0);const l=this.getModelField(t),c={callback:d=>{s&&s(t.field,d,t.rule),this.onInput(t,d)},modelField:l,value:this.$handle.getFormData(t)};o.push({on:Xe({[`update:${l}`]:c.callback},t.prop.modelEmit?{[t.prop.modelEmit]:()=>this.onEmitInput(t)}:{}),props:{[l]:c.value}}),t.prop.model=c}return zi(o,t.prop),t.prop},onMounted(t,n){t.el=this.vm.refs[t.ref]||n,t.parser.mounted(t),this.$handle.effect(t,"mounted"),this.$handle.targetHook(t,"mounted")},onInput(t,n){if(t.prop.modelEmit){this.$handle.onBaseInput(t,n);return}this.$handle.onInput(t,n)},onEmitInput(t){this.$handle.setValue(t,t.parser.toValue(t.modelValue,t),t.modelValue)},renderChildren(t,n){if(!Me.trueArray(t))return{};const r=_c();return t.map(i=>{if(i){if(Me.String(i)||Me.Number(i))return r.setSlot(null,`${i}`);if(i.__fc__)return this.renderSlot(r,i.__fc__,n);i.type&&gt(()=>{this.$handle.loadChildren(t,n),this.$handle.refresh()})}}),r.getSlots()},defaultRender(t,n){const r=t.prop;return r.component?typeof r.component=="string"?this.vNode.make(r.component,r,n):this.vNode.makeComponent(r.component,r,n):this.vNode[t.type]?this.vNode[t.type](r,n):this.vNode[t.originType]?this.vNode[t.originType](r,n):this.vNode.make(TE(r.type),r,n)},createChildrenVnodes(t,n,r){this.force=r!==!1,this.tmpInput=n;const i=this.renderChildren(t.rule.children,t);return this.force=!1,this.tmpInput=null,i},createRuleVnode(t,n,r){this.force=r!==!1,this.tmpInput=n;const i=_c();return this.renderSlot(i,t,t.parent),this.force=!1,this.tmpInput=null,i.getSlots()},renderRule(t,n,r){if(!t)return;if(Me.String(t)||Me.Number(t))return`${t}`;let i;if(r)i=t.type;else if(i=t.is,t.type){i=tr(t.type);const l=this.vNode.aliasMap[i];l&&(i=tr(l))}if(!i)return;const o=_c();Me.trueArray(t.children)&&t.children.forEach(l=>{l&&o.setSlot(l?.slot,()=>this.renderRule(l))});const s=Xe({},t);return delete s.type,delete s.is,this.vNode.make(i,s,o.mergeBag(n).getSlots())}})}let Xz=1;function im(e){st(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:Xz++}),$E(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}Gz(im);Qz(im);function Jz(e){st(e.prototype,{parseInjectEvent(t,n){const r=t.inject||this.options.injectEvent;return this.parseEventLst(t,n,r)},parseEventLst(t,n,r,i){return Object.keys(n).forEach(o=>{const s=this.parseEvent(t,n[o],r,i);s&&(n[o]=s)}),n},parseEvent(t,n,r,i){if(Me.Function(n)&&(r!==!1&&!Me.Undef(r)||n.__inject))return this.inject(t,n,r);if(!i&&Array.isArray(n)&&n[0]&&(Me.String(n[0])||Me.Function(n[0])))return this.parseEventLst(t,n,r,!0);if(Me.String(n)){const o=wi(n);if(o&&n!==o)return o.__inject?this.parseEvent(t,o,r,!0):o}},parseEmit(t){let n={},r=t.rule,{emitPrefix:i,field:o,name:s,inject:l}=r,c=r.emit||[];return Me.trueArray(c)&&c.forEach(d=>{if(!d)return;let f,p=i||o||s;if(Me.Object(d)&&(f=d.inject,d=d.name,p=d.prefix||p),p){const v=Na(`${p}-${d}`),y=(...g)=>{this.vm.emitsOptions&&!this.vm.emitsOptions[v]&&(this.vm.emitsOptions[v]=null),this.vm.emit(v,...g),this.vm.emit("emit-event",v,...g),this.bus.$emit(v,...g)};if(y.__emit=!0,!f&&l===!1)n[tr(d)]=y;else{let g=f||l||this.options.injectEvent;n[tr(d)]=Me.Undef(g)?y:this.inject(r,y,g)}}}),t.computed.on=n,n},getInjectData(t,n){const r=t.__fc__&&t.__fc__.$api,i=t.__fc__&&t.__fc__.$handle.vm||this.vm,{option:o,rule:s}=i.props;return{$f:r||this.api,api:r||this.api,rule:s,self:t.__origin__,option:o,inject:n}},inject(t,n,r){if(n.__origin){if(this.watching&&!this.loading)return n;n=n.__origin}const i=this,o=function(...s){const l=i.getInjectData(t,r);return l.args=[...s],s.unshift(l),n.apply(this,s)};return o.__origin=n,o.__json=n.__json,o},loadStrVar(t,n,r){if(t&&typeof t=="string"&&t.indexOf("{{")>-1&&t.indexOf("}}")>-1){const i=t,o=Bz(t),s=d=>{let f=!1,p;if(r&&d.indexOf("$form.")===0){const v=d.split(".");v.shift(),Zt(r.value,v[0])&&(f=!0,p=n?n({id:"$form."+v[0]+"_"+r.rule.__fc__.id,getValue:()=>Nn(r.value,v)}):Nn(r.value,v))}return f||(p=n?n(d):this.fc.getLoadData(d)),p},l=d=>{const f=[];d.forEach(v=>{v.key?f.push(v.key):v.children&&f.push(l(v.children))});let p=!1;return f.forEach((v,y)=>{v!=null&&(v.indexOf("'")===0||v.indexOf('"')===0)&&(f[y]=v.slice(1,-1),p=!0)}),f.length===1&&(p||!isNaN(Number(f[0])))?f[0]:s(f.join("."))};let c;if(o.forEach(d=>{const f=d.split("||"),p=f[0].trim();if(p){const v=(f[1]||"").trim(),y=AE(p);let g=_t(()=>l(y));(g==null||g==="")&&f.length>1&&(g=v),c=g,t=t.replaceAll(`{{${d}}}`,g??"")}}),o.length===1&&i===`{{${o[0]}}}`)return c}return t},loadFetchVar(t,n,r){let i;r&&r.__fc__&&(i=r.__fc__.getParentGroup()),!i&&t.targetRule&&t.targetRule.__fc__&&(i=t.targetRule.__fc__.getParentGroup());const o=s=>this.loadStrVar(s,n,i?{rule:r,value:this.subRuleData[i.id]||{}}:null);return t.action=o(t.action||""),["headers","data","query"].forEach(s=>{if(t[s]){const l=Array.isArray(t[s])?[]:{};Object.keys(t[s]).forEach(c=>{l[o(c)]=o(t[s][c])}),t[s]=l}}),t}})}const ub=["hook:updated","hook:mounted"];function Zz(e){st(e.prototype,{usePage(){const t=this.options.page;if(!t)return;let n=25,r=e8(this.rules);Me.Object(t)&&(t.first&&(n=parseInt(t.first,10)||n),t.limit&&(r=parseInt(t.limit,10)||r)),st(this,{first:n,limit:r,pageEnd:this.rules.length<=n}),this.bus.$on("page-end",()=>this.vm.emit("page-end",this.api)),this.pageLoad()},pageLoad(){const t=()=>{this.pageEnd?(this.bus.$off(ub,t),this.bus.$emit("page-end")):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(ub,t)}})}function e8(e){return e.length<31?31:Math.ceil(e.length/3)}function t8(e){st(e.prototype,{clearNextTick(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick(t){this.clearNextTick(),this.nextTick=setTimeout(()=>{t(),this.nextTick=null},10)},render(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function n8(e){Object.defineProperties(e.origin,{__fc__:Kp(Ni(e))}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:Kp(Ni(e))})}function ME(e,t,n){const r=Mu(),i=!!t.field;st(this,{id:r,ref:r,wrapRef:r+"fi",rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:Xe({},t),computed:{},payload:{},refRule:{},input:i,el:void 0,exportEl:void 0,defaultValue:i?yi(n):void 0,field:t.field||void 0}),this.updateKey(),n8(this),this.update(e,!0)}st(ME.prototype,{getParentGroup(){let e=this.parent;for(;e;){if(e.group)return e;e=e.parent}},loadChildrenPending(){const e=this.rule.children||[];return Array.isArray(e)?e:this.loadPending({key:"children",origin:e,def:[],onLoad:t=>{this.$handle&&this.$handle.loadChildren(t,this)},onUpdate:(t,n)=>{this.$handle&&(t===n?this.$handle.loadChildren(t,this):this.$handle.updateChildren(this,t,n))},onReload:t=>{this.$handle?this.$handle.updateChildren(this,[],t):delete this.pending.children}})},loadPending(e){const{key:t,origin:n,def:r,onLoad:i,onReload:o,onUpdate:s}=e;if(this.pending[t]&&this.pending[t].origin===n)return this.getPending(t,r);delete this.pending[t];let l=n;if(Me.Function(n)){let c=_t(()=>n({rule:this.rule,api:this.$api,update:d=>{const f=d||r,p=this.getPending(t,r);this.setPending(t,n,f),s&&s(f,p)},reload:()=>{const d=this.getPending(t,r);delete this.pending[t],o&&o(d),this.$api&&this.$api.sync(this.rule)}}));c&&Me.Function(c.then)?(c.then(d=>{const f=d||r;this.setPending(t,n,f),i&&i(f),this.$api&&this.$api.sync(this.rule)}).catch(d=>{console.error(d)}),l=r,this.setPending(t,n,l)):(l=c||r,this.setPending(t,n,l),i&&i(l))}return l},getPending(e,t){return this.pending[e]&&this.pending[e].value||t},setPending(e,t,n){this.pending[e]={origin:t,value:Hn(n)}},effectData(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey(e){this.key=Mu(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=tr(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser(e){this.parser=e,e.init(this)},initProp(){var e,t,n;const r=Xe({},this.rule);delete r.children,delete r.validate,this.prop=Hi({},[r,...Object.keys(this.payload).map(i=>this.payload[i]),this.computed]),r.col&&((e=r.col)==null?void 0:e.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[...((n=(t=this.refRule)==null?void 0:t.__$validate)==null?void 0:n.value)||[],...this.prop.validate||[]]},initNone(){this.none=!(Me.Undef(this.prop.display)||this.prop.display)},hasHidden(){return!!this.rule.hidden||(this.parent?this.parent.hasHidden():!1)},injectValidate(){return this.prop.validate},check(e){return this.vm===e.vm},unwatch(){this.watch.forEach(e=>e()),this.watch=[],Object.keys(this.refRule).forEach(e=>{e.indexOf("__$")!==0&&delete this.refRule[e]})},unlink(){this.linkOn.forEach(e=>e()),this.linkOn=[]},link(){this.unlink(),this.$handle.appendLink(this)},watchTo(){this.$handle.watchCtx(this)},delete(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),st(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1})},rmCtrl(){this.ctrlRule.forEach(e=>e.__fc__&&e.__fc__.rm()),this.ctrlRule=[]},rm(){const e=()=>{let t=this.root.indexOf(this.origin);t>-1&&(this.root.splice(t,1),this.$handle&&this.$handle.refresh())};if(this.deleted){e();return}this.$handle.noWatch(()=>{this.$handle.deferSyncValue(()=>{this.rmCtrl(),e(),this.$handle.rmCtx(this),st(this,{root:[]})},this.input)})},update(e,t){st(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});function r8(e){st(e.prototype,{nextRefresh(t){const n=this.loadedId;gt(()=>{n===this.loadedId&&(t?t():this.refresh())})},parseRule(t){const n=ib(t);return Object.defineProperties(n,{__origin__:Kp(t)}),i8(n),this.appendValue(n),[n,n.prefix,n.suffix].forEach(r=>{r&&this.loadFn(r,n)}),this.loadCtrl(n),n.update&&(n.update=wi(n.update)),n},loadFn(t,n){["on","props","deep"].forEach(r=>{t[r]&&this.parseInjectEvent(n,t[r])})},loadCtrl(t){t.control&&t.control.forEach(n=>{n.handle&&(n.handle=wi(n.handle))})},syncProp(t){const n=t.rule;Me.trueArray(n.sync)&&zi([{on:n.sync.reduce((r,i)=>(r[typeof i=="object"&&i.event||`update:${i}`]=o=>{n.props[typeof i=="object"&&i.prop||i]=o,this.vm.emit("sync",i,o,n,this.fapi)},r),{})}],t.computed)},loadRule(){this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(()=>{if(this._loadRule(this.rules),this.loading=!1,this.cycleLoad&&this.pageEnd)return this.loadRule();this.syncForm(),this.pageEnd&&this.bus.$emit("load-end"),this.vm.setupState.renderRule()})},loadChildren(t,n){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(t,n),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(n)},_loadRule(t,n){const r=s=>{let l=t[s-1];if(!l||!l.__fc__)return s>0?r(s-1):-1;let c=this.sort.indexOf(l.__fc__.id);return c>-1?c:r(s-1)},i=(s,l)=>{Me.trueArray(s)&&this._loadRule(s,l)},o=t.map((s,l)=>{if(n&&!Me.Object(s)||!this.pageEnd&&!n&&l>=this.first)return;if(s.__fc__&&s.__fc__.root===t&&this.ctxs[s.__fc__.id])return i(s.__fc__.loadChildrenPending(),s.__fc__),s.__fc__;let c=ib(s);const d=()=>!!(c.field&&this.fieldCtx[c.field]&&this.fieldCtx[c.field][0]!==s.__fc__);this.fc.targetFormDriver("loadRule",{rule:c,api:this.api},this.fc),this.ruleEffect(c,"init",{repeat:d()}),d()&&this.vm.emit("repeat-field",s,this.api);let f,p=!1,v=!!s.__fc__,y=c.value;if(v){if(f=s.__fc__,y=f.defaultValue,f.deleted){if(db(f))return;f.update(this)}else if(!f.check(this)){if(db(f))return;t[l]=s=s._clone?s._clone():bE(za(s)),f=null,p=!0}}if(f)f.originType!==f.rule.type&&f.updateType(),this.bindParser(f),this.appendValue(f.rule),f.parent&&f.parent!==n&&this.rmSubRuleData(f);else{const b=this.parseRule(s);f=new ME(this,b,y),this.bindParser(f)}this.parseEmit(f),this.syncProp(f),f.parent=n||null,f.root=t,this.setCtx(f),!p&&!v&&(this.effect(f,"load"),this.targetHook(f,"load")),this.effect(f,"created");const g=f.loadChildrenPending();if(f.parser.loadChildren===!1||i(g,f),!n){const b=r(l);b>-1||!l?this.sort.splice(b+1,0,f.id):this.sort.push(f.id)}const m=f.rule;return f.updated||(f.updated=!0,Me.Function(m.update)&&this.bus.$once("load-end",()=>{this.refreshUpdate(f,m.value,"init")}),this.effect(f,"loaded")),this.refreshControl(f)&&(this.cycleLoad=!0),f}).filter(s=>!!s);n&&(n.children=o)},refreshControl(t){return t.input&&t.rule.control&&this.useCtrl(t)},useCtrl(t){const n=o8(t),r=[],i=this.api;if(!n.length)return!1;for(let l=0;l<n.length;l++){const c=n[l],d=c.handle||function(p){return(Ko[c.condition||"=="]||Ko["=="])(p,c.value)};if(!Me.trueArray(c.rule))continue;const f=Br(Xe({},c),{valid:_t(()=>d(t.rule.value,i)),ctrl:s8(t,c.rule),isHidden:Me.String(c.rule[0])});f.valid&&f.ctrl||!f.valid&&!f.ctrl&&!f.isHidden||r.push(f)}if(!r.length)return!1;const o=[];let s=!1;return this.deferSyncValue(()=>{r.reverse().forEach(({isHidden:l,valid:c,rule:d,prepend:f,append:p,child:v,ctrl:y,method:g})=>{if(l){c?t.ctrlRule.push({__ctrl:!0,children:d,valid:c}):y&&t.ctrlRule.splice(t.ctrlRule.indexOf(y)>>>0,1),o[c?"push":"unshift"](()=>{g==="disabled"||g==="enabled"?this.api.disabled(!c,d):g==="display"||g==="show"?this.api.display(c,d):g==="required"?(d.forEach(m=>{this.api.setEffect(m,"required",c)}),c||this.api.clearValidateState(d)):g==="if"?this.api.hidden(!c,d):this.api.hidden(!c,d)});return}if(c){s=!0;const m={type:"fragment",native:!0,__ctrl:!0,children:d};t.ctrlRule.push(m),this.bus.$once("load-start",()=>{f?i.prepend(m,f,v):p||v?i.append(m,p||t.id,v):t.root.splice(t.root.indexOf(t.origin)+1,0,m)})}else{t.ctrlRule.splice(t.ctrlRule.indexOf(y),1);const m=hi(y);m&&m.rm()}})}),o.length&&(this.loading?o.length&&this.bus.$once("load-end",()=>{o.forEach(l=>l())}):o.length&&gt(()=>{o.forEach(l=>l())})),this.vm.emit("control",t.origin,this.api),this.effect(t,"control"),s},reloadRule(t){return this._reloadRule(t)},_reloadRule(t){t||(t=this.rules);const n=Xe({},this.ctxs);this.clearNextTick(),this.initData(t),this.fc.rules=t,this.deferSyncValue(()=>{this.bus.$once("load-end",()=>{Object.keys(n).filter(r=>this.ctxs[r]===void 0).forEach(r=>this.rmCtx(n[r])),this.$render.clearCacheAll()}),this.reloading=!0,this.loadRule(),this.reloading=!1,this.refresh(),this.bus.$emit("reloading",this.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh(){this.vm.setupState.refresh()}})}function i8(e){const t=RE();return Object.keys(t).forEach(n=>{Zt(e,n)||(e[n]=t[n])}),e}function o8(e){const t=e.rule.control||[];return Me.Object(t)?[t]:t}function s8(e,t){for(let n=0;n<e.ctrlRule.length;n++){const r=e.ctrlRule[n];if(r.children===t)return r}}function db(e){return!!e.rule.__ctrl}function a8(e){st(e.prototype,{setValue(t,n,r,i){t.deleted||(t.rule.value=n,this.changeStatus=!0,this.nextRefresh(),this.$render.clearCache(t),this.setFormData(t,r),this.syncValue(),this.valueChange(t,n),this.vm.emit("change",t.field,n,t.origin,this.api,i||!1),this.effect(t,"value"),this.targetHook(t,"value",{value:n}),this.emitEvent("change",t.field,n,{rule:t.origin,api:this.api,setFlag:i||!1}),i&&gt(()=>{gt(()=>{gt(()=>{this.api.clearValidateState(t.id)})})}),this.$manager.fieldChange(t,n,r,i))},onInput(t,n){let r;t.input&&(this.isQuote(t,r=t.parser.toValue(n,t))||this.isChange(t,n))&&this.setValue(t,r,n)},onUpdateValue(t,n){this.deferSyncValue(()=>{const r=t.getParentGroup(),i=r?this.subRuleData[r.id]:null,o={};Object.keys(n||{}).forEach(s=>{i&&Zt(i,s)?o[s]=n[s]:Zt(this.api.form,s)?this.api.form[s]=n[s]:this.api.top!==this.api&&Zt(this.api.top.form,s)&&(this.api.top.form[s]=n[s])}),Object.keys(o).length&&this.api.setChildrenFormData(r.rule,o)})},onBaseInput(t,n){this.setFormData(t,n),t.modelValue=n,this.nextRefresh(),this.$render.clearCache(t)},setFormData(t,n){t.modelValue=n;const r=t.getParentGroup();r&&(this.subRuleData[r.id]||(this.subRuleData[r.id]={}),this.subRuleData[r.id][t.field]=t.rule.value),Fr(this.formData,t.id,n)},rmSubRuleData(t){const n=t.getParentGroup();n&&this.subRuleData[n.id]&&delete this.subRuleData[n.id][t.field]},getFormData(t){return this.formData[t.id]},syncForm(){const t=Hn({}),n=this.fields(),r=[];this.options.appendValue!==!1&&Object.keys(this.appendData).reduce((i,o)=>(n.indexOf(o)===-1&&(i[o]=Sn(this.appendData,o)),i),t),n.reduce((i,o)=>{let s=(this.fieldCtx[o]||[]).filter(l=>!this.isIgnore(l))[0];return s||(s=this.fieldCtx[o][0],r.push(o)),i[o]=Sn(s.rule,"value"),i},t),this.form=t,this.ignoreFields=r,this.syncValue()},isIgnore(t){return t.rule.ignore===!0||(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields)&&t.hasHidden()},appendValue(t){(!t.field||!Zt(this.appendData,t.field))&&(!Me.Undef(t.value)||!this.options.forceCoverValue)||(t.value=this.appendData[t.field],delete this.appendData[t.field])},addSubForm(t,n){this.subForm[t.id]=n},deferSyncValue(t,n){this.deferSyncFn||(this.deferSyncFn=t),this.deferSyncFn.sync||(this.deferSyncFn.sync=n),_t(t),this.deferSyncFn===t&&(this.deferSyncFn=null,t.sync&&this.syncForm())},syncValue(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;const t={};Object.keys(this.form).forEach(n=>{this.ignoreFields.indexOf(n)===-1&&(t[n]=this.form[n])}),this.vm.setupState.updateValue(t)},isChange(t,n){return JSON.stringify(this.getFormData(t),fb)!==JSON.stringify(n,fb)},isQuote(t,n){return(n instanceof Function||Me.Object(n)||Array.isArray(n))&&n===t.rule.value},refreshUpdate(t,n,r,i){if(Me.Function(t.rule.update)){const o=_t(()=>t.rule.update(n,t.origin,this.api,{origin:r||"change",linkField:i}));if(o===void 0)return;t.rule.hidden=o===!0}},valueChange(t,n){this.refreshRule(t,n),this.bus.$emit("change-"+t.field,n)},refreshRule(t,n,r,i){this.refreshControl(t)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(t,n,r,i)},appendLink(t){const n=t.rule.link;Me.trueArray(n)&&n.forEach(r=>{const i=()=>this.refreshRule(t,t.rule.value,"link",r);this.bus.$on("change-"+r,i),t.linkOn.push(()=>this.bus.$off("change-"+r,i))})},fields(){return Object.keys(this.fieldCtx)}})}function fb(e,t){return typeof t=="function"?""+t:t}const Aa={init(e){},toFormValue(e,t){return e},toValue(e,t){return e},mounted(e){},render(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp(e){}},l8=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],xa=Symbol("oldValue");function c8(e){st(e.prototype,{getCtx(t){return this.getFieldCtx(t)||this.getNameCtx(t)[0]||this.ctxs[t]},getCtxs(t){return this.fieldCtx[t]||this.nameCtx[t]||(this.ctxs[t]?[this.ctxs[t]]:[])},setIdCtx(t,n,r){const i=`${r}Ctx`;this[i][n]?this[i][n].push(t):this[i][n]=[t]},rmIdCtx(t,n,r){const i=`${r}Ctx`,o=this[i][n];if(!o)return!1;const s=o.splice(o.indexOf(t)>>>0,1).length>0;return o.length||delete this[i][n],s},getFieldCtx(t){return(this.fieldCtx[t]||[])[0]},getNameCtx(t){return this.nameCtx[t]||[]},setCtx(t){let{id:n,field:r,name:i,rule:o}=t;this.ctxs[n]=t,i&&this.setIdCtx(t,i,"name"),t.input&&(this.setIdCtx(t,r,"field"),this.setFormData(t,t.parser.toFormValue(o.value,t)),this.isMounted&&!this.reloading&&this.vm.emit("change",t.field,o.value,t.origin,this.api,!1,!0))},getParser(t){const n=this.fc.parsers,r=this.fc.renderDriver;if(r){const i=r.parsers||{},o=i[t.originType]||i[tr(t.type)]||i[t.trueType];if(o)return o}return n[t.originType]||n[tr(t.type)]||n[t.trueType]||Aa},bindParser(t){t.setParser(this.getParser(t))},getType(t){const n=this.fc.CreateNode.aliasMap,r=n[t]||n[tr(t)]||t;return tr(r)},noWatch(t){this.noWatchFn||(this.noWatchFn=t),_t(t),this.noWatchFn===t&&(this.noWatchFn=null)},watchCtx(t){if(xE().filter(n=>n[0]!=="_"&&n[0]!=="$"&&l8.indexOf(n)===-1).forEach(n=>{const r=Sn(t.rule,n),i=n==="children";t.refRule[n]=r,t.watch.push(He(i?()=>Me.Function(r.value)?r.value:[...r.value||[]]:()=>r.value,(o,s)=>{let l=r.value;if(!this.isBreakWatch()){if(i&&t.parser.loadChildren===!1){this.$render.clearCache(t),this.nextRefresh();return}if(this.watching=!0,gt(()=>{this.targetHook(t,"watch",{key:n,oldValue:s,newValue:l})}),n==="hidden"&&!!l!=!!s&&(this.$render.clearCacheAll(),gt(()=>{this.targetHook(t,"hidden",{value:l})})),n==="ignore"&&t.input||n==="hidden"&&(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields))this.syncForm();else if(n==="link"){t.link();return}else["props","on","deep"].indexOf(n)>-1?(this.parseInjectEvent(t.rule,l||{}),n==="props"&&t.input&&this.setFormData(t,t.parser.toFormValue(t.rule.value,t))):n==="emit"?this.parseEmit(t):["prefix","suffix"].indexOf(n)>-1?l&&this.loadFn(l,t.rule):n==="type"?(t.updateType(),this.bindParser(t)):i&&(Me.Function(s)&&(s=t.getPending("children",[])),Me.Function(l)&&(l=t.loadChildrenPending()),this.updateChildren(t,l,s));this.$render.clearCache(t),this.refresh(),this.watching=!1}},{deep:!i,sync:i}))}),t.refRule.__$title=se(()=>{let n=(typeof t.rule.title=="object"?t.rule.title.title:t.rule.title)||"";if(n){const r=n.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);r&&(n=this.api.t(r[1]))}return n}),t.refRule.__$info=se(()=>{let n=(typeof t.rule.info=="object"?t.rule.info.info:t.rule.info)||"";if(n){const r=n.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);r&&(n=this.api.t(r[1]))}return n}),t.refRule.__$validate=se(()=>{const n=r=>{var i,o;const s=r.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return s?this.api.t(s[1],{title:(o=(i=t.refRule)==null?void 0:i.__$title)==null?void 0:o.value}):r};return er(t.rule.validate).map(r=>{const i=Xe({},r);if(i.message&&(i.message=n(i.message)),Me.Function(i.validator)){const o=t;i.validator=function(...s){return r.validator.call({that:this,id:o.id,field:o.field,rule:o.rule,api:o.$handle.api},...s)}}if(i.adapter){if(typeof i.error=="object"){const o=Xe({},i.error);Object.keys(o).forEach(s=>{o[s]=n(o[s])}),i.error=o}return this.adapterValidate(i,t)}return i})}),t.input){const n=Sn(t.rule,"value");t.watch.push(He(()=>n.value,()=>{let r=t.parser.toFormValue(n.value,t);this.isChange(t,r)&&this.setValue(t,n.value,r,!0)}))}this.bus.$once("load-end",()=>{let n=t.rule.computed;n&&(typeof n!="object"&&(n={value:n}),Object.keys(n).forEach(r=>{const i=se(()=>{const s=n[r];if(!s)return;const l=this.compute(t,s);return(s.linkage||s.linkageVariable)&&l===xa?xa:l}),o=s=>{r==="value"?this.onInput(t,s):r[0]==="$"?this.api.setEffect(t.id,r,s):bo(t.rule,r,s)};(r==="value"?[void 0,null,""].indexOf(t.rule.value)>-1:i.value!==Nn(t.rule,r))&&o(i.value),t.watch.push(He(i,s=>{s!==xa&&setTimeout(()=>{o(s)})},{deep:!0}))}))}),this.watchEffect(t)},adapterValidate(t,n){const r=(i,o)=>{if((t.beforeValidate&&_t(()=>t.beforeValidate({value:i,api:this.api,validate:t,rule:n.rule})))===!1)o();else{const s=this.validator(n,i,t);if(s){let l="";typeof t.error=="object"&&(l=t.error[s]||t.error.default),!l&&typeof t.message=="string"&&(l=t.message),l||(l=this.getValidateMessage(n,{key:s,rule:t[s]})),o(l)}else if(t.validator){const l=t.validator&&_t(()=>t.validator(i,o));l&&Me.Function(l.then)&&l.then(()=>o()).catch(c=>o(c))}else o()}};return this.$manager.adapterValidate({required:t.required,message:t.message,trigger:t.trigger},r)},getValidateMessage(t,n){var r,i;const o=Array.isArray(n.rule)?n.rule.join(","):""+n.rule;return this.api.t(n.key==="required"?n.key:"validate."+n.key,{[n.key]:o,title:(i=(r=t.refRule)==null?void 0:r.__$title)==null?void 0:i.value})},validator(t,n,r){if(Me.empty(n))return r.required?"required":void 0;for(const[i,o]of Object.entries(r))switch(i){case"len":case"maxLen":case"minLen":const s=c=>i==="len"?c===o:i==="maxLen"?c<=o:c>=o;if(Array.isArray(n)){if(!s(n.length))return i}else if(typeof n=="object"||!s((""+n).length))return i;break;case"pattern":if(!(typeof o=="string"?new RegExp(o):o).test(""+n))return i;break;case"uppercase":if(o&&(typeof n!="string"||!/^[A-Z]*$/.test(n)))return i;break;case"lowercase":if(o&&(typeof n!="string"||!/^[a-z]*$/.test(n)))return i;break;case"min":case"max":case"positive":case"negative":case"integer":case"number":const l=Number(n);if(Number.isNaN(l)||i==="min"&&l<o||i==="max"&&l>o||i==="positive"&&l<=0||i==="negative"&&l>=0||i==="integer"&&!Number.isInteger(l))return i;break;case"equal":if(n!==o)return i;break;case"enum":if(Array.isArray(o)&&!o.includes(n))return i;break;case"hasKeys":if(typeof n!="object"||Array.isArray(o)&&o.some(c=>!(c in n)))return i;break;case"email":if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(""+n))return i;break;case"url":if(!new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(""+n))return i;break;case"ip":if(!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test(""+n))return i;break;case"phone":if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(""+n))return i;break;case"computed":if(!this.compute(t,o))return i;break}},compute(t,n){let r;if(typeof n=="object"){const i=t.getParentGroup(),o=l=>{if(l=Array.isArray(l)?{mode:"AND",group:l}:l,!Me.trueArray(l.group))return!0;const c=l.mode==="OR";let d=!0;for(let f=0;f<l.group.length;f++){const p=l.group[f];let v,y=null,g=null;if(p.variable)g=this.fc.getLoadData(p.variable);else if(p.field)y=ab(p.field||"");else if(!p.mode)return!0;let m=p.compare;if(m&&(m=ab(m||"")),p.mode?v=o(p):Ko[p.condition]?Me.Function(p.handler)?v=_t(()=>p.handler(this.api,t.rule)):v=_t(()=>new Function("$condition","$variableVal","$val","$form","$scope","$group","$rule",`with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${p.variable?"$variableVal":y}, ${m||"$val"}); }}}}`).call(this.api.form,Ko,g,p.value,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,i?this.subRuleData[i.id]||{}:{},t.rule)):v=!1,c&&v)return!0;c||(d=d&&v)}return c?!1:d};let s=o(n);return s=n.invert===!0?!s:s,n.linkage?s?_t(()=>this.computeValue(n.linkage,t,i),void 0):xa:n.linkageVariable?s?_t(()=>this.fc.getLoadData(n.linkageVariable),void 0):xa:s}else if(Me.Function(n))r=()=>n(this.api.form,this.api,t.rule);else{const i=t.getParentGroup();r=()=>this.computeValue(n,t,i)}return _t(r,void 0)},computeValue(t,n,r){const i=this,o=Object.keys(this.fc.formulas).reduce((s,l)=>(s[l]=function(...c){return i.fc.formulas[l].call({that:this,rule:n.rule,api:i.api,fc:i.fc},...c)},s),{});return _t(()=>new Function("$formulas","$form","$scope","$group","$rule","$api",`with($form){with($scope){with(this){with($group){with($formulas){ return ${t} }}}}}`).call(this.api.form,o,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,r?this.subRuleData[r.id]||{}:{},n.rule,this.api),void 0)},updateChildren(t,n,r){this.deferSyncValue(()=>{r&&r.forEach(i=>{(n||[]).indexOf(i)===-1&&i&&!Me.String(i)&&i.__fc__&&i.__fc__.parent===t&&this.rmCtx(i.__fc__)}),Me.trueArray(n)&&(this.loadChildren(n,t),this.bus.$emit("update",this.api))})},rmSub(t){Me.trueArray(t)&&t.forEach(n=>{n&&n.__fc__&&this.rmCtx(n.__fc__)})},rmCtx(t){if(t.deleted)return;const{id:n,field:r,input:i,name:o}=t;jo(this.ctxs,n),jo(this.formData,n),jo(this.subForm,n),jo(this.vm.setupState.ctxInject,n);const s=t.getParentGroup();s&&this.subRuleData[s.id]&&jo(this.subRuleData[s.id],r),t.group&&jo(this.subRuleData,n),i&&this.rmIdCtx(t,r,"field"),o&&this.rmIdCtx(t,o,"name"),i&&!Zt(this.fieldCtx,r)&&jo(this.form,r),this.deferSyncValue(()=>{if(!this.reloading){if(t.parser.loadChildren!==!1){const c=t.getPending("children",t.rule.children);Me.trueArray(c)&&c.forEach(d=>d&&d.__fc__&&this.rmCtx(d.__fc__))}t.root===this.rules&&this.vm.setupState.renderRule()}},i);const l=this.sort.indexOf(n);return l>-1&&this.sort.splice(l,1),this.$render.clearCache(t),t.delete(),this.effect(t,"deleted"),this.targetHook(t,"deleted"),i&&!this.fieldCtx[r]&&this.vm.emit("remove-field",r,t.rule,this.api),t.rule.__ctrl||this.vm.emit("remove-rule",t.rule,this.api),t}})}function u8(e){st(e.prototype,{mounted(){const t=()=>{this.isMounted=!0,this.lifecycle("mounted")};this.pageEnd?t():this.bus.$once("page-end",t)},lifecycle(t){this.fc.targetFormDriver(t,this.api,this.fc),this.vm.emit(t,this.api),this.emitEvent(t,this.api)},emitEvent(t,...n){const r=this.options[t]||this.options[tr("on-"+t)];if(r){const i=wi(r);Me.Function(i)&&_t(()=>i(...n))}this.bus.$emit(t,...n)},targetHook(t,n,r){var i,o,s,l;let c=(o=(i=t.prop)==null?void 0:i.hook)==null?void 0:o[n],d=(v,y)=>{v&&(v=Array.isArray(v)?v:[v],v.forEach(g=>{_t(()=>g(Br(Xe({args:Object.values(r||{})},r||{}),{self:t.rule,rule:t.rule,parent:y?.rule,$f:this.api,api:this.api,option:this.vm.props.option})))}))};d(c);let f="deep"+_E(n),p=t.parent;for(;p;){let v=(l=(s=p.prop)==null?void 0:s.hook)==null?void 0:l[f];d(v,p),p=p.parent}}})}function d8(e){st(e.prototype,{useProvider(){const t=this.fc.providers;Object.keys(t).forEach(n=>{let r=t[n];Me.Function(r)&&(r=r(this.fc)),r._c=p8(r),this.onEffect(r,n),this.providers[n]=r})},onEffect(t,n){const r=[];(t._c||["*"]).forEach(i=>{const o=i==="*"?"*":this.getType(i);r.indexOf(o)>-1||(r.push(o),this.bus.$on(`p:${n||t.name}:${o}:${t.input?1:0}`,(s,l)=>{t[s]&&t[s](...l)}))}),t._used=r},watchEffect(t){let n={required:()=>{var r,i;return(Zt(t.rule,"$required")?t.rule.$required:(i=(r=t.rule)==null?void 0:r.effect)==null?void 0:i.required)||!1}};Object.keys(t.rule.effect||{}).forEach(r=>{n[r]=()=>t.rule.effect[r]}),Object.keys(t.rule).forEach(r=>{r[0]==="$"&&(n[r.substr(1)]=()=>t.rule[r])}),Object.keys(n).forEach(r=>{t.watch.push(He(n[r],i=>{this.effect(t,"watch",{[r]:i})},{deep:!0}))})},ruleEffect(t,n,r){this.emitEffect({rule:t,input:!!t.field,type:this.getType(t.type)},n,r)},effect(t,n,r){this.emitEffect({rule:t.rule,input:t.input,type:t.trueType,ctx:t,custom:r},n)},getEffect(t,n){if(Zt(t,"$"+n))return t["$"+n];if(Zt(t,"effect")&&Zt(t.effect,n))return t.effect[n]},emitEffect({ctx:t,rule:n,input:r,type:i,custom:o},s,l){if(!i||["fcFragment","fragment"].indexOf(i)>-1)return;const c=o||Object.keys(n).reduce((d,f)=>(f[0]==="$"&&(d[f.substr(1)]=n[f]),d),Xe({},n.effect||{}));Object.keys(c).forEach(d=>{const f=this.providers[d];if(!f||f.input&&!r)return;let p;if(!f._c)p="*";else if(f._used.indexOf(i)>-1)p=i;else return;const v=Xe({value:c[d],getValue:()=>this.getEffect(n,d)},l||{});t&&(v.getProp=()=>t.effectData(d),v.clearProp=()=>t.clearEffectData(d),v.mergeProp=y=>Hi(v.getProp(),[y]),v.id=t.id),this.bus.$emit(`p:${d}:${p}:${f.input?1:0}`,s,[v,n,this.api])})}})}function f8(e){return e.filter(function(t,n,r){return r.indexOf(t,0)===n})}function p8(e){const t=e.components;if(Array.isArray(t)){const n=f8(t.filter(r=>r!=="*"));return n.length?n:!1}else return Me.String(t)?[t]:!1}function Ci(e){$E(this,{options(){return e.options.value||{}},bus(){return e.bus},preview(){return e.vm.props.preview!=null?e.vm.props.preview:e.vm.setupState.parent&&e.vm.setupState.parent.props.preview!=null?e.vm.setupState.parent.props.preview:e.options.value.preview||!1}}),st(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:Hn({}),subRuleData:Hn({}),subForm:{},form:Hn({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:()=>{this.lifecycle("reload")}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=new im(this),this.api=e.extendApiFn.reduce((t,n)=>{const r=_t(()=>n(t,this));return r&&r!==t&&st(t,r),t},Kz(this))}st(Ci.prototype,{initData(e){st(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},updateAppendData(){this.appendData=Xe(Xe(Xe({},yi(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch(e){return new Promise((t,n)=>{const r=this.options.beforeFetch&&_t(()=>this.options.beforeFetch(e,{api:this.api}));r&&Me.Function(r.then)?r.then(t).catch(n):t()})},beforeFetch(e){return new Promise((t,n)=>{const r=e&&e.beforeFetch&&_t(()=>e.beforeFetch(e,{api:this.api}));r&&Me.Function(r.then)?r.then(t).catch(n):r===!1?n():t()}).then(()=>this.globalBeforeFetch(e))},beforeSubmit(e){return new Promise((t,n)=>{const r=this.options.beforeSubmit&&_t(()=>this.options.beforeSubmit(e,{api:this.api}));r&&Me.Function(r.then)?r.then(t).catch(n):r===!1?n():t()})}});Jz(Ci);Zz(Ci);t8(Ci);r8(Ci);a8(Ci);c8(Ci);u8(Ci);d8(Ci);const h8="fcFragment",Ff=ze({name:h8,inheritAttrs:!1,props:["vnode"],render(){return this.vnode}});function m8(e){return Object.keys(e).map(t=>{const n=e[t],r=aP(t);if(r)return[r,n.value,n.arg,n.modifiers]}).filter(t=>!!t)}function pb(e,t){let n=e.directives;return n?(Array.isArray(n)||(n=[n]),Ct(t,n.reduce((r,i)=>r.concat(m8(i)),[]))):t}function v8(){const e={};function t(n){this.vm=n.vm,this.handle=n}return st(t.prototype,{make(n,r,i){return pb(r,this.h(n,ob(r),i))},makeComponent(n,r,i){try{return pb(r,Z(n,ob(r),i))}catch(o){return console.error(o),Z("")}},h(n,r,i){const o=(this.vm||Fs()).appContext.config.isNativeTag(n),s=this.handle.fc.prop.components[n];!s&&o&&delete r.formCreateInject;try{return Z(s||(o?n:ft(n)),r,i)}catch(l){return console.error(l),Z("")}},aliasMap:e}),st(t,{aliasMap:e,alias(n,r){e[n]=r},use(n){Object.keys(n).forEach(r=>{const i=Na(r),o=gE(r).toLocaleLowerCase(),s=n[r];t.alias(r,s),[r,i,o].forEach(l=>{t.prototype[l]=function(c,d){return this.make(e[r]||l,c,d)}})})}}),t}function g8(e){class t extends DE{}return Object.assign(t.prototype,e),t}function DE(e){st(this,{$handle:e,vm:e.vm,options:{},ref:"fcForm",mergeOptionsRule:{normal:["form","row","info","submitBtn","resetBtn"]}}),this.updateKey(),this.init()}st(DE.prototype,{__init(){this.$render=this.$handle.$render,this.$r=(...e)=>this.$render.renderRule(...e)},updateKey(){this.key=Mu()},init(){},update(){},beforeRender(){},form(){return this.vm.refs[this.ref]},adapterValidate(e,t){return e.validator=(n,r,i)=>t(r,i),e},getSlot(e){const t=n=>{if(n)return n.slots[e]||t(n.setupState.parent)};return t(this.vm)},mergeOptions(e,t){return zi(e.map(n=>this.tidyOptions(n)),t,this.mergeOptionsRule)},updateOptions(e){this.$handle.fc.targetFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()},tidyOptions(e){return e},tidyRule(e){},mergeProp(e){},getDefaultOptions(){return{}},fieldChange(e,t,n,r){},render(e){}});const _8=function(e){const t={name:"loadData",_fn:[],loaded(n,r,i){this.deleted(n),gt(()=>{let o=er(n.getValue());const s=[];o.forEach(l=>{if(l&&(l.attr||l.template)){let c=p=>{let v;r&&r.__fc__&&(v=r.__fc__.getParentGroup());let y;l.template?y=e.$handle.loadStrVar(l.template,p,v?{rule:r,value:e.$handle.subRuleData[v.id]||{}}:null):l.handler&&Me.Function(l.handler)?y=l.handler(p,r,i):y=e.$handle.loadStrVar(`{{${l.attr}}}`,p,v?{rule:r,value:e.$handle.subRuleData[v.id]||{}}:null),(y==null||y==="")&&l.default!=null&&(y=l.default),l.copy!==!1&&(y=yi(y));const g=l.modify?r:n.getProp();l.to==="child"?g.children?g.children[0]=y:g.children=[y]:bo(g,l.to||"options",y),i.sync(r)},d=p=>c(p);const f=e.watchLoadData(d);c=ho(c,l.wait||300),l.watch!==!1?s.push(f):f()}}),this._fn[n.id]=s})},deleted(n){this._fn[n.id]&&(this._fn[n.id].forEach(r=>{r()}),delete this._fn[n.id]),n.clearProp()}};return t.watch=t.loaded,t},y8=function(e){const t={name:"t",_fn:[],loaded(n,r,i){this.deleted(n);let o=n.getValue()||{};const s=[];Object.keys(o).forEach(l=>{const c=o[l];if(c){const d=typeof c=="object";let f=y=>{let g=e.t(d?c.attr:c,d?c.params:null,y);const m=d&&c.modify?r:n.getProp();l==="child"?m.children?m.children[0]=g:m.children=[g]:bo(m,l,g),i.sync(r)},p=y=>f(y);const v=e.watchLoadData(p);f=ho(f,c.wait||300),c.watch!==!1?s.push(v):v()}}),this._fn[n.id]=s},deleted(n){this._fn[n.id]&&(this._fn[n.id].forEach(r=>{r()}),delete this._fn[n.id]),n.clearProp()}};return t.watch=t.loaded,t},FE={name:"componentValidate",load(e,t,n){let r=e.getValue();if(!r||r.method===!1)e.clearProp(),n.clearValidateState([t.field]);else{Me.Object(r)||(r={method:r});const i=r.method,o=Br(Xe({},r),{validator(...s){const l=hi(t);if(l)return n.exec(l.id,Me.String(i)?i:"formCreateValidate",...s,{attr:e,rule:t,api:n})}});delete o.method,e.getProp().validate=[o]}},watch(...e){FE.load(...e)}},b8=function(e){function t(i){return Me.String(i)&&(i={action:i,to:"options"}),i}function n(i,o,s){let l=i.value;r.deleted(i),Me.Function(l)&&(l=l(o,s)),l=t(l);const c=p=>{p===void 0?i.clearProp():bo(i.getProp(),l.to||"options",p),p!=null&&l&&l.key&&e.$handle.options.globalData[l.key]&&e.fetchCache.set(e.$handle.options.globalData[l.key],{status:!0,data:p}),s.sync(o)};if(!l||!l.action&&!l.key){c(void 0);return}l=yi(l),l.to||(l.to="options");const d=l.onError,f=()=>{if(!i.getValue())return i.clearProp(),s.sync(o),!0};r._fn[i.id]=e.watchLoadData(ho((p,v)=>{if(v&&l.watch===!1)return r._fn[i.id]();if(l.key){e.targetRule=o;const m=p("$globalData."+l.key);if(delete e.targetRule,m){if(f())return;c(m)}return}const y=e.$handle.loadFetchVar(yi(l),p,o),g=Br(Xe({headers:{}},y),{onSuccess(m,b){if(f())return;let x=O=>b?O:Zt(O,"data")?O.data:O;const S=wi(y.parse);Me.Function(S)?x=S:S&&Me.String(S)&&(x=O=>Nn(O,S)),du(x(m,o,s)).then(O=>{c(O)})},onError(m){c(void 0),!f()&&(d||(b=>em(b.message||"fetch fail "+y.action)))(m,o,s)}});e.$handle.beforeFetch(g,{rule:o,api:s}).then(()=>{if(Me.Function(y.action)){du(y.action(o,s)).then(m=>{g.onSuccess(m,!0)}).catch(m=>{g.onError(m)});return}_t(()=>e.create.fetch(g,{inject:i,rule:o,api:s}))}).catch(m=>{})},l.wait||600))}const r={name:"fetch",_fn:[],loaded(...i){n(...i)},watch(...i){n(...i)},deleted(i){this._fn[i.id]&&(this._fn[i.id](),delete this._fn[i.id]),i.clearProp()}};return r},w8={fetch:b8,loadData:_8,t:y8,componentValidate:FE},E8="html",S8={name:E8,loadChildren:!1,render(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||"div",t.prop)},renderChildren(e){return{default:()=>e.filter(t=>Me.String(t)).join("")}}};function C8(e){e=e+"=";const t=decodeURIComponent(document.cookie).split(";");for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===" ";)r=r.substring(1);if(r.indexOf(e)===0){r=r.substring(e.length,r.length);try{return JSON.parse(r)}catch{return r}}}return null}function x8(e){const t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return t}return null}function T8(e){const t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return t}return null}function om(e,t){if(!t)return null;const n=t.split(".");let r=e(n.shift());return n.length?r==null?null:Nn(r,n):r}function k8(e){return om(C8,e)}function O8(e){return om(x8,e)}function $8(e){return om(T8,e)}const A8={en:{required:"{title} is required",validate:{url:"{title} is not a valid url",email:"{title} is not a valid email",ip:"{title} {title} is not a valid ip",phone:"{title} {title} is not a valid phone",pattern:"{title} does not match pattern {pattern}",uppercase:"{title} must be all uppercase",lowercase:"{title} must be all lowercased",positive:"{title} is not a positive number",negative:"{title} is not a negative number",equal:"{title} is not equal to {equal}",min:"{title} cannot be less than {min}",max:"{title} cannot be greater than {max}",enum:"{title} must be one of {enum}",hasKeys:"{title} does not contain required fields {hasKeys}",minLen:"{title} must be at least {minLen}",maxLen:"{title} cannot be longer than {maxLen}",len:"{title} must be exactly {len}",integer:"{title} is not an integer",number:"{title} is not an number"}},"zh-cn":{required:"{title}不能为空",validate:{url:"{title}不是有效的 url 地址",email:"{title}不是有效的邮箱地址",ip:"{title}不是有效的 IP 地址",phone:"{title}不是正确的手机号",pattern:"{title}必须匹配 {pattern}",uppercase:"{title}必须全大写",lowercase:"{title}必须全小写",positive:"{title}不是正数",negative:"{title}不是负数",equal:"{title}必须等于 {equal}",min:"{title}必须大于等于 {min}",max:"{title}必须小于等于 {max}",enum:"{title}必须是 {enum} 之一",hasKeys:"{title}必须包含 {hasKeys} 字段",minLen:"{title}长度必须大于 {minLen}",maxLen:"{title}长度必须小于 {maxLen}",len:"{title}长度必须为 {len}",integer:"{title}必须为整数",number:"{title}必须为数字"}}};function R8(e,t){let n;return arguments.length===2?(n=arguments[1],t=n[e]):n=arguments[2],{id:t,prop:n}}function Lf(){return R8("name",...arguments)}function P8(e){const t=e.key||[],n=e.array||[],r=e.normal||[];CE.push(...t),tm.push(...n),nm.push(...r),PE([...t,...n,...r])}let I8=1;const Mr={},hb=Symbol("defValue");function LE(e){const t={[Ff.name]:Ff},n={},r={},i={},o={},s=[],l=[],c=[e.extendApi],d=Xe({},w8),f=Wz();let p={global:{}};const v=e.isMobile===!0,y=Hn({$mobile:v}),g=v8(),m={},b={};P8(e.attrs||{});function x(F){const G=Mr[F];if(Array.isArray(G))return G.map(N=>N.api());if(G)return G.api()}function S(F){s.push(F)}function O(){const F=Lf(...arguments);F.id&&F.prop&&(r[F.id]=F.prop)}function T(){const F=Lf(...arguments);F.id&&F.prop&&(d[F.id]=Me.Function(F.prop)?F.prop:Br(Xe({},F.prop),{name:F.id}))}function A(F){g.use(F)}function M(F){if(arguments.length===0)return Aa;if(typeof F=="string"&&arguments.length===1)return n[tr(F)];const G=Lf(...arguments);if(!G.id||!G.prop)return Aa;const N=tr(G.id),ie=G.prop,ge=ie.merge===!0?n[N]:void 0;n[N]=yc(ie,ge||Aa),f[N]=kn(N),ie.maker&&st(f,ie.maker)}function z(F,G){let N;if(Me.String(F)){if(N=F,G===void 0)return t[N]}else N=F.displayName||F.name,G=F;if(!N||!G)return;const ie=tr(N);t[N]=G,t[ie]=G,delete g.aliasMap[N],delete g.aliasMap[ie],delete n[N],delete n[ie],G.formCreateParser&&M(N,G.formCreateParser)}function Y(){return Vz(B,t,r)}function ve(F,G){const N=Y();return Fh({data(){return Hn({rule:F,option:G})},render(){return Ia(N,Xe({ref:"fc"},this.$data))}})}function W(){return Ff}function X(F,G){return Me.Function(F.install)?F.install(K,G):Me.Function(F)&&F(K,G),this}function K(F,G){let N=ve(F,G||{});s.forEach(ge=>{_t(()=>ge(K,N))});const ie=document.createElement("div");return(G?.el||document.body).appendChild(ie),N.mount(ie).$refs.fc.fapi}yc(K,b);function L(F){let G=Xe({},e);return F?G.inherit={components:t,parsers:n,directives:r,modelFields:i,providers:d,useApps:s,maker:f,formulas:m,loadData:y}:delete G.inherit,LE(G)}function D(F,G){i[F]=G}function ne(F,G){m[F]=G}function le(F,G){const N=o[F]||{},ie=N.parsers||{};G.parsers&&Object.keys(G.parsers).forEach(ge=>{ie[ge]=yc(G.parsers[ge],Aa)}),G.name=F,o[F]=Br(Xe(Xe({},N),G),{parsers:ie})}function je(F){F&&Object.keys(Mr).forEach(G=>{(Array.isArray(Mr[G])?Mr[G]:[Mr[G]]).forEach(N=>{N.bus.$emit("$loadData."+F)})})}function J(F,G){bo(y,F,G),je(F)}function j(F,G){const N=(...ie)=>_t(()=>G(...ie));N._driver=!0,J(F,N)}function de(F,G){const N=(F||"").split(".");F=N.shift();const ie=N.join(".");if(Zt(y,F)||(y[F]=hb),y[F]!==hb){let ge=y[F];return ge&&ge._driver?ge=ge(ie):N.length&&(ge=Nn(ge,N)),ge==null||ge===""?G:ge}else return G}function U(F){c.push(F)}function ee(F){delete y[F],je(F)}function Q(F,G){l.push({name:F,callback:G})}function B(F){st(this,{id:I8++,create:K,vm:F,manager:g8(e.manager),parsers:n,providers:d,modelFields:i,formulas:m,isMobile:v,rules:F.props.rule,name:F.props.name||Mu(),inFor:F.props.inFor,prop:{components:t,directives:r},get:null,drivers:o,renderDriver:null,refreshData:je,loadData:y,CreateNode:g,bus:new vE,unwatch:[],options:re({}),extendApiFn:c,fetchCache:new WeakMap,tmpData:Hn({})}),l.forEach(G=>{this.bus.$on(G.name,G.callback)}),gt(()=>{He(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),st(F.appContext.components,t),st(F.appContext.directives,r),this.$handle=new Ci(this),this.name&&(this.inFor?(Mr[this.name]||(Mr[this.name]=[]),Mr[this.name].push(this)):Mr[this.name]=this)}B.isMobile=v,st(B.prototype,{init(){this.isSub()&&this.unwatch.push(He(()=>this.vm.setupState.parent.setupState.fc.options.value,()=>{this.initOptions(),this.$handle.api.refresh()},{deep:!0,flush:"sync"})),this.vm.props.driver&&(this.renderDriver=typeof this.vm.props.driver=="object"?this.vm.props.driver:this.drivers[this.vm.props.driver]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targetFormDriver(F,...G){if(this.bus.$emit(F,...G),this.renderDriver&&this.renderDriver[F])return _t(()=>this.renderDriver[F](...G))},t(F,G,N){let ie=N?N("$t."+F):this.globalLanguageDriver(F);return ie==null&&(ie=""),ie&&G&&Object.keys(G).forEach(ge=>{const fe=new RegExp(`{${ge}}`,"g");ie=ie.replace(fe,G[ge])}),ie},globalDataDriver(F){let G=F.split(".");const N=G.shift(),ie=this.options.value.globalData&&this.options.value.globalData[N];if(ie){if(ie.type==="static")return Nn(ie.data,G);{let ge;const fe=this.fetchCache.get(ie);if(fe){if(fe.status&&(ge=Nn(fe.data,G)),!fe.loading)return ge;fe.loading=!1,this.fetchCache.set(ie,fe)}else this.fetchCache.set(ie,{status:!1});const pe=ho(()=>{Ke();const Ne=this.fetchCache.get(ie);this.options.value.globalData&&Object.values(this.options.value.globalData).indexOf(ie)!==-1?(Ne&&(Ne.loading=!0,this.fetchCache.set(ie,Ne)),this.bus.$emit("$loadData.$globalData."+N)):this.fetchCache.delete(ie)},ie.wait||600),Ce=Ne=>{this.fetchCache.set(ie,{status:!0,data:Ne}),this.bus.$emit("$loadData.$globalData."+N)},$e=(Ne,tt)=>{if(tt&&ie.watch===!1)return Ke();if(tt){pe();return}const Ge=this.$handle.loadFetchVar(qp(ie),Ne);Ge.targetRule=this.targetRule,this.$handle.api.fetch(Ge).then(Ze=>{Ce(Ze)}).catch(Ze=>{Ce(null)})},Ke=this.watchLoadData($e);return ie.watch===!1&&Ke(),this.unwatch.push(Ke),ge}}},getLocale(){let F=this.vm.setupState.top.props.locale;return F&&typeof F=="object"?F.name:typeof F=="string"?F:"zh-cn"},globalLanguageDriver(F){let G=this.vm.setupState.top.props.t,N=this.vm.setupState.top.props.locale,ie;if(G&&(ie=_t(()=>G(F))),ie==null&&N&&typeof N=="object"&&(ie=Nn(N,F)),ie==null){const ge=this.options.value.language||{},fe=this.getLocale();ie=Nn(ge[fe]||{},F),ie==null&&(ie=Nn(A8[fe]||{},F))}return ie},globalVarDriver(F){let G=F.split(".");const N=G.shift(),ie=this.options.value.globalVariable&&this.options.value.globalVariable[N];if(ie){const ge=Me.Function(ie)?ie:wi(ie.handle);if(ge){let fe=ge((...pe)=>this.$handle.api.getData(...pe),this.$handle.api);return Nn(fe,G)}}},setData(F,G,N){N?J(F,G):(bo(this.vm.setupState.top.setupState.fc.tmpData,F,G),this.bus.$emit("$loadData."+F))},getLoadData(F,G){let N=null;if(F!=null){let ie=F.split(".");const ge=ie.shift();if(N=Nn(this.vm.setupState.top.setupState.fc.tmpData,F),N!=null)return N;if(ge==="$topForm")N=this.$handle.api.top.formData(!0);else if(ge==="$scopeForm")N=this.$handle.api.scope.formData(!0);else if(ge==="$form")N=this.$handle.api.formData(!0);else if(ge==="$options")N=this.options.value;else if(ge==="$globalData")N=this.globalDataDriver(ie.join(".")),ie=[];else if(ge==="$var")N=this.globalVarDriver(ie.join(".")),ie=[];else if(ge==="$locale")N=this.getLocale(),ie=[];else if(ge==="$t")N=this.globalLanguageDriver(ie.join(".")),ie=[];else{if(ge==="$preview")return this.$handle.preview;N=de(F),ie=[]}N&&ie.length&&(N=Nn(N,ie))}return N==null||N===""?G:N},watchLoadData(F,G){let N={};const ie=pe=>{this.get||(this.get=ge),_t(()=>{F(ge,pe)}),this.get===ge&&(this.get=void 0)},ge=(pe,Ce)=>{let $e;if(typeof pe=="object"&&($e=pe.getValue,pe=pe.id),N[pe])return N[pe].val;const Ke=se(()=>$e?$e():this.getLoadData(pe,Ce)),Ne=pe.split("."),tt=Ne.shift(),Ge=Ne.shift()||"",Ze=ho(()=>{const St=$e?$e():this.getLoadData(pe,Ce);if(N[pe])((St instanceof Function||Me.Object(St)||Array.isArray(St))&&St===N[pe].val||JSON.stringify(St)!==JSON.stringify(N[pe].val))&&(N[pe].val=St,ie(!0));else return},G||0),Pt=He(Ke,St=>{Ze()});return this.bus.$on("$loadData."+tt,Ze),Ge&&this.bus.$on("$loadData."+tt+"."+Ge,Ze),N[pe]={fn:()=>{this.bus.$off("$loadData."+tt,Ze),Ge&&this.bus.$off("$loadData."+tt+"."+Ge,Ze),Pt()},val:Ke.value},Ke.value};ie(!1);const fe=()=>{Object.keys(N).forEach(pe=>N[pe].fn()),N={}};return this.unwatch.push(fe),fe},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let F=Xe({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},yi(p));const G=this.isSub();G&&(F=this.mergeOptions(F,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),F=this.mergeOptions(F,this.vm.props.option);const N=this.api();this.targetFormDriver("initOptions",F,{api:N,isSubForm:G}),this.updateOptions(F)},mergeOptions(F,G,N){return G=Xe({},G||{}),N&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","beforeUnmount","beforeSubmit","onBeforeUnmount","onReload","reload","formData","el","globalClass","style"].forEach(ie=>{delete G[ie]}),G.global&&(F.global=zz(F.global,G.global),delete G.global),this.$handle.$manager.mergeOptions([G],F),F},updateOptions(F){this.options.value=this.mergeOptions(this.options.value,F),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api(){return this.$handle.api},render(){return this.$handle.render()},mounted(){this.$handle.mounted()},unmount(){if(_t(()=>this.$handle.lifecycle("beforeUnmount")),this.name)if(this.inFor){const F=Mr[this.name].indexOf(this);Mr[this.name].splice(F,1)}else delete Mr[this.name];l.forEach(F=>{this.bus.$off(F.name,F.callback)}),this.tmpData={},this.unwatch.forEach(F=>F()),this.unwatch=[],this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit("next-tick",this.$handle.api))}});function oe(F){st(F,{version:e.version,ui:e.ui,isMobile:v,extendApi:U,getData:de,setDataDriver:j,setData:J,removeData:ee,refreshData:je,maker:f,component:z,directive:O,setModelField:D,setFormula:ne,setDriver:le,register:T,$vnode:W,parser:M,use:X,factory:L,componentAlias:A,copyRule:kE,copyRules:OE,mergeRule:Hi,fetch:IE,$form:Y,parseFn:wi,parseJson:bE,toJson:za,useApp:S,getApi:x,on:Q})}function V(F){st(F,{create:K,install(G,N){p=Xe(Xe({},p),N||{});const ie=`_installedFormCreate${v?"Mobile":""}_${e.ui}`;if(G[ie]===!0)return;G[ie]=!0;const ge=function(pe,Ce={}){return K(pe,Ce)};oe(ge),G.config.globalProperties.$formCreate=ge;const fe=Y();G.component(fe.name,fe),s.forEach(pe=>{_t(()=>pe(F,G))})}})}if(oe(b),V(b),j("$cookie",k8),j("$localStorage",O8),j("$sessionStorage",$8),g.use({fragment:"fcFragment"}),e.install&&K.use(e),S((F,G)=>{G.mixin({props:["formCreateInject"],emits:["fc.updateValue","fc.el"]})}),M(S8),e.inherit){const F=e.inherit;F.components&&st(t,F.components),F.parsers&&st(n,F.parsers),F.directives&&st(r,F.directives),F.modelFields&&st(i,F.modelFields),F.providers&&st(d,F.providers),F.useApps&&st(s,F.useApps),F.maker&&st(f,F.maker),F.loadData&&st(y,F.loadData),F.formulas&&st(m,F.formulas)}const P=Y();return yc(P,b),Object.defineProperties(P,{fetch:{get(){return b.fetch},set(F){b.fetch=F}}}),P.util=b,P}const mb={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},vb="datePicker",M8={name:vb,maker:(function(){return["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce((e,t)=>(e[t]=kn(vb,{type:t.toLowerCase()}),e),{})})(),mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat=mb[t.type]||mb.date)}},jf="hidden",D8={name:jf,maker:{[jf]:(e,t)=>kn(jf)("",e,t)},render(){return[]}},Uf="input",F8={name:Uf,maker:(function(){const e=["password","url","email","text","textarea"].reduce((t,n)=>(t[n]=kn(Uf,{type:n}),t),{});return e.idate=kn(Uf,{type:"date"}),e})(),mergeProp(e){let{props:t}=e.prop;t&&t.autosize&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},L8="textarea",j8={name:L8,mergeProp(e){let{props:t}=e.prop;t.type="textarea",t&&t.autosize&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},gb="slider",U8={name:gb,maker:{sliderRange:kn(gb,{range:!0})},toFormValue(e,t){let n=Array.isArray(e),r=t.prop.props,i=r.min||0,o;return r.range===!0?o=n?e:[i,parseFloat(e)||i]:o=n?parseFloat(e[0])||i:parseFloat(e),o}},Nf="timePicker",N8={name:Nf,maker:{time:kn(Nf,e=>e.props.isRange=!1),timeRange:kn(Nf,e=>e.props.isRange=!0)},mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},z8={name:"FcRow",render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},B8="select",V8={name:B8,toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?er(e):e}},H8=[M8,D8,F8,j8,U8,N8,z8,V8],Vt="el",q8={button:Vt+"-button",icon:Vt+"-icon",slider:Vt+"-slider",rate:Vt+"-rate",upload:"fc-upload",cascader:Vt+"-cascader",popover:Vt+"-popover",tooltip:Vt+"-tooltip",colorPicker:Vt+"-colorPicker",timePicker:Vt+"-time-picker",timeSelect:Vt+"-time-select",datePicker:Vt+"-date-picker",switch:Vt+"-switch",select:"fc-select",checkbox:"fc-checkbox",radio:"fc-radio",inputNumber:Vt+"-input-number",number:Vt+"-input-number",input:Vt+"-input",textarea:Vt+"-input",formItem:Vt+"-form-item",form:Vt+"-form",frame:"fc-frame",col:Vt+"-col",row:Vt+"-row",tree:"fc-tree",inputTag:Vt+"-input-tag",inputOtp:Vt+"-input-otp",mention:Vt+"-mention",transfer:Vt+"-transfer",treeSelect:Vt+"-tree-select",autoComplete:Vt+"-autocomplete",auto:Vt+"-autocomplete",group:"fc-group",array:"fc-group",object:"fc-sub-form",subForm:"fc-sub-form"};function W8(){return{form:{inline:!1,labelPosition:"right",labelWidth:"125px",disabled:!1,size:void 0},row:{show:!0,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"",show:!0,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0}}}function Y8(e){return e.type==="tooltip"}function _b(e,t){Zt(e,t)&&Me.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function Mi(e){return e===!1}function K8(e,t){Zt(e,t)&&!Me.Object(e[t])&&(e[t]={show:!!e[t]})}function zf(e){const t=Xe({},e);return delete t.children,t}const G8={validate(){const e=this.form();return e?e.validate():new Promise(t=>t())},validateField(e){return new Promise((t,n)=>{const r=this.form();r?r.validateField(e,(i,o)=>{o?n(o):t(i)}):t()})},clearValidateState(e){const t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange(e,t,n,r){var i,o;r||(o=(i=this.vm.refs[e.wrapRef])==null?void 0:i.validate("change"))==null||o.catch(()=>{})},tidyOptions(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(t=>{K8(e,t)}),e},tidyRule({prop:e}){return _b(e,"title"),_b(e,"info"),e},mergeProp(e){const t={info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}};["info","wrap","col","title"].forEach(n=>{e.prop[n]=zi([this.options[n]||{},e.prop[n]||{}],t[n])})},getDefaultOptions(){return W8()},update(){const e=this.options.form;this.rule={props:Xe({},e),on:{submit:t=>{t.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:n}=this,r=this.options.form;st(this.rule,{key:e,ref:t,class:[r.className,r.class,"form-create",this.$handle.preview?"is-preview":""]}),st(this.rule.props,{model:n.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,Mi(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){const n=e.prop,r=`${this.key}${e.key}`,i=n.col,o=this.isTitle(n)&&n.wrap.title!==!1,s=!i.labelWidth&&!o?0:i.labelWidth,{inline:l,col:c}=this.rule.props,d=n.wrap.class;delete n.wrap.class,delete n.wrap.title;const f=(Me.Undef(n.wrap.show)?!e.input:Mi(n.wrap.show))?t:this.$r(zi([n.wrap,{props:Br(Xe({labelWidth:s===void 0?s:gE(s),label:o?n.title.title:void 0},zf(n.wrap||{})),{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||n.className,"fc-form-item"),key:`${r}fi`,ref:e.wrapRef,type:"formItem"}]),Xe({default:()=>t},o?{label:()=>this.makeInfo(n,r,e)}:{}));return l===!0||Mi(c)||Mi(i.show)?f:this.makeCol(n,r,[f])},isTitle(e){if(this.options.form.title===!1)return!1;const t=e.title;return!(!t.title&&!t.native||Mi(t.show))},makeInfo(e,t,n){var r,i,o,s,l,c;const d=Xe({},e.title),f=Xe({},e.info),p=Y8(f),v=this.options.form,y=this.getSlot("title"),g=[y?y({title:(i=(r=n.refRule)==null?void 0:r.__$title)==null?void 0:i.value,rule:n.rule,options:this.options}):((s=(o=n.refRule)==null?void 0:o.__$title)==null?void 0:s.value)+(v.labelSuffix||v["label-suffix"]||"")];if(!Mi(f.show)&&(f.info||f.native)&&!Mi(f.icon)){const b={type:f.type||"popover",props:zf(f),key:`${t}pop`};delete b.props.icon,delete b.props.show,delete b.props.info,delete b.props.align,delete b.props.native;const x="content";f.info&&!Zt(b.props,x)&&(b.props[x]=(c=(l=n.refRule)==null?void 0:l.__$info)==null?void 0:c.value),g[f.align!=="left"?"unshift":"push"](this.$r(zi([f,b]),{[d.slot||(p?"default":"reference")]:()=>this.$r({type:"ElIcon",style:"top:2px",key:`${t}i`},{default:()=>this.$r({type:f.icon===!0?"icon-warning":f.icon})},!0)}))}const m=zi([d,{props:zf(d),key:`${t}tit`,class:"fc-form-title",type:d.type||"span",on:{click:(...b)=>{this.$handle.targetHook(n,"titleClick",{args:b})}}}]);return delete m.props.show,delete m.props.title,delete m.props.native,this.$r(m,g)},makeCol(e,t,n){const r=Xe({},e.col);return delete r.show,this.$r({class:this.$render.mergeClass(r.class,"fc-form-col"),type:"col",props:r||{span:24},key:`${t}col`},n)},makeRow(e){const t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"fc-form-row"),key:`${this.key}row`},e)},makeFormBtn(){let e=[];if(Mi(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),Mi(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;const t=this.$r({type:"formItem",class:"fc-form-item",key:`${this.key}fb`},e);return this.rule.props.inline===!0?t:this.$r({type:"col",class:"fc-form-col fc-form-footer",props:{span:24},key:`${this.key}fc`},[t])},makeResetBtn(){const e=Xe({},this.options.resetBtn),t=e.innerText||this.$handle.api.t("reset")||"重置";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"fc-reset-btn",style:{width:e.width},on:{click:()=>{const n=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(n):n.resetFields()}},key:`${this.key}b2`},[t])},makeSubmitBtn(){const e=Xe({},this.options.submitBtn),t=e.innerText||this.$handle.api.t("submit")||"提交";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"fc-submit-btn",style:{width:e.width},on:{click:()=>{const n=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(n):n.submit().catch(()=>{})}},key:`${this.key}b1`},[t])}},wo={};Q8(wo);X8(wo);J8(wo);Z8(wo);eB(wo);tB(wo);function Q8(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","inputTag","inputOtp","mention","transfer","treeSelect","radio","rate"].forEach(t=>{e[t]=kn(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker,e.tag=e.inputTag}function X8(e){e.treeSelectMultiple=kn("treeSelect",{multiple:!0})}function J8(e){const t="select",n="multiple";e.selectMultiple=kn(t,{[n]:!0}),e.selectOne=kn(t,{[n]:!1})}function Z8(e){const t="tree",n={treeSelected:"selected",treeChecked:"checked"};Object.keys(n).reduce((r,i)=>(r[i]=kn(t,{type:n[i]}),r),e)}function eB(e){const t="upload",n={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(n).reduce((r,i)=>(r[i]=kn(t,o=>o.props({uploadType:n[i][0],maxLength:n[i][1]})),r),e),e.uploadImage=e.image,e.uploadFile=e.file}function tB(e){const t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};return Object.keys(t).reduce((n,r)=>(n[r]=kn("frame",i=>i.props({type:t[r][0],maxLength:t[r][1]})),n),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages,e}function yb(e,t){return Me.Boolean(e)?e={show:e}:!Me.Undef(e)&&!Me.Object(e)&&(e={show:t}),e}function nB(e,t){return{formEl(){return t.$manager.form()},wrapEl(n){const r=t.getFieldCtx(n);if(r)return t.vm.refs[r.wrapRef]},validate(n){return new Promise((r,i)=>{const o=e.children,s=[t.$manager.validate()];o.filter(l=>!l.isScope).forEach(l=>{s.push(l.validate())}),Promise.all(s).then(()=>{r(!0),n&&n(!0)}).catch(l=>{i(l),n&&n(l),t.vm.emit("validate-fail",l,{api:e}),t.emitEvent("validate-fail",l,{api:e})})})},validateField(n,r){return new Promise((i,o)=>{const s=typeof n=="object"?hi(n):t.getCtx(n);if(!s){i(null),r&&r(null);return}const l=t.subForm[s.id],c=[t.$manager.validateField(s.id)];er(l).filter(d=>!d.isScope).forEach(d=>{c.push(d.validate())}),Promise.all(c).then(()=>{i(null),r&&r(null)}).catch(d=>{o(d),r&&r(d),t.vm.emit("validate-field-fail",d,{field:n,api:e})})})},validateFields(n,r){return new Promise((i,o)=>{Array.isArray(n)||(n=[n]);const s=n.map(l=>e.validateField(l));Promise.all(s).then(()=>{i(null),r&&r(null)}).catch(l=>{o(l),r&&r(l)})})},clearValidateState(n,r=!0){e.helper.tidyFields(n).forEach(i=>{r&&this.clearSubValidateState(i),t.getCtxs(i).forEach(o=>{t.$manager.clearValidateState(o)})})},clearSubValidateState(n){e.helper.tidyFields(n).forEach(r=>{t.getCtxs(r).forEach(i=>{const o=t.subForm[i.id];o&&(Array.isArray(o)?o.forEach(s=>{s.clearValidateState()}):o&&o.clearValidateState())})})},btn:{loading:(n=!0)=>{e.submitBtnProps({loading:!!n})},disabled:(n=!0)=>{e.submitBtnProps({disabled:!!n})},show:(n=!0)=>{e.submitBtnProps({show:!!n})}},resetBtn:{loading:(n=!0)=>{e.resetBtnProps({loading:!!n})},disabled:(n=!0)=>{e.resetBtnProps({disabled:!!n})},show:(n=!0)=>{e.resetBtnProps({show:!!n})}},submitBtnProps:(n={})=>{let r=yb(t.options.submitBtn,!0);st(r,n),t.options.submitBtn=r,e.refreshOptions()},resetBtnProps:(n={})=>{let r=yb(t.options.resetBtn,!1);st(r,n),t.options.resetBtn=r,e.refreshOptions()},submit(n,r){return new Promise((i,o)=>{(t.options.validateOnSubmit===!1?Promise.resolve():e.validate()).then(()=>{let s=e.formData();t.beforeSubmit(s).then(()=>{Me.Function(n)&&_t(()=>n(s,e)),Me.Function(t.options.onSubmit)&&_t(()=>t.options.onSubmit(s,e)),t.vm.emit("submit",s,e),i(s)}).catch(l=>{})}).catch((...s)=>{Me.Function(r)&&_t(()=>r(e,...s)),o(...s)})})}}}const jE={name:"required",load(e,t,n){const r=rB(e.getValue());let i;if(r.required===!1)e.clearProp(),n.clearValidateState([t.field]);else{const o=Xe({required:!0,validator(l,c,d){s(),Me.empty(c)?d(o.message):d()}},r),s=()=>{var l;const c=(l=t.__fc__.refRule.__$title)==null?void 0:l.value;if(i!==c)if(i=c,!r.message)o.message=n.t("required",{title:c})||c+(n.getLocale()==="en"?" is required":"不能为空");else{const d=r.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);d&&(o.message=n.t(d[1],{title:c}))}};s(),e.getProp().validate=[o]}n.sync(t)},watch(...e){jE.load(...e)}};function rB(e){return Me.Boolean(e)?{required:e}:Me.String(e)?{message:e}:Me.Undef(e)?{required:!1}:Me.Function(e)?{validator:e}:Me.Object(e)?e:{}}function iB(e){e.componentAlias(q8),Uz.forEach(t=>{e.component(t.name,t)}),e.register(jE),H8.forEach(t=>{e.parser(t)}),Object.keys(wo).forEach(t=>{e.maker[t]=wo[t]}),typeof window<"u"&&window.ElementPlus&&e.useApp((t,n)=>{n.use(window.ElementPlus)})}function oB(){return LE({ui:"element-ui",version:"3.3.1",manager:G8,extendApi:nB,install:iB,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}})}const Du=oB();typeof window<"u"&&(window.formCreate=Du);Du.maker;function sB(e){e.useApp((t,n)=>{n.component(Ap.name)||n.use(Ap),n.component(Is.name)||n.use(Is),n.component(z_.name)||n.use(z_),n.component(B_.name)||n.use(B_),n.component(V_.name)||n.use(V_),n.component(Pp.name)||n.use(Pp),n.component(H_.name)||n.use(H_),n.component(Rp.name)||n.use(Rp),n.component(q_.name)||n.use(q_),n.component(W_.name)||n.use(W_),n.component(Y_.name)||n.use(Y_),n.component(K_.name)||n.use(K_),n.component(G_.name)||n.use(G_),n.component(Q_.name)||n.use(Q_),n.component(X_.name)||n.use(X_),n.component(J_.name)||n.use(J_),n.component(Z_.name)||n.use(Z_),n.component(ey.name)||n.use(ey),n.component(ty.name)||n.use(ty),n.component(ny.name)||n.use(ny),n.component(ry.name)||n.use(ry),n.component(iy.name)||n.use(iy),n.component(oy.name)||n.use(oy),n.component(sy.name)||n.use(sy),n.component(ay.name)||n.use(ay),n.component(Ma.name)||n.use(Ma),n.component(ly.name)||n.use(ly),n.component(cy.name)||n.use(cy),n.component(uy.name)||n.use(uy),n.component(dy.name)||n.use(dy),n.component(fy.name)||n.use(fy),n.component(py.name)||n.use(py)})}Du.use(sB);function aB(e){e.use(Du)}async function lB(){}function cB(e){e.use(s4,{paginationStorage:{get:()=>UD(),set:t=>ND(t)}})}function uB(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(i){i(n)}),(r=e.get("*"))&&r.slice().map(function(i){i(t,n)})}}}function Qe(e){let t=yn();if(typeof window<"u"){let n=e.subscribe(r=>{t.value=r});ww()&&Ew(n)}else t.value=e.get();return t}let ei=[],ao=0;const Gc=4,Qc=globalThis.nanostoresGlobal||={epoch:0};let dB=()=>{for(ao=0;ao<ei.length;ao+=Gc)ei[ao](ei[ao+1].value,ei[ao+2],ei[ao+3]);ei.length=0};const Rn=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(r){return n.lc=t.push(r),()=>{for(let o=ao+Gc;o<ei.length;)ei[o]===r?ei.splice(o,Gc):o+=Gc;let i=t.indexOf(r);~i&&(t.splice(i,1),--n.lc||n.off())}},notify(r,i){Qc.epoch++;let o=!ei.length&&!0;for(let s of t)ei.push(s,n,r,i);o&&dB()},off(){},set(r){let i=n.value;i!==r&&(n.value=r,n.notify(i))},subscribe(r){let i=n.listen(r);return r(n.value),i},value:e};return n},fB=5,bc=6,wc=10;let pB=(e,t,n,r)=>(e.events=e.events||{},e.events[n+wc]||(e.events[n+wc]=r(i=>{e.events[n].reduceRight((o,s)=>(s(o),o),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],o=i.indexOf(t);i.splice(o,1),i.length||(delete e.events[n],e.events[n+wc](),delete e.events[n+wc])});const hB=1e3;let UE=(e,t)=>pB(e,r=>{let i=t(r);i&&e.events[bc].push(i)},fB,r=>{let i=e.listen;e.listen=(...s)=>(!e.lc&&!e.active&&(e.active=!0,r()),i(...s));let o=e.off;return e.events[bc]=[],e.off=()=>{o(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let s of e.events[bc])s();e.events[bc]=[]}},hB)},()=>{e.listen=i,e.off=o}}),mB=(e,t,n)=>{Array.isArray(e)||(e=[e]);let r,i,o=()=>{if(i===Qc.epoch)return;i=Qc.epoch;let d=e.map(f=>f.get());if(!r||d.some((f,p)=>f!==r[p])){r=d;let f=t(...d);f&&f.then&&f.t?f.then(p=>{r===d&&s.set(p)}):(s.set(f),i=Qc.epoch)}},s=Rn(void 0),l=s.get;s.get=()=>(o(),l());let c=o;return UE(s,()=>{let d=e.map(f=>f.listen(c));return o(),()=>{for(let f of d)f()}}),s};const lo=(e,t)=>mB(e,t);let bb=e=>e,Fi={},Gp={addEventListener(){},removeEventListener(){}};function vB(){try{return typeof localStorage<"u"}catch{return!1}}vB()&&(Fi=localStorage);let gB={addEventListener(e,t,n){window.addEventListener("storage",t),window.addEventListener("pageshow",n)},removeEventListener(e,t,n){window.removeEventListener("storage",t),window.removeEventListener("pageshow",n)}};typeof window<"u"&&(Gp=gB);function NE(e,t,n={}){let r=n.encode||bb,i=n.decode||bb,o=Fi[e],s=Rn(e in Fi?i(o):t),l=s.set;s.set=f=>{o=r(f),typeof o>"u"?delete Fi[e]:Fi[e]=o,l(f)};function c(f){f.key===e?f.newValue===null?l(t):l(i(f.newValue)):e in Fi||l(t)}function d(){o!==Fi[e]&&s.set(e in Fi?i(Fi[e]):t)}return UE(s,()=>{if(d(),n.listen!==!1)return Gp.addEventListener(e,c,d),()=>{Gp.removeEventListener(e,c,d)}}),s}let Qp=1;var _B=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,r=typeof e.id=="number"||e.id&&e.id?.length>0?e.id:Qp++,i=this.toasts.find(s=>s.id===r),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(s=>s.id===r?(this.publish({...s,...e,id:r,title:t}),{...s,...e,id:r,dismissible:o,title:t}):s):this.addToast({title:t,...n,dismissible:o,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:"default"});error=(e,t)=>this.create({...t,type:"error",message:e});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let i=n!==void 0,o;const s=r.then(async c=>{if(o=["resolve",c],Ts(c))i=!1,this.create({id:n,type:"default",message:c});else if(bB(c)&&!c.ok){i=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description,y=typeof f=="object"&&!Ts(f)?f:{message:f||"",id:n||""};this.create({id:n,type:"error",description:p,...y})}else if(c instanceof Error){i=!1;const f=typeof t.error=="function"?await t.error(c):t.error,p=typeof t.description=="function"?await t.description(c):t.description,y=typeof f=="object"&&!Ts(f)?f:{message:f||"",id:n||""};this.create({id:n,type:"error",description:p,...y})}else if(t.success!==void 0){i=!1;const f=typeof t.success=="function"?await t.success(c):t.success,p=typeof t.description=="function"?await t.description(c):t.description,y=typeof f=="object"&&!Ts(f)?f:{message:f||"",id:n||""};this.create({id:n,type:"success",description:p,...y})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){i=!1;const d=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description,v=typeof d=="object"&&!Ts(d)?d:{message:d||"",id:n||""};this.create({id:n,type:"error",description:f,...v})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),l=()=>new Promise((c,d)=>s.then(()=>o[0]==="reject"?d(o[1]):c(o[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})};custom=(e,t)=>{const n=t?.id||Qp++,r=this.toasts.find(o=>o.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(o=>o.id===n?(this.publish({...o,component:e,dismissible:i,id:n,...t}),{...o,component:e,dismissible:i,id:n,...t}):o):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const Jn=new _B;function yB(e,t){const n=t?.id||Qp++;return Jn.create({message:e,id:n,type:"default",...t}),n}const bB=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wB=yB,EB=()=>Jn.toasts,SB=()=>Jn.getActiveToasts(),Ec=Object.assign(wB,{success:Jn.success,info:Jn.info,warning:Jn.warning,error:Jn.error,custom:Jn.custom,message:Jn.message,promise:Jn.promise,dismiss:Jn.dismiss,loading:Jn.loading},{getHistory:EB,getToasts:SB});function Sc(e){return e.label!==void 0}const CB=3,zE="24px",BE="16px",wb=4e3,xB=356,TB=14,kB=45,VE=200;function OB(){const e=re(!1);return zn(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function io(...e){return e.filter(Boolean).join(" ")}function $B(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}function AB(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",l=o?BE:zE;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=l:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),n}const RB=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],PB=["aria-label","data-disabled","data-close-button-position"];var IB=ze({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,r=t,i=re(null),o=re(null),s=re(!1),l=re(!1),c=re(!1),d=re(!1),f=re(!1),p=re(0),v=re(0),y=re(n.toast.duration||n.duration||wb),g=re(null),m=re(null),b=se(()=>n.index===0),x=se(()=>n.index+1<=n.visibleToasts),S=se(()=>n.toast.type),O=se(()=>n.toast.dismissible!==!1),T=se(()=>n.toast.class||""),A=se(()=>n.descriptionClass||""),M=se(()=>{const P=n.toast.position||n.position,G=n.heights.filter(N=>N.position===P).findIndex(N=>N.toastId===n.toast.id);return G>=0?G:0}),z=se(()=>{const P=n.toast.position||n.position;return n.heights.filter(G=>G.position===P).reduce((G,N,ie)=>ie>=M.value?G:G+N.height,0)}),Y=se(()=>M.value*n.gap+z.value||0),ve=se(()=>n.toast.closeButton??n.closeButton),W=se(()=>n.toast.duration||n.duration||wb),X=re(0),K=re(0),L=re(null),D=se(()=>n.position.split("-")),ne=se(()=>D.value[0]),le=se(()=>D.value[1]),je=se(()=>typeof n.toast.title!="string"),J=se(()=>typeof n.toast.description!="string"),{isDocumentHidden:j}=OB(),de=se(()=>S.value&&S.value==="loading");xt(()=>{s.value=!0,y.value=W.value}),zn(async()=>{if(!s.value||!m.value)return;await gt();const P=m.value,F=P.style.height;P.style.height="auto";const G=P.getBoundingClientRect().height;P.style.height=F,v.value=G,r("update:height",{toastId:n.toast.id,height:G,position:n.toast.position||n.position})});function U(){l.value=!0,p.value=Y.value,setTimeout(()=>{r("removeToast",n.toast)},VE)}function ee(){if(de.value||!O.value)return{};U(),n.toast.onDismiss?.(n.toast)}function Q(P){P.button!==2&&(de.value||!O.value||(g.value=new Date,p.value=Y.value,P.target.setPointerCapture(P.pointerId),P.target.tagName!=="BUTTON"&&(c.value=!0,L.value={x:P.clientX,y:P.clientY})))}function B(){if(d.value||!O.value)return;L.value=null;const P=Number(m.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),F=Number(m.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),G=new Date().getTime()-(g.value?.getTime()||0),N=i.value==="x"?P:F,ie=Math.abs(N)/G;if(Math.abs(N)>=kB||ie>.11){p.value=Y.value,n.toast.onDismiss?.(n.toast),i.value==="x"?o.value=P>0?"right":"left":o.value=F>0?"down":"up",U(),d.value=!0;return}else m.value?.style.setProperty("--swipe-amount-x","0px"),m.value?.style.setProperty("--swipe-amount-y","0px");f.value=!1,c.value=!1,i.value=null}function oe(P){if(!L.value||!O.value||(window?.getSelection()?.toString()?.length??!1))return;const G=P.clientY-L.value.y,N=P.clientX-L.value.x,ie=n.swipeDirections??$B(n.position);!i.value&&(Math.abs(N)>1||Math.abs(G)>1)&&(i.value=Math.abs(N)>Math.abs(G)?"x":"y");let ge={x:0,y:0};const fe=pe=>1/(1.5+Math.abs(pe)/20);if(i.value==="y"){if(ie.includes("top")||ie.includes("bottom"))if(ie.includes("top")&&G<0||ie.includes("bottom")&&G>0)ge.y=G;else{const pe=G*fe(G);ge.y=Math.abs(pe)<Math.abs(G)?pe:G}}else if(i.value==="x"&&(ie.includes("left")||ie.includes("right")))if(ie.includes("left")&&N<0||ie.includes("right")&&N>0)ge.x=N;else{const pe=N*fe(N);ge.x=Math.abs(pe)<Math.abs(N)?pe:N}(Math.abs(ge.x)>0||Math.abs(ge.y)>0)&&(f.value=!0),m.value?.style.setProperty("--swipe-amount-x",`${ge.x}px`),m.value?.style.setProperty("--swipe-amount-y",`${ge.y}px`)}xt(()=>{if(s.value=!0,!m.value)return;const P=m.value.getBoundingClientRect().height;v.value=P;const F=[{toastId:n.toast.id,height:P,position:n.toast.position},...n.heights];r("update:heights",F)}),ns(()=>{m.value&&r("removeToast",n.toast)}),zn(P=>{if(n.toast.promise&&S.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let F;const G=()=>{if(K.value<X.value){const ie=new Date().getTime()-X.value;y.value=y.value-ie}K.value=new Date().getTime()},N=()=>{y.value!==1/0&&(X.value=new Date().getTime(),F=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),U()},y.value))};n.expanded||n.interacting||j.value?G():N(),P(()=>{clearTimeout(F)})}),He(()=>n.toast.delete,P=>{P!==void 0&&P&&(U(),n.toast.onDismiss?.(n.toast))},{deep:!0});function V(){c.value=!1,i.value=null,L.value=null}return(P,F)=>(C(),R("li",{tabindex:"0",ref_key:"toastRef",ref:m,class:Be(w(io)(n.class,T.value,P.classes?.toast,P.toast.classes?.toast,P.classes?.[S.value],P.toast?.classes?.[S.value])),"data-sonner-toast":"","data-rich-colors":P.toast.richColors??P.defaultRichColors,"data-styled":!(P.toast.component||P.toast?.unstyled||P.unstyled),"data-mounted":s.value,"data-promise":!!P.toast.promise,"data-swiped":f.value,"data-removed":l.value,"data-visible":x.value,"data-y-position":ne.value,"data-x-position":le.value,"data-index":P.index,"data-front":b.value,"data-swiping":c.value,"data-dismissible":O.value,"data-type":S.value,"data-invert":P.toast.invert||P.invert,"data-swipe-out":d.value,"data-swipe-direction":o.value,"data-expanded":!!(P.expanded||P.expandByDefault&&s.value),"data-testid":P.toast.testId,style:an({"--index":P.index,"--toasts-before":P.index,"--z-index":P.toasts.length-P.index,"--offset":`${l.value?p.value:Y.value}px`,"--initial-height":P.expandByDefault?"auto":`${v.value}px`,...P.style,...n.toast.style}),onDragend:V,onPointerdown:Q,onPointerup:B,onPointermove:oe},[ve.value&&!P.toast.component&&S.value!=="loading"?(C(),R("button",{key:0,"aria-label":P.closeButtonAriaLabel||"Close toast","data-disabled":de.value,"data-close-button":"true","data-close-button-position":P.closeButtonPosition,class:Be(w(io)(P.classes?.closeButton,P.toast?.classes?.closeButton)),onClick:ee},[P.icons?.close?(C(),Ee(Pn(P.icons?.close),{key:0})):mt(P.$slots,"close-icon",{key:1})],10,PB)):Se("v-if",!0),P.toast.component?(C(),Ee(Pn(P.toast.component),Ot({key:1},P.toast.componentProps,{onCloseToast:ee,isPaused:P.$props.expanded||P.$props.interacting||w(j)}),null,16,["isPaused"])):(C(),R(We,{key:2},[S.value!=="default"||P.toast.icon||P.toast.promise?(C(),R("div",{key:0,"data-icon":"",class:Be(w(io)(P.classes?.icon,P.toast?.classes?.icon))},[P.toast.icon?(C(),Ee(Pn(P.toast.icon),{key:0})):(C(),R(We,{key:1},[S.value==="loading"?mt(P.$slots,"loading-icon",{key:0}):S.value==="success"?mt(P.$slots,"success-icon",{key:1}):S.value==="error"?mt(P.$slots,"error-icon",{key:2}):S.value==="warning"?mt(P.$slots,"warning-icon",{key:3}):S.value==="info"?mt(P.$slots,"info-icon",{key:4}):Se("v-if",!0)],64))],2)):Se("v-if",!0),_("div",{"data-content":"",class:Be(w(io)(P.classes?.content,P.toast?.classes?.content))},[_("div",{"data-title":"",class:Be(w(io)(P.classes?.title,P.toast.classes?.title))},[je.value?(C(),Ee(Pn(P.toast.title),ii(Ot({key:0},P.toast.componentProps)),null,16)):(C(),R(We,{key:1},[Et(q(P.toast.title),1)],64))],2),P.toast.description?(C(),R("div",{key:0,"data-description":"",class:Be(w(io)(P.descriptionClass,A.value,P.classes?.description,P.toast.classes?.description))},[J.value?(C(),Ee(Pn(P.toast.description),ii(Ot({key:0},P.toast.componentProps)),null,16)):(C(),R(We,{key:1},[Et(q(P.toast.description),1)],64))],2)):Se("v-if",!0)],2),P.toast.cancel?(C(),R("button",{key:1,style:an(P.toast.cancelButtonStyle||P.cancelButtonStyle),class:Be(w(io)(P.classes?.cancelButton,P.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:F[0]||(F[0]=G=>{w(Sc)(P.toast.cancel)&&O.value&&(P.toast.cancel.onClick?.(G),U())})},q(w(Sc)(P.toast.cancel)?P.toast.cancel?.label:P.toast.cancel),7)):Se("v-if",!0),P.toast.action?(C(),R("button",{key:2,style:an(P.toast.actionButtonStyle||P.actionButtonStyle),class:Be(w(io)(P.classes?.actionButton,P.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:F[1]||(F[1]=G=>{w(Sc)(P.toast.action)&&(P.toast.action.onClick?.(G),!G.defaultPrevented&&U())})},q(w(Sc)(P.toast.action)?P.toast.action?.label:P.toast.action),7)):Se("v-if",!0)],64))],46,RB))}}),MB=IB,ll=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const DB={},FB={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function LB(e,t){return C(),R("svg",FB,t[0]||(t[0]=[_("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),_("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var jB=ll(DB,[["render",LB]]);const UB=["data-visible"],NB={class:"sonner-spinner"};var zB=ze({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,r)=>(C(),R("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[_("div",NB,[(C(!0),R(We,null,ut(w(t),i=>(C(),R("div",{key:`spinner-bar-${i}`,class:"sonner-loading-bar"}))),128))])],8,UB))}}),BB=zB;const VB={},HB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function qB(e,t){return C(),R("svg",HB,t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var WB=ll(VB,[["render",qB]]);const YB={},KB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function GB(e,t){return C(),R("svg",KB,t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var QB=ll(YB,[["render",GB]]);const XB={},JB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function ZB(e,t){return C(),R("svg",JB,t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var eV=ll(XB,[["render",ZB]]);const tV={},nV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function rV(e,t){return C(),R("svg",nV,t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var iV=ll(tV,[["render",rV]]);const oV=["aria-label"],sV=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],aV=typeof window<"u"&&typeof document<"u";function lV(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var cV=ze({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},closeButtonPosition:{default:"top-left"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:TB},visibleToasts:{default:CB},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:zE},mobileOffset:{default:BE},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=Ih(),r=re([]),i=se(()=>t.id?r.value.filter(W=>W.toasterId===t.id):r.value.filter(W=>!W.toasterId));function o(W,X){return i.value.filter(K=>!K.position&&X===0||K.position===W)}const s=se(()=>{const W=i.value.filter(X=>X.position).map(X=>X.position);return W.length>0?Array.from(new Set([t.position].concat(W))):[t.position]}),l=se(()=>{const W={};return s.value.forEach(X=>{W[X]=r.value.filter(K=>K.position===X)}),W}),c=re([]),d=re({}),f=re(!1);zn(()=>{s.value.forEach(W=>{W in d.value||(d.value[W]=!1)})});const p=re(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),v=re(null),y=re(null),g=re(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function b(W){r.value.find(X=>X.id===W.id)?.delete||Jn.dismiss(W.id),r.value=r.value.filter(({id:X})=>X!==W.id),setTimeout(()=>{r.value.find(X=>X.id===W.id)||(c.value=c.value.filter(X=>X.toastId!==W.id))},VE+50)}function x(W){g.value&&!W.currentTarget?.contains?.(W.relatedTarget)&&(g.value=!1,y.value&&(y.value.focus({preventScroll:!0}),y.value=null))}function S(W){W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||g.value||(g.value=!0,y.value=W.relatedTarget)}function O(W){W.target&&W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||(f.value=!0)}zn(W=>{const X=Jn.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(L=>L.id===K.id?{...L,delete:!0}:L)});return}gt(()=>{const L=r.value.findIndex(D=>D.id===K.id);L!==-1?r.value=[...r.value.slice(0,L),{...r.value[L],...K},...r.value.slice(L+1)]:r.value=[K,...r.value]})});W(X)}),zn(W=>{if(typeof window>"u")return;if(t.theme!=="system"){p.value=t.theme;return}const X=window.matchMedia("(prefers-color-scheme: dark)"),K=D=>{p.value=D?"dark":"light"};K(X.matches);const L=D=>{K(D.matches)};try{X.addEventListener("change",L)}catch{X.addListener(L)}W(()=>{try{X.removeEventListener("change",L)}catch{X.removeListener(L)}})}),zn(()=>{v.value&&y.value&&(y.value.focus({preventScroll:!0}),y.value=null,g.value=!1)}),zn(()=>{r.value.length<=1&&Object.keys(d.value).forEach(W=>{d.value[W]=!1})}),zn(W=>{function X(K){const L=t.hotkey.every(le=>K[le]||K.code===le),D=Array.isArray(v.value)?v.value[0]:v.value;L&&(s.value.forEach(le=>{d.value[le]=!0}),D?.focus());const ne=document.activeElement===v.value||D?.contains(document.activeElement);K.code==="Escape"&&ne&&s.value.forEach(le=>{d.value[le]=!1})}aV&&(document.addEventListener("keydown",X),W(()=>{document.removeEventListener("keydown",X)}))});function T(W){const X=W.currentTarget,K=X.getAttribute("data-y-position")+"-"+X.getAttribute("data-x-position");d.value[K]=!0}function A(W){if(!f.value){const X=W.currentTarget,K=X.getAttribute("data-y-position")+"-"+X.getAttribute("data-x-position");d.value[K]=!1}}function M(){Object.keys(d.value).forEach(W=>{d.value[W]=!1})}function z(){f.value=!1}function Y(W){c.value=W}function ve(W){const X=c.value.findIndex(K=>K.toastId===W.toastId);if(X!==-1)c.value[X]=W;else{const K=c.value.findIndex(L=>L.position===W.position);K!==-1?c.value.splice(K,0,W):c.value.unshift(W)}}return(W,X)=>(C(),R(We,null,[Se(" Remove item from normal navigation flow, only available via hotkey "),_("section",{"aria-label":`${W.containerAriaLabel} ${w(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),R(We,null,ut(s.value,(K,L)=>(C(),R("ol",Ot({key:K,ref_for:!0,ref_key:"listRef",ref:v,"data-sonner-toaster":"","data-sonner-theme":p.value,class:t.class,dir:W.dir==="auto"?lV():W.dir,tabIndex:-1,"data-theme":W.theme,"data-rich-colors":W.richColors,"data-y-position":K.split("-")[0],"data-x-position":K.split("-")[1],style:{"--front-toast-height":`${c.value[0]?.height||0}px`,"--width":`${w(xB)}px`,"--gap":`${W.gap}px`,...W.style,...w(n).style,...w(AB)(W.offset,W.mobileOffset)}},{ref_for:!0},W.$attrs,{onBlur:x,onFocus:S,onMouseenter:T,onMousemove:T,onMouseleave:A,onDragend:M,onPointerdown:O,onPointerup:z}),[(C(!0),R(We,null,ut(o(K,L),(D,ne)=>(C(),Ee(MB,{key:D.id,heights:c.value,icons:W.icons,index:ne,toast:D,defaultRichColors:W.richColors,duration:W.toastOptions?.duration??W.duration,class:Be(W.toastOptions?.class??""),descriptionClass:W.toastOptions?.descriptionClass,invert:W.invert,visibleToasts:W.visibleToasts,closeButton:W.toastOptions?.closeButton??W.closeButton,interacting:f.value,position:K,closeButtonPosition:W.toastOptions?.closeButtonPosition??W.closeButtonPosition,style:an(W.toastOptions?.style),unstyled:W.toastOptions?.unstyled,classes:W.toastOptions?.classes,cancelButtonStyle:W.toastOptions?.cancelButtonStyle,actionButtonStyle:W.toastOptions?.actionButtonStyle,"close-button-aria-label":W.toastOptions?.closeButtonAriaLabel,toasts:l.value[K],expandByDefault:W.expand,gap:W.gap,expanded:d.value[K]||!1,swipeDirections:t.swipeDirections,"onUpdate:heights":Y,"onUpdate:height":ve,onRemoveToast:b},{"close-icon":Le(()=>[mt(W.$slots,"close-icon",{},()=>[Z(jB)])]),"loading-icon":Le(()=>[mt(W.$slots,"loading-icon",{},()=>[Z(BB,{visible:D.type==="loading"},null,8,["visible"])])]),"success-icon":Le(()=>[mt(W.$slots,"success-icon",{},()=>[Z(WB)])]),"error-icon":Le(()=>[mt(W.$slots,"error-icon",{},()=>[Z(iV)])]),"warning-icon":Le(()=>[mt(W.$slots,"warning-icon",{},()=>[Z(eV)])]),"info-icon":Le(()=>[mt(W.$slots,"info-icon",{},()=>[Z(QB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","closeButtonPosition","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,sV))),128))],8,oV)],2112))}}),uV=cV,Fu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dV=class extends Fu{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},HE=new dV,fV={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},pV=class{#e=fV;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Xp=new pV;function hV(e){setTimeout(e,0)}var mV=typeof window>"u"||"Deno"in globalThis;function Xr(){}function vV(e,t){return typeof e=="function"?e(t):e}function gV(e){return typeof e=="number"&&e>=0&&e!==1/0}function _V(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jp(e,t){return typeof e=="function"?e(t):e}function yV(e,t){return typeof e=="function"?e(t):e}function Eb(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==sm(s,t.options))return!1}else if(!Vs(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function Sb(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ba(t.options.mutationKey)!==Ba(o))return!1}else if(!Vs(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function sm(e,t){return(t?.queryKeyHashFn||Ba)(e)}function Ba(e){return JSON.stringify(e,(t,n)=>Zp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Vs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let r=0;r<t.length;r++)if(!Vs(e[r],t[r]))return!1;return!0}const n=Object.keys(t);for(const r of n)if(!Vs(e[r],t[r]))return!1;return!0}return!1}var bV=Object.prototype.hasOwnProperty;function qE(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Cb(e)&&Cb(t);if(!r&&!(Zp(e)&&Zp(t)))return t;const o=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),l=s.length,c=r?new Array(l):{};let d=0;for(let f=0;f<l;f++){const p=r?f:s[f],v=e[p],y=t[p];if(v===y){c[p]=v,(r?f<o:bV.call(e,p))&&d++;continue}if(v===null||y===null||typeof v!="object"||typeof y!="object"){c[p]=y;continue}const g=qE(v,y,n+1);c[p]=g,g===v&&d++}return o===l&&d===o?e:c}function Cb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zp(e){if(!xb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!xb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xb(e){return Object.prototype.toString.call(e)==="[object Object]"}function wV(e){return new Promise(t=>{Xp.setTimeout(t,e)})}function EV(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?qE(e,t):t}function SV(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function CV(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var am=Symbol();function WE(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===am?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xV(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var YE=(()=>{let e=()=>mV;return{isServer(){return e()},setIsServer(t){e=t}}})();function TV(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var kV=hV;function OV(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=kV;const o=l=>{t?e.push(l):i(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||s()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Bn=OV(),$V=class extends Fu{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},fu=new $V;function AV(e){return Math.min(1e3*2**e,3e4)}function KE(e){return(e??"online")==="online"?fu.isOnline():!0}var pu=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function RV(e){return e instanceof pu}function GE(e){let t=!1,n=0,r;const i=TV(),o=()=>i.status!=="pending",s=m=>{if(!o()){const b=new pu(m);v(b),e.onCancel?.(b)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>HE.isFocused()&&(e.networkMode==="always"||fu.isOnline())&&e.canRun(),f=()=>KE(e.networkMode)&&e.canRun(),p=m=>{o()||(r?.(),i.resolve(m))},v=m=>{o()||(r?.(),i.reject(m))},y=()=>new Promise(m=>{r=b=>{(o()||d())&&m(b)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),g=()=>{if(o())return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(p).catch(x=>{if(o())return;const S=e.retry??(YE.isServer()?0:3),O=e.retryDelay??AV,T=typeof O=="function"?O(n,x):O,A=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,x);if(t||!A){v(x);return}n++,e.onFail?.(n,x),wV(T).then(()=>d()?void 0:y()).then(()=>{t?v(x):g()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?g():y().then(g),i)}}var QE=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gV(this.gcTime)&&(this.#e=Xp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(YE.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Xp.clearTimeout(this.#e),this.#e=void 0)}};function PV(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let f=!1;const p=g=>{xV(g,()=>t.signal,()=>f=!0)},v=WE(t.options,t.fetchOptions),y=async(g,m,b)=>{if(f)return Promise.reject(t.signal.reason);if(m==null&&g.pages.length)return Promise.resolve(g);const S=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:m,direction:b?"backward":"forward",meta:t.options.meta};return p(M),M})(),O=await v(S),{maxPages:T}=t.options,A=b?CV:SV;return{pages:A(g.pages,O,T),pageParams:A(g.pageParams,m,T)}};if(i&&o.length){const g=i==="backward",m=g?IV:Tb,b={pages:o,pageParams:s},x=m(r,b);l=await y(b,x,g)}else{const g=e??o.length;do{const m=c===0?s[0]??r.initialPageParam:Tb(r,l);if(c>0&&m==null)break;l=await y(l,m),c++}while(c<g)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function Tb(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function IV(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var MV=class extends QE{#e;#t;#n;#r;#o;#i;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#r=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ob(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ob(this.options);t.data!==void 0&&(this.setState(kb(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=EV(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Xr).catch(Xr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>yV(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===am||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Jp(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!_V(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#s||this.#u()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const c=WE(this.options,t),f=(()=>{const p={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#s=!1,this.options.persister?this.options.persister(c,f,this):c(f)},s=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:i};return r(c),c})();(this.#e==="infinite"?PV(this.options.pages):this.options.behavior)?.onFetch(s,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#l({type:"fetch",meta:s.fetchOptions?.meta}),this.#i=GE({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:c=>{c instanceof pu&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{this.#l({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const c=await this.#i.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof pu){if(c.silent)return this.#i.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...DV(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...kb(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Bn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function DV(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ob(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var FV=class extends QE{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||LV(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=GE({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,s)=>{this.#o({type:"failed",failureCount:o,error:s})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#o({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const s=await this.options.onMutate?.(e,n);s!==this.state.context&&this.#o({type:"pending",context:s,variables:e,isPaused:i})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(s){Promise.reject(s)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(s){Promise.reject(s)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(s){Promise.reject(s)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Bn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function LV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var XE=class extends Fu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,n,r){const i=new FV({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){this.#e.add(t);const n=Cc(t);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(t):this.#t.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const n=Cc(t);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&this.#t.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Cc(t);if(typeof n=="string"){const i=this.#t.get(n)?.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){const n=Cc(t);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Bn.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sb(n,r))}findAll(t={}){return this.getAll().filter(n=>Sb(t,n))}notify(t){Bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Bn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Xr))))}};function Cc(e){return e.options.scope?.id}var JE=class extends Fu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,n,r){const i=n.queryKey,o=n.queryHash??sm(i,n);let s=this.get(o);return s||(s=new MV({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#e.get(t.queryHash);n&&(t.destroy(),n===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Bn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Eb(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Eb(t,r)):n}notify(t){Bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Bn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Bn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},jV=class{#e;#t;#n;#r;#o;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new JE,this.#t=t.mutationCache||new XE,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=HE.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=fu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Jp(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.defaultQueryOptions({queryKey:t}),s=this.#e.get(i.queryHash)?.state.data,l=vV(n,s);if(l!==void 0)return this.#e.build(this,i).setData(l,{...r,manual:!0})}setQueriesData(t,n,r){return Bn.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state}removeQueries(t){const n=this.#e;Bn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#e;return Bn.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},i=Bn.batch(()=>this.#e.findAll(t).map(o=>o.cancel(r)));return Promise.all(i).then(Xr).catch(Xr)}invalidateQueries(t,n={}){return Bn.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=Bn.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,r);return r.throwOnError||(s=s.catch(Xr)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(Xr)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Jp(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Xr).catch(Xr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Xr).catch(Xr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return fu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,n){this.#r.set(Ba(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#r.values()],r={};return n.forEach(i=>{Vs(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,n){this.#o.set(Ba(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#o.values()],r={};return n.forEach(i=>{Vs(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=sm(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===am&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function eh(e,t,n="",r=0){if(t){const i=t(e,n,r);if(i===void 0&&Za(e)||i!==void 0)return i}if(Array.isArray(e))return e.map((i,o)=>eh(i,t,String(o),r+1));if(typeof e=="object"&&NV(e)){const i=Object.entries(e).map(([o,s])=>[o,eh(s,t,o,r+1)]);return Object.fromEntries(i)}return e}function UV(e,t){return eh(e,t)}function kt(e,t=!1){return UV(e,(n,r,i)=>{if(i===1&&r==="queryKey")return kt(n,!0);if(t&&zV(n))return kt(n(),t);if(Za(n))return kt(w(n),t)})}function NV(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function zV(e){return typeof e=="function"}var BV=class extends JE{find(e){return super.find(kt(e))}findAll(e={}){return super.findAll(kt(e))}},VV=class extends XE{find(e){return super.find(kt(e))}findAll(e={}){return super.findAll(kt(e))}},HV=class extends jV{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new BV,mutationCache:e.mutationCache||new VV};super(t),this.isRestoring=re(!1)}isFetching(e={}){return super.isFetching(kt(e))}isMutating(e={}){return super.isMutating(kt(e))}getQueryData(e){return super.getQueryData(kt(e))}ensureQueryData(e){return super.ensureQueryData(kt(e))}getQueriesData(e){return super.getQueriesData(kt(e))}setQueryData(e,t,n={}){return super.setQueryData(kt(e),t,kt(n))}setQueriesData(e,t,n={}){return super.setQueriesData(kt(e),t,kt(n))}getQueryState(e){return super.getQueryState(kt(e))}removeQueries(e={}){return super.removeQueries(kt(e))}resetQueries(e={},t={}){return super.resetQueries(kt(e),kt(t))}cancelQueries(e={},t={}){return super.cancelQueries(kt(e),kt(t))}invalidateQueries(e={},t={}){const n=kt(e),r=kt(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const i={...n,type:n.refetchType??n.type??"active"};return gt().then(()=>super.refetchQueries(i,r))}refetchQueries(e={},t={}){return super.refetchQueries(kt(e),kt(t))}fetchQuery(e){return super.fetchQuery(kt(e))}prefetchQuery(e){return super.prefetchQuery(kt(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(kt(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(kt(e))}setDefaultOptions(e){super.setDefaultOptions(kt(e))}setQueryDefaults(e,t){super.setQueryDefaults(kt(e),kt(t))}getQueryDefaults(e){return super.getQueryDefaults(kt(e))}setMutationDefaults(e,t){super.setMutationDefaults(kt(e),kt(t))}getMutationDefaults(e){return super.getMutationDefaults(kt(e))}};class th extends Error{cause;isNetworkError;request;constructor(t,n=null){super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=n}}class qV{#e;#t=!1;#n;#r;constructor(t,n){this.#r=t,this.#n=()=>n(t)}progress(){this.#t||this.#r>0&&(clearTimeout(this.#e),this.#e=setTimeout(this.#n,this.#r))}done(){this.#t||(clearTimeout(this.#e),this.#e=void 0,this.#t=!0)}}const xc=()=>{};function WV(e,t={}){const{body:n=null,headers:r={},method:i="GET",onBeforeRequest:o=xc,onUploadProgress:s=xc,shouldRetry:l=()=>!0,onAfterResponse:c=xc,onTimeout:d=xc,responseType:f,retries:p=3,signal:v=null,timeout:y=3e4,withCredentials:g=!1}=t,m=S=>.3*2**(S-1)*1e3,b=new qV(y,d);function x(S=0){return new Promise(async(O,T)=>{const A=new XMLHttpRequest,M=Y=>{l(A)&&S<p?setTimeout(()=>{x(S+1).then(O,T)},m(S)):(b.done(),T(Y))};A.open(i,e,!0),A.withCredentials=g,f&&(A.responseType=f),A.onload=async()=>{try{await c(A,S)}catch(Y){Y.request=A,M(Y);return}A.status>=200&&A.status<300?(b.done(),O(A)):l(A)&&S<p?setTimeout(()=>{x(S+1).then(O,T)},m(S)):(b.done(),T(new th(A.statusText,A)))},A.onerror=()=>M(new th(A.statusText,A)),A.upload.onprogress=Y=>{b.progress(),s(Y)},r&&Object.keys(r).forEach(Y=>{A.setRequestHeader(Y,r[Y])});function z(){A.abort(),T(new DOMException("Aborted","AbortError"))}if(v?.addEventListener("abort",z),v?.aborted){z();return}await o(A,S),A.send(n)})}return x()}const YV=e=>"error"in e&&!!e.error,KV=e=>e.progress.uploadComplete;function GV(e){return e.filter(t=>!YV(t)&&!KV(t))}function QV(e){return e.filter(t=>!t.progress?.uploadStarted||!t.isRestored)}function ZE(e){const t=e.lastIndexOf(".");return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}const $b={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function eS(e){if(e.type)return e.type;const t=e.name?ZE(e.name).extension?.toLowerCase():null;return t&&t in $b?$b[t]:"application/octet-stream"}function XV(e){return e.charCodeAt(0).toString(32)}function Ab(e){let t="";return e.replace(/[^A-Z0-9]/gi,n=>(t+=`-${XV(n)}`,"/"))+t}function JV(e,t){let n=t||"uppy";return typeof e.name=="string"&&(n+=`-${Ab(e.name.toLowerCase())}`),e.type!==void 0&&(n+=`-${e.type}`),e.meta&&typeof e.meta.relativePath=="string"&&(n+=`-${Ab(e.meta.relativePath.toLowerCase())}`),e.data?.size!==void 0&&(n+=`-${e.data.size}`),e.data.lastModified!==void 0&&(n+=`-${e.data.lastModified}`),n}function ZV(e){return!e.isRemote||!e.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}function e6(e,t){if(ZV(e))return e.id;const n=eS(e);return JV({...e,type:n},t)}function Rb(e,t){return e===!0?Object.keys(t):Array.isArray(e)?e:[]}function Bf(e){return e<10?`0${e}`:e.toString()}function Xc(){const e=new Date,t=Bf(e.getHours()),n=Bf(e.getMinutes()),r=Bf(e.getSeconds());return`${t}:${n}:${r}`}function t6(e){return e?e.readyState===4&&e.status===0:!1}class n6{#e=[];#t=0;#n;#r=!1;constructor(t){const n=t?.concurrency;this.#n=typeof n!="number"||n===0?1/0:n}add(t){const n=new AbortController;let r,i;const o=new Promise((l,c)=>{r=l,i=c}),s={run:()=>t(n.signal),resolve:r,reject:i,controller:n};return n.signal.addEventListener("abort",()=>{const l=this.#e.indexOf(s);l!==-1&&(this.#e.splice(l,1),i(n.signal.reason??new DOMException("Aborted","AbortError")))},{once:!0}),o.abort=l=>{n.abort(l??new DOMException("Aborted","AbortError"))},o.abortOn=l=>{if(l){const c=()=>o.abort(l.reason);l.addEventListener("abort",c,{once:!0}),o.then(()=>l.removeEventListener("abort",c),()=>l.removeEventListener("abort",c))}return o},!this.#r&&this.#t<this.#n?this.#o(s):this.#e.push(s),o}#o(t){if(this.#t++,t.controller.signal.aborted){this.#t--,t.reject(t.controller.signal.reason??new DOMException("Aborted","AbortError")),this.#i();return}let n;try{n=t.run()}catch(r){n=Promise.reject(r)}n.then(r=>{t.controller.signal.aborted?t.reject(t.controller.signal.reason??new DOMException("Aborted","AbortError")):t.resolve(r)},r=>{t.reject(r)}).finally(()=>{this.#t--,this.#i()})}#i(){queueMicrotask(()=>{if(!(this.#r||this.#t>=this.#n))for(;this.#e.length>0;){const t=this.#e.shift();if(!t.controller.signal.aborted){this.#o(t);return}}})}pause(){this.#r=!0}resume(){this.#r=!1;const t=this.#n-this.#t;for(let n=0;n<t;n++)this.#i()}clear(t){const n=this.#e.splice(0),r=t??new DOMException("Cleared","AbortError");for(const i of n)i.controller.abort(r),i.reject(r)}get concurrency(){return this.#n}set concurrency(t){if(this.#n=typeof t!="number"||t===0?1/0:t,!this.#r){const n=this.#n-this.#t;for(let r=0;r<n;r++)this.#i()}}get pending(){return this.#e.length}get running(){return this.#t}get isPaused(){return this.#r}wrapPromiseFunction(t){return(...n)=>this.add(r=>t(...n))}}function r6(e,t,n){const r=[];return e.forEach(i=>typeof i!="string"?r.push(i):t[Symbol.split](i).forEach((o,s,l)=>{o!==""&&r.push(o),s<l.length-1&&r.push(n)})),r}function Pb(e,t){const n=/\$/g,r="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let s=t[o];typeof s=="string"&&(s=n[Symbol.replace](s,r)),i=r6(i,new RegExp(`%\\{${o}\\}`,"g"),s)}return i}const i6=e=>{throw new Error(`missing string: ${e}`)};class tS{locale;constructor(t,{onMissingKey:n=i6}={}){this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(t)?t.forEach(this.#t,this):this.#t(t),this.#e=n}#e;#t(t){if(!t?.strings)return;const n=this.locale;Object.assign(this.locale,{strings:{...n.strings,...t.strings},pluralize:t.pluralize||n.pluralize})}translate(t,n){return this.translateArray(t,n).join("")}translateArray(t,n){let r=this.locale.strings[t];if(r==null&&(this.#e(t),r=t),typeof r=="object"){if(n&&typeof n.smart_count<"u"){const o=this.locale.pluralize(n.smart_count);return Pb(r[o],n)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof r!="string")throw new Error("string was not a string");return Pb(r,n)}}class o6{uppy;opts;id;defaultLocale;i18n;i18nArray;type;VERSION;constructor(t,n){this.uppy=t,this.opts=n??{}}getPluginState(){const{plugins:t}=this.uppy.getState();return t?.[this.id]||{}}setPluginState(t){const{plugins:n}=this.uppy.getState();this.uppy.setState({plugins:{...n,[this.id]:{...n[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const t=new tS([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState(void 0)}addTarget(t){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(t){}afterUpdate(){}}class s6{#e;#t=[];constructor(t){this.#e=t}on(t,n){return this.#t.push([t,n]),this.#e.on(t,n)}remove(){for(const[t,n]of this.#t.splice(0))this.#e.off(t,n)}onFilePause(t,n){this.on("upload-pause",(r,i)=>{t===r?.id&&n(i)})}onFileRemove(t,n){this.on("file-removed",r=>{t===r.id&&n(r.id)})}onPause(t,n){this.on("upload-pause",(r,i)=>{t===r?.id&&n(i)})}onRetry(t,n){this.on("upload-retry",r=>{t===r?.id&&n()})}onRetryAll(t,n){this.on("retry-all",()=>{this.#e.getFile(t)&&n()})}onPauseAll(t,n){this.on("pause-all",()=>{this.#e.getFile(t)&&n()})}onCancelAll(t,n){this.on("cancel-all",(...r)=>{this.#e.getFile(t)&&n(...r)})}onResumeAll(t,n){this.on("resume-all",()=>{this.#e.getFile(t)&&n()})}}const a6={debug:()=>{},warn:()=>{},error:(...e)=>console.error(`[Uppy] [${Xc()}]`,...e)},l6={debug:(...e)=>console.debug(`[Uppy] [${Xc()}]`,...e),warn:(...e)=>console.warn(`[Uppy] [${Xc()}]`,...e),error:(...e)=>console.error(`[Uppy] [${Xc()}]`,...e)};var Vf,Ib;function c6(){return Ib||(Ib=1,Vf=function(t){if(typeof t!="number"||Number.isNaN(t))throw new TypeError(`Expected a number, got ${typeof t}`);const n=t<0;let r=Math.abs(t);if(n&&(r=-r),r===0)return"0 B";const i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(r)/Math.log(1024)),i.length-1),s=Number(r/1024**o),l=i[o];return`${s>=10||s%1===0?Math.round(s):s.toFixed(1)} ${l}`}),Vf}var u6=c6();const Tc=rs(u6);var Hf,Mb;function d6(){if(Mb)return Hf;Mb=1;function e(t,n){this.text=t=t||"",this.hasWild=~t.indexOf("*"),this.separator=n,this.parts=t.split(n)}return e.prototype.match=function(t){var n=!0,r=this.parts,i,o=r.length,s;if(typeof t=="string"||t instanceof String)if(!this.hasWild&&this.text!=t)n=!1;else{for(s=(t||"").split(this.separator),i=0;n&&i<o;i++)r[i]!=="*"&&(i<s.length?n=r[i]===s[i]:n=!1);n=n&&s}else if(typeof t.splice=="function")for(n=[],i=t.length;i--;)this.match(t[i])&&(n[n.length]=t[i]);else if(typeof t=="object"){n={};for(var l in t)this.match(l)&&(n[l]=t[l])}return n},Hf=function(t,n,r){var i=new e(t,r||/[\/\.]/);return typeof n<"u"?i.match(n):i},Hf}var qf,Db;function f6(){if(Db)return qf;Db=1;var e=d6(),t=/[\/\+\.]/;return qf=function(n,r){function i(o){var s=e(o,n,t);return s&&s.length>=2}return r?i(r.split(";")[0]):i},qf}var p6=f6();const h6=rs(p6),m6={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class Zr extends Error{isUserFacing;file;constructor(t,n){super(t),this.isUserFacing=n?.isUserFacing??!0,n?.file&&(this.file=n.file)}isRestriction=!0}class v6{getI18n;getOpts;constructor(t,n){this.getI18n=n,this.getOpts=()=>{const r=t();if(r.restrictions?.allowedFileTypes!=null&&!Array.isArray(r.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return r}}validateAggregateRestrictions(t,n){const{maxTotalFileSize:r,maxNumberOfFiles:i}=this.getOpts().restrictions;if(i&&t.filter(s=>!s.isGhost).length+n.length>i)throw new Zr(`${this.getI18n()("youCanOnlyUploadX",{smart_count:i})}`);if(r){const o=[...t,...n].reduce((s,l)=>s+(l.size??0),0);if(o>r)throw new Zr(this.getI18n()("aggregateExceedsSize",{sizeAllowed:Tc(r),size:Tc(o)}))}}validateSingleFile(t){const{maxFileSize:n,minFileSize:r,allowedFileTypes:i}=this.getOpts().restrictions;if(i&&!i.some(s=>s.includes("/")?t.type?h6(t.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&t.extension?t.extension.toLowerCase()===s.slice(1).toLowerCase():!1)){const s=i.join(", ");throw new Zr(this.getI18n()("youCanOnlyUploadFileTypes",{types:s}),{file:t})}if(n&&t.size!=null&&t.size>n)throw new Zr(this.getI18n()("exceedsSize",{size:Tc(n),file:t.name??this.getI18n()("unnamed")}),{file:t});if(r&&t.size!=null&&t.size<r)throw new Zr(this.getI18n()("inferiorSize",{size:Tc(r)}),{file:t})}validate(t,n){n.forEach(r=>{this.validateSingleFile(r)}),this.validateAggregateRestrictions(t,n)}validateMinNumberOfFiles(t){const{minNumberOfFiles:n}=this.getOpts().restrictions;if(n&&Object.keys(t).length<n)throw new Zr(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:n}))}getMissingRequiredMetaFields(t){const n=new Zr(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:t.name??this.getI18n()("unnamed")})),{requiredMetaFields:r}=this.getOpts().restrictions,i=[];for(const o of r)(!Object.hasOwn(t.meta,o)||t.meta[o]==="")&&i.push(o);return{missingFields:i,error:n}}}const g6="5.0.0",_6={version:g6};class y6{static VERSION=_6.version;state={};#e=new Set;getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,this.#t(n,r,t)}subscribe(t){return this.#e.add(t),()=>{this.#e.delete(t)}}#t(...t){this.#e.forEach(n=>{n(...t)})}}var Wf,Fb;function lm(){if(Fb)return Wf;Fb=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Wf=e,Wf}var Yf,Lb;function b6(){if(Lb)return Yf;Lb=1;var e=typeof cc=="object"&&cc&&cc.Object===Object&&cc;return Yf=e,Yf}var Kf,jb;function nS(){if(jb)return Kf;jb=1;var e=b6(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Kf=n,Kf}var Gf,Ub;function w6(){if(Ub)return Gf;Ub=1;var e=nS(),t=function(){return e.Date.now()};return Gf=t,Gf}var Qf,Nb;function E6(){if(Nb)return Qf;Nb=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Qf=t,Qf}var Xf,zb;function S6(){if(zb)return Xf;zb=1;var e=E6(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Xf=n,Xf}var Jf,Bb;function rS(){if(Bb)return Jf;Bb=1;var e=nS(),t=e.Symbol;return Jf=t,Jf}var Zf,Vb;function C6(){if(Vb)return Zf;Vb=1;var e=rS(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(s){var l=n.call(s,i),c=s[i];try{s[i]=void 0;var d=!0}catch{}var f=r.call(s);return d&&(l?s[i]=c:delete s[i]),f}return Zf=o,Zf}var ep,Hb;function x6(){if(Hb)return ep;Hb=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ep=n,ep}var tp,qb;function T6(){if(qb)return tp;qb=1;var e=rS(),t=C6(),n=x6(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?i:r:o&&o in Object(l)?t(l):n(l)}return tp=s,tp}var np,Wb;function k6(){if(Wb)return np;Wb=1;function e(t){return t!=null&&typeof t=="object"}return np=e,np}var rp,Yb;function O6(){if(Yb)return rp;Yb=1;var e=T6(),t=k6(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return rp=r,rp}var ip,Kb;function $6(){if(Kb)return ip;Kb=1;var e=S6(),t=lm(),n=O6(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=t(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=o.test(d);return p||s.test(d)?l(d.slice(2),p?2:8):i.test(d)?r:+d}return ip=c,ip}var op,Gb;function A6(){if(Gb)return op;Gb=1;var e=lm(),t=w6(),n=$6(),r="Expected a function",i=Math.max,o=Math.min;function s(l,c,d){var f,p,v,y,g,m,b=0,x=!1,S=!1,O=!0;if(typeof l!="function")throw new TypeError(r);c=n(c)||0,e(d)&&(x=!!d.leading,S="maxWait"in d,v=S?i(n(d.maxWait)||0,c):v,O="trailing"in d?!!d.trailing:O);function T(L){var D=f,ne=p;return f=p=void 0,b=L,y=l.apply(ne,D),y}function A(L){return b=L,g=setTimeout(Y,c),x?T(L):y}function M(L){var D=L-m,ne=L-b,le=c-D;return S?o(le,v-ne):le}function z(L){var D=L-m,ne=L-b;return m===void 0||D>=c||D<0||S&&ne>=v}function Y(){var L=t();if(z(L))return ve(L);g=setTimeout(Y,M(L))}function ve(L){return g=void 0,O&&f?T(L):(f=p=void 0,y)}function W(){g!==void 0&&clearTimeout(g),b=0,f=m=p=g=void 0}function X(){return g===void 0?y:ve(t())}function K(){var L=t(),D=z(L);if(f=arguments,p=this,m=L,D){if(g===void 0)return A(m);if(S)return clearTimeout(g),g=setTimeout(Y,c),T(m)}return g===void 0&&(g=setTimeout(Y,c)),y}return K.cancel=W,K.flush=X,K}return op=s,op}var sp,Qb;function R6(){if(Qb)return sp;Qb=1;var e=A6(),t=lm(),n="Expected a function";function r(i,o,s){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(s)&&(l="leading"in s?!!s.leading:l,c="trailing"in s?!!s.trailing:c),e(i,o,{leading:l,maxWait:o,trailing:c})}return sp=r,sp}var P6=R6();const I6=rs(P6);var ap,Xb;function M6(){return Xb||(Xb=1,ap=function(){var t={},n=t._fns={};t.emit=function(s,l,c,d,f,p,v){var y=r(s);y.length&&i(s,y,[l,c,d,f,p,v])},t.on=function(s,l){n[s]||(n[s]=[]),n[s].push(l)},t.once=function(s,l){function c(){l.apply(this,arguments),t.off(s,c)}this.on(s,c)},t.off=function(s,l){var c=[];if(s&&l){var d=this._fns[s],f=0,p=d?d.length:0;for(f;f<p;f++)d[f]!==l&&c.push(d[f])}c.length?this._fns[s]=c:delete this._fns[s]};function r(o){var s=n[o]?n[o]:[],l=o.indexOf(":"),c=l===-1?[o]:[o.substring(0,l),o.substring(l+1)],d=Object.keys(n),f=0,p=d.length;for(f;f<p;f++){var v=d[f];if(v==="*"&&(s=s.concat(n[v])),c.length===2&&c[0]===v){s=s.concat(n[v]);break}}return s}function i(o,s,l){var c=0,d=s.length;for(c;c<d&&s[c];c++)s[c].event=o,s[c].apply(s[c],l)}return t}),ap}var D6=M6();const F6=rs(D6);let L6="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",j6=(e=21)=>{let t="",n=e|0;for(;n-- >0;)t+=L6[Math.random()*64|0];return t};const U6="5.2.0",N6={version:U6};function z6(e,t){return t.name?t.name:e.split("/")[0]==="image"?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}const B6={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function V6(e){if(e==null&&typeof navigator<"u"&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const r=t[1].split(".",2),i=parseInt(r[0],10),o=parseInt(r[1],10);return i<15||i===15&&o<15063||i>18||i===18&&o>=18218}const kc={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};class cm{static VERSION=N6.version;#e=Object.create(null);#t;#n;#r=F6();#o=new Set;#i=new Set;#a=new Set;defaultLocale;locale;opts;store;i18n;i18nArray;scheduledAutoProceed=null;wasOffline=!1;constructor(t){this.defaultLocale=B6;const n={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:m6,meta:{},onBeforeFileAdded:(i,o)=>!Object.hasOwn(o,i.id),onBeforeUpload:i=>i,store:new y6,logger:a6,infoTimeout:5e3},r={...n,...t};this.opts={...r,restrictions:{...n.restrictions,...t?.restrictions}},t?.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t?.debug&&(this.opts.logger=l6),this.log(`Using Core v${cm.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...kc,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:V6(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),this.#t=new v6(()=>this.opts,()=>this.i18n),this.#n=this.store.subscribe((i,o,s)=>{this.emit("state-update",i,o,s),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),this.#x()}emit(t,...n){this.#r.emit(t,...n)}on(t,n){return this.#r.on(t,n),this}once(t,n){return this.#r.once(t,n),this}off(t,n){return this.#r.off(t,n),this}updateAll(t){this.iteratePlugins(n=>{n.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}patchFilesState(t){const n=this.getState().files;this.setState({files:{...n,...Object.fromEntries(Object.entries(t).map(([r,i])=>[r,{...n[r],...i}]))}})}setFileState(t,n){if(!this.getState().files[t])throw new Error(`Can’t set state for ${t} (the file could have been removed)`);this.patchFilesState({[t]:n})}i18nInit(){const t=r=>this.log(`Missing i18n string: ${r}`,"error"),n=new tS([this.defaultLocale,this.opts.locale],{onMissingKey:t});this.i18n=n.translate.bind(n),this.i18nArray=n.translateArray.bind(n),this.locale=n.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t?.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(n=>{n.setOptions(t)}),this.setState(void 0)}resetProgress(){const t={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r=Object.create(null);Object.keys(n).forEach(i=>{r[i]={...n[i],progress:{...n[i].progress,...t},tus:void 0,transloadit:void 0}}),this.setState({files:r,...kc})}clear(){const{capabilities:t,currentUploads:n}=this.getState();if(Object.keys(n).length>0&&!t.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...kc,files:{}})}addPreProcessor(t){this.#o.add(t)}removePreProcessor(t){return this.#o.delete(t)}addPostProcessor(t){this.#a.add(t)}removePostProcessor(t){return this.#a.delete(t)}addUploader(t){this.#i.add(t)}removeUploader(t){return this.#i.delete(t)}setMeta(t){const n={...this.getState().meta,...t},r={...this.getState().files};Object.keys(r).forEach(i=>{r[i]={...r[i],meta:{...r[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:n,files:r})}setFileMeta(t,n){const r={...this.getState().files};if(!r[t]){this.log(`Was trying to set metadata for a file that has been removed: ${t}`);return}const i={...r[t].meta,...n};r[t]={...r[t],meta:i},this.setState({files:r})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getFilesByIds(t){return t.map(n=>this.getFile(n))}getObjectOfFilesPerState(){const{files:t,totalProgress:n,error:r}=this.getState(),i=Object.values(t),o=[],s=[],l=[],c=[],d=[],f=[],p=[],v=[],y=[];for(const g of i){const{progress:m}=g;!m.uploadComplete&&m.uploadStarted&&(o.push(g),g.isPaused||v.push(g)),m.uploadStarted||s.push(g),(m.uploadStarted||m.preprocess||m.postprocess)&&l.push(g),m.uploadStarted&&c.push(g),g.isPaused&&d.push(g),m.uploadComplete&&f.push(g),g.error&&p.push(g),(m.preprocess||m.postprocess)&&y.push(g)}return{newFiles:s,startedFiles:l,uploadStartedFiles:c,pausedFiles:d,completeFiles:f,erroredFiles:p,inProgressFiles:o,inProgressNotPausedFiles:v,processingFiles:y,isUploadStarted:c.length>0,isAllComplete:n===100&&f.length===i.length&&y.length===0,isAllErrored:!!r&&p.length===i.length,isAllPaused:o.length!==0&&d.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(g=>g.isGhost)}}#s(t){for(const s of t)s.isRestriction?this.emit("restriction-failed",s.file,s):this.emit("error",s,s.file),this.log(s,"warning");const n=t.filter(s=>s.isUserFacing),r=4,i=n.slice(0,r),o=n.slice(r);i.forEach(({message:s,details:l=""})=>{this.info({message:s,details:l},"error",this.opts.infoTimeout)}),o.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:o.length})})}validateRestrictions(t,n=this.getFiles()){try{this.#t.validate(n,[t])}catch(r){return r}return null}validateSingleFile(t){try{this.#t.validateSingleFile(t)}catch(n){return n.message}return null}validateAggregateRestrictions(t){const n=this.getFiles();try{this.#t.validateAggregateRestrictions(n,t)}catch(r){return r.message}return null}#u(t){const{missingFields:n,error:r}=this.#t.getMissingRequiredMetaFields(t);return n.length>0?(this.setFileState(t.id,{missingRequiredMetaFields:n,error:r.message}),this.log(r.message),this.emit("restriction-failed",t,r),!1):(n.length===0&&t.missingRequiredMetaFields&&this.setFileState(t.id,{missingRequiredMetaFields:[]}),!0)}#l(t){let n=!0;for(const r of Object.values(t))this.#u(r)||(n=!1);return n}#w(t){const{allowNewUpload:n}=this.getState();if(n===!1){const r=new Zr(this.i18n("noMoreFilesAllowed"),{file:t});throw this.#s([r]),r}}checkIfFileAlreadyExists(t){const{files:n}=this.getState();return!!(n[t]&&!n[t].isGhost)}#E(t){const n=t instanceof File?{name:t.name,type:t.type,size:t.size,data:t,meta:{},isRemote:!1,source:void 0,preview:void 0}:t,r=eS(n),i=z6(r,n),o=ZE(i).extension,s=e6(n,this.getID()),l={...n.meta,name:i,type:r},c=Number.isFinite(n.data.size)?n.data.size:null;return{source:n.source||"",id:s,name:i,extension:o||"",meta:{...this.getState().meta,...l},type:r,progress:{percentage:0,bytesUploaded:!1,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isGhost:!1,...n.isRemote?{isRemote:!0,remote:n.remote,data:n.data}:{isRemote:!1,data:n.data},preview:n.preview}}#h(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(t=>{t.isRestriction||this.log(t.stack||t.message||t)})},4))}#m(t){let{files:n}=this.getState(),r={...n};const i=[],o=[];for(const s of t)try{let l=this.#E(s);this.#w(l);const c=n[l.id],d=c?.isGhost;if(d&&!l.isRemote){if(l.data==null)throw new Error("File data is missing");l={...c,isGhost:!1,data:l.data},this.log(`Replaced the blob in the restored ghost file: ${l.name}, ${l.id}`)}const f=this.opts.onBeforeFileAdded(l,r);if(n=this.getState().files,r={...n,...r},!f&&this.checkIfFileAlreadyExists(l.id))throw new Zr(this.i18n("noDuplicates",{fileName:l.name??this.i18n("unnamed")}),{file:l});if(f===!1&&!d)throw new Zr("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:l});typeof f=="object"&&f!==null&&(l=f),this.#t.validateSingleFile(l),r[l.id]=l,i.push(l)}catch(l){o.push(l)}try{this.#t.validateAggregateRestrictions(Object.values(n),i)}catch(s){return o.push(s),{nextFilesState:n,validFilesToAdd:[],errors:o}}return{nextFilesState:r,validFilesToAdd:i,errors:o}}addFile(t){const{nextFilesState:n,validFilesToAdd:r,errors:i}=this.#m([t]),o=i.filter(l=>l.isRestriction);if(this.#s(o),i.length>0)throw i[0];this.setState({files:n});const[s]=r;return this.emit("file-added",s),this.emit("files-added",r),this.log(`Added file: ${s.name}, ${s.id}, mime type: ${s.type}`),this.#h(),s.id}addFiles(t){const{nextFilesState:n,validFilesToAdd:r,errors:i}=this.#m(t),o=i.filter(l=>l.isRestriction);this.#s(o);const s=i.filter(l=>!l.isRestriction);if(s.length>0){let l=`Multiple errors occurred while adding files:
36
- `;if(s.forEach(c=>{l+=`
37
- * ${c.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:l},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(s,l);{const c=new Error(l);throw c.errors=s,c}}this.setState({files:n}),r.forEach(l=>{this.emit("file-added",l)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.values(r).forEach(l=>{this.log(`Added file: ${l.name}
38
- id: ${l.id}
39
- type: ${l.type}`)}),r.length>0&&this.#h()}removeFiles(t){const{files:n,currentUploads:r}=this.getState(),i={...n},o={...r},s=Object.create(null);t.forEach(f=>{n[f]&&(s[f]=n[f],delete i[f])});function l(f){return s[f]===void 0}Object.keys(o).forEach(f=>{const p=r[f].fileIDs.filter(l);if(p.length===0){delete o[f];return}const{capabilities:v}=this.getState();if(p.length!==r[f].fileIDs.length&&!v.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");o[f]={...r[f],fileIDs:p}});const c={currentUploads:o,files:i};Object.keys(i).length===0&&(c.allowNewUpload=!0,c.error=null,c.recoveredState=null),this.setState(c),this.#d();const d=Object.keys(s);d.forEach(f=>{this.emit("file-removed",s[f])}),d.length>5?this.log(`Removed ${d.length} files`):this.log(`Removed files: ${d.join(", ")}`)}removeFile(t){this.removeFiles([t])}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).progress.uploadComplete)return;const n=this.getFile(t),i=!(n.isPaused||!1);return this.setFileState(t,{isPaused:i}),this.emit("upload-pause",n,i),i}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}#v(){const{files:t}=this.getState();return Object.keys(t).filter(n=>{const r=t[n];return r.error&&(!r.missingRequiredMetaFields||r.missingRequiredMetaFields.length===0)})}async#g(){const t=this.#v(),n={...this.getState().files};if(t.forEach(i=>{n[i]={...n[i],isPaused:!1,error:null}}),this.setState({files:n,error:null}),this.emit("retry-all",this.getFilesByIds(t)),t.length===0)return{successful:[],failed:[]};const r=this.#f(t,{forceAllowNewUpload:!0});return this.#p(r)}async retryAll(){const t=await this.#g();return this.emit("complete",t),t}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n),this.setState(kc)}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(t));const n=this.#f([t],{forceAllowNewUpload:!0});return this.#p(n)}logout(){this.iteratePlugins(t=>{t.provider?.logout?.()})}#S=(t,n)=>{const r=t?this.getFile(t.id):void 0;if(t==null||!r){this.log(`Not setting progress for a file that has been removed: ${t?.id}`);return}if(r.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${t.id}`);return}const i={bytesTotal:n.bytesTotal,percentage:n.bytesTotal!=null&&Number.isFinite(n.bytesTotal)&&n.bytesTotal>0?Math.round(n.bytesUploaded/n.bytesTotal*100):void 0};r.progress.uploadStarted!=null?this.setFileState(t.id,{progress:{...r.progress,...i,bytesUploaded:n.bytesUploaded}}):this.setFileState(t.id,{progress:{...r.progress,...i}}),this.#d()};#_(){const t=this.#C();let n=null;t!=null&&(n=Math.round(t*100),n>100?n=100:n<0&&(n=0)),this.emit("progress",n??0),this.setState({totalProgress:n??0})}#d=I6(()=>this.#_(),500,{leading:!0,trailing:!0});[Symbol.for("uppy test: updateTotalProgress")](){return this.#_()}#C(){const n=this.getFiles().filter(c=>c.progress.uploadStarted||c.progress.preprocess||c.progress.postprocess);if(n.length===0)return 0;if(n.every(c=>c.progress.uploadComplete))return 1;const r=c=>c.progress.bytesTotal!=null&&c.progress.bytesTotal!==0,i=n.filter(r),o=n.filter(c=>!r(c));if(i.every(c=>c.progress.uploadComplete)&&o.length>0&&!o.every(c=>c.progress.uploadComplete))return null;const s=i.reduce((c,d)=>c+(d.progress.bytesTotal??0),0),l=i.reduce((c,d)=>c+(d.progress.bytesUploaded||0),0);return s===0?0:l/s}#x(){const t=(i,o,s)=>{let l=i.message||"Unknown error";i.details&&(l+=` ${i.details}`),this.setState({error:l}),o!=null&&o.id in this.getState().files&&this.setFileState(o.id,{error:l,response:s})};this.on("error",t),this.on("upload-error",(i,o,s)=>{if(t(o,i,s),typeof o=="object"&&o.message){this.log(o.message,"error");const l=new Error(this.i18n("failedToUpload",{file:i?.name??""}));l.isUserFacing=!0,l.details=o.message,o.details&&(l.details+=` ${o.details}`),this.#s([l])}else this.#s([o])});let n=null;this.on("upload-stalled",(i,o)=>{const{message:s}=i,l=o.map(c=>c.meta.name).join(", ");n||(this.info({message:s,details:l},"warning",this.opts.infoTimeout),n=setTimeout(()=>{n=null},this.opts.infoTimeout)),this.log(`${s} ${l}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const r=i=>{const o=i.filter(l=>{const c=l!=null&&this.getFile(l.id);return c||this.log(`Not setting progress for a file that has been removed: ${l?.id}`),c}),s=Object.fromEntries(o.map(l=>[l.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:l.size}}]));this.patchFilesState(s)};this.on("upload-start",r),this.on("upload-progress",this.#S),this.on("upload-success",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const s=this.getFile(i.id).progress,l=this.#a.size>0;this.setFileState(i.id,{progress:{...s,postprocess:l?{mode:"indeterminate"}:void 0,uploadComplete:!0,...!l&&{complete:!0},percentage:100,bytesUploaded:s.bytesTotal},response:o,uploadURL:o.uploadURL,isPaused:!1}),i.size==null&&this.setFileState(i.id,{size:o.bytesUploaded||s.bytesTotal}),this.#d()}),this.on("preprocess-progress",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getFile(i.id).progress,preprocess:o}})}),this.on("preprocess-complete",i=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const o={...this.getState().files};o[i.id]={...o[i.id],progress:{...o[i.id].progress}},delete o[i.id].progress.preprocess,this.setState({files:o})}),this.on("postprocess-progress",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getState().files[i.id].progress,postprocess:o}})}),this.on("postprocess-complete",i=>{const o=i&&this.getFile(i.id);if(o==null){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const{postprocess:s,...l}=o.progress;this.patchFilesState({[o.id]:{progress:{...l,complete:!0}}})}),this.on("restored",()=>{this.#d()}),this.on("dashboard:file-edit-complete",i=>{i&&this.#u(i)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",this.#c),window.addEventListener("offline",this.#c),setTimeout(this.#c,3e3))}updateOnlineStatus(){window.navigator.onLine??!0?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}#c=this.updateOnlineStatus.bind(this);getID(){return this.opts.id}use(t,...n){if(typeof t!="function"){const s=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(s)}const r=new t(this,...n),i=r.id;if(!i)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const s=`Already found a plugin named '${o.id}'. Tried to use: '${i}'.
40
- Uppy plugins must have unique \`id\` options.`;throw new Error(s)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in this.#e?this.#e[r.type].push(r):this.#e[r.type]=[r],r.install(),this.emit("plugin-added",r),this}getPlugin(t){for(const n of Object.values(this.#e)){const r=n.find(i=>i.id===t);if(r!=null)return r}}[Symbol.for("uppy test: getPlugins")](t){return this.#e[t]}iteratePlugins(t){Object.values(this.#e).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=this.#e[t.type],r=n.findIndex(s=>s.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),this.#n(),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",this.#c),window.removeEventListener("offline",this.#c))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n="info",r=3e3){const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}#y=new Map;registerRequestClient(t,n){this.#y.set(t,n)}getRequestClientForFile(t){if(!("remote"in t&&t.remote))throw new Error(`Tried to get RequestClient for a non-remote file ${t.id}`);const n=this.#y.get(t.remote.requestClientId);if(n==null)throw new Error(`requestClientId "${t.remote.requestClientId}" not registered for file "${t.id}"`);return n}async restore(t){this.log(`Core: Running restored upload "${t}"`);const n=await this.#p(t);return this.emit("complete",n),n}#f(t,n={}){const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:i,currentUploads:o}=this.getState();if(!i&&!r)throw new Error("Cannot create a new upload: already uploading.");const s=j6();return this.emit("upload",s,this.getFilesByIds(t)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...o,[s]:{fileIDs:t,step:0,result:{}}}}),s}[Symbol.for("uppy test: createUpload")](...t){return this.#f(...t)}#T(t){const{currentUploads:n}=this.getState();return n[t]}addResultData(t,n){if(!this.#T(t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}#b(t){const{[t]:n,...r}=this.getState().currentUploads;this.setState({currentUploads:r})}async#p(t){const n=()=>{const{currentUploads:s}=this.getState();return s[t]};let r=n();if(!r)throw new Error("Nonexistent upload");const i=[...this.#o,...this.#i,...this.#a];try{for(let s=r.step||0;s<i.length;s++){const l=i[s];this.setState({currentUploads:{...this.getState().currentUploads,[t]:{...r,step:s}}});const{fileIDs:c}=r;if(await l(c,t),r=n(),!r)break}}catch(s){throw this.#b(t),s}if(r){r.fileIDs.forEach(d=>{const f=this.getFile(d);f?.progress.postprocess&&this.emit("postprocess-complete",f)});const s=r.fileIDs.map(d=>this.getFile(d)),l=s.filter(d=>!d.error),c=s.filter(d=>d.error);this.addResultData(t,{successful:l,failed:c,uploadID:t}),r=n()}let o;return r&&(o=r.result,this.#b(t)),o==null&&(this.log(`Not setting result for an upload that has been removed: ${t}`),o={successful:[],failed:[],uploadID:t}),o}async upload(){this.#e.uploader?.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();if(this.#v().length>0){const i=await this.#g();if(!(this.getFiles().filter(s=>s.progress.uploadStarted==null).length>0))return this.emit("complete",i),i;({files:t}=this.getState())}const r=this.opts.onBeforeUpload(t);if(r===!1)throw new Error("Not starting the upload because onBeforeUpload returned false");r&&typeof r=="object"&&(t=r,this.setState({files:t}));try{if(this.#t.validateMinNumberOfFiles(t),!this.#l(t))throw new Zr(this.i18n("missingRequiredMetaField"));const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(d=>d.fileIDs),s=Object.keys(t).filter(d=>{const f=this.getFile(d);return f&&!f.progress.uploadStarted&&!o.includes(d)}),l=this.#f(s),c=await this.#p(l);return this.emit("complete",c),c}catch(i){throw this.#s([i]),i}}}const Co=typeof window<"u",iS=Co&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),oS=Co&&window.devicePixelRatio>1,H6={elements_selector:".lazy",container:iS||Co?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},sS=e=>Object.assign({},H6,e),Jb=function(e,t){let n;const r="LazyLoad::Initialized",i=new e(t);try{n=new CustomEvent(r,{detail:{instance:i}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(r,!1,!1,{instance:i})}window.dispatchEvent(n)},q6=(e,t)=>{if(t)if(t.length)for(let n,r=0;n=t[r];r+=1)Jb(e,n);else Jb(e,t)},Wi="src",um="srcset",dm="sizes",aS="poster",cl="llOriginalAttrs",lS="data",fm="loading",cS="loaded",uS="applied",W6="entered",pm="error",dS="native",fS="data-",pS="ll-status",or=(e,t)=>e.getAttribute(fS+t),Y6=(e,t,n)=>{const r=fS+t;n!==null?e.setAttribute(r,n):e.removeAttribute(r)},ul=e=>or(e,pS),is=(e,t)=>Y6(e,pS,t),Lu=e=>is(e,null),hm=e=>ul(e)===null,K6=e=>ul(e)===fm,G6=e=>ul(e)===pm,mm=e=>ul(e)===dS,Q6=[fm,cS,uS,pm],X6=e=>Q6.indexOf(ul(e))>=0,xo=(e,t,n,r)=>{e&&typeof e=="function"&&(r===void 0?n===void 0?e(t):e(t,n):e(t,n,r))},ta=(e,t)=>{Co&&t!==""&&e.classList.add(t)},mi=(e,t)=>{Co&&t!==""&&e.classList.remove(t)},J6=e=>{e.llTempImage=document.createElement("IMG")},Z6=e=>{delete e.llTempImage},hS=e=>e.llTempImage,ju=(e,t)=>{if(!t)return;const n=t._observer;n&&n.unobserve(e)},eH=e=>{e.disconnect()},tH=(e,t,n)=>{t.unobserve_entered&&ju(e,n)},vm=(e,t)=>{e&&(e.loadingCount+=t)},nH=e=>{e&&(e.toLoadCount-=1)},mS=(e,t)=>{e&&(e.toLoadCount=t)},rH=e=>e.loadingCount>0,iH=e=>e.toLoadCount>0,vS=e=>{let t=[];for(let n,r=0;n=e.children[r];r+=1)n.tagName==="SOURCE"&&t.push(n);return t},gm=(e,t)=>{const n=e.parentNode;n&&n.tagName==="PICTURE"&&vS(n).forEach(t)},gS=(e,t)=>{vS(e).forEach(t)},Uu=[Wi],_S=[Wi,aS],Va=[Wi,um,dm],yS=[lS],Nu=e=>!!e[cl],bS=e=>e[cl],wS=e=>delete e[cl],Hs=(e,t)=>{if(Nu(e))return;const n={};t.forEach((r=>{n[r]=e.getAttribute(r)})),e[cl]=n},oH=e=>{Nu(e)||(e[cl]={backgroundImage:e.style.backgroundImage})},Zo=(e,t)=>{if(!Nu(e))return;const n=bS(e);t.forEach((r=>{((i,o,s)=>{s?i.setAttribute(o,s):i.removeAttribute(o)})(e,r,n[r])}))},sH=e=>{if(!Nu(e))return;const t=bS(e);e.style.backgroundImage=t.backgroundImage},ES=(e,t,n)=>{ta(e,t.class_applied),is(e,uS),n&&(t.unobserve_completed&&ju(e,t),xo(t.callback_applied,e,n))},SS=(e,t,n)=>{ta(e,t.class_loading),is(e,fm),n&&(vm(n,1),xo(t.callback_loading,e,n))},mo=(e,t,n)=>{n&&e.setAttribute(t,n)},Zb=(e,t)=>{mo(e,dm,or(e,t.data_sizes)),mo(e,um,or(e,t.data_srcset)),mo(e,Wi,or(e,t.data_src))},aH=(e,t)=>{gm(e,(n=>{Hs(n,Va),Zb(n,t)})),Hs(e,Va),Zb(e,t)},lH=(e,t)=>{Hs(e,Uu),mo(e,Wi,or(e,t.data_src))},cH=(e,t)=>{gS(e,(n=>{Hs(n,Uu),mo(n,Wi,or(n,t.data_src))})),Hs(e,_S),mo(e,aS,or(e,t.data_poster)),mo(e,Wi,or(e,t.data_src)),e.load()},uH=(e,t)=>{Hs(e,yS),mo(e,lS,or(e,t.data_src))},dH=(e,t,n)=>{const r=or(e,t.data_bg),i=or(e,t.data_bg_hidpi),o=oS&&i?i:r;o&&(e.style.backgroundImage=`url("${o}")`,hS(e).setAttribute(Wi,o),SS(e,t,n))},fH=(e,t,n)=>{const r=or(e,t.data_bg_multi),i=or(e,t.data_bg_multi_hidpi),o=oS&&i?i:r;o&&(e.style.backgroundImage=o,ES(e,t,n))},pH=(e,t,n)=>{const r=or(e,t.data_bg_set);if(!r)return;let i=r.split("|").map((o=>`image-set(${o})`));e.style.backgroundImage=i.join(),ES(e,t,n)},CS={IMG:aH,IFRAME:lH,VIDEO:cH,OBJECT:uH},hH=(e,t)=>{const n=CS[e.tagName];n&&n(e,t)},mH=(e,t,n)=>{const r=CS[e.tagName];r&&(r(e,t),SS(e,t,n))},vH=["IMG","IFRAME","VIDEO","OBJECT"],gH=e=>vH.indexOf(e.tagName)>-1,xS=(e,t)=>{!t||rH(t)||iH(t)||xo(e.callback_finish,t)},e0=(e,t,n)=>{e.addEventListener(t,n),e.llEvLisnrs[t]=n},_H=(e,t,n)=>{e.removeEventListener(t,n)},_m=e=>!!e.llEvLisnrs,yH=(e,t,n)=>{_m(e)||(e.llEvLisnrs={});const r=e.tagName==="VIDEO"?"loadeddata":"load";e0(e,r,t),e0(e,"error",n)},nh=e=>{if(!_m(e))return;const t=e.llEvLisnrs;for(let n in t){const r=t[n];_H(e,n,r)}delete e.llEvLisnrs},TS=(e,t,n)=>{Z6(e),vm(n,-1),nH(n),mi(e,t.class_loading),t.unobserve_completed&&ju(e,n)},bH=(e,t,n,r)=>{const i=mm(t);TS(t,n,r),ta(t,n.class_loaded),is(t,cS),xo(n.callback_loaded,t,r),i||xS(n,r)},wH=(e,t,n,r)=>{const i=mm(t);TS(t,n,r),ta(t,n.class_error),is(t,pm),xo(n.callback_error,t,r),n.restore_on_error&&Zo(t,Va),i||xS(n,r)},rh=(e,t,n)=>{const r=hS(e)||e;_m(r)||yH(r,(i=>{bH(0,e,t,n),nh(r)}),(i=>{wH(0,e,t,n),nh(r)}))},ih=(e,t,n)=>{gH(e)?((r,i,o)=>{rh(r,i,o),mH(r,i,o)})(e,t,n):((r,i,o)=>{J6(r),rh(r,i,o),oH(r),dH(r,i,o),fH(r,i,o),pH(r,i,o)})(e,t,n)},EH=(e,t,n)=>{e.setAttribute("loading","lazy"),rh(e,t,n),hH(e,t),is(e,dS)},t0=e=>{e.removeAttribute(Wi),e.removeAttribute(um),e.removeAttribute(dm)},SH=e=>{gm(e,(t=>{t0(t)})),t0(e)},kS=e=>{gm(e,(t=>{Zo(t,Va)})),Zo(e,Va)},CH=e=>{gS(e,(t=>{Zo(t,Uu)})),Zo(e,_S),e.load()},xH=e=>{Zo(e,Uu)},TH=e=>{Zo(e,yS)},kH={IMG:kS,IFRAME:xH,VIDEO:CH,OBJECT:TH},OH=(e,t)=>{(n=>{const r=kH[n.tagName];r?r(n):sH(n)})(e),((n,r)=>{hm(n)||mm(n)||(mi(n,r.class_entered),mi(n,r.class_exited),mi(n,r.class_applied),mi(n,r.class_loading),mi(n,r.class_loaded),mi(n,r.class_error))})(e,t),Lu(e),wS(e)},$H=(e,t,n,r)=>{n.cancel_on_exit&&K6(e)&&e.tagName==="IMG"&&(nh(e),SH(e),kS(e),mi(e,n.class_loading),vm(r,-1),Lu(e),xo(n.callback_cancel,e,t,r))},AH=(e,t,n,r)=>{const i=X6(e);is(e,W6),ta(e,n.class_entered),mi(e,n.class_exited),tH(e,n,r),xo(n.callback_enter,e,t,r),i||ih(e,n,r)},RH=(e,t,n,r)=>{hm(e)||(ta(e,n.class_exited),$H(e,t,n,r),xo(n.callback_exit,e,t,r))},PH=["IMG","IFRAME","VIDEO"],OS=e=>e.use_native&&"loading"in HTMLImageElement.prototype,IH=(e,t,n)=>{e.forEach((r=>{PH.indexOf(r.tagName)!==-1&&EH(r,t,n)})),mS(n,0)},MH=e=>e.isIntersecting||e.intersectionRatio>0,DH=(e,t)=>{t.forEach((n=>{e.observe(n)}))},FH=(e,t)=>{eH(e),DH(e,t)},LH=(e,t)=>{OS(e)||(t._observer=new IntersectionObserver((n=>{((r,i,o)=>{r.forEach((s=>MH(s)?AH(s.target,s,i,o):RH(s.target,s,i,o)))})(n,e,t)}),(n=>({root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))(e)))},$S=e=>Array.prototype.slice.call(e),hu=e=>e.container.querySelectorAll(e.elements_selector),jH=e=>$S(e).filter(hm),UH=e=>G6(e),NH=e=>$S(e).filter(UH),n0=(e,t)=>jH(e||hu(t)),zH=(e,t)=>{NH(hu(e)).forEach((n=>{mi(n,e.class_error),Lu(n)})),t.update()},BH=(e,t)=>{Co&&(t._onlineHandler=()=>{zH(e,t)},window.addEventListener("online",t._onlineHandler))},VH=e=>{Co&&window.removeEventListener("online",e._onlineHandler)},Ho=function(e,t){const n=sS(e);this._settings=n,this.loadingCount=0,LH(n,this),BH(n,this),this.update(t)};Ho.prototype={update:function(e){const t=this._settings,n=n0(e,t);mS(this,n.length),iS?this.loadAll(n):OS(t)?IH(n,t,this):FH(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),VH(this),hu(this._settings).forEach((e=>{wS(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){const t=this._settings;n0(e,t).forEach((n=>{ju(n,this),ih(n,t,this)}))},restoreAll:function(){const e=this._settings;hu(e).forEach((t=>{OH(t,e)}))}},Ho.load=(e,t)=>{const n=sS(t);ih(e,n)},Ho.resetStatus=e=>{Lu(e)},Co&&q6(Ho,window.lazyLoadOptions);function r0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r0(Object(n),!0).forEach((function(r){jr(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r0(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HH(e,t){if(e==null)return{};var n,r,i=(function(s,l){if(s==null)return{};var c,d,f={},p=Object.keys(s);for(d=0;d<p.length;d++)c=p[d],l.indexOf(c)>=0||(f[c]=s[c]);return f})(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function es(e){return(function(t){if(Array.isArray(t))return lp(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||(function(t,n){if(t){if(typeof t=="string")return lp(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lp(t,n)}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
41
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function lp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i0,qH,Oc,vn=(i0=function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(s==="object")if(o.toString===Object.prototype.toString)for(var c in o)t.call(o,c)&&o[c]&&r.push(c);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()},i0(Oc={path:qH,exports:{},require:function(e,t){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(t==null&&Oc.path)}},Oc.exports),Oc.exports),ai=function(e){return function(t,n){if(!t)return e;var r;typeof t=="string"?r=t:n=t;var i=e;return r&&(i+="__"+r),i+(n?Object.keys(n).reduce((function(o,s){var l=n[s];return l&&(o+=" "+(typeof l=="boolean"?i+"--"+s:i+"--"+s+"_"+l)),o}),""):"")}};function oh(e,t,n){var r,i,o,s,l;function c(){var f=Date.now()-s;f<t&&f>=0?r=setTimeout(c,t-f):(r=null,n||(l=e.apply(o,i),o=i=null))}t==null&&(t=100);var d=function(){o=this,i=arguments,s=Date.now();var f=n&&!r;return r||(r=setTimeout(c,t)),f&&(l=e.apply(o,i),o=i=null),l};return d.clear=function(){r&&(clearTimeout(r),r=null)},d.flush=function(){r&&(l=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},d}oh.debounce=oh;var sh=oh,nt=function(){return nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nt.apply(this,arguments)};function AS(e,t){var n,r;return e&&t?(n=""+e+t[0].toUpperCase()+t.slice(1),r=e+"-"+t):(n=e||t,r=e||t),{name:n,classname:r}}function RS(e){return/^blob:/.test(e)}function o0(e){return RS(e)||(function(t){return/^data:/.test(t)})(e)}function Es(e){return!!(e&&e.constructor&&e.call&&e.apply)}function _n(e){return e===void 0}function Jc(e){return typeof e=="object"&&e!==null}function ah(e,t,n){var r={};return Jc(e)?(Object.keys(t).forEach((function(i){_n(e[i])?r[i]=t[i]:Jc(t[i])?Jc(e[i])?r[i]=ah(e[i],t[i],n[i]):r[i]=e[i]?t[i]:n[i]:t[i]===!0||t[i]===!1?r[i]=!!e[i]:r[i]=e[i]})),r):e?t:n}function $c(e){var t=Number(e);return Number.isNaN(t)?e:t}function s0(e){return typeof(e=="number"||(function(t){return typeof t=="object"&&t!==null})(e)&&toString.call(e)=="[object Number]")&&!PS(e)}function PS(e){return e!=e}function IS(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}var Pa=function(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=e,this.scale=t},WH=function(e,t){t===void 0&&(t={}),this.type="resize",this.directions=e,this.params=t},ym=function(e){this.type="move",this.directions=e},YH=(function(){function e(t,n,r,i,o){this.type="drag",this.nativeEvent=t,this.position=r,this.previousPosition=i,this.element=n,this.anchor=o}return e.prototype.shift=function(){var t=this,n=t.element,r=t.anchor,i=t.position;if(n){var o=n.getBoundingClientRect(),s=o.left,l=o.top;return{left:i.left-s-r.left,top:i.top-l-r.top}}return{left:0,top:0}},e})(),bm={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(e){e.cancelable&&!this.disabled&&e.touches.length===1&&(this.touches=es(e.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),e.touches.length&&this.initAnchor(this.touches.reduce((function(t,n){return{clientX:t.clientX+n.clientX/e.touches.length,clientY:t.clientY+n.clientY/e.touches.length}}),{clientX:0,clientY:0})),e.preventDefault&&e.preventDefault(),e.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(e){this.touches.length&&(this.processMove(e,e.touches),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation())},onMouseDown:function(e){if(!this.disabled){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.initAnchor(t),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var t=this.$refs.draggable.getBoundingClientRect(),n=t.left,r=t.right,i=t.bottom,o=t.top;this.anchor={left:e.clientX-n,top:e.clientY-o,bottom:i-e.clientY,right:r-e.clientX}},processMove:function(e,t){var n=es(t);if(this.touches.length){if(this.touches.length===1&&n.length===1){var r=this.$refs.draggable;this.$emit("drag",new YH(e,r,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};bm.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"draggable",class:n.classname,onTouchstart:t[1]||(t[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:t[2]||(t[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onMouseover:t[3]||(t[3]=function(){return o.onMouseOver&&o.onMouseOver.apply(o,arguments)}),onMouseleave:t[4]||(t[4]=function(){return o.onMouseLeave&&o.onMouseLeave.apply(o,arguments)})},[mt(e.$slots,"default")],34)};var cp=ai("vue-handler-wrapper"),MS={name:"HandlerWrapper",components:{DraggableElement:bm},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var e;if(this.horizontalPosition||this.verticalPosition){var t,n=AS(this.horizontalPosition,this.verticalPosition);e=cp((jr(t={},n.classname,!0),jr(t,"disabled",this.disabled),t))}else e=cp({disabled:this.disabled});return{root:e,draggable:cp("draggable")}}},emits:["leave","enter","drag","drag-end"]};MS.render=function(e,t,n,r,i,o){var s=ft("DraggableElement");return C(),Ee("div",{class:o.classes.root},[Z(s,{class:o.classes.draggable,onDrag:t[1]||(t[1]=function(l){return e.$emit("drag",l)}),onDragEnd:t[2]||(t[2]=function(l){return e.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(l){return e.$emit("leave")}),onEnter:t[4]||(t[4]=function(l){return e.$emit("enter")})},{default:Le((function(){return[mt(e.$slots,"default")]})),_:3},8,["class"])],2)};var KH=ai("vue-line-wrapper"),DS={name:"LineWrapper",components:{DraggableElement:bm},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var e;return KH((jr(e={},this.position,!0),jr(e,"disabled",this.disabled),e))}},emits:["leave","enter","drag","drag-end"]};DS.render=function(e,t,n,r,i,o){var s=ft("DraggableElement");return C(),Ee(s,{class:o.classname,onDrag:t[1]||(t[1]=function(l){return e.$emit("drag",l)}),onDragEnd:t[2]||(t[2]=function(l){return e.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(l){return e.$emit("leave")}),onEnter:t[4]||(t[4]=function(l){return e.$emit("enter")})},{default:Le((function(){return[mt(e.$slots,"default")]})),_:3},8,["class"])};var gi=["left","right","top","bottom"],GH=["left","right"],QH=["top","bottom"],XH=["left","top"],JH=["fill-area","fit-area","stencil","none"],a0={left:0,top:0,width:0,height:0};function l0(e,t,n){return!(n=n||["width","height","left","top"]).some((function(r){return e[r]!==t[r]}))}function Ei(e){return{left:e.left,top:e.top,right:e.left+e.width,bottom:e.top+e.height}}function qs(e,t){return{left:e.left-t.left,top:e.top-t.top}}function Cn(e){return{left:e.left+e.width/2,top:e.top+e.height/2}}function Ha(e,t){var n={left:0,top:0,right:0,bottom:0};return gi.forEach((function(r){var i=t[r],o=Ei(e)[r];n[r]=i!==void 0&&o!==void 0?r==="left"||r==="top"?Math.max(0,i-o):Math.max(0,o-i):0})),n}function vi(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width+t.left+t.right,height:e.height+t.top+t.bottom}}function zu(e){return{left:-e.left,top:-e.top}}function sr(e,t){return nt(nt({},e),{left:e.left+t.left,top:e.top+t.top})}function zr(e,t,n,r){if(t!==1){if(n){var i=Cn(e);return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2+(n.left-i.left)*(1-t),top:e.top+e.height*(1-t)/2+(n.top-i.top)*(1-t)}}return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2,top:e.top+e.height*(1-t)/2}}return e}function Dt(e){return e.width/e.height}function Ws(e,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/e.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/e.height:1/0)}function Ys(e,t){var n={left:0,top:0},r=Ha(e,t);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function up(e,t){var n;return t.minimum&&e<t.minimum?n=t.minimum:t.maximum&&e>t.maximum&&(n=t.maximum),n}function FS(e,t){var n=Dt(e),r=Dt(t);return t.width<1/0&&t.height<1/0?n>r?{width:t.width,height:t.width/n}:{width:t.height*n,height:t.height}:t.width<1/0?{width:t.width,height:t.width/n}:t.height<1/0?{width:t.height*n,height:t.height}:e}function LS(e,t){var n=t*Math.PI/180;return{width:Math.abs(e.width*Math.cos(n))+Math.abs(e.height*Math.sin(n)),height:Math.abs(e.width*Math.sin(n))+Math.abs(e.height*Math.cos(n))}}function uo(e,t){var n=t*Math.PI/180;return{left:e.left*Math.cos(n)-e.top*Math.sin(n),top:e.left*Math.sin(n)+e.top*Math.cos(n)}}function Bu(e,t){var n=Ha(xn(e,t),t);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((e.width+n.left+n.right)/e.width,Ws(e,t)):Math.min((e.height+n.top+n.bottom)/e.height,Ws(e,t)):1}function xn(e,t,n){n===void 0&&(n=!1);var r=Ys(e,t);return sr(e,n?zu(r):r)}function lh(e){return{width:e.right!==void 0&&e.left!==void 0?e.right-e.left:1/0,height:e.bottom!==void 0&&e.top!==void 0?e.bottom-e.top:1/0}}function ZH(e,t){return nt(nt({},e),{minWidth:Math.min(t.width,e.minWidth),minHeight:Math.min(t.height,e.minHeight),maxWidth:Math.min(t.width,e.maxWidth),maxHeight:Math.min(t.height,e.maxHeight)})}function jS(e,t,n){n===void 0&&(n=!0);var r={};return gi.forEach((function(i){var o=e[i],s=t[i];o!==void 0&&s!==void 0?r[i]=i==="left"||i==="top"?n?Math.max(o,s):Math.min(o,s):n?Math.min(o,s):Math.max(o,s):s!==void 0?r[i]=s:o!==void 0&&(r[i]=o)})),r}function Vu(e,t){return jS(e,t,!0)}function c0(e){var t=e.size,n=e.aspectRatio,r=e.ignoreMinimum,i=e.sizeRestrictions;return!!((t.correctRatio||Dt(t)>=n.minimum&&Dt(t)<=n.maximum)&&t.height<=i.maxHeight&&t.width<=i.maxWidth&&t.width&&t.height&&(r||t.height>=i.minHeight&&t.width>=i.minWidth))}function u0(e,t){return Math.pow(e.width-t.width,2)+Math.pow(e.height-t.height,2)}function Bi(e){var t=e.width,n=e.height,r=e.sizeRestrictions,i={minimum:e.aspectRatio&&e.aspectRatio.minimum||0,maximum:e.aspectRatio&&e.aspectRatio.maximum||1/0},o={width:Math.max(r.minWidth,Math.min(r.maxWidth,t)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))};function s(d,f){return f===void 0&&(f=!1),d.reduce((function(p,v){return c0({size:v,aspectRatio:i,sizeRestrictions:r,ignoreMinimum:f})&&(!p||u0(v,{width:t,height:n})<u0(p,{width:t,height:n}))?v:p}),null)}var l=[];i&&[i.minimum,i.maximum].forEach((function(d){d&&l.push({width:o.width,height:o.width/d,correctRatio:!0},{width:o.height*d,height:o.height,correctRatio:!0})})),c0({size:o,aspectRatio:i,sizeRestrictions:r})&&l.push(o);var c=s(l)||s(l,!0);return c&&{width:c.width,height:c.height}}function ch(e){var t=e.event,n=e.coordinates,r=e.positionRestrictions,i=r===void 0?{}:r,o=sr(n,t.directions);return sr(o,Ys(o,i))}function e7(e){var t=e.coordinates,n=e.transform,r=e.imageSize,i=e.sizeRestrictions,o=e.positionRestrictions,s=e.aspectRatio,l=e.visibleArea,c=function(f,p){return ch({coordinates:f,positionRestrictions:o,event:new ym({left:p.left-f.left,top:p.top-f.top})})},d=nt({},t);return(Array.isArray(n)?n:[n]).forEach((function(f){var p={};_n((p=typeof f=="function"?f({coordinates:d,imageSize:r,visibleArea:l}):f).width)&&_n(p.height)||(d=(function(v,y){var g=nt(nt(nt({},v),Bi({width:y.width,height:y.height,sizeRestrictions:i,aspectRatio:s})),{left:0,top:0});return c(g,{left:v.left,top:v.top})})(d,nt(nt({},d),p))),_n(p.left)&&_n(p.top)||(d=c(d,nt(nt({},d),p)))})),d}function t7(e){e.event;var t=e.getAreaRestrictions,n=e.boundaries,r=e.coordinates,i=e.visibleArea;e.aspectRatio;var o=e.stencilSize,s=e.sizeRestrictions,l=e.positionRestrictions;e.stencilReference;var c,d,f,p=nt({},r),v=nt({},i),y=nt({},o);c=Dt(y),d=Dt(p),f===void 0&&(f=.001),(c===0||d===0?Math.abs(d-c)<f:Math.abs(d/c)<1+f&&Math.abs(d/c)>1-f)||(p=nt(nt({},p),Bi({sizeRestrictions:s,width:p.width,height:p.height,aspectRatio:{minimum:Dt(y),maximum:Dt(y)}})));var g=Bu(v=zr(v,p.width*n.width/(v.width*y.width)),t({visibleArea:v,type:"resize"}));return g!==1&&(v=zr(v,g),p=zr(p,g)),v=xn(v=sr(v,qs(Cn(p),Cn(v))),t({visibleArea:v,type:"move"})),{coordinates:p=xn(p,Vu(Ei(v),l)),visibleArea:v}}function n7(e){var t=e.event,n=e.getAreaRestrictions,r=e.boundaries,i=e.coordinates,o=e.visibleArea;e.aspectRatio,e.stencilSize,e.sizeRestrictions;var s=e.positionRestrictions;e.stencilReference;var l=nt({},i),c=nt({},o);if(i&&o&&t.type!=="manipulateImage"){var d={width:0,height:0};c.width,r.width,Dt(r)>Dt(l)?(d.height=.8*r.height,d.width=d.height*Dt(l)):(d.width=.8*r.width,d.height=d.width*Dt(l));var f=Bu(c=zr(c,l.width*r.width/(c.width*d.width)),n({visibleArea:c,type:"resize"}));c=zr(c,f),f!==1&&(d.height/=f,d.width/=f),c=xn(c=sr(c,qs(Cn(l),Cn(c))),n({visibleArea:c,type:"move"})),l=xn(l,Vu(Ei(c),s))}return{coordinates:l,visibleArea:c}}function r7(e){var t=e.event,n=e.coordinates,r=e.visibleArea,i=e.getAreaRestrictions,o=nt({},r),s=nt({},n);if(t.type==="setCoordinates"){var l=Math.max(0,s.width-o.width),c=Math.max(0,s.height-o.height);l>c?o=zr(o,Math.min(s.width/o.width,Ws(o,i({visibleArea:o,type:"resize"})))):c>l&&(o=zr(o,Math.min(s.height/o.height,Ws(o,i({visibleArea:o,type:"resize"}))))),o=xn(o=sr(o,zu(Ys(s,Ei(o)))),i({visibleArea:o,type:"move"}))}return{visibleArea:o,coordinates:s}}function i7(e){var t=e.imageSize,n=e.visibleArea,r=e.coordinates,i=n||t;return{left:(n?n.left:0)+i.width/2-r.width/2,top:(n?n.top:0)+i.height/2-r.height/2}}function o7(e){var t=e.imageSize,n=e.visibleArea,r=e.aspectRatio,i=e.sizeRestrictions,o=n||t,s=Math.min(r.maximum||1/0,Math.max(r.minimum||0,Dt(o))),l=o.width<o.height?{width:.8*o.width,height:.8*o.width/s}:{height:.8*o.height,width:.8*o.height*s};return Bi(nt(nt({},l),{aspectRatio:r,sizeRestrictions:i}))}function s7(e){var t,n,r=e.imageSize,i=e.visibleArea,o=e.boundaries,s=e.aspectRatio,l=e.sizeRestrictions,c=e.stencilSize,d=i||r;return Dt(d)>Dt(o)?n=(t=c.height*d.height/o.height)*Dt(c):t=(n=c.width*d.width/o.width)/Dt(c),Bi({width:n,height:t,aspectRatio:s,sizeRestrictions:l})}function a7(e){var t=e.getAreaRestrictions,n=e.coordinates,r=e.imageSize,i=Dt(e.boundaries);if(n){var o={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},s=FS({width:Dt(o)>i?o.width:o.height*i,height:Dt(o)>i?o.width/i:o.height},lh(t())),l={left:n.left+n.width/2-s.width/2,top:n.top+n.height/2-s.height/2,width:s.width,height:s.height},c=Ha(n,Ei(nt({left:0,top:0},r))),d={};return!c.left&&!c.right&&l.width<=r.width&&(d.left=0,d.right=r.width),!c.top&&!c.bottom&&l.height<=r.height&&(d.top=0,d.bottom=r.height),xn(l,d)}var f=Dt(r);return s={height:f>i?r.height:r.width/i,width:f>i?r.height*i:r.width},{left:r.width/2-s.width/2,top:r.height/2-s.height/2,width:s.width,height:s.height}}function Ac(e,t){return jS(e,Ei(t))}function l7(e){var t=e.event,n=e.coordinates,r=e.visibleArea,i=e.sizeRestrictions,o=e.getAreaRestrictions,s=e.positionRestrictions,l=e.adjustStencil,c=t.scale,d=t.move,f=nt({},r),p=nt({},n),v=1,y=1,g=c.factor&&Math.abs(c.factor-1)>.001;f=sr(f,{left:d.left||0,top:d.top||0});var m={stencil:{minimum:Math.max(i.minWidth?i.minWidth/p.width:0,i.minHeight?i.minHeight/p.height:0),maximum:Math.min(i.maxWidth?i.maxWidth/p.width:1/0,i.maxHeight?i.maxHeight/p.height:1/0,Ws(p,s))},area:{maximum:Ws(f,o({visibleArea:f,type:"resize"}))}};c.factor&&g&&(c.factor<1?(y=Math.max(c.factor,m.stencil.minimum))>1&&(y=1):c.factor>1&&(y=Math.min(c.factor,Math.min(m.area.maximum,m.stencil.maximum)))<1&&(y=1)),y&&(f=zr(f,y,c.center));var b=n.left-r.left,x=r.width+r.left-(n.width+n.left),S=n.top-r.top,O=r.height+r.top-(n.height+n.top);return f=xn(f=sr(f,Ys(f,{left:s.left!==void 0?s.left-b*y:void 0,top:s.top!==void 0?s.top-S*y:void 0,bottom:s.bottom!==void 0?s.bottom+O*y:void 0,right:s.right!==void 0?s.right+x*y:void 0})),o({visibleArea:f,type:"move"})),p.width=p.width*y,p.height=p.height*y,p.left=f.left+b*y,p.top=f.top+S*y,p=xn(p,Vu(Ei(f),s)),c.factor&&g&&l&&(c.factor>1?v=Math.min(m.area.maximum,c.factor)/y:c.factor<1&&(v=Math.max(p.height/f.height,p.width/f.width,c.factor/y)),v!==1&&(f=sr(f=xn(f=zr(f,v,c.factor>1?c.center:Cn(p)),o({visibleArea:f,type:"move"})),zu(Ys(p,Ei(f)))))),{coordinates:p,visibleArea:f}}function c7(e){var t=e.aspectRatio,n=e.getAreaRestrictions,r=e.coordinates,i=e.visibleArea,o=e.sizeRestrictions,s=e.positionRestrictions,l=e.imageSize,c=e.previousImageSize,d=e.angle,f=nt({},r),p=nt({},i),v=uo(Cn(nt({left:0,top:0},c)),d);return(f=nt(nt({},Bi({sizeRestrictions:o,aspectRatio:t,width:f.width,height:f.height})),uo(Cn(f),d))).left-=v.left-l.width/2+f.width/2,f.top-=v.top-l.height/2+f.height/2,p=zr(p,Bu(p,n({visibleArea:p,type:"resize"}))),{coordinates:f=xn(f,s),visibleArea:p=xn(p=sr(p,qs(Cn(f),Cn(r))),n({visibleArea:p,type:"move"}))}}function u7(e){var t=e.flip,n=e.previousFlip,r=e.rotate,i=e.getAreaRestrictions,o=e.coordinates,s=e.visibleArea,l=e.imageSize,c=nt({},o),d=nt({},s),f=n.horizontal!==t.horizontal,p=n.vertical!==t.vertical;if(f||p){var v=uo({left:l.width/2,top:l.height/2},-r),y=uo(Cn(c),-r),g=uo({left:f?v.left-(y.left-v.left):y.left,top:p?v.top-(y.top-v.top):y.top},r);c=sr(c,qs(g,Cn(c))),y=uo(Cn(d),-r),d=xn(d=sr(d,qs(g=uo({left:f?v.left-(y.left-v.left):y.left,top:p?v.top-(y.top-v.top):y.top},r),Cn(d))),i({visibleArea:d,type:"move"}))}return{coordinates:c,visibleArea:d}}function d0(e){var t=e.directions,n=e.coordinates,r=e.positionRestrictions,i=r===void 0?{}:r,o=e.sizeRestrictions,s=e.preserveRatio,l=e.compensate,c=nt({},t),d=vi(n,c).width,f=vi(n,c).height;d<0&&(c.left<0&&c.right<0?(c.left=-(n.width-o.minWidth)/(c.left/c.right),c.right=-(n.width-o.minWidth)/(c.right/c.left)):c.left<0?c.left=-(n.width-o.minWidth):c.right<0&&(c.right=-(n.width-o.minWidth))),f<0&&(c.top<0&&c.bottom<0?(c.top=-(n.height-o.minHeight)/(c.top/c.bottom),c.bottom=-(n.height-o.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(n.height-o.minHeight):c.bottom<0&&(c.bottom=-(n.height-o.minHeight)));var p=Ha(vi(n,c),i);l&&(p.left&&p.left>0&&p.right===0?(c.right+=p.left,c.left-=p.left):p.right&&p.right>0&&p.left===0&&(c.left+=p.right,c.right-=p.right),p.top&&p.top>0&&p.bottom===0?(c.bottom+=p.top,c.top-=p.top):p.bottom&&p.bottom>0&&p.top===0&&(c.top+=p.bottom,c.bottom-=p.bottom),p=Ha(vi(n,c),i));var v={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(gi.forEach((function(m){var b=p[m];b&&c[m]&&(v[m]=Math.max(0,1-b/c[m]))})),s){var y=Math.min.apply(null,gi.map((function(m){return v[m]})));y!==1/0&&gi.forEach((function(m){c[m]*=y}))}else gi.forEach((function(m){v[m]!==1/0&&(c[m]*=v[m])}));if(d=vi(n,c).width,f=vi(n,c).height,c.right+c.left&&(d>o.maxWidth?v.width=(o.maxWidth-n.width)/(c.right+c.left):d<o.minWidth&&(v.width=(o.minWidth-n.width)/(c.right+c.left))),c.bottom+c.top&&(f>o.maxHeight?v.height=(o.maxHeight-n.height)/(c.bottom+c.top):f<o.minHeight&&(v.height=(o.minHeight-n.height)/(c.bottom+c.top))),s){var g=Math.min(v.width,v.height);g!==1/0&&gi.forEach((function(m){c[m]*=g}))}else v.width!==1/0&&GH.forEach((function(m){c[m]*=v.width})),v.height!==1/0&&QH.forEach((function(m){c[m]*=v.height}));return c}function Rc(e,t,n){return t==0&&n==0?e/2:t==0?0:n==0?e:e*Math.abs(t/(t+n))}var d7=ai("vue-simple-handler"),f7=ai("vue-simple-handler-wrapper"),wm={name:"SimpleHandler",components:{HandlerWrapper:MS},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var e,t=(jr(e={},this.horizontalPosition,!!this.horizontalPosition),jr(e,this.verticalPosition,!!this.verticalPosition),jr(e,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),jr(e,"hover",this.hover),e);return{default:vn(d7(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:vn(f7(t),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};wm.render=function(e,t,n,r,i,o){var s=ft("HandlerWrapper");return C(),Ee(s,{class:o.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:Le((function(){return[Z("div",{class:o.classes.default},null,2)]})),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var p7=ai("vue-simple-line"),h7=ai("vue-simple-line-wrapper"),Em={name:"SimpleLine",components:{LineWrapper:DS},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:vn(p7(jr({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:vn(h7(jr({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Em.render=function(e,t,n,r,i,o){var s=ft("LineWrapper");return C(),Ee(s,{class:o.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:Le((function(){return[Z("div",{class:o.classes.root},null,2)]})),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var dp=ai("vue-bounding-box"),m7=["east","west",null],v7=["south","north",null],US={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return wm}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Em}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var e=[];return m7.forEach((function(t){v7.forEach((function(n){if(t!==n){var r=AS(t,n),i=r.name,o=r.classname;e.push({name:i,classname:o,verticalDirection:n,horizontalDirection:t})}}))})),{points:e}},computed:{style:function(){var e={};return this.width&&this.height&&(e.width="".concat(this.width,"px"),e.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),e},classes:function(){var e=this.handlersClasses,t=this.handlersWrappersClasses,n=this.linesClasses,r=this.linesWrappersClasses;return{root:dp(),handlers:e,handlersWrappers:t,lines:n,linesWrappers:r}},lineNodes:function(){var e=this,t=[];return this.points.forEach((function(n){n.horizontalDirection&&n.verticalDirection||!e.lines[n.name]||t.push({name:n.name,component:e.linesComponent,class:vn(e.classes.lines.default,e.classes.lines[n.name],!e.resizable&&e.classes.lines.disabled),wrapperClass:vn(e.classes.linesWrappers.default,e.classes.linesWrappers[n.name],!e.resizable&&e.classes.linesWrappers.disabled),hoverClass:e.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!e.resizable})})),t},handlerNodes:function(){var e=this,t=[],n=this.width,r=this.height;return this.points.forEach((function(i){if(e.handlers[i.name]){var o={name:i.name,component:e.handlersComponent,class:vn(e.classes.handlers.default,e.classes.handlers[i.name]),wrapperClass:vn(e.classes.handlersWrappers.default,e.classes.handlersWrappers[i.name]),hoverClass:e.classes.handlers.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!e.resizable};if(n&&r){var s=i.horizontalDirection,l=i.verticalDirection,c=s==="east"?n:s==="west"?0:n/2,d=l==="south"?r:l==="north"?0:r/2;o.wrapperClass=dp("handler"),o.wrapperStyle={transform:"translate(".concat(c,"px, ").concat(d,"px)")},e.transitions&&e.transitions.enabled&&(o.wrapperStyle.transition="".concat(e.transitions.time,"ms ").concat(e.transitions.timingFunction))}else o.wrapperClass=dp("handler",jr({},i.classname,!0));t.push(o)}})),t}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(e,t,n){var r,i=e.shift(),o=i.left,s=i.top,l={left:0,right:0,top:0,bottom:0};t==="west"?l.left-=o:t==="east"&&(l.right+=o),n==="north"?l.top-=s:n==="south"&&(l.bottom+=s),!n&&t?r="width":n&&!t&&(r="height"),this.resizable&&this.$emit("resize",new WH(l,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:e.nativeEvent&&e.nativeEvent.shiftKey,respectDirection:r}))}},emits:["resize","resize-end"]};US.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"box",class:o.classes.root,style:o.style},[mt(e.$slots,"default"),Z("div",null,[(C(!0),Ee(We,null,ut(o.lineNodes,(function(s){return C(),Ee(Pn(s.component),{key:s.name,"default-class":s.class,"hover-class":s.hoverClass,"wrapper-class":s.wrapperClass,position:s.name,disabled:s.disabled,onDrag:function(l){return o.onHandlerDrag(l,s.horizontalDirection,s.verticalDirection)},onDragEnd:t[1]||(t[1]=function(l){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])})),128))]),(C(!0),Ee(We,null,ut(o.handlerNodes,(function(s){return C(),Ee("div",{key:s.name,style:s.wrapperStyle,class:s.wrapperClass},[(C(),Ee(Pn(s.component),{"default-class":s.class,"hover-class":s.hoverClass,"wrapper-class":s.wrapperClass,"horizontal-position":s.horizontalDirection,"vertical-position":s.verticalDirection,disabled:s.disabled,onDrag:function(l){return o.onHandlerDrag(l,s.horizontalDirection,s.verticalDirection)},onDragEnd:t[2]||(t[2]=function(l){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)})),128))],6)};var g7=ai("vue-draggable-area"),NS={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:g7()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(e){if(e.cancelable){var t=this.movable&&e.touches.length===1;t&&(this.touches=es(e.touches)),(this.touchStarted||t)&&(e.preventDefault(),e.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(e){this.touches.length>=1&&(this.touchStarted?(this.processMove(e,e.touches),e.preventDefault(),e.stopPropagation()):IS({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:e.touches[0].clientX,y:e.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(e){if(this.movable&&e.button===0){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.initAnchor(t),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.cancelable&&e.preventDefault(),e.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var t=this.$refs.container.getBoundingClientRect(),n=t.left,r=t.top;this.anchor={x:e.clientX-n,y:e.clientY-r}},processMove:function(e,t){var n=es(t);if(this.touches.length){var r=this.$refs.container.getBoundingClientRect(),i=r.left,o=r.top;this.touches.length===1&&n.length===1&&this.$emit("move",new ym({left:n[0].clientX-(i+this.anchor.x),top:n[0].clientY-(o+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};NS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:t[2]||(t[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)})},[mt(e.$slots,"default")],544)};function fp(e){var t,n;return{rotate:e.rotate||0,flip:{horizontal:((t=e?.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((n=e?.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function _7(e){return new Promise((function(t,n){try{if(e)if(/^data:/i.test(e))t((function(c){c=c.replace(/^data:([^;]+);base64,/gim,"");for(var d=atob(c),f=d.length,p=new ArrayBuffer(f),v=new Uint8Array(p),y=0;y<f;y++)v[y]=d.charCodeAt(y);return p})(e));else if(/^blob:/i.test(e)){var r=new FileReader;r.onload=function(c){t(c.target.result)},o=e,s=function(c){r.readAsArrayBuffer(c)},(l=new XMLHttpRequest).open("GET",o,!0),l.responseType="blob",l.onload=function(){this.status!=200&&this.status!==0||s(this.response)},l.send()}else{var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===4&&(i.status===200||i.status===0?t(i.response):n("Warning: could not load an image to parse its orientation"),i=null)},i.onprogress=function(){i.getResponseHeader("content-type")!=="image/jpeg"&&i.abort()},i.withCredentials=!1,i.open("GET",e,!0),i.responseType="arraybuffer",i.send(null)}else n("Error: the image is empty")}catch(c){n(c)}var o,s,l}))}function zS(e){var t=e.rotate,n=e.flip,r=e.scaleX,i=e.scaleY,o="";return o+=" rotate("+t+"deg) ",o+=" scaleX("+r*(n.horizontal?-1:1)+") ",o+=" scaleY("+i*(n.vertical?-1:1)+") "}function y7(e){try{var t,n=new DataView(e),r=void 0,i=void 0,o=void 0,s=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var l=n.byteLength,c=2;c+1<l;){if(n.getUint8(c)===255&&n.getUint8(c+1)===225){o=c;break}c++}if(o&&(r=o+10,(function(y,g,m){var b,x="";for(b=g,m+=g;b<m;b++)x+=String.fromCharCode(y.getUint8(b));return x})(n,o+4,4)==="Exif")){var d=n.getUint16(r);if(((i=d===18761)||d===19789)&&n.getUint16(r+2,i)===42){var f=n.getUint32(r+4,i);f>=8&&(s=r+f)}}if(s){for(var p=n.getUint16(s,i),v=0;v<p;v++)if(c=s+12*v+2,n.getUint16(c,i)===274){c+=8,t=n.getUint16(c,i),n.setUint16(c,1,i);break}}return t}catch{return null}}function f0(e,t){var n=t.getBoundingClientRect(),r=n.left,i=n.top,o={left:0,top:0},s=0;return e.forEach((function(l){o.left+=(l.clientX-r)/e.length,o.top+=(l.clientY-i)/e.length})),e.forEach((function(l){s+=IS({x:o.left,y:o.top},{x:l.clientX-r,y:l.clientY-i})})),{centerMass:o,spread:s,count:e.length}}var BS={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=sh(this.processEnd),this.touches=[]},methods:{processMove:function(e,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new Pa({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=f0(t,this.$refs.container),r=this.oldGeometricProperties;r.count===n.count&&r.count>1&&this.$emit("resize",new Pa({left:r.centerMass.left-n.centerMass.left,top:r.centerMass.top-n.centerMass.top},{factor:r.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(e){return this.eventsFilter?this.eventsFilter(e,this.transforming)!==!1:(e.preventDefault(),e.stopPropagation(),!0)},onTouchStart:function(e){if(e.cancelable&&(this.touchMove||this.touchResize&&e.touches.length>1)&&this.processEvent(e)){var t=this.$refs.container,n=t.getBoundingClientRect(),r=n.left,i=n.top,o=n.bottom,s=n.right;this.touches=es(e.touches).filter((function(l){return l.clientX>r&&l.clientX<s&&l.clientY>i&&l.clientY<o})),this.oldGeometricProperties=f0(this.touches,t)}},onTouchEnd:function(e){e.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(e){var t=this;if(this.touches.length){var n=es(e.touches).filter((function(r){return!r.identifier||t.touches.find((function(i){return i.identifier===r.identifier}))}));this.processEvent(e)&&(this.processMove(e,n),this.processStart())}},onMouseDown:function(e){if(this.mouseMove&&"buttons"in e&&e.buttons===1&&this.processEvent(e)){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(e){this.touches.length&&this.processEvent(e)&&this.processMove(e,[{clientX:e.clientX,clientY:e.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(e){if(this.wheelResize&&this.processEvent(e)){var t=this.$refs.container.getBoundingClientRect(),n=t.left,r=t.top,i=1+this.wheelResize.ratio*(s=e.deltaY||e.detail||e.wheelDelta,(l=+s)==0||PS(l)?l:l>0?1:-1),o={left:e.clientX-n,top:e.clientY-r};this.$emit("resize",new Pa({},{factor:i,center:o})),this.touches.length||this.debouncedProcessEnd()}var s,l}},emits:["resize","move","transform-end"]};BS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:t[2]||(t[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onWheel:t[3]||(t[3]=function(){return o.onWheel&&o.onWheel.apply(o,arguments)})},[mt(e.$slots,"default")],544)};var uh={components:{TransformableImage:BS},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};uh.render=function(e,t,n,r,i,o){var s=ft("transformable-image");return C(),Ee(s,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:t[1]||(t[1]=function(l){return e.$emit("move",l)}),onResize:t[2]||(t[2]=function(l){return e.$emit("resize",l)})},{default:Le((function(){return[mt(e.$slots,"default")]})),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Pc=ai("vue-preview"),VS={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Pc({fill:this.fill}),wrapper:Pc("wrapper"),imageWrapper:Pc("image-wrapper"),image:vn(Pc("image"),this.imageClass)}},style:function(){if(this.fill)return{};var e={};return this.width&&(e.width="".concat(this.size.width,"px")),this.height&&(e.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},wrapperStyle:function(){var e={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},imageStyle:function(){if(this.coordinates&&this.image){var e=this.coordinates.width/this.size.width,t=Mt(Mt({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/e,scaleY:1/e}),n=this.imageSize.width,r=this.imageSize.height,i=LS({width:n,height:r},t.rotate),o={width:"".concat(n,"px"),height:"".concat(r,"px"),left:"0px",top:"0px"},s={rotate:{left:(n-i.width)*t.scaleX/2,top:(r-i.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*n/2,top:(1-t.scaleY)*r/2}};return o.transform=`translate(
42
- `.concat(-this.coordinates.left/e-s.rotate.left-s.scale.left,"px,").concat(-this.coordinates.top/e-s.rotate.top-s.scale.top,"px) ")+zS(t),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(e){(e.width||e.height)&&this.onChangeImage()}},mounted:function(){var e=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){e.refreshImage()})),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var e=this.$refs.image;this.calculatedImageSize.height=e.naturalHeight,this.calculatedImageSize.width=e.naturalWidth},refresh:function(){var e=this.$refs.root;this.width||(this.calculatedSize.width=e.clientWidth),this.height||(this.calculatedSize.height=e.clientHeight)},onChangeImage:function(){var e=this.$refs.image;e&&e.complete&&this.refreshImage(),this.refresh()}}};VS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"root",class:o.classes.root,style:o.style},[Z("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[Ct(Z("img",{ref:"image",src:n.image&&n.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[Nr,n.image&&n.image.src]])],6)],6)};var HS={components:{Preview:VS},inheritAttrs:!1};HS.render=function(e,t,n,r,i,o){var s=ft("preview");return C(),Ee(s,Ot(e.$attrs,{fill:!0}),null,16)};var pp=ai("vue-rectangle-stencil"),qS={name:"RectangleStencil",components:{StencilPreview:HS,BoundingBox:US,DraggableArea:NS},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return wm}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Em}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:vn(pp({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:vn(pp("preview"),this.previewClass),boundingBox:vn(pp("bounding-box"),this.boundingBoxClass)}},style:function(){var e=this.stencilCoordinates,t=e.height,n=e.width,r=e.left,i=e.top,o={width:"".concat(n,"px"),height:"".concat(t,"px"),transform:"translate(".concat(r,"px, ").concat(i,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(e){this.$emit("move",e),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(e){this.$emit("resize",e),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};qS.render=function(e,t,n,r,i,o){var s=ft("stencil-preview"),l=ft("draggable-area"),c=ft("bounding-box");return C(),Ee("div",{class:o.classes.stencil,style:o.style},[Z(c,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:o.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:Le((function(){return[Z(l,{movable:n.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:Le((function(){return[Z(s,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:o.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]})),_:1},8,["movable","onMove","onMoveEnd"])]})),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var b7=["transitions"],Di=ai("vue-advanced-cropper"),WS={name:"Cropper",components:{BackgroundWrapper:uh},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return qS}},backgroundWrapperComponent:{type:[Object,String],default:function(){return uh}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(e){return JH.indexOf(e)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(e){return!(typeof e=="string"&&e!=="fill"&&e!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(e){var t=e.event,n=e.coordinates,r=e.aspectRatio,i=e.positionRestrictions,o=e.sizeRestrictions,s=nt(nt({},n),{right:n.left+n.width,bottom:n.top+n.height}),l=t.params||{},c=nt({},t.directions),d=l.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(c.left=0,c.right=0),o.heightFrozen&&(c.top=0,c.bottom=0),gi.forEach((function(T){d[T]||(c[T]=0)}));var f=vi(s,c=d0({coordinates:s,directions:c,sizeRestrictions:o,positionRestrictions:i})).width,p=vi(s,c).height,v=l.preserveRatio?Dt(s):up(f/p,r);if(v){var y=l.respectDirection;if(y||(y=s.width>=s.height||v===1?"width":"height"),y==="width"){var g=f/v-s.height;if(d.top&&d.bottom){var m=c.top,b=c.bottom;c.bottom=Rc(g,b,m),c.top=Rc(g,m,b)}else d.bottom?c.bottom=g:d.top?c.top=g:d.right?c.right=0:d.left&&(c.left=0)}else if(y==="height"){var x=s.width-p*v;if(d.left&&d.right){var S=c.left,O=c.right;c.left=-Rc(x,S,O),c.right=-Rc(x,O,S)}else d.left?c.left=-x:d.right?c.right=-x:d.top?c.top=0:d.bottom&&(c.bottom=0)}c=d0({directions:c,coordinates:s,sizeRestrictions:o,positionRestrictions:i,preserveRatio:!0,compensate:l.compensate})}return f=vi(s,c).width,p=vi(s,c).height,(v=l.preserveRatio?Dt(s):up(f/p,r))&&Math.abs(v-f/p)>.001&&gi.forEach((function(T){d[T]||(c[T]=0)})),ch({event:new ym({left:-c.left,top:-c.top}),coordinates:{width:n.width+c.right+c.left,height:n.height+c.top+c.bottom,left:n.left,top:n.top},positionRestrictions:i})}},moveAlgorithm:{type:Function,default:ch},initStretcher:{type:Function,default:function(e){var t=e.stretcher,n=e.imageSize,r=Dt(n);t.style.width=n.width+"px",t.style.height=t.clientWidth/r+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(e){var t=e.visibleArea,n=e.coordinates,r=e.aspectRatio,i=e.sizeRestrictions,o=e.positionRestrictions,s=nt(nt({},n),Bi({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,i.minHeight),minWidth:Math.min(t.width,i.minWidth)}}));return s=xn(s=sr(s,qs(Cn(n),Cn(s))),Vu(Ei(t),o))}},fitVisibleArea:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.getAreaRestrictions,i=e.coordinates,o=nt({},t);o.height=o.width/Dt(n),o.top+=(t.height-o.height)/2,(i.height-o.height>0||i.width-o.width>0)&&(o=zr(o,Math.max(i.height/o.height,i.width/o.width)));var s=zu(Ys(i,Ei(o=zr(o,Bu(o,r({visibleArea:o,type:"resize"}))))));return o.width<i.width&&(s.left=0),o.height<i.height&&(s.top=0),o=xn(o=sr(o,s),r({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.imageSize,i=e.imageRestriction,o=e.type,s={};return i==="fill-area"?s={left:0,top:0,right:r.width,bottom:r.height}:i==="fit-area"&&(Dt(n)>Dt(r)?(s={top:0,bottom:r.height},t&&o==="move"&&(t.width>r.width?(s.left=-(t.width-r.width)/2,s.right=r.width-s.left):(s.left=0,s.right=r.width))):(s={left:0,right:r.width},t&&o==="move"&&(t.height>r.height?(s.top=-(t.height-r.height)/2,s.bottom=r.height-s.top):(s.top=0,s.bottom=r.height)))),s}},sizeRestrictionsAlgorithm:{type:Function,default:function(e){return{minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.imageSize,n={};return e.imageRestriction!=="none"&&(n={left:0,top:0,right:t.width,bottom:t.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:Mt({},a0)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var e=(function(t){return t*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(e))+Math.abs(this.imageAttributes.height*Math.sin(e)),height:Math.abs(this.imageAttributes.width*Math.sin(e))+Math.abs(this.imageAttributes.height*Math.cos(e))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var e=ah(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:ah(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:e}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var e=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:_n(this.minWidth)?0:$c(this.minWidth),minHeight:_n(this.minHeight)?0:$c(this.minHeight),maxWidth:_n(this.maxWidth)?1/0:$c(this.maxWidth),maxHeight:_n(this.maxHeight)?1/0:$c(this.maxHeight)});if(e=(function(r){var i=r.areaRestrictions,o=r.sizeRestrictions,s=r.boundaries,l=r.positionRestrictions,c=nt(nt({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});l.left!==void 0&&l.right!==void 0&&(c.maxWidth=Math.min(c.maxWidth,l.right-l.left)),l.bottom!==void 0&&l.top!==void 0&&(c.maxHeight=Math.min(c.maxHeight,l.bottom-l.top));var d=lh(i),f=FS(s,d);return d.width<1/0&&(!c.maxWidth||c.maxWidth>f.width)&&(c.maxWidth=Math.min(c.maxWidth,f.width)),d.height<1/0&&(!c.maxHeight||c.maxHeight>f.height)&&(c.maxHeight=Math.min(c.maxHeight,f.height)),c.minWidth>c.maxWidth&&(c.minWidth=c.maxWidth,c.widthFrozen=!0),c.minHeight>c.maxHeight&&(c.minHeight=c.maxHeight,c.heightFrozen=!0),c})({sizeRestrictions:e,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),n=lh(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));e.maxWidth=Math.min(e.maxWidth,n.width*t.width/this.boundaries.width),e.maxHeight=Math.min(e.maxHeight,n.height*t.height/this.boundaries.height),e.maxWidth<e.minWidth&&(e.minWidth=e.maxWidth),e.maxHeight<e.minHeight&&(e.minHeight=e.maxHeight)}return e}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Di(),image:vn(Di("image"),this.imageClass),stencil:Di("stencil"),boundaries:vn(Di("boundaries"),this.boundariesClass),stretcher:vn(Di("stretcher")),background:vn(Di("background"),this.backgroundClass),foreground:vn(Di("foreground"),this.foregroundClass),imageWrapper:vn(Di("image-wrapper")),cropperWrapper:vn(Di("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var e=this.coordinates,t=e.width,n=e.height,r=e.left,i=e.top;return{width:t/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(i-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var e={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(e.opacity="0"),e},imageStyle:function(){var e=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(e.width-this.imageSize.width)/(2*this.coefficient),top:(e.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*e.width/2,top:(1-1/this.coefficient)*e.height/2},r=Mt(Mt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/e.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/e.height)}),i={width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-n.left-this.imageTransforms.translateX,"px, ").concat(-t.top-n.top-this.imageTransforms.translateY,"px)")+zS(r)};return this.transitionsOptions.enabled&&(i.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),i}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var e=this;this.$nextTick((function(){e.resetCoordinates(),e.runAutoZoom("setCoordinates"),e.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(e,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return e[n]!==t[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=sh(this.update,this.debounce),this.debouncedDisableTransitions=sh(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var e=this.initialized?this.prepareResult(Mt({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:Mt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Mt({},this.visibleArea):null,imageTransforms:t,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Mt({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Pa({},{factor:1/e,center:t}),{normalize:!1,transitions:i})},move:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Pa({left:e||0,top:t||0}),{normalize:!1,transitions:i})},setCoordinates:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,i=r===void 0||r,o=n.transitions,s=o===void 0||o;this.$nextTick((function(){t.imageLoaded?(t.transitionsActive||(s&&t.enableTransitions(),t.coordinates=t.applyTransform(e),i&&t.runAutoZoom("setCoordinates"),s&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=e}))},refresh:function(){var e=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then((function(){e.onChange()})):this.resetVisibleArea().then((function(){e.onChange()}))},reset:function(){var e=this;return this.resetVisibleArea().then((function(){e.onChange(!1)}))},awaitRender:function(e){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){e(),t.awaiting=!1})))},prepareResult:function(e){return this.roundResult?(function(t){var n=t.coordinates,r=t.sizeRestrictions,i=t.positionRestrictions,o={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return o.width>r.maxWidth?o.width=Math.floor(n.width):o.width<r.minWidth&&(o.width=Math.ceil(n.width)),o.height>r.maxHeight?o.height=Math.floor(n.height):o.height<r.minHeight&&(o.height=Math.ceil(n.height)),xn(o,i)})(Mt(Mt({},this.getPublicProperties()),{},{positionRestrictions:Ac(this.positionRestrictions,this.visibleArea),coordinates:e})):e},processAutoZoom:function(e,t,n,r){var i=this.autoZoomAlgorithm;i||(i=this.stencilSize?t7:this.autoZoom?n7:r7);var o=i({event:{type:e,params:r},visibleArea:t,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return Mt(Mt({},o),{},{changed:!l0(o.visibleArea,t)||!l0(o.coordinates,n)})},runAutoZoom:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n!==void 0&&n,i=HH(t,b7),o=this.processAutoZoom(e,this.visibleArea,this.coordinates,i),s=o.visibleArea,l=o.coordinates,c=o.changed;r&&c&&this.enableTransitions(),this.visibleArea=s,this.coordinates=l,r&&c&&this.debouncedDisableTransitions()},normalizeEvent:function(e){return(function(t){var n=t.event,r=t.visibleArea,i=t.coefficient;if(n.type==="manipulateImage")return nt(nt({},n),{move:{left:n.move&&n.move.left?i*n.move.left:0,top:n.move&&n.move.top?i*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*i+r.left,top:n.scale.center.top*i+r.top}:null}});if(n.type==="resize"){var o=nt(nt({},n),{directions:nt({},n.directions)});return gi.forEach((function(l){o.directions[l]*=i})),o}if(n.type==="move"){var s=nt(nt({},n),{directions:nt({},n.directions)});return XH.forEach((function(l){s.directions[l]*=i})),s}return n})(Mt(Mt({},this.getPublicProperties()),{},{event:e}))},getCanvas:function(){if(this.$refs.canvas){var e=this.$refs.canvas,t=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(l,c,d){var f=d.rotate,p=d.flip,v={width:c.naturalWidth,height:c.naturalHeight},y=LS(v,f),g=l.getContext("2d");l.height=y.height,l.width=y.width,g.save();var m=uo(Cn(nt({left:0,top:0},v)),f);return g.translate(-(m.left-y.width/2),-(m.top-y.height/2)),g.rotate(f*Math.PI/180),g.translate(p.horizontal?v.width:0,p.vertical?v.height:0),g.scale(p.horizontal?-1:1,p.vertical?-1:1),g.drawImage(c,0,0,v.width,v.height),g.restore(),l})(this.$refs.sourceCanvas,t,this.imageTransforms):t,r=Mt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),i=function(l){return l.find((function(c){return d=c,!Number.isNaN(parseFloat(d))&&isFinite(d);var d}))},o=Bi({sizeRestrictions:{minWidth:i([r.width,r.minWidth])||0,minHeight:i([r.height,r.minHeight])||0,maxWidth:i([r.width,r.maxWidth])||1/0,maxHeight:i([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&o.width*o.height>r.maxArea){var s=Math.sqrt(r.maxArea/(o.width*o.height));o={width:Math.round(s*o.width),height:Math.round(s*o.height)}}return(function(l,c,d,f,p){l.width=f?f.width:d.width,l.height=f?f.height:d.height;var v=l.getContext("2d");v.clearRect(0,0,l.width,l.height),p&&(p.imageSmoothingEnabled&&(v.imageSmoothingEnabled=p.imageSmoothingEnabled),p.imageSmoothingQuality&&(v.imageSmoothingQuality=p.imageSmoothingQuality),p.fillColor&&(v.fillStyle=p.fillColor,v.fillRect(0,0,l.width,l.height),v.save()));var y=d.left<0?-d.left:0,g=d.top<0?-d.top:0;v.drawImage(c,d.left+y,d.top+g,d.width,d.height,y*(l.width/d.width),g*(l.height/d.height),l.width,l.height)})(e,n,this.coordinates,o,r),e}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&t?ZH(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&t?Ac(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return e7({transform:e,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var e=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?s7:o7);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=Es(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,i=this.defaultPosition||i7,o=[r,function(s){var l=s.coordinates;return Mt({},Es(i)?i({coordinates:l,imageSize:e.imageSize,visibleArea:e.visibleArea}):e.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,es(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var e=this;this.imageLoaded=!1,setTimeout((function(){var t=e.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),e.coordinates=e.defaultCoordinates(),e.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var e=this,t=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then((function(){var r={cropper:n,imageSize:e.imageSize};if(Es(e.defaultBoundaries)?e.boundaries=e.defaultBoundaries(r):e.defaultBoundaries==="fit"?e.boundaries=(function(i){var o=i.cropper,s=i.imageSize,l=o.clientHeight,c=o.clientWidth,d=l,f=s.width*l/s.height;return f>c&&(f=c,d=s.height*c/s.width),{width:f,height:d}})(r):e.boundaries=(function(i){var o=i.cropper;return{width:o.clientWidth,height:o.clientHeight}})(r),!e.boundaries.width||!e.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var e=this;return this.appliedImageTransforms=Mt(Mt({},this.defaultImageTransforms),{},{flip:Mt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){e.priority!=="visible-area"&&(e.visibleArea=null,e.resetCoordinates());var t,n,r,i,o,s,l=e.defaultVisibleArea||a7;e.visibleArea=Es(l)?l({imageSize:e.imageSize,boundaries:e.boundaries,coordinates:e.priority!=="visible-area"?e.coordinates:null,getAreaRestrictions:e.getAreaRestrictions,stencilSize:e.getStencilSize()}):e.defaultVisibleArea,e.visibleArea=(t={visibleArea:e.visibleArea,boundaries:e.boundaries,getAreaRestrictions:e.getAreaRestrictions},n=t.visibleArea,r=t.boundaries,i=t.getAreaRestrictions,o=nt({},n),s=Dt(r),o.width/o.height!==s&&(o.height=o.width/s),xn(o,i({visibleArea:o,type:"move"}))),e.priority==="visible-area"?e.resetCoordinates():e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("resetVisibleArea")})).catch((function(){e.visibleArea=null}))},updateVisibleArea:function(){var e=this;return this.updateBoundaries().then((function(){e.visibleArea=e.fitVisibleArea({imageSize:e.imageSize,boundaries:e.boundaries,visibleArea:e.visibleArea,coordinates:e.coordinates,getAreaRestrictions:e.getAreaRestrictions}),e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("updateVisibleArea")})).catch((function(){e.visibleArea=null}))},onChange:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var e,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(i){if(o0(i))return!1;var o=window.location,s=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i)||[],l={protocol:s[1]||"",host:s[2]||"",port:s[3]||""},c=function(d){return d.port||((d.protocol||o.protocol)==="http"?80:433)};return!(!l.protocol&&!l.host&&!l.port||l.protocol&&l.protocol==o.protocol&&l.host&&l.host==o.host&&l.host&&c(l)==c(o))})(this.src)){var n=_n(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(e=this.src,new Promise((function(i){_7(e).then((function(o){var s=y7(o);i(o?{source:e,arrayBuffer:o,orientation:s}:{source:e,arrayBuffer:null,orientation:null})})).catch((function(o){console.warn(o),i({source:e,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){r.then(t.onParseImage)}),this.transitionTime)}else setTimeout((function(){t.onParseImage({source:t.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var e=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){e.$emit("ready"),e.onChange(!1)})))},onParseImage:function(e){var t=this,n=e.source,r=e.arrayBuffer,i=e.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&i&&i>1?RS(n)||!o0(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(o){for(var s=[],l=new Uint8Array(o);l.length>0;){var c=l.subarray(0,8192);s.push(String.fromCharCode.apply(null,Array.from?Array.from(c):c.slice())),l=l.subarray(8192)}return"data:image/jpeg;base64,"+btoa(s.join(""))})(r):this.imageAttributes.src=n,Es(this.defaultTransforms)?this.appliedImageTransforms=fp(this.defaultTransforms()):Jc(this.defaultTransforms)?this.appliedImageTransforms=fp(this.defaultTransforms):this.appliedImageTransforms=(function(o){var s=fp({});if(o)switch(o){case 2:s.flip.horizontal=!0;break;case 3:s.rotate=-180;break;case 4:s.flip.vertical=!0;break;case 5:s.rotate=90,s.flip.vertical=!0;break;case 6:s.rotate=90;break;case 7:s.rotate=90,s.flip.horizontal=!0;break;case 8:s.rotate=-90}return s})(i),this.defaultImageTransforms=Mt(Mt({},this.appliedImageTransforms),{},{flip:Mt({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var o=t.$refs.image;o&&o.complete&&((function(s){return!!s.naturalWidth})(o)?t.onSuccessLoadImage():t.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(e){var t=this;this.transitionsOptions.enabled||this.awaitRender((function(){t.coordinates=t.moveAlgorithm(Mt(Mt({},t.getPublicProperties()),{},{positionRestrictions:Ac(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(e)})),t.onChange()}))},onResize:function(e){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=t.sizeRestrictions,r=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(Mt(Mt({},t.getPublicProperties()),{},{positionRestrictions:Ac(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,t.visibleArea.width),maxHeight:Math.min(n.maxHeight,t.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:t.normalizeEvent(e)})),t.onChange(),t.ticking=!1}))},onManipulateImage:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=t.transitions,r=n!==void 0&&n,i=t.normalize,o=i===void 0||i;r&&this.enableTransitions();var s=l7(Mt(Mt({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(e):e,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),l=s.visibleArea,c=s.coordinates;this.visibleArea=l,this.coordinates=c,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.visibleArea,n=e.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:r})},getAspectRatio:function(e){var t,n,r=this.stencilProps,i=r.aspectRatio,o=r.minAspectRatio,s=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var l=this.$refs.stencil.aspectRatios();t=l.minimum,n=l.maximum}if(_n(t)&&(t=_n(i)?o:i),_n(n)&&(n=_n(i)?s:i),!e&&(_n(t)||_n(n))){var c=this.getStencilSize(),d=c?Dt(c):null;_n(t)&&(t=s0(d)?d:void 0),_n(n)&&(n=s0(d)?d:void 0)}return{minimum:t,maximum:n}},getStencilSize:function(){if(this.stencilSize)return e={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=e.boundaries,n=e.stencilSize,r=e.aspectRatio,up(Dt(i=Es(n)?n({boundaries:t,aspectRatio:r}):n),r)&&(i=Bi({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(i.width>t.width||i.height>t.height)&&(i=Bi({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:Dt(i),maximum:Dt(i)}})),i;var e,t,n,r,i},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return Mt({},a0)},flip:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;if(!this.transitionsActive){i&&this.enableTransitions();var o=Mt({},this.imageTransforms.flip),s=u7({flip:{horizontal:e?!o.horizontal:o.horizontal,vertical:t?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),l=s.visibleArea,c=s.coordinates;e&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=l,this.coordinates=c,this.onChange(),i&&this.debouncedDisableTransitions()}},rotate:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var i=Mt({},this.imageSize);this.appliedImageTransforms.rotate+=e;var o=c7({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:i,imageSize:this.imageSize,angle:e,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=o.visibleArea,l=o.coordinates,c=this.processAutoZoom("rotateImage",s,l);s=c.visibleArea,l=c.coordinates,this.visibleArea=s,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},w7={key:0,ref:"canvas",style:{display:"none"}},E7={key:1,ref:"sourceCanvas",style:{display:"none"}};WS.render=function(e,t,n,r,i,o){return C(),Ee("div",{ref:"cropper",class:o.classes.cropper},[Z("div",{ref:"stretcher",class:o.classes.stretcher},null,2),Z("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(C(),Ee(Pn(n.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:Le((function(){return[Z("div",{class:o.classes.background,style:o.boundariesStyle},null,6),Z("div",{class:o.classes.imageWrapper},[Z("img",{ref:"image",crossorigin:i.imageAttributes.crossOrigin,src:i.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:t[1]||(t[1]=ht((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),Z("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),Ct((C(),Ee(Pn(n.stencilComponent),Ot({ref:"stencil",image:o.image,coordinates:i.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},n.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Nr,i.imageLoaded]]),n.canvas?(C(),Ee("canvas",w7,null,512)):Se("",!0),n.canvas?(C(),Ee("canvas",E7,null,512)):Se("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const wr=(e,t)=>{const{o:n,i:r,u:i}=e;let o=n,s;const l=(f,p)=>{const v=o,y=f,g=p||(r?!r(v,y):v!==y);return(g||i)&&(o=y,s=v),[o,g,s]};return[t?f=>l(t(o,s),f):l,f=>[o,!!f,s]]},S7=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,nr=S7?window:{},YS=Math.max,C7=Math.min,dh=Math.round,po=Math.abs,p0=Math.sign,Sm=nr.cancelAnimationFrame,qa=nr.requestAnimationFrame,Cm=nr.setTimeout,KS=nr.clearTimeout,Hu=e=>typeof nr[e]<"u"?nr[e]:void 0,x7=Hu("MutationObserver"),h0=Hu("IntersectionObserver"),$s=Hu("ResizeObserver"),Ra=Hu("ScrollTimeline"),xm=e=>e===void 0,qu=e=>e===null,vo=e=>typeof e=="number",na=e=>typeof e=="string",Wu=e=>typeof e=="boolean",li=e=>typeof e=="function",Vr=e=>Array.isArray(e),mu=e=>typeof e=="object"&&!Vr(e)&&!qu(e),Tm=e=>{const t=!!e&&e.length,n=vo(t)&&t>-1&&t%1==0;return Vr(e)||!li(e)&&n?t>0&&mu(e)?t-1 in e:!0:!1},Wa=e=>!!e&&e.constructor===Object,vu=e=>e instanceof HTMLElement,Yu=e=>e instanceof Element;function zt(e,t){if(Tm(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&zt(Object.keys(e),(n=>t(e[n],n,e)));return e}const GS=(e,t)=>e.indexOf(t)>=0,Ks=(e,t)=>e.concat(t),en=(e,t,n)=>(!na(t)&&Tm(t)?Array.prototype.push.apply(e,t):e.push(t),e),To=e=>Array.from(e||[]),km=e=>Vr(e)?e:!na(e)&&Tm(e)?To(e):[e],gu=e=>!!e&&!e.length,_u=e=>To(new Set(e)),Sr=(e,t,n)=>{zt(e,i=>i?i.apply(void 0,t||[]):!0),n||(e.length=0)},QS="paddingTop",XS="paddingRight",JS="paddingLeft",ZS="paddingBottom",eC="marginLeft",tC="marginRight",nC="marginBottom",Om="overflowX",$m="overflowY",dl="width",fl="height",Ui="visible",ti="hidden",Go="scroll",T7=e=>{const t=String(e||"");return t?t[0].toUpperCase()+t.slice(1):""},Ku=(e,t,n,r)=>{if(e&&t){let i=!0;return zt(n,(o=>{const s=e[o],l=t[o];s!==l&&(i=!1)})),i}return!1},Am=(e,t)=>Ku(e,t,["w","h"]),Zc=(e,t)=>Ku(e,t,["x","y"]),k7=(e,t)=>Ku(e,t,["t","r","b","l"]),dt=(e,...t)=>e.bind(0,...t),As=e=>{let t;const n=e?Cm:qa,r=e?KS:Sm;return[i=>{r(t),t=n((()=>i()),li(e)?e():e)},()=>r(t)]},m0=e=>{const t=li(e)?e():e;if(vo(t)){const n=t?Cm:qa,r=t?KS:Sm;return i=>{const o=n((()=>i()),t);return()=>{r(o)}}}return t&&t._},rC=(e,t)=>{const{p:n,v:r,S:i,m:o}=t||{};let s,l,c,d;const f=function(m){l&&l(),s&&s(),d=l=s=c=void 0,e.apply(this,m)},p=g=>o&&c?o(c,g):g,v=()=>{l&&c&&f(p(c)||c)},y=function(){const m=To(arguments),b=m0(n);if(b){const x=typeof i=="function"?i():i,S=m0(r),T=p(m)||m,A=f.bind(0,T);l&&l(),x&&!d?(A(),d=!0,l=b((()=>d=void 0))):(l=b(A),S&&!s&&(s=S(v))),c=T}else f(m)};return y.O=v,y},iC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Zn=e=>e?Object.keys(e):[],Ft=(e,t,n,r,i,o,s)=>{const l=[t,n,r,i,o,s];return(typeof e!="object"||qu(e))&&!li(e)&&(e={}),zt(l,(c=>{zt(c,((d,f)=>{const p=c[f];if(e===p)return!0;const v=Vr(p);if(p&&Wa(p)){const y=e[f];let g=y;v&&!Vr(y)?g=[]:!v&&!Wa(y)&&(g={}),e[f]=Ft(g,p)}else e[f]=v?p.slice():p}))})),e},oC=(e,t)=>zt(Ft({},e),((n,r,i)=>{n===void 0?delete i[r]:n&&Wa(n)&&(i[r]=oC(n))})),Rm=e=>!Zn(e).length,Ya=()=>{},sC=(e,t,n)=>YS(e,C7(t,n)),Qo=e=>_u((Vr(e)?e:(e||"").split(" ")).filter((t=>t))),Pm=(e,t)=>e&&e.getAttribute(t),v0=(e,t)=>e&&e.hasAttribute(t),Li=(e,t,n)=>{zt(Qo(t),(r=>{e&&e.setAttribute(r,String(n||""))}))},pi=(e,t)=>{zt(Qo(t),(n=>e&&e.removeAttribute(n)))},Gu=(e,t)=>{const n=Qo(Pm(e,t)),r=dt(Li,e,t),i=(o,s)=>{const l=new Set(n);return zt(Qo(o),(c=>{l[s](c)})),To(l).join(" ")};return{C:o=>r(i(o,"delete")),$:o=>r(i(o,"add")),H:o=>{const s=Qo(o);return s.reduce(((l,c)=>l&&n.includes(c)),s.length>0)}}},aC=(e,t,n)=>(Gu(e,t).C(n),dt(Im,e,t,n)),Im=(e,t,n)=>(Gu(e,t).$(n),dt(aC,e,t,n)),yu=(e,t,n,r)=>(r?Im:aC)(e,t,n),Mm=(e,t,n)=>Gu(e,t).H(n),lC=e=>Gu(e,"class"),cC=(e,t)=>{lC(e).C(t)},Qu=(e,t)=>(lC(e).$(t),dt(cC,e,t)),uC=(e,t)=>{const n=t?Yu(t)&&t:document;return n?To(n.querySelectorAll(e)):[]},O7=(e,t)=>{const n=t?Yu(t)&&t:document;return n&&n.querySelector(e)},fh=(e,t)=>Yu(e)&&e.matches(t),dC=e=>fh(e,"body"),ph=e=>e?To(e.childNodes):[],Ka=e=>e&&e.parentElement,Rs=(e,t)=>Yu(e)&&e.closest(t),hh=e=>document.activeElement,$7=(e,t,n)=>{const r=Rs(e,t),i=e&&O7(n,r),o=Rs(i,t)===r;return r&&i?r===e||i===e||o&&Rs(Rs(e,n),t)!==r:!1},Gs=e=>{zt(km(e),(t=>{const n=Ka(t);t&&n&&n.removeChild(t)}))},Vn=(e,t)=>dt(Gs,e&&t&&zt(km(t),(n=>{n&&e.appendChild(n)})));let fC;const A7=()=>fC,R7=e=>{fC=e},Ds=e=>{const t=document.createElement("div");return Li(t,"class",e),t},Dm=e=>{const t=Ds(),n=A7(),r=e.trim();return t.innerHTML=n?n.createHTML(r):r,zt(ph(t),(i=>Gs(i)))},g0=(e,t)=>e.getPropertyValue(t)||e[t]||"",pC=e=>{const t=e||0;return isFinite(t)?t:0},Ic=e=>pC(parseFloat(e||"")),mh=e=>Math.round(e*1e4)/1e4,hC=e=>`${mh(pC(e))}px`;function Qs(e,t){e&&t&&zt(t,((n,r)=>{try{const i=e.style,o=qu(n)||Wu(n)?"":vo(n)?hC(n):n;r.indexOf("--")===0?i.setProperty(r,o):i[r]=o}catch{}}))}function Si(e,t,n){const r=na(t);let i=r?"":{};if(e){const o=nr.getComputedStyle(e,n)||e.style;i=r?g0(o,t):To(t).reduce(((s,l)=>(s[l]=g0(o,l),s)),i)}return i}const _0=(e,t,n)=>{const r=t?`${t}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,s=`${r}right${i}`,l=`${r}bottom${i}`,c=`${r}left${i}`,d=Si(e,[o,s,l,c]);return{t:Ic(d[o]),r:Ic(d[s]),b:Ic(d[l]),l:Ic(d[c])}},hp=(e,t)=>`translate${mu(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,P7=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),I7={w:0,h:0},Xu=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:I7,M7=e=>Xu("inner",e||nr),go=dt(Xu,"offset"),mC=dt(Xu,"client"),bu=dt(Xu,"scroll"),Fm=e=>{const t=parseFloat(Si(e,dl))||0,n=parseFloat(Si(e,fl))||0;return{w:t-dh(t),h:n-dh(n)}},mp=e=>e.getBoundingClientRect(),D7=e=>!!e&&P7(e),vh=e=>!!(e&&(e[fl]||e[dl])),vC=(e,t)=>{const n=vh(e);return!vh(t)&&n},y0=(e,t,n,r)=>{zt(Qo(t),(i=>{e&&e.removeEventListener(i,n,r)}))},Ht=(e,t,n,r)=>{var i;const o=(i=r&&r.D)!=null?i:!0,s=r&&r.I||!1,l=r&&r.A||!1,c={passive:o,capture:s};return dt(Sr,Qo(t).map((d=>{const f=l?p=>{y0(e,d,f,s),n&&n(p)}:n;return e&&e.addEventListener(d,f,c),dt(y0,e,d,f,s)})))},Lm=e=>e.stopPropagation(),gh=e=>e.preventDefault(),gC=e=>Lm(e)||gh(e),Ur=(e,t)=>{const{x:n,y:r}=vo(t)?{x:t,y:t}:t||{};vo(n)&&(e.scrollLeft=n),vo(r)&&(e.scrollTop=r)},Er=e=>({x:e.scrollLeft,y:e.scrollTop}),_C=()=>({T:{x:0,y:0},k:{x:0,y:0}}),F7=(e,t)=>{const{T:n,k:r}=e,{w:i,h:o}=t,s=(p,v,y)=>{let g=p0(p)*y,m=p0(v)*y;if(g===m){const b=po(p),x=po(v);m=b>x?0:m,g=b<x?0:g}return g=g===m?0:g,[g+0,m+0]},[l,c]=s(n.x,r.x,i),[d,f]=s(n.y,r.y,o);return{T:{x:l,y:d},k:{x:c,y:f}}},vp=({T:e,k:t})=>{const n=(r,i)=>r===0&&r<=i;return{x:n(e.x,t.x),y:n(e.y,t.y)}},b0=({T:e,k:t},n)=>{const r=(i,o,s)=>sC(0,1,(i-s)/(i-o)||0);return{x:r(e.x,t.x,n.x),y:r(e.y,t.y,n.y)}},_h=e=>{e&&e.focus&&e.focus({preventScroll:!0,focusVisible:!1})},w0=(e,t)=>{zt(km(t),e)},yh=e=>{const t=new Map,n=(o,s)=>{if(o){const l=t.get(o);w0((c=>{l&&l[c?"delete":"clear"](c)}),s)}else t.forEach((l=>{l.clear()})),t.clear()},r=(o,s)=>{if(na(o)){const d=t.get(o)||new Set;return t.set(o,d),w0((f=>{li(f)&&d.add(f)}),s),dt(n,o,s)}Wu(s)&&s&&n();const l=Zn(o),c=[];return zt(l,(d=>{const f=o[d];f&&en(c,r(d,f))})),dt(Sr,c)},i=(o,s)=>{zt(To(t.get(o)),(l=>{s&&!gu(s)?l.apply(0,s):l()}))};return r(e||{}),[r,n,i]},yC={},bC={},L7=e=>{zt(e,(t=>zt(t,((n,r)=>{yC[r]=t[r]}))))},wC=(e,t,n)=>Zn(e).map((r=>{const{static:i,instance:o}=e[r],[s,l,c]=n||[],d=n?o:i;if(d){const f=n?d(s,l,t):d(t);return(c||bC)[r]=f}})),j7=(e,t)=>e[t],ra=e=>j7(bC,e),U7="__osOptionsValidationPlugin",ia="data-overlayscrollbars",eu="os-environment",Mc=`${eu}-scrollbar-hidden`,gp=`${ia}-initialize`,tu="noClipping",E0=`${ia}-body`,_o=ia,N7="host",ji=`${ia}-viewport`,z7=Om,B7=$m,V7="arrange",EC="measuring",H7="scrolling",SC="scrollbarHidden",q7="noContent",bh=`${ia}-padding`,S0=`${ia}-content`,jm="os-size-observer",W7=`${jm}-appear`,Um=`${jm}-listener`,Y7=`${Um}-scroll`,nu=`${Um}-item`,C0=`${nu}-final`,K7="os-trinsic-observer",G7="os-theme-none",Cr="os-scrollbar",Q7=`${Cr}-rtl`,X7=`${Cr}-horizontal`,J7=`${Cr}-vertical`,CC=`${Cr}-track`,Nm=`${Cr}-handle`,Z7=`${Cr}-visible`,e9=`${Cr}-cornerless`,x0=`${Cr}-interaction`,T0=`${Cr}-unusable`,wh=`${Cr}-auto-hide`,t9=`${wh}-hidden`,k0=`${Cr}-wheel`,n9=`${CC}-interactive`,r9=`${Nm}-interactive`,xC="__osSizeObserverPlugin",i9={[xC]:{static:()=>(e,t,n)=>{const i="scroll",o=Dm(`<div class="${nu}" dir="ltr"><div class="${nu}"><div class="${C0}"></div></div><div class="${nu}"><div class="${C0}" style="width: 200%; height: 200%"></div></div></div>`),s=o[0],l=s.lastChild,c=s.firstChild,d=c?.firstChild;let f=go(s),p=f,v=!1,y;const g=()=>{Ur(c,3333333),Ur(l,3333333)},m=S=>{y=0,v&&(f=p,t(S===!0))},b=S=>{p=go(s),v=!S||!Am(p,f),S?(Lm(S),v&&!y&&(Sm(y),y=qa(m))):m(S===!1),g()},x=[Vn(e,o),Ht(c,i,b),Ht(l,i,b)];return Qu(e,Y7),Qs(d,{[dl]:3333333,[fl]:3333333}),qa(g),[n?dt(b,!1):g,x]}}},o9=(e,t)=>{const{M:n}=t,[r,i]=e("showNativeOverlaidScrollbars");return[r&&n.x&&n.y,i]},Ps=e=>e.indexOf(Ui)===0,s9=e=>e.replace(`${Ui}-`,""),Eh=(e,t)=>{if(e==="auto")return t?Go:ti;const n=e||ti;return[ti,Go,Ui].includes(n)?n:ti},a9=(e,t)=>{const{overflowX:n,overflowY:r}=Si(e,[Om,$m]);return{x:Eh(n,t.x),y:Eh(r,t.y)}},zm="__osScrollbarsHidingPlugin",l9="__osClickScrollPlugin",O0=e=>JSON.stringify(e,((t,n)=>{if(li(n))throw 0;return n})),$0=(e,t)=>e?`${t}`.split(".").reduce(((n,r)=>n&&iC(n,r)?n[r]:void 0),e):void 0,c9=[0,33],TC=[33,99],kC=[222,666,!0],u9={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:c9,resize:null,event:TC,env:kC},attributes:null,ignoreMutation:null,flowDirectionStyles:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},OC=(e,t)=>{const n={},r=Ks(Zn(t),Zn(e));return zt(r,(i=>{const o=e[i],s=t[i];if(mu(o)&&mu(s))Ft(n[i]={},OC(o,s)),Rm(n[i])&&delete n[i];else if(iC(t,i)&&s!==o){let l=!0;if(Vr(o)||Vr(s))try{O0(o)===O0(s)&&(l=!1)}catch{}l&&(n[i]=s)}})),n},_p=(e,t,n)=>r=>[$0(e,r),n||$0(t,r)!==void 0];let $C;const d9=()=>$C,f9=e=>{$C=e};let yp;const p9=()=>{const e=(T,A,M)=>{Vn(document.body,T),Vn(document.body,T);const z=mC(T),Y=go(T),ve=Fm(A);return M&&Gs(T),{x:Y.h-z.h+ve.h,y:Y.w-z.w+ve.w}},t=T=>{let A=!1;const M=Qu(T,Mc);try{A=Si(T,"scrollbar-width")==="none"||Si(T,"display","::-webkit-scrollbar")==="none"}catch{}return M(),A},n=`.${eu}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${eu} div{width:200%;height:200%;margin:10px 0}.${Mc}{scrollbar-width:none!important}.${Mc}::-webkit-scrollbar,.${Mc}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,i=Dm(`<div class="${eu}"><div></div><style>${n}</style></div>`)[0],o=i.firstChild,s=i.lastChild,l=d9();l&&(s.nonce=l);const[c,,d]=yh(),[f,p]=wr({o:e(i,o),i:Zc},dt(e,i,o,!0)),[v]=p(),y=t(i),g={x:v.x===0,y:v.y===0},m={elements:{host:null,padding:!y,viewport:T=>y&&dC(T)&&T,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},b=Ft({},u9),x=dt(Ft,{},b),S=dt(Ft,{},m),O={U:v,M:g,P:y,J:!!Ra,G:dt(c,"r"),K:S,Z:T=>Ft(m,T)&&S(),tt:x,nt:T=>Ft(b,T)&&x(),ot:Ft({},m),st:Ft({},b)};if(pi(i,"style"),Gs(i),Ht(nr,"resize",(()=>{d("r",[])})),li(nr.matchMedia)&&!y&&(!g.x||!g.y)){const T=A=>{const M=nr.matchMedia(`(resolution: ${nr.devicePixelRatio}dppx)`);Ht(M,"change",(()=>{A(),T(A)}),{A:!0})};T((()=>{const[A,M]=f();Ft(O.U,A),d("r",[M])}))}return O},xi=()=>(yp||(yp=p9()),yp),h9=(e,t,n)=>{let r=!1;const i=n?new WeakMap:!1,o=()=>{r=!0},s=l=>{if(i&&n){const c=n.map((d=>{const[f,p]=d||[];return[p&&f?(l||uC)(f,e):[],p]}));zt(c,(d=>zt(d[0],(f=>{const p=d[1],v=i.get(f)||[];if(e.contains(f)&&p){const g=Ht(f,p,(m=>{r?(g(),i.delete(f)):t(m)}));i.set(f,en(v,g))}else Sr(v),i.delete(f)}))))}};return s(),[o,s]},A0=(e,t,n,r)=>{let i=!1;const{et:o,ct:s,rt:l,it:c,lt:d,ut:f}=r||{},[p,v]=h9(e,(()=>i&&n(!0)),l),y=o||[],g=s||[],m=Ks(y,g),b=(S,O)=>{if(!gu(O)){const T=d||Ya,A=f||Ya,M=[],z=[];let Y=!1,ve=!1;if(zt(O,(W=>{const{attributeName:X,target:K,type:L,oldValue:D,addedNodes:ne,removedNodes:le}=W,je=L==="attributes",J=L==="childList",j=e===K,de=je&&X,U=de&&Pm(K,X||""),ee=na(U)?U:null,Q=de&&D!==ee,B=GS(g,X)&&Q;if(t&&(J||!j)){const oe=je&&Q,V=oe&&c&&fh(K,c),F=(V?!T(K,X,D,ee):!je||oe)&&!A(W,!!V,e,r);zt(ne,(G=>en(M,G))),zt(le,(G=>en(M,G))),ve=ve||F}!t&&j&&Q&&!T(K,X,D,ee)&&(en(z,X),Y=Y||B)})),v((W=>_u(M).reduce(((X,K)=>(en(X,uC(W,K)),fh(K,W)?en(X,K):X)),[]))),t)return!S&&ve&&n(!1),[!1];if(!gu(z)||Y){const W=[_u(z),Y];return S||n.apply(0,W),W}}},x=new x7(dt(b,!1));return[()=>(x.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:m,subtree:t,childList:t,characterData:t}),i=!0,()=>{i&&(p(),x.disconnect(),i=!1)}),()=>{if(i)return b(!0,x.takeRecords())}]};let Uo=null;const AC=(e,t,n)=>{const{ft:r}=n||{},i=ra(xC),[o]=wr({o:!1,u:!0});return()=>{const s=[],c=Dm(`<div class="${jm}"><div class="${Um}"></div></div>`)[0],d=c.firstChild,f=p=>{const v=Vr(p)&&!gu(p);let y=!1,g=!1;if(v){const m=p[0],[b,,x]=o(m.contentRect),S=vh(b);g=vC(b,x),y=!g&&!S}else g=p===!0;y||t({_t:!0,ft:g})};if($s){if(!Wu(Uo)){const g=new $s(Ya);g.observe(e,{get box(){Uo=!0}}),Uo=Uo||!1,g.disconnect()}const p=rC(f,{p:0,v:0}),v=g=>p(g),y=new $s(v);if(y.observe(Uo?e:d),en(s,[()=>{y.disconnect()},!Uo&&Vn(e,c)]),Uo){const g=new $s(v);g.observe(e,{box:"border-box"}),en(s,(()=>g.disconnect()))}}else if(i){const[p,v]=i(d,f,r);en(s,Ks([Qu(c,W7),Ht(c,"animationstart",p),Vn(e,c)],v))}else return Ya;return dt(Sr,s)}},m9=(e,t)=>{let n;const r=c=>c.h===0||c.isIntersecting||c.intersectionRatio>0,i=Ds(K7),[o]=wr({o:!1}),s=(c,d)=>{if(c){const f=o(r(c)),[,p]=f;return p&&!d&&t(f)&&[f]}},l=(c,d)=>s(d.pop(),c);return[()=>{const c=[];if(h0)n=new h0(dt(l,!1),{root:e}),n.observe(i),en(c,(()=>{n.disconnect()}));else{const d=()=>{const f=go(i);s(f)};en(c,AC(i,d)()),d()}return dt(Sr,en(c,Vn(e,i)))},()=>n&&l(!0,n.takeRecords())]},v9=(e,t,n,r)=>{let i,o,s,l,c,d,f,p;const v=`[${_o}]`,y=`[${ji}]`,g=["id","class","style","open","wrap","cols","rows"],{dt:m,vt:b,L:x,gt:S,ht:O,V:T,bt:A,yt:M,wt:z,St:Y}=e,ve=P=>Si(P,"direction")==="rtl",W=()=>{let P,F,G;const N=rC(r,{p:()=>P,v:()=>F,S:()=>G,m(ge,fe){const[pe]=ge,[Ce]=fe;return[Ks(Zn(pe),Zn(Ce)).reduce((($e,Ke)=>($e[Ke]=pe[Ke]||Ce[Ke],$e)),{})]}}),ie=(ge,fe)=>{if(Vr(fe)){const[pe,Ce,$e]=fe;P=pe,F=Ce,G=$e}else vo(fe)?(P=fe,F=!1,G=!1):(P=!1,F=!1,G=!1);N(ge)};return ie.O=N.O,ie},X={Ot:!1,B:ve(m)},K=xi(),L=ra(zm),[D]=wr({i:Am,o:{w:0,h:0}},(()=>{const P=L&&L.R(e,t,X,K,n).Y,G=!(A&&T)&&Mm(b,_o,tu),N=!T&&M(V7),ie=N&&Er(S),ge=ie&&Y(),fe=z(EC,G),pe=N&&P&&P(),Ce=bu(x),$e=Fm(x);return pe&&pe(),Ur(S,ie),ge&&ge(),G&&fe(),{w:Ce.w+$e.w,h:Ce.h+$e.h}})),ne=W(),le=P=>{const F=ve(m);Ft(P,{Ct:p!==F}),Ft(X,{B:F}),p=F},je=(P,F)=>{const[G,N]=P,ie={$t:N};return Ft(X,{Ot:G}),F||r(ie),ie},J=({_t:P,ft:F})=>{const G=F?r:ne,N={_t:P||F,ft:F};le(N),G(N,o)},j=(P,F)=>{const[,G]=D(),N={xt:G};return le(N),G&&!F&&ne(N,P?s:i),N},de=(P,F,G)=>{const N={Ht:F};return le(N),F&&!G&&ne(N,i),N},[U,ee]=O?m9(b,je):[],Q=!T&&AC(b,J,{ft:!0}),[B,oe]=A0(b,!1,de,{ct:g,et:g}),V=T&&$s&&new $s((P=>{const F=P[P.length-1].contentRect;J({_t:!0,ft:vC(F,f)}),f=F}));return[()=>{V&&V.observe(b);const P=Q&&Q(),F=U&&U(),G=B(),N=K.G((ie=>{const[,ge]=D();ne({Et:ie,xt:ge,_t:A},l)}));return()=>{V&&V.disconnect(),P&&P(),F&&F(),d&&d(),G(),N()}},({Dt:P,zt:F,It:G})=>{const N={},[ie]=P("update.ignoreMutation"),[ge,fe]=P("update.attributes"),[pe,Ce]=P("update.elementEvents"),[$e,Ke]=P("update.debounce"),Ne=Ce||fe,tt=F||G,Ge=Ze=>li(ie)&&!!ie(Ze);if(Ne){c&&c(),d&&d();const[Ze,Pt]=A0(O||x,!0,j,{et:Ks(g,ge||[]),rt:pe,it:v,ut:(St,Nt)=>{const{target:It,attributeName:qt}=St;return(!Nt&&qt&&!T?$7(It,v,y):!1)||!!Rs(It,`.${Cr}`)||Ge(St)}});d=Ze(),c=Pt}if(Ke&&(ne.O(),Vr($e)||vo($e)?(i=$e,o=!1,s=TC,l=kC):Wa($e)?(i=$e.mutation,o=$e.resize,s=$e.event,l=$e.env):(i=!1,o=!1,s=!1,l=!1)),tt){const Ze=oe(),Pt=ee&&ee(),St=c&&c();Ze&&Ft(N,de(Ze[0],Ze[1],tt)),Pt&&Ft(N,je(Pt[0],tt)),St&&Ft(N,j(St[0],tt))}return le(N),N},X]},RC=(e,t)=>li(t)?t.apply(0,e):t,g9=(e,t,n,r)=>{const i=xm(r)?n:r;return RC(e,i)||t.apply(0,e)},PC=(e,t,n,r)=>{const i=xm(r)?n:r,o=RC(e,i);return!!o&&(vu(o)?o:t.apply(0,e))},_9=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{M:i,P:o,K:s}=xi(),{nativeScrollbarsOverlaid:l,body:c}=s().cancel,d=n??l,f=xm(r)?c:r,p=(i.x||i.y)&&d,v=e&&(qu(f)?!o:f);return!!p||!!v},y9=(e,t,n,r)=>{const i="--os-viewport-percent",o="--os-scroll-percent",s="--os-scroll-direction",{K:l}=xi(),{scrollbars:c}=l(),{slot:d}=c,{dt:f,vt:p,L:v,At:y,gt:g,bt:m,V:b}=t,{scrollbars:x}=y?{}:e,{slot:S}=x||{},O=[],T=[],A=[],M=PC([f,p,v],(()=>b&&m?f:p),d,S),z=U=>{if(Ra){let ee=null,Q=[];const B=new Ra({source:g,axis:U}),oe=()=>{ee&&ee.cancel(),ee=null};return{Mt:P=>{const{Tt:F}=n,G=vp(F)[U],N=U==="x",ie=[hp(0,N),hp(`calc(-100% + 100cq${N?"w":"h"})`,N)],ge=G?ie:ie.reverse();return Q[0]===ge[0]&&Q[1]===ge[1]||(Q=ge,oe(),ee=P.kt.animate({clear:["left"],transform:ge},{timeline:B})),oe}}}},Y={x:z("x"),y:z("y")},ve=()=>{const{Rt:U,Vt:ee}=n,Q=(B,oe)=>sC(0,1,B/(B+oe)||0);return{x:Q(ee.x,U.x),y:Q(ee.y,U.y)}},W=(U,ee,Q)=>{const B=Q?Qu:cC;zt(U,(oe=>{B(oe.Lt,ee)}))},X=(U,ee)=>{zt(U,(Q=>{const[B,oe]=ee(Q);Qs(B,oe)}))},K=(U,ee,Q)=>{const B=Wu(Q),oe=B?Q:!0,V=B?!Q:!0;oe&&W(T,U,ee),V&&W(A,U,ee)},L=()=>{const U=ve(),ee=Q=>B=>[B.Lt,{[i]:mh(Q)+""}];X(T,ee(U.x)),X(A,ee(U.y))},D=()=>{if(!Ra){const{Tt:U}=n,ee=b0(U,Er(g)),Q=B=>oe=>[oe.Lt,{[o]:mh(B)+""}];X(T,Q(ee.x)),X(A,Q(ee.y))}},ne=()=>{const{Tt:U}=n,ee=vp(U),Q=B=>oe=>[oe.Lt,{[s]:B?"0":"1"}];X(T,Q(ee.x)),X(A,Q(ee.y)),Ra&&(T.forEach(Y.x.Mt),A.forEach(Y.y.Mt))},le=()=>{if(b&&!m){const{Rt:U,Tt:ee}=n,Q=vp(ee),B=b0(ee,Er(g)),oe=V=>{const{Lt:P}=V,F=Ka(P)===v&&P,G=(N,ie,ge)=>{const fe=ie*N;return hC(ge?fe:-fe)};return[F,F&&{transform:hp({x:G(B.x,U.x,Q.x),y:G(B.y,U.y,Q.y)})}]};X(T,oe),X(A,oe)}},je=U=>{const ee=U?"x":"y",B=Ds(`${Cr} ${U?X7:J7}`),oe=Ds(CC),V=Ds(Nm),P={Lt:B,Pt:oe,kt:V},F=Y[ee];return en(U?T:A,P),en(O,[Vn(B,oe),Vn(oe,V),dt(Gs,B),F&&F.Mt(P),r(P,K,U)]),P},J=dt(je,!0),j=dt(je,!1),de=()=>(Vn(M,T[0].Lt),Vn(M,A[0].Lt),dt(Sr,O));return J(),j(),[{Ut:L,Nt:D,qt:ne,Bt:le,Ft:K,jt:{Xt:T,Yt:J,Wt:dt(X,T)},Jt:{Xt:A,Yt:j,Wt:dt(X,A)}},de]},b9=(e,t,n,r,i)=>(o,s,l)=>{const{vt:c,L:d,V:f,gt:p,Gt:v,St:y}=t,{Lt:g,Pt:m,kt:b}=o,[x,S]=As(333),[O,T]=As(444),A=Y=>{li(p.scrollBy)&&p.scrollBy({behavior:"smooth",left:Y.x,top:Y.y})},M=()=>{const Y="pointerup pointercancel lostpointercapture",ve=`client${l?"X":"Y"}`,W=l?dl:fl,X=l?"left":"top",K=l?"w":"h",L=l?"x":"y",D=[];return Ht(m,"pointerdown",r((ne=>{const le=Rs(ne.target,`.${Nm}`)===b,je=le?b:m,J=e.scrollbars,j=J[le?"dragScroll":"clickScroll"],{button:de,isPrimary:U,pointerType:ee}=ne,{pointers:Q}=J;if(de===0&&U&&j&&(Q||[]).includes(ee)){Sr(D),T();const oe=!le&&(ne.shiftKey||j==="instant"),V=dt(mp,b),P=dt(mp,m),F=(It,qt)=>(It||V())[X]-(qt||P())[X],G=dh(mp(p)[W])/go(p)[K]||1,N=Er(p)[L],ie=It=>{Ur(p,{[L]:N+It})},ge=It=>{const{Rt:qt}=n,Gt=go(m)[K]-go(b)[K],Wt=1/G*It/Gt;ie(Wt*qt[L])},fe=ne[ve],pe=V(),Ce=P(),$e=pe[W],Ke=F(pe,Ce)+$e/2,tt=fe-Ce[X]-Ke,Ge=le?0:tt,Ze=It=>{Sr(Nt),je.releasePointerCapture(It.pointerId)},Pt=le||oe,St=y(),Nt=[Ht(v,Y,Ze),Ht(v,"selectstart",(It=>gh(It)),{D:!1}),Ht(m,Y,Ze),Pt&&Ht(m,"pointermove",(It=>ge(Ge+It[ve]-fe))),Pt&&(()=>{const It=Er(p);St();const qt=Er(p),Gt={x:qt.x-It.x,y:qt.y-It.y};(po(Gt.x)>3||po(Gt.y)>3)&&(y(),Ur(p,It),A(Gt),O(St))})];if(je.setPointerCapture(ne.pointerId),oe)ge(tt);else if(!le){const It=ra(l9);if(It){const{Vt:qt}=n,Gt=It(ie,ge,dt(F),tt,qt[L],j,!!l,(Wt=>{Wt?St():en(Nt,St)}));en(Nt,Gt),en(D,dt(Gt,!0))}}}})))};let z=!0;return dt(Sr,[Ht(b,"pointermove pointerleave",r(i)),Ht(g,"pointerenter",r((()=>{s(x0,!0)}))),Ht(g,"pointerleave pointercancel",r((()=>{s(x0,!1)}))),Ht(g,"wheel",r((Y=>{const{deltaX:ve,deltaY:W,deltaMode:X}=Y;z&&X===0&&Ka(g)===c&&A({x:ve,y:W}),z=!1,s(k0,!0),x((()=>{z=!0,s(k0)})),gh(Y)})),{D:!1,I:!0}),!f&&Ht(g,"mousedown",r((()=>{const Y=hh();(v0(Y,ji)||v0(Y,_o)||Y===document.body)&&Cm(dt(_h,d),25)}))),Ht(g,"pointerdown",(()=>{const Y=Ht(v,"click",(W=>{ve(),gC(W)}),{A:!0,I:!0,D:!1}),ve=Ht(v,"pointerup pointercancel",(()=>{ve(),setTimeout(Y,150)}),{I:!0,D:!0})}),{I:!0,D:!0}),M(),S,T])},w9=(e,t,n,r,i,o,s)=>{let l,c,d,f,p,v=Ya,y=0;const g=["mouse","pen"],m=V=>P=>{n.Kt||V(P)},b=V=>g.includes(V.pointerType),[x,S]=As(),[O,T]=As(100),[A,M]=As(50),[z,Y]=As((()=>y)),[ve,W]=y9(e,o,i,b9(t,o,i,m,(V=>b(V)&&de()))),{vt:X,Qt:K,bt:L}=o,{Ft:D,Ut:ne,Nt:le,qt:je,Bt:J}=ve,j=(V,P)=>{Y();const F=G=>{n.Kt||D(t9,G)};if(V)F();else{const G=d?!l:!0;y>0&&!P?z(dt(F,G)):F(G)}},de=()=>{(d?!l:!f)&&(j(!0),O((()=>{j(!1)})))},U=V=>{b(V)&&(l=!0,!n.Kt&&d&&j(!0))},ee=V=>{b(V)&&(l=!1,!n.Kt&&d&&j(!1))},Q=V=>{D(wh,V,!0),D(wh,V,!1)},B=[Y,T,M,S,()=>v(),Ht(X,"pointerover",U,{A:!0}),Ht(X,"pointerenter",U),Ht(X,"pointerleave",ee),Ht(X,"pointermove",m((V=>{b(V)&&c&&de()}))),Ht(K,"scroll",m((V=>{x((()=>{le(),de()})),s(V),J()})))],oe=ra(zm);return[()=>dt(Sr,en(B,W())),({Dt:V,It:P,Zt:F,tn:G})=>{const{nn:N,sn:ie,en:ge,cn:fe}=G||{},{Ct:pe,ft:Ce}=F||{},{B:$e}=r,{M:Ke,P:Ne}=xi(),{rn:tt,j:Ge}=i,[Ze,Pt]=V("showNativeOverlaidScrollbars"),[St,Nt]=V("scrollbars.theme"),[It,qt]=V("scrollbars.visibility"),[Gt,Wt]=V("scrollbars.autoHide"),[nn,Dn]=V("scrollbars.autoHideSuspend"),[_e]=V("scrollbars.autoHideDelay"),[ce,ye]=V("scrollbars.dragScroll"),[Fe,qe]=V("scrollbars.clickScroll"),[xe,et]=V("overflow"),be=Ce&&!P,ke=N||ie||fe||pe||P,Ie=ge||qt||et,Oe=Ze&&Ke.x&&Ke.y,Ue=!Ne&&!oe,pr=Oe||Ue,Fn=(qn,On,dn)=>{const ko=qn.includes(Go)&&(It===Ui||It==="auto"&&On===Go);return D(Z7,ko,dn),ko};if(y=_e,(Pt||Ue)&&D(G7,pr),Nt&&(D(p),D(St,!0),p=St),(Dn||be)&&(Q(!nn),be&&nn&&(Ge.x||Ge.y?(v(),A((()=>{v=Ht(K,Go,m(dt(Q,!0)),{A:!0})}))):Q(!0))),Wt&&(c=Gt==="move",d=Gt==="leave",f=Gt==="never",j(f,!0)),ye&&D(r9,ce),qe&&D(n9,!!Fe),Ie){const qn=Fn(xe.x,tt.x,!0),On=Fn(xe.y,tt.y,!1);D(e9,!(qn&&On))}ke&&(le(),ne(),J(),fe&&je(),D(T0,!Ge.x,!0),D(T0,!Ge.y,!1),D(Q7,$e&&!L))},{},ve]},E9=e=>{const t=xi(),{K:n,P:r}=t,{elements:i}=n(),{padding:o,viewport:s,content:l}=i,c=vu(e),d=c?{}:e,{elements:f}=d,{padding:p,viewport:v,content:y}=f||{},g=c?e:d.target,m=dC(g),b=g.ownerDocument,x=b.documentElement,S=()=>b.defaultView||nr,O=dt(g9,[g]),T=dt(PC,[g]),A=dt(Ds,""),M=dt(O,A,s),z=dt(T,A,l),Y=pe=>{const Ce=go(pe),$e=bu(pe),Ke=Si(pe,Om),Ne=Si(pe,$m);return $e.w-Ce.w>0&&!Ps(Ke)||$e.h-Ce.h>0&&!Ps(Ne)},ve=M(v),W=ve===g,X=W&&m,K=!W&&z(y),L=!W&&ve===K,D=X?x:ve,ne=X?D:g,le=!W&&T(A,o,p),je=!L&&K,J=[je,D,le,ne].map((pe=>vu(pe)&&!Ka(pe)&&pe)),j=pe=>pe&&GS(J,pe),de=!j(D)&&Y(D)?D:g,U=X?x:D,Q={dt:g,vt:ne,L:D,ln:le,ht:je,gt:U,Qt:X?b:D,an:m?x:de,Gt:b,bt:m,At:c,V:W,un:S,yt:pe=>Mm(D,ji,pe),wt:(pe,Ce)=>yu(D,ji,pe,Ce),St:()=>yu(U,ji,H7,!0)},{dt:B,vt:oe,ln:V,L:P,ht:F}=Q,G=[()=>{pi(oe,[_o,gp]),pi(B,gp),m&&pi(x,[gp,_o])}];let N=ph([F,P,V,oe,B].find((pe=>pe&&!j(pe))));const ie=X?B:F||P,ge=dt(Sr,G);return[Q,()=>{const pe=S(),Ce=hh(),$e=Ze=>{Vn(Ka(Ze),ph(Ze)),Gs(Ze)},Ke=Ze=>Ht(Ze,"focusin focusout focus blur",gC,{I:!0,D:!1}),Ne="tabindex",tt=Pm(P,Ne),Ge=Ke(Ce);return Li(oe,_o,W?"":N7),Li(V,bh,""),Li(P,ji,""),Li(F,S0,""),W||(Li(P,Ne,tt||"-1"),m&&Li(x,E0,"")),Vn(ie,N),Vn(oe,V),Vn(V||oe,!W&&P),Vn(P,F),en(G,[Ge,()=>{const Ze=hh(),Pt=j(P),St=Pt&&Ze===P?B:Ze,Nt=Ke(St);pi(V,bh),pi(F,S0),pi(P,ji),m&&pi(x,E0),tt?Li(P,Ne,tt):pi(P,Ne),j(F)&&$e(F),Pt&&$e(P),j(V)&&$e(V),_h(St),Nt()}]),r&&!W&&(Im(P,ji,SC),en(G,dt(pi,P,ji))),_h(!W&&m&&Ce===B&&pe.top===pe?P:Ce),Ge(),N=0,ge},ge]},S9=({ht:e})=>({Zt:t,fn:n,It:r})=>{const{$t:i}=t||{},{Ot:o}=n;e&&(i||r)&&Qs(e,{[fl]:o&&"100%"})},C9=({vt:e,ln:t,L:n,V:r},i)=>{const[o,s]=wr({i:k7,o:_0()},dt(_0,e,"padding",""));return({Dt:l,Zt:c,fn:d,It:f})=>{let[p,v]=s(f);const{P:y}=xi(),{_t:g,xt:m,Ct:b}=c||{},{B:x}=d,[S,O]=l("paddingAbsolute");(g||v||(f||m))&&([p,v]=o(f));const A=!r&&(O||b||v);if(A){const M=!S||!t&&!y,z=p.r+p.l,Y=p.t+p.b,ve={[tC]:M&&!x?-z:0,[nC]:M?-Y:0,[eC]:M&&x?-z:0,top:M?-p.t:0,right:M?x?-p.r:"auto":0,left:M?x?"auto":-p.l:0,[dl]:M&&`calc(100% + ${z}px)`},W={[QS]:M?p.t:0,[XS]:M?p.r:0,[ZS]:M?p.b:0,[JS]:M?p.l:0};Qs(t||n,ve),Qs(n,W),Ft(i,{ln:p,_n:!M,F:t?W:Ft({},ve,W)})}return{dn:A}}},x9=(e,t)=>{const n=xi(),{vt:r,ln:i,L:o,V:s,Qt:l,gt:c,bt:d,wt:f,un:p}=e,{P:v}=n,y=d&&s,g=dt(YS,0),m={display:()=>!1,direction:B=>B!=="ltr",flexDirection:B=>B.endsWith("-reverse"),writingMode:B=>B!=="horizontal-tb"},b=Zn(m),x={i:Am,o:{w:0,h:0}},S={i:Zc,o:{}},O=B=>{f(EC,!y&&B)},T=()=>Si(o,b),A=(B,oe)=>{const V=!Zn(B).length,P=oe?!0:b.some((Ne=>{const tt=B[Ne];return na(tt)&&m[Ne](tt)}));if(V||!P||!D7(o))return{T:{x:0,y:0},k:{x:1,y:1}};O(!0);const F=Er(c),G=Ht(l,Go,(Ne=>{const tt=Er(c);Ne.isTrusted&&tt.x===F.x&&tt.y===F.y&&Lm(Ne)}),{I:!0,A:!0}),N=f(q7,!0);Ur(c,{x:0,y:0}),N();const ie=Er(c),ge=bu(c);Ur(c,{x:ge.w,y:ge.h});const fe=Er(c),pe={x:fe.x-ie.x,y:fe.y-ie.y};Ur(c,{x:-ge.w,y:-ge.h});const Ce=Er(c),$e={x:Ce.x-ie.x,y:Ce.y-ie.y},Ke={x:po(pe.x)>=po($e.x)?fe.x:Ce.x,y:po(pe.y)>=po($e.y)?fe.y:Ce.y};return Ur(c,F),qa((()=>G())),{T:ie,k:Ke}},M=(B,oe)=>{const V=nr.devicePixelRatio%1!==0?1:0,P={w:g(B.w-oe.w),h:g(B.h-oe.h)};return{w:P.w>V?P.w:0,h:P.h>V?P.h:0}},z=(B,oe)=>{const V=(P,F,G,N)=>{const ie=P===Ui?ti:s9(P),ge=Ps(P),fe=Ps(G);return!F&&!N?ti:ge&&fe?Ui:ge?F&&N?ie:F?Ui:ti:F?ie:fe&&N?Ui:ti};return{x:V(oe.x,B.x,oe.y,B.y),y:V(oe.y,B.y,oe.x,B.x)}},Y=B=>{const oe=P=>[Ui,ti,Go].map((F=>Q(Eh(F),P))),V=oe(!0).concat(oe()).join(" ");f(V),f(Zn(B).map((P=>Q(B[P],P==="x"))).join(" "),!0)},[ve,W]=wr(x,dt(Fm,o)),[X,K]=wr(x,dt(bu,o)),[L,D]=wr(x),[ne]=wr(S),[le,je]=wr(x),[J]=wr(S),[j]=wr({i:(B,oe)=>Ku(B,oe,_u(Ks(Zn(B),Zn(oe)))),o:{}}),[de,U]=wr({i:(B,oe)=>Zc(B.T,oe.T)&&Zc(B.k,oe.k),o:_C()}),ee=ra(zm),Q=(B,oe)=>`${oe?z7:B7}${T7(B)}`;return({Dt:B,Zt:oe,fn:V,It:P},{dn:F})=>{const{_t:G,Ht:N,xt:ie,Ct:ge,ft:fe,Et:pe}=oe||{},Ce=ee&&ee.R(e,t,V,n,B),{X:$e,Y:Ke,W:Ne}=Ce||{},[tt,Ge]=o9(B,n),[Ze,Pt]=B("overflow"),St=Ps(Ze.x),Nt=Ps(Ze.y),It=G||F||ie||ge||pe||Ge;let qt=W(P),Gt=K(P),Wt=D(P),nn=je(P);if(Ge&&v&&f(SC,!tt),It){Mm(r,_o,tu)&&O(!0);const bl=Ke&&Ke(),[os]=qt=ve(P),[Yi]=Gt=X(P),ss=mC(o),Ki=y&&M7(p()),fd={w:g(Yi.w+os.w),h:g(Yi.h+os.h)},wl={w:g((Ki?Ki.w:ss.w+g(ss.w-Yi.w))+os.w),h:g((Ki?Ki.h:ss.h+g(ss.h-Yi.h))+os.h)};bl&&bl(),nn=le(wl),Wt=L(M(fd,wl),P)}const[Dn,_e]=nn,[ce,ye]=Wt,[Fe,qe]=Gt,[xe,et]=qt,[be]=ne({x:ce.w>0,y:ce.h>0}),ke=St&&Nt&&(be.x||be.y)||St&&be.x&&!be.y||Nt&&be.y&&!be.x,Ie=F||ge||pe||et||qe||_e||ye||Pt||Ge||It||N&&y,[Oe]=B("update.flowDirectionStyles"),[Ue,pr]=j(Oe?Oe(o)||{}:T(),P),Fn=ge||fe||pr||P,[qn,On]=Fn?de(A(Ue,!!Oe),P):U();let dn=z(be,Ze);O(!1),Ie&&(Y(dn),dn=a9(o,be),Ne&&$e&&($e(dn,Fe,xe),Qs(o,Ne(dn))));const[ko,dd]=J(dn);return yu(r,_o,tu,ke),yu(i,bh,tu,ke),Ft(t,{rn:ko,Vt:{x:Dn.w,y:Dn.h},Rt:{x:ce.w,y:ce.h},j:be,Tt:F7(qn,ce)}),{en:dd,nn:_e,sn:ye,cn:On||ye}}},T9=e=>{const[t,n,r]=E9(e),i={ln:{t:0,r:0,b:0,l:0},_n:!1,F:{[tC]:0,[nC]:0,[eC]:0,[QS]:0,[XS]:0,[ZS]:0,[JS]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},rn:{x:ti,y:ti},j:{x:!1,y:!1},Tt:_C()},{dt:o,gt:s,V:l,St:c}=t,{P:d,M:f}=xi(),p=!d&&(f.x||f.y),v=[S9(t),C9(t,i),x9(t,i)];return[n,y=>{const g={},b=p&&Er(s),x=b&&c();return zt(v,(S=>{Ft(g,S(y,g)||{})})),Ur(s,b),x&&x(),l||Ur(o,0),g},i,t,r]},k9=(e,t,n,r)=>{let i=!1;const o={Kt:!1,pn:!1},s=_p(t,{}),[l,c,d,f,p]=T9(e),[v,y,g]=v9(f,d,s,(T=>{O({},T)})),[m,b,,x]=w9(e,t,o,g,d,f,r),S=T=>Zn(T).some((A=>!!T[A])),O=(T,A)=>{const{Kt:M,pn:z}=o;if(z||M&&i)return!1;const{vn:Y,It:ve,zt:W}=T,X=Y||{},K=!!ve||!i,L={Dt:_p(t,X,K),vn:X,It:K},D=A||y(Ft({},L,{zt:W})),ne=c(Ft({},L,{fn:g,Zt:D}));b(Ft({},L,{Zt:D,tn:ne}));const le=S(D),je=S(ne),J=le||je||!Rm(X)||K;return i=!0,J&&n(T,{Zt:D,tn:ne}),J};return[()=>{const{an:T,gt:A,St:M}=f,z=Er(T),Y=[v(),l(),m(),()=>{o.pn=!0}],ve=M();return Ur(A,z),ve(),dt(Sr,Y)},O,T=>{const A=o.Kt;o.Kt=T,!T&&A!==T&&O({It:!0,zt:!0})},()=>{b({Dt:_p(t,{},!1),vn:{},It:!1})},()=>({gn:o,hn:g,bn:d}),{yn:f,wn:x},p]},Bm=new WeakMap,O9=(e,t)=>{Bm.set(e,t)},$9=e=>{Bm.delete(e)},IC=e=>Bm.get(e),Hr=(e,t,n)=>{const{tt:r}=xi(),i=vu(e),o=i?e:e.target,s=IC(o);if(t&&!s){const l=[],c={},d=K=>{const L=oC(K),D=ra(U7);return D?D(L,!0):L},f=Ft({},r(),d(t)),[p,v,y]=yh(),[g,m,b]=yh(n),x=(K,L)=>{b(K,L),y(K,L)},[S,O,T,A,M,z,Y]=k9(e,f,(({vn:K,It:L},{Zt:D,tn:ne})=>{const{_t:le,Ct:je,$t:J,xt:j,Ht:de,ft:U}=D,{nn:ee,sn:Q,en:B,cn:oe}=ne;x("updated",[X,{updateHints:{sizeChanged:!!le,directionChanged:!!je,heightIntrinsicChanged:!!J,overflowEdgeChanged:!!ee,overflowAmountChanged:!!Q,overflowStyleChanged:!!B,scrollCoordinatesChanged:!!oe,contentMutation:!!j,hostMutation:!!de,appear:!!U},changedOptions:K||{},force:!!L}])}),(K=>x("scroll",[X,K]))),ve=K=>{const{gn:L}=M(),{pn:D}=L;D||($9(o),Sr(l),x("destroyed",[X,K]),v(),m())},X={options(K,L){if(K){const D=L?r():{},ne=OC(f,Ft(D,d(K)));Rm(ne)||(Ft(f,ne),O({vn:ne}))}return Ft({},f)},on:g,off:(K,L)=>{K&&L&&m(K,L)},state(){const{gn:K,hn:L,bn:D}=M(),{pn:ne,Kt:le}=K,{B:je}=L,{Vt:J,Rt:j,rn:de,j:U,ln:ee,_n:Q,Tt:B}=D;return Ft({},{overflowEdge:J,overflowAmount:j,overflowStyle:de,hasOverflow:U,scrollCoordinates:{start:B.T,end:B.k},padding:ee,paddingAbsolute:Q,directionRTL:je,sleeping:le,destroyed:ne})},elements(){const{dt:K,vt:L,ln:D,L:ne,ht:le,gt:je,Qt:J}=z.yn,{jt:j,Jt:de}=z.wn,U=Q=>{const{kt:B,Pt:oe,Lt:V}=Q;return{scrollbar:V,track:oe,handle:B}},ee=Q=>{const{Xt:B,Yt:oe}=Q,V=U(B[0]);return Ft({},V,{clone:()=>{const P=U(oe());return A(),P}})};return Ft({},{target:K,host:L,padding:D||ne,viewport:ne,content:le||ne,scrollOffsetElement:je,scrollEventElement:J,scrollbarHorizontal:ee(j),scrollbarVertical:ee(de)})},update:K=>O({It:K,zt:!0}),destroy:dt(ve,!1),sleep:T,plugin:K=>c[Zn(K)[0]]};return en(l,[Y]),O9(o,X),wC(yC,Hr,[X,p,c]),_9(z.yn.bt,!i&&e.cancel)?(ve(!0),X):(en(l,S()),x("initialized",[X]),X.update(),X)}return s};Hr.plugin=e=>{const t=Vr(e),n=t?e:[e],r=n.map((i=>wC(i,Hr)[0]));return L7(n),t?r:r[0]};Hr.valid=e=>{const t=e&&e.elements,n=li(t)&&t();return Wa(n)&&!!IC(n.target)};Hr.env=()=>{const{U:e,M:t,P:n,J:r,ot:i,st:o,K:s,Z:l,tt:c,nt:d}=xi();return Ft({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:r,staticDefaultInitialization:i,staticDefaultOptions:o,getDefaultInitialization:s,setDefaultInitialization:l,getDefaultOptions:c,setDefaultOptions:d})};Hr.nonce=f9;Hr.trustedTypePolicy=R7;class A9{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,n){const r=this._listeners.get(t)??new Set;return this._listeners.set(t,r),r.add(n),this}removeEventListener(t,n){var r;return(r=this._listeners.get(t))==null||r.delete(n),this}dispatchEvent(t,...n){let r=!0;for(const i of this._listeners.get(t)??[])r=i(...n)!==!1&&r;return r}unbindAllListeners(){this._listeners.clear()}}const R0=(e,t="px")=>typeof e=="number"?e+t:e,oo=({style:e},t,n)=>{if(typeof t=="object")for(const[r,i]of Object.entries(t))i!==void 0&&(e[r]=R0(i));else n!==void 0&&(e[t]=R0(n))},P0=(e=0,t=0,n=0,r=0)=>{const i={x:e,y:t,width:n,height:r,top:t,left:e,right:e+n,bottom:t+r};return{...i,toJSON:()=>JSON.stringify(i)}},R9=e=>{let t,n=-1,r=!1;return{next:(...i)=>{t=i,r||(r=!0,n=requestAnimationFrame(()=>{e(...t),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},I0=(e,t,n="touch")=>{switch(n){case"center":{const r=t.left+t.width/2,i=t.top+t.height/2;return r>=e.left&&r<=e.right&&i>=e.top&&i<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},P9=()=>matchMedia("(hover: none), (pointer: coarse)").matches,I9=()=>"safari"in window,Sh=e=>Array.isArray(e)?e:[e],MC=e=>(t,n,r,i={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=Sh(n),t=Sh(t);for(const o of t)if(o)for(const s of n)o[e](s,r,{capture:!1,...i})},so=MC("addEventListener"),Qr=MC("removeEventListener"),Dc=e=>{var t;const{clientX:n,clientY:r,target:i}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:r,target:i}},Ss=(e,t=document)=>Sh(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),M9=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:No,max:M0,min:D0,ceil:F0}=Math,L0=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}}),DC=class extends A9{constructor(t){var n,r,i,o,s;super(),this._selection=L0(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=P0(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(r=t.behaviour)==null?void 0:r.scrolling,startScrollMargins:{x:0,y:0,...(o=(i=t.behaviour)==null?void 0:i.scrolling)==null?void 0:o.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(s=t.features)==null?void 0:s.singleTap}}};for(const f of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[f]=="function"&&(this[f]=this[f].bind(this));const{document:l,selectionAreaClass:c,selectionContainerClass:d}=this._options;this._area=l.createElement("div"),this._clippingElement=l.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(c),d&&this._clippingElement.classList.add(d),oo(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),oo(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=R9(f=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",f),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:r}=this._options,i=t?so:Qr;i(n,"mousedown",this._onTapStart),r.touch&&i(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:r,y:i,target:o}=Dc(t),{document:s,startAreas:l,boundaries:c,features:d,behaviour:f}=this._options,p=o.getBoundingClientRect();if(t instanceof MouseEvent&&!M9(t,f.triggers))return;const v=Ss(l,s),y=Ss(c,s);this._targetElement=y.find(x=>I0(x.getBoundingClientRect(),p));const g=t.composedPath(),m=v.find(x=>g.includes(x));if(this._targetBoundary=y.find(x=>g.includes(x)),!this._targetElement||!m||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:r,y1:i,x2:0,y2:0};const b=s.scrollingElement??s.body;this._scrollDelta={x:b.scrollLeft,y:b.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),so(s,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),so(s,["mouseup","touchcancel","touchend"],this._onTapStop),so(s,"scroll",this._onScroll),d.deselectOnBlur&&(this._targetBoundaryScrolled=!1,so(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:r}=this._options.features,i=Dc(t);let o;if(n==="native")o=i.target;else if(n==="touch"){this.resolveSelectables();const{x:l,y:c}=i;o=this._selectables.find(d=>{const{right:f,left:p,top:v,bottom:y}=d.getBoundingClientRect();return l<f&&l>p&&c<y&&c>v})}if(!o)return;for(this.resolveSelectables();!this._selectables.includes(o);)if(o.parentElement)o=o.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:s}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&r&&this._latestElement){const l=this._latestElement,[c,d]=l.compareDocumentPosition(o)&4?[o,l]:[l,o],f=[...this._selectables.filter(p=>p.compareDocumentPosition(c)&4&&p.compareDocumentPosition(d)&2),c,d];this.select(f),this._latestElement=l}else s.includes(o)&&(s.length===1||t.ctrlKey||s.every(l=>this._selection.stored.includes(l)))?this.deselect(o):(this.select(o),this._latestElement=o)}_delayedTapMove(t){const{container:n,document:r,behaviour:{startThreshold:i}}=this._options,{x1:o,y1:s}=this._areaLocation,{x:l,y:c}=Dc(t);if(typeof i=="number"&&No(l+c-(o+s))>=i||typeof i=="object"&&No(l-o)>=i.x||No(c-s)>=i.y){if(Qr(r,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){Qr(r,["mouseup","touchcancel","touchend"],this._onTapStop);return}so(r,["mousemove","touchmove"],this._onTapMove,{passive:!1}),oo(this._area,"display","block"),Ss(n,r)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(so(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),so(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(d=>this._targetElement.contains(d))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:r}=this,i=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(oo(t,{top:i.top,left:i.left,width:i.width,height:i.height}),oo(r,{marginTop:-i.top,marginLeft:-i.left})):(oo(t,{top:0,left:0,width:"100%",height:"100%"}),oo(r,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:r,_options:i,_frame:o}=this,{speedDivider:s}=i.behaviour.scrolling,l=this._targetElement,{x:c,y:d}=Dc(t);if(r.x2=c,r.y2=d,this._lastMousePosition.x=c,this._lastMousePosition.y=d,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const f=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:p,scrollLeft:v}=l;n.y&&(l.scrollTop+=F0(n.y/s),r.y1-=l.scrollTop-p),n.x&&(l.scrollLeft+=F0(n.x/s),r.x1-=l.scrollLeft-v),o.next(t),requestAnimationFrame(f)};requestAnimationFrame(f)}else o.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&P9()||this._scrollAvailable&&I9())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:r,scrollLeft:i}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-i,this._areaLocation.y1+=t.y-r,t.x=i,t.y=r,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,Qr(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,r=t.deltaY?t.deltaY>0?1:-1:0,i=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=r*n,this._scrollSpeed.x+=i*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,r=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,i=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(r)*n,this._scrollSpeed.y+=Math.sign(i)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:r,_options:i}=this,{scrollTop:o,scrollHeight:s,clientHeight:l,scrollLeft:c,scrollWidth:d,clientWidth:f}=r,p=this._targetRect,{x1:v,y1:y}=n;let{x2:g,y2:m}=n;const{behaviour:{scrolling:{startScrollMargins:b}}}=i;g<p.left+b.x?(t.x=c?-No(p.left-g+b.x):0,g=g<p.left?p.left:g):g>p.right-b.x?(t.x=d-c-f?No(p.left+p.width-g-b.x):0,g=g>p.right?p.right:g):t.x=0,m<p.top+b.y?(t.y=o?-No(p.top-m+b.y):0,m=m<p.top?p.top:m):m>p.bottom-b.y?(t.y=s-o-l?No(p.top+p.height-m-b.y):0,m=m>p.bottom?p.bottom:m):t.y=0;const x=D0(v,g),S=D0(y,m),O=M0(v,g),T=M0(y,m);this._areaRect=P0(x,S,O-x,T-S)}_redrawSelectionArea(){const{x:t,y:n,width:r,height:i}=this._areaRect,{style:o}=this._area;o.left=`${t}px`,o.top=`${n}px`,o.width=`${r}px`,o.height=`${i}px`}_onTapStop(t,n){var r;const{document:i,features:o}=this._options,{_singleClick:s}=this;Qr(this._targetElement,"scroll",this._onStartAreaScroll),Qr(i,["mousemove","touchmove"],this._delayedTapMove),Qr(i,["touchmove","mousemove"],this._onTapMove),Qr(i,["mouseup","touchcancel","touchend"],this._onTapStop),Qr(i,"scroll",this._onScroll),this._keepSelection(),t&&s&&o.singleTap.allow?this._onSingleTap(t):!s&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Qr(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Qr(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(r=this._frame)==null||r.cancel(),oo(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:r,_areaRect:i}=this,{stored:o,selected:s,touched:l}=r,{intersect:c,overlap:d}=n.behaviour,f=d==="invert",p=[],v=[],y=[];for(let m=0;m<t.length;m++){const b=t[m];if(I0(i,b.getBoundingClientRect(),c)){if(s.includes(b))o.includes(b)&&!l.includes(b)&&l.push(b);else if(f&&o.includes(b)){y.push(b);continue}else v.push(b);p.push(b)}}f&&v.push(...o.filter(m=>!s.includes(m)));const g=d==="keep";for(let m=0;m<s.length;m++){const b=s[m];!p.includes(b)&&!(g&&o.includes(b))&&y.push(b)}r.selected=p,r.changed={added:v,removed:y},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:r,changed:i,touched:o,stored:s}=n,l=r.filter(c=>!s.includes(c));switch(t.behaviour.overlap){case"drop":{n.stored=[...l,...s.filter(c=>!o.includes(c))];break}case"invert":{n.stored=[...l,...s.filter(c=>!i.removed.includes(c))];break}case"keep":{n.stored=[...s,...r.filter(c=>!s.includes(c))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=Ss(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:r,stored:i,changed:o}=this._selection;o.added=[],o.removed.push(...r,...t?i:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=L0(t?[]:i)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,n=!1){const{changed:r,selected:i,stored:o}=this._selection,s=Ss(t,this._options.document).filter(l=>!i.includes(l)&&!o.includes(l));return o.push(...s),i.push(...s),r.added.push(...s),r.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),s}deselect(t,n=!1){const{selected:r,stored:i,changed:o}=this._selection,s=Ss(t,this._options.document).filter(l=>r.includes(l)||i.includes(l));this._selection.stored=i.filter(l=>!s.includes(l)),this._selection.selected=r.filter(l=>!s.includes(l)),this._selection.changed.added=[],this._selection.changed.removed.push(...s.filter(l=>!o.removed.includes(l))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};DC.version="3.9.0";let D9=DC;const F9="5.2.0",L9={version:F9},j9={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function U9(e,t){let n=t;return n||(n=new Error("Upload error")),typeof n=="string"&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),t6(e)?(n=new th(n,e),n):(n.request=e,n)}function j0(e){return e.data.slice(0,e.data.size,e.meta.type)}const N9={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:""};class z9 extends o6{static VERSION=L9.version;#e;#t;uploaderEvents;constructor(t,n){if(super(t,{...N9,fieldName:n.bundle?"files[]":"file",...n}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=j9,this.i18nInit(),this.#t=new n6({concurrency:this.opts.limit}),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&typeof this.opts.headers=="function")throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(n?.allowedMetaFields===void 0&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null),this.#e=r=>async(i,o)=>{try{const s=await WV(i,{...o,onBeforeRequest:(d,f)=>this.opts.onBeforeRequest?.(d,f,r),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:d=>{const f=Math.ceil(d/1e3),p=new Error(this.i18n("uploadStalled",{seconds:f}));this.uppy.emit("upload-stalled",p,r)},onUploadProgress:d=>{if(d.lengthComputable)for(const{id:f}of r){const p=this.uppy.getFile(f);p!=null&&this.uppy.emit("upload-progress",p,{uploadStarted:p.progress.uploadStarted??0,bytesUploaded:d.loaded/d.total*p.size,bytesTotal:p.size})}}});let l=await this.opts.getResponseData?.(s);if(s.responseType==="json")l??=s.response;else try{l??=JSON.parse(s.responseText)}catch(d){throw new Error("@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.",{cause:d})}const c=typeof l?.url=="string"?l.url:void 0;for(const{id:d}of r)this.uppy.emit("upload-success",this.uppy.getFile(d),{status:s.status,body:l,uploadURL:c});return s}catch(s){if(s.name==="AbortError")return;const l=s.request;for(const c of r)this.uppy.emit("upload-error",this.uppy.getFile(c.id),U9(l,s),l);throw s}}}getOptions(t){const n=this.uppy.getState().xhrUpload,{headers:r}=this.opts,i={...this.opts,...n||{},...t.xhrUpload||{},headers:{}};return typeof r=="function"?i.headers=r(t):Object.assign(i.headers,this.opts.headers),n&&Object.assign(i.headers,n.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,n,r){Rb(r.allowedMetaFields,n).forEach(o=>{const s=n[o];Array.isArray(s)?s.forEach(l=>t.append(o,l)):t.append(o,s)})}createFormDataUpload(t,n){const r=new FormData;this.addMetadata(r,t.meta,n);const i=j0(t);return t.name?r.append(n.fieldName,i,t.meta.name):r.append(n.fieldName,i),r}createBundledUpload(t,n){const r=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(r,i,n),t.forEach(o=>{const s=this.getOptions(o),l=j0(o);o.name?r.append(s.fieldName,l,o.name):r.append(s.fieldName,l)}),r}async#n(t){const n=new s6(this.uppy),r=new AbortController;n.onFileRemove(t.id,()=>r.abort()),n.onCancelAll(t.id,()=>r.abort());try{await this.#t.add(async i=>{const o=this.getOptions(t),s=this.#e([t]),l=o.formData?this.createFormDataUpload(t,o):t.data,c=typeof o.endpoint=="string"?o.endpoint:await o.endpoint(t);return s(c,{...o,body:l,signal:AbortSignal.any([i,r.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{n.remove()}}async#r(t){const n=new AbortController;function r(){n.abort()}this.uppy.once("cancel-all",r);try{await this.#t.add(async i=>{const o=this.uppy.getState().xhrUpload??{},s=this.#e(t),l=this.createBundledUpload(t,{...this.opts,...o}),c=typeof this.opts.endpoint=="string"?this.opts.endpoint:await this.opts.endpoint(t);return s(c,{...this.opts,body:l,signal:AbortSignal.any([i,n.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{this.uppy.off("cancel-all",r)}}#o(t){const n=this.getOptions(t),r=Rb(n.allowedMetaFields,t.meta);return{...t.remote?.body,protocol:"multipart",endpoint:n.endpoint,size:t.data.size,fieldname:n.fieldName,metadata:Object.fromEntries(r.map(i=>[i,t.meta[i]])),httpMethod:n.method,useFormData:n.formData,headers:n.headers}}async#i(t){await Promise.allSettled(t.map(n=>{if(n.isRemote){const r=()=>this.#t,i=new AbortController,o=s=>{s.id===n.id&&i.abort()};return this.uppy.on("file-removed",o),this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,this.#o(n),{signal:i.signal,getQueue:r}).finally(()=>{this.uppy.off("file-removed",o)})}return this.#n(n)}))}#a=async t=>{if(t.length===0){this.uppy.log("[XHRUpload] No files to upload!");return}this.opts.limit===0&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const n=this.uppy.getFilesByIds(t),r=GV(n),i=QV(r);if(this.uppy.emit("upload-start",i),this.opts.bundle){if(r.some(s=>s.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await this.#r(r)}else await this.#i(r)};install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.#a)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.#a)}}const Vm=new Map,Ch=Symbol("ServiceContainerId");function B9(e,t){Vm.set(e,t)}function V9(e){Vm.delete(e)}function rt(e){const t=e??Ls(Ch);if(!t)throw new Error("No VueFinder app instance found. Make sure VueFinder component is mounted and provide the id explicitly or use within a VueFinder component tree.");const n=Vm.get(t);if(!n)throw new Error(`VueFinder app instance with id "${t}" was not found. Make sure the VueFinder component with id="${t}" is mounted.`);return n}function H9(e){const t=localStorage.getItem(e+"_storage"),n=Hn(JSON.parse(t??"{}"));He(n,r);function r(){Object.keys(n).length?localStorage.setItem(e+"_storage",JSON.stringify(n)):localStorage.removeItem(e+"_storage")}function i(l,c){n[l]=c}function o(l){delete n[l]}function s(){Object.keys(n).forEach(l=>o(l))}return{getStore:(l,c=null)=>l in n?n[l]:c,setStore:i,removeStore:o,clearStore:s}}function bn(e,t="An error occurred"){if(!e)return t;if(typeof e=="string")return e||t;if(e instanceof Error)return e.message||t;if(typeof e=="object"&&e!==null){const n=e;if(typeof n.message=="string"&&n.message)return n.message;if(typeof n.error=="string"&&n.error)return n.error}return t}function q9(e,t){return NE(e,t,{encode:JSON.stringify,decode:JSON.parse})}function W9(e){if(!e?.config?.get)return!0;try{return!!e.config.get("notificationsEnabled")}catch{return!0}}function Os(e,t,n){const r={type:t,message:n};if(e?.emitter?.emit?.("vf-notify",r),!!W9(e))switch(t){case"success":Ec.success(n);break;case"error":Ec.error(n);break;case"warning":Ec.warning(n);break;default:Ec.info(n);break}}function ur(e){return{success(t){Os(e,"success",t)},error(t){Os(e,"error",t)},info(t){Os(e,"info",t)},warning(t){Os(e,"warning",t)},emit(t,n){Os(e,t,n)}}}const bp=new Map;async function wp(e,t){const n=t[e];return typeof n=="function"?(await n()).default:n}function Y9(e,t,n,r,i){const o=ur({emitter:n,config:i}),s="vuefinder_locale",l="global";let c;if(bp.has(l))c=bp.get(l),t&&t!==c.get()&&c.set(t);else{const T=localStorage.getItem(s)?JSON.parse(localStorage.getItem(s)):null;c=q9(s,t||T||"en"),bp.set(l,c)}const d="vuefinder_translations",f=T=>{try{const A=localStorage.getItem(d);if(A)return JSON.parse(A)[T]||null}catch{}return null},p=(T,A)=>{try{const M=localStorage.getItem(d),z=M?JSON.parse(M):{};z[T]=A,localStorage.setItem(d,JSON.stringify(z))}catch{}},v=Qe(c),y=String(v.value),g=f(y),m=re(g||{});let b=!1;!g&&Object.keys(r).length>0&&wp(y,r).then(T=>{m.value=T,p(y,T)}).catch(()=>{}),He(v,async(T,A)=>{if(A&&T===A)return;if(!b){b=!0;const z=f(String(T));if(z)m.value=z;else if(Object.keys(r).length>0)try{const Y=await wp(String(T),r);m.value=Y,p(String(T),Y)}catch{}return}const M=f(String(T));if(M)m.value=M;else try{const z=await wp(String(T),r);m.value=z,p(String(T),z)}catch(z){const Y=bn(z,"Locale cannot be loaded!");o.error(Y);return}Object.values(r).length>1&&(o.success("The language is set to "+T),n.emit("vf-language-saved"))},{immediate:!1});const x=(T,...A)=>A.length?x(T=T.replace("%s",String(A.shift())),...A):T;function S(T,...A){return m.value&&Object.prototype.hasOwnProperty.call(m.value,T)?x(m.value[T]||T,...A):x(T,...A)}const O=se({get:()=>v.value,set:T=>{c.set(T)}});return Hn({t:S,locale:O,localeAtom:c})}const K9=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],FC={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:K9.reduce((e,t)=>(e[t]=!0,e),{})};function U0(){return FC.advanced}function LC(e){return e?e==="simple"||e==="advanced"?{...FC[e]}:{...U0(),...e}:U0()}const G9="4.6.0";function Hm(e,t,n,r,i){return t=Math,n=t.log,r=1024,i=n(e)/n(r)|0,(e/t.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"iB":"B")}function jC(e,t,n,r,i){return t=Math,n=t.log,r=1e3,i=n(e)/n(r)|0,(e/t.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"B":"B")}function Q9(e){if(typeof e=="number")return e;const t={k:1,m:2,g:3,t:4},n=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(e);if(!n)return 0;const r=parseFloat(n[1]||"0"),i=(n[2]||"").toLowerCase(),o=t[i]??0;return Math.round(r*Math.pow(1024,o))}function X9(e){const t=yn(null),n=re(!1),r=re(),i=re(!1),o=yn(null);return{visible:n,type:t,data:r,open:(s,l=null)=>{e.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),n.value=!0,t.value=s,r.value=l},close:()=>{e.get("fullScreen")||(document.querySelector("body").style.overflow=""),n.value=!1,t.value=null,i.value=!1,o.value=null},setEditMode:s=>{i.value=s},editMode:i,controls:o,registerControls:s=>{o.value=s},unregisterControls:s=>{o.value===s&&(o.value=null)}}}const wu={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},Eu={initialPath:null,maxFileSize:null,loadingIndicator:"circular",showMenuBar:!0,showToolbar:!0,gridItemWidth:96,gridItemHeight:80,gridItemGap:8,gridIconSize:48,listItemHeight:32,listItemGap:2,listIconSize:16,notificationPosition:"bottom-center",notificationDuration:3e3,notificationVisibleToasts:4,notificationRichColors:!0},J9=new Set(Object.keys(Eu));function Z9(e){return e||"silver"}function UC(e){return J9.has(e)}function N0(e){const t={},n={},r=e;for(const i in r)if(UC(i))n[i]=r[i];else if(i in wu){const o=i;t[o]=r[i]}return{persistenceConfig:t,nonPersistenceConfig:n}}function z0(e,t){const n={...wu,...e,...t};return n.theme=Z9(n.theme),n}function B0(e,t){return{...Eu,...t,...e}}const eq=(e,t={})=>{const n=`vuefinder_config_${e}`,{persistenceConfig:r,nonPersistenceConfig:i}=N0(t),o=z0(r,wu),s=B0(i,Eu),l=NE(n,o,{encode:JSON.stringify,decode:JSON.parse}),c=Rn(s),d=lo([l,c],(g,m)=>({...g,...m})),f=(g={})=>{const m=l.get(),b=c.get(),{persistenceConfig:x,nonPersistenceConfig:S}=N0(g),O=z0(x,m),T=B0(S,b);l.set(O),c.set(T)},p=g=>UC(g)?c.get()[g]:l.get()[g],v=()=>({...l.get(),...c.get()}),y=(g,m)=>{const b=l.get();typeof g=="object"&&g!==null?l.set({...b,...g}):l.set({...b,[g]:m})};return{state:d,init:f,get:p,set:y,toggle:g=>{const m=l.get();y(g,!m[g])},all:v,reset:()=>{l.set({...wu}),c.set({...Eu})}}},Jt=e=>`${e.type}:${e.path}`;function NC(e,t){if(typeof e=="string"&&typeof t=="string")return e.toLowerCase().localeCompare(t.toLowerCase());const n=Number(e)||0,r=Number(t)||0;return n===r?0:n<r?-1:1}const tq=()=>{const e=Rn(""),t=Rn([]),n=Rn(!1),r=Rn([]),i=Rn({active:!1,column:"",order:""}),o=Rn({kind:"all",showHidden:!1}),s=Rn(new Set),l=Rn({type:"copy",path:"",items:new Set}),c=Rn(null),d=Rn(0),f=Rn(!1),p=Rn([]),v=Rn(-1),y=lo([e],fe=>{const pe=(fe??"").trim(),Ce=pe.indexOf("://"),$e=Ce>=0?pe.slice(0,Ce):"",Ke=(Ce>=0?pe.slice(Ce+3):pe).split("/").filter(Boolean);let Ne="";const tt=Ke.map(Ge=>(Ne=Ne?`${Ne}/${Ge}`:Ge,{basename:Ge,name:Ge,path:$e?`${$e}://${Ne}`:Ne,type:"dir"}));return{storage:$e,breadcrumb:tt,path:pe}}),g=lo([r,i,o],(fe,pe,Ce)=>{let $e=fe;Ce.kind==="files"?$e=$e.filter(Ze=>Ze.type==="file"):Ce.kind==="folders"&&($e=$e.filter(Ze=>Ze.type==="dir")),Ce.showHidden||($e=$e.filter(Ze=>!Ze.basename.startsWith(".")));const{active:Ke,column:Ne,order:tt}=pe;if(!Ke||!Ne)return $e;const Ge=tt==="asc"?1:-1;return $e.slice().sort((Ze,Pt)=>NC(Ze[Ne],Pt[Ne])*Ge)}),m=lo([r,s],(fe,pe)=>pe.size===0?[]:fe.filter(Ce=>pe.has(Jt(Ce)))),b=(fe,pe)=>{const Ce=e.get();if((pe??!0)&&Ce!==fe){const $e=p.get(),Ke=v.get();Ke<$e.length-1&&$e.splice(Ke+1),$e.length===0&&Ce&&$e.push(Ce),$e.push(fe),p.set([...$e]),v.set($e.length-1)}e.set(fe)},x=fe=>{r.set(fe??[])},S=fe=>{t.set(fe??[])},O=(fe,pe)=>{i.set({active:!0,column:fe,order:pe})},T=fe=>{const pe=i.get();pe.active&&pe.column===fe?i.set({active:pe.order==="asc",column:fe,order:"desc"}):i.set({active:!0,column:fe,order:"asc"})},A=()=>{i.set({active:!1,column:"",order:""})},M=(fe,pe)=>{o.set({kind:fe,showHidden:pe})},z=()=>{o.set({kind:"all",showHidden:!1})},Y=(fe,pe="multiple")=>{const Ce=new Set(s.get());pe==="single"&&Ce.clear(),Ce.add(fe),s.set(Ce)},ve=(fe,pe="multiple")=>{const Ce=new Set(s.get());pe==="single"&&Ce.clear(),fe.forEach($e=>Ce.add($e)),s.set(Ce)},W=fe=>{const pe=new Set(s.get());pe.delete(fe),s.set(pe)},X=fe=>s.get().has(fe),K=(fe,pe="multiple")=>{const Ce=new Set(s.get());Ce.has(fe)?Ce.delete(fe):(pe==="single"&&Ce.clear(),Ce.add(fe)),s.set(Ce)},L=(fe="multiple",pe)=>{if(fe==="single"){const Ce=r.get()[0];if(Ce){const $e=Jt(Ce);s.set(new Set([$e])),d.set(1)}}else{if(pe?.selectionFilterType||pe?.selectionFilterMimeIncludes&&pe.selectionFilterMimeIncludes.length>0){const Ce=r.get().filter($e=>{const Ke=pe.selectionFilterType,Ne=pe.selectionFilterMimeIncludes;return Ke==="files"&&$e.type==="dir"||Ke==="dirs"&&$e.type==="file"?!1:Ne&&Array.isArray(Ne)&&Ne.length>0&&$e.type!=="dir"?$e.mime_type?Ne.some(tt=>$e.mime_type?.startsWith(tt)):!1:!0}).map($e=>Jt($e));s.set(new Set(Ce))}else{const Ce=new Set(r.get().map($e=>Jt($e)));s.set(Ce)}le(s.get().size)}},D=()=>{s.set(new Set),d.set(0)},ne=fe=>{const pe=new Set(fe??[]),Ce=new Set(r.get().filter($e=>pe.has($e.path)).map($e=>Jt($e)));s.set(Ce),d.set(Ce.size)},le=fe=>{d.set(fe)},je=fe=>{f.set(!!fe)},J=()=>f.get(),j=(fe,pe)=>{const Ce=r.get().filter($e=>pe.has(Jt($e)));l.set({type:fe,path:y.get().path,items:new Set(Ce)})},de=fe=>lo([l],pe=>pe.type==="cut"&&Array.from(pe.items).some(Ce=>Jt(Ce)===fe)),U=fe=>lo([l],pe=>pe.type==="copy"&&Array.from(pe.items).some(Ce=>Jt(Ce)===fe));return{files:r,storages:t,currentPath:e,sort:i,filter:o,selectedKeys:s,selectedCount:d,loading:f,draggedItem:c,clipboardItems:l,path:y,sortedFiles:g,selectedItems:m,setPath:b,setFiles:x,setStorages:S,setSort:O,toggleSort:T,clearSort:A,setFilter:M,clearFilter:z,select:Y,selectMultiple:ve,deselect:W,toggleSelect:K,selectAll:L,isSelected:X,clearSelection:D,setSelection:ne,setSelectedCount:le,setLoading:je,isLoading:J,setClipboard:j,createIsCut:de,createIsCopied:U,isCut:fe=>{const pe=de(fe);return Qe(pe).value??!1},isCopied:fe=>{const pe=U(fe);return Qe(pe).value??!1},clearClipboard:()=>{l.set({type:"copy",path:"",items:new Set})},getClipboard:()=>l.get(),setDraggedItem:fe=>{c.set(fe)},getDraggedItem:()=>c.get(),clearDraggedItem:()=>{c.set(null)},setReadOnly:fe=>{n.set(fe)},getReadOnly:()=>n.get(),isReadOnly:fe=>n.get()?!0:fe.read_only??!1,goBack:()=>{const fe=p.get(),pe=v.get();if(pe>0){const Ce=pe-1,$e=fe[Ce];$e&&(v.set(Ce),b($e,!1))}},goForward:()=>{const fe=p.get(),pe=v.get();if(pe<fe.length-1){const Ce=pe+1,$e=fe[Ce];$e&&(v.set(Ce),b($e,!1))}},canGoBack:lo([v],fe=>fe>0),canGoForward:lo([p,v],(fe,pe)=>pe<fe.length-1),navigationHistory:p,historyIndex:v}};class nq{validateParam(t,n){if(t==null)throw new Error(`${n} is required`)}validatePath(t){if(!t)throw new Error("Path must be a non-empty string")}parsePath(t){if(!t)return{};if(t.includes("://")){const[n,...r]=t.split("://");return{storage:n,path:r.join("://")}}return{path:t}}combinePath(t,n){return t&&n?`${t}://${n}`:n||""}}function V0(e,t,n){const r=`HTTP ${t}: ${n}`;if(!e)return r;try{const i=JSON.parse(e);if(i.message)return i.message;if(i.error){if(typeof i.error=="string")return i.error;if(i.error.message)return i.error.message}if(i.errors&&Array.isArray(i.errors)&&i.errors.length>0){const o=i.errors.map(s=>s.message).filter(s=>!!s);if(o.length>0)return o.join(", ")}return i.detail?i.detail:i.title?i.title:e}catch{return e||r}}class zC extends nq{config;static DEFAULT_URLS={list:"",upload:"/upload",delete:"/delete",rename:"/rename",copy:"/copy",move:"/move",archive:"/archive",unarchive:"/unarchive",createFile:"/create-file",createFolder:"/create-folder",preview:"/preview",download:"/download",search:"/search",save:"/save"};constructor(t){super();const n={...zC.DEFAULT_URLS,...t.url||{}};this.config={...t,baseURL:t.baseURL||"",url:n}}setBaseURL(t){this.config.baseURL=t||""}setToken(t){this.config.token=t}configureUploader(t,n){const r=this.getHeaders();delete r["Content-Type"],t.use(z9,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:r,formData:!0}),t.on("upload",()=>{const i=n.getTargetPath();t.getFiles().forEach(o=>{t.setFileMeta(o.id,{path:i})})})}getHeaders(){const t={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(t.Authorization=`Bearer ${this.config.token}`),t}async request(t,n={}){const r=`${this.config.baseURL}${t}`,i=await fetch(r,{...n,headers:{...this.getHeaders(),...n.headers}});if(!i.ok){const o=await i.text(),s=V0(o,i.status,i.statusText);throw new Error(s)}return i.status===204||i.status===304?{}:(i.headers.get("content-type")||"").includes("application/json")?await i.json():await i.text()}async list(t){const n=new URLSearchParams;t?.path&&n.append("path",t.path);const r=n.toString()?`${this.config.url.list}?${n.toString()}`:this.config.url.list;return await this.request(r,{method:"GET",signal:t?.signal})}async delete(t){return this.validateParam(t.items,"items"),this.validateParam(t.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:t.path,items:t.items})})}async rename(t){return this.validateParam(t.path,"path"),this.validateParam(t.item,"item"),this.validateParam(t.name,"name"),this.validatePath(t.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:t.path,item:t.item,name:t.name})})}async copy(t){return this.validateParam(t.sources,"sources"),this.validateParam(t.destination,"destination"),t.path&&this.validatePath(t.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:t.sources,destination:t.destination,path:t.path})})}async move(t){return this.validateParam(t.sources,"sources"),this.validateParam(t.destination,"destination"),t.path&&this.validatePath(t.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:t.sources,destination:t.destination,path:t.path})})}async archive(t){return this.validateParam(t.items,"items"),this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:t.items,path:t.path,name:t.name,...t.destination?{destination:t.destination}:{}})})}async unarchive(t){return this.validateParam(t.item,"item"),this.validateParam(t.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:t.item,path:t.path,...t.destination?{destination:t.destination}:{}})})}async createFile(t){return this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:t.path,name:t.name})})}async createFolder(t){return this.validateParam(t.name,"name"),this.validateParam(t.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:t.path,name:t.name})})}getPreviewUrl(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path});return`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`}async getContent(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path}),r=`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`,i=await fetch(r,{headers:this.getHeaders(),signal:t.signal});if(!i.ok){const o=await i.text(),s=V0(o,i.status,i.statusText);throw new Error(s)}return{content:await i.text(),mimeType:i.headers.get("Content-Type")||void 0}}getDownloadUrl(t){this.validatePath(t.path);const n=new URLSearchParams({path:t.path});return`${this.config.baseURL}${this.config.url.download}?${n.toString()}`}async search(t){const n=this.config.url.search,r=new URLSearchParams;t.path&&r.set("path",t.path),t.filter&&r.set("filter",t.filter),t.deep&&r.set("deep","1"),t.size&&t.size!=="all"&&r.set("size",t.size);const i=r.toString()?`${n}?${r.toString()}`:n;return(await this.request(i,{method:"GET",signal:t.signal})).files||[]}async save(t){return this.validateParam(t.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:t.path,content:t.content}),headers:this.getHeaders(),signal:t.signal})}}const Ep={list:e=>["adapter","list",e],search:(e,t,n,r)=>["adapter","search",e,t,n,r],delete:e=>["adapter","delete",e],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class rq{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(t,n={}){this.driver=t,this.onBeforeOpen=n.onBeforeOpen,this.onAfterOpen=n.onAfterOpen,this.queryClient=n.queryClient||new HV({defaultOptions:{queries:{refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,retry:n.retry??2},mutations:{retry:n.retry??1}}}),this.config={queryClient:this.queryClient,refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,cacheTime:n.cacheTime??600*1e3,retry:n.retry??2,onBeforeOpen:this.onBeforeOpen??(()=>{}),onAfterOpen:this.onAfterOpen??(()=>{})}}getDriver(){return this.driver}getQueryClient(){return this.queryClient}async list(t){const n=Ep.list(t);return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.list({path:t,signal:r}),staleTime:this.config.staleTime})}async open(t){this.onBeforeOpen&&this.onBeforeOpen();try{const n=await this.list(t);return this.onAfterOpen&&this.onAfterOpen(n),n}catch(n){if(RV(n)||n?.name==="AbortError")return;throw n}}cancelOpen(t){const n=t===void 0?["adapter","list"]:Ep.list(t);this.queryClient.cancelQueries({queryKey:n})}async delete(t){const n=await this.driver.delete(t);return this.invalidateListQueries(),n}async rename(t){const n=await this.driver.rename(t);return this.invalidateListQueries(),n}async copy(t){const n=await this.driver.copy(t);return this.invalidateListQueries(),n}async move(t){const n=await this.driver.move(t);return this.invalidateListQueries(),n}async archive(t){const n=await this.driver.archive(t);return this.invalidateListQueries(),n}async unarchive(t){const n=await this.driver.unarchive(t);return this.invalidateListQueries(),n}async createFile(t){const n=await this.driver.createFile(t);return this.invalidateListQueries(),n}async createFolder(t){const n=await this.driver.createFolder(t);return this.invalidateListQueries(),n}async getContent(t){const n=["adapter","content",t.path];return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.getContent({path:t.path,signal:t.signal??r}),staleTime:this.config.staleTime})}getPreviewUrl(t){return this.driver.getPreviewUrl(t)}getDownloadUrl(t){return this.driver.getDownloadUrl(t)}async search(t){const n=Ep.search(t.path,t.filter,t.deep,t.size);return await this.queryClient.fetchQuery({queryKey:n,queryFn:({signal:r})=>this.driver.search({...t,signal:t.signal??r}),staleTime:this.config.staleTime})}async save(t){const n=await this.driver.save(t);return this.invalidateListQueries(),n}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(t){this.queryClient.invalidateQueries({queryKey:["adapter","list",t],exact:!0})}clearCache(){this.queryClient.clear()}}function iq(e){const t=Qe(e.state);return{current:se(()=>t.value.theme||"silver"),set:n=>{e.set("theme",n)}}}const oq=(e,t)=>{const n=H9(e.id??"vf"),r=uB(),i=t.i18n,o=e.locale??t.locale,s=eq(e.id??"vf",e.config??{}),l=tq();if(!e.driver)throw new Error("Driver is required for VueFinder");const c=new rq(e.driver);return Hn({version:G9,config:s,theme:(()=>{const d=iq(s);return{current:d.current,set:d.set}})(),fs:l,root:null,debug:e.debug??!1,emitter:r,storage:n,i18n:Y9(n,o,r,i,s),modal:X9(s),adapter:Ni(c),features:LC(e.features),selectionMode:e.selectionMode||"multiple",selectionFilterType:se(()=>e.selectionFilterType||"both"),selectionFilterMimeIncludes:se(()=>e.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:s.get("metricUnits")?jC:Hm,contextMenuItems:e.contextMenuItems,customUploader:e.customUploader})},sq=["data-theme"],aq={class:"vuefinder__modal-layout__container"},lq={class:"vuefinder__modal-layout__content"},cq={key:0,class:"vuefinder__modal-layout__footer"},uq={key:0,class:"vuefinder__modal-drag-overlay"},dq={class:"vuefinder__modal-drag-message"},dr=ze({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{},onRequestClose:{type:Function},bodyStyle:{type:[Boolean,null,String,Object,Array]},bodyClass:{},onBodyTouchstart:{type:Function},onBodyTouchmove:{type:Function},onBodyTouchend:{type:Function},onBodyTouchcancel:{type:Function}},setup(e){const t=re(null),n=rt();n.config;const r=e,i=()=>{r.onRequestClose?r.onRequestClose():n.modal.close()};xt(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),gt(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&t.value){const l=t.value.getBoundingClientRect().bottom+16;window.scrollTo({top:l,left:0,behavior:"smooth"})}})});const o=s=>{s.target.classList.contains("vuefinder__modal-layout__wrapper")&&(s.preventDefault(),s.stopPropagation())};return(s,l)=>(C(),R("div",{"data-theme":w(n).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:l[5]||(l[5]=Lr(c=>i(),["esc"]))},[l[6]||(l[6]=_("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),_("div",aq,[_("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:o,onMousedown:l[4]||(l[4]=ht(c=>i(),["self"]))},[_("div",{ref_key:"modalBody",ref:t,class:Be(["vuefinder__modal-layout__body",r.bodyClass]),style:an(r.bodyStyle),onTouchstart:l[0]||(l[0]=(...c)=>r.onBodyTouchstart&&r.onBodyTouchstart(...c)),onTouchmove:l[1]||(l[1]=(...c)=>r.onBodyTouchmove&&r.onBodyTouchmove(...c)),onTouchend:l[2]||(l[2]=(...c)=>r.onBodyTouchend&&r.onBodyTouchend(...c)),onTouchcancel:l[3]||(l[3]=(...c)=>r.onBodyTouchcancel&&r.onBodyTouchcancel(...c))},[_("div",lq,[mt(s.$slots,"default")]),s.$slots.buttons?(C(),R("div",cq,[mt(s.$slots,"buttons")])):Se("",!0)],38)],32)]),r.showDragOverlay?(C(),R("div",uq,[_("div",dq,q(r.dragOverlayText||"Drag and drop the files/folders to here."),1)])):Se("",!0)],40,sq))}}),fq={class:"vuefinder__modal-header"},pq={class:"vuefinder__modal-header__icon-container"},hq={id:"modal-title",class:"vuefinder__modal-header__title"},xr=ze({__name:"ModalHeader",props:{title:{},icon:{}},setup(e){return(t,n)=>(C(),R("div",fq,[_("div",pq,[(C(),Ee(Pn(e.icon),{class:"vuefinder__modal-header__icon"}))]),_("div",hq,q(e.title),1)]))}}),mq={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function vq(e,t){return C(),R("svg",mq,[...t[0]||(t[0]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8.2h.01M10.75 11.25H12v4.5m0 0h1.25m-1.25 0h-2"},null,-1)])])}const qm={render:vq},gq={class:"vuefinder__about-modal__content"},_q={class:"vuefinder__about-modal__main"},yq={class:"vuefinder__about-modal__tab-content"},bq={class:"vuefinder__about-modal__lead"},wq={class:"vuefinder__about-modal__description"},Eq={class:"vuefinder__about-modal__links"},Sq={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},Cq={class:"vuefinder__about-modal__meta"},xq={class:"vuefinder__about-modal__meta-item"},Tq={class:"vuefinder__about-modal__meta-label"},kq={class:"vuefinder__about-modal__meta-value"},Oq={class:"vuefinder__about-modal__meta-item"},$q={class:"vuefinder__about-modal__meta-label"},BC=ze({__name:"ModalAbout",setup(e){const t=rt(),{t:n}=t.i18n;return(r,i)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:i[0]||(i[0]=o=>w(t).modal.close())},q(w(n)("Close")),1)]),default:Le(()=>[_("div",gq,[Z(xr,{icon:w(qm),title:"Vuefinder "+w(t).version},null,8,["icon","title"]),_("div",_q,[_("div",yq,[_("div",bq,q(w(n)("A modern, customizable file manager component built for Vue.")),1),_("div",wq,q(w(n)("If you like it, please follow and ⭐ star on GitHub.")),1),_("div",Eq,[_("a",Sq,q(w(n)("Project Home")),1),i[1]||(i[1]=_("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),_("div",Cq,[_("div",xq,[_("span",Tq,q(w(n)("Version")),1),_("span",kq,q(w(t).version),1)]),_("div",Oq,[_("span",$q,q(w(n)("License")),1),i[2]||(i[2]=_("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),Aq={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Rq(e,t){return C(),R("svg",Aq,[...t[0]||(t[0]=[_("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const VC={render:Rq},Pq={class:"vuefinder__delete-modal__content"},Iq={class:"vuefinder__delete-modal__form"},Mq={class:"vuefinder__delete-modal__description"},Dq={class:"vuefinder__delete-modal__files vf-scrollbar"},Fq={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Lq={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},jq={class:"vuefinder__delete-modal__file-name"},Uq={class:"vuefinder__delete-modal__confirmation"},Nq={class:"vuefinder__delete-modal__confirmation-label"},zq={class:"vuefinder__delete-modal__confirmation-text"},Bq=["disabled"],Ju=ze({__name:"ModalDelete",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(t.modal.data.items),l=re(!1),c=()=>{s.value.length&&l.value&&t.adapter.delete({path:o.value.path,items:s.value.map(({path:d,type:f})=>({path:d,type:f}))}).then(d=>{n.success(r("Files deleted.")),t.fs.setFiles(d.files),t.modal.close()}).catch(d=>{n.error(bn(d,r("Failed to delete files")))})};return(d,f)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("div",Uq,[_("label",Nq,[Ct(_("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>l.value=p),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[Zs,l.value]]),_("span",zq,q(w(r)("I'm sure delete it, This action cannot be undone.")),1)])]),_("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!l.value,onClick:c},q(w(r)("Yes, Delete!")),9,Bq),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[1]||(f[1]=p=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(VC),title:w(r)("Delete files")},null,8,["icon","title"]),_("div",Pq,[_("div",Iq,[_("p",Mq,q(w(r)("Are you sure you want to delete these files?")),1),_("div",Dq,[(C(!0),R(We,null,ut(s.value,p=>(C(),R("p",{key:p.path,class:"vuefinder__delete-modal__file"},[p.type==="dir"?(C(),R("svg",Fq,[...f[2]||(f[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",Lq,[...f[3]||(f[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",jq,q(p.basename),1)]))),128))])])])])]),_:1}))}}),Vq={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Hq(e,t){return C(),R("svg",Vq,[...t[0]||(t[0]=[_("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1)])])}const HC={render:Hq},qq={class:"vuefinder__rename-modal__content"},Wq={class:"vuefinder__rename-modal__item"},Yq={class:"vuefinder__rename-modal__item-info"},Kq={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Gq={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Qq={class:"vuefinder__rename-modal__item-name"},Zu=ze({__name:"ModalRename",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(t.modal.data.items[0]),l=re(s.value.basename),c=()=>{l.value!=s.value.basename&&t.adapter.rename({path:o.value.path,item:s.value.path,name:l.value}).then(d=>{n.success(r("%s is renamed.",l.value)),t.fs.setFiles(d.files),t.modal.close()}).catch(d=>{n.error(bn(d,r("Failed to rename")))})};return(d,f)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:c},q(w(r)("Rename")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[1]||(f[1]=p=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(HC),title:w(r)("Rename")},null,8,["icon","title"]),_("div",qq,[_("div",Wq,[_("p",Yq,[s.value.type==="dir"?(C(),R("svg",Kq,[...f[2]||(f[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",Gq,[...f[3]||(f[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",Qq,q(s.value.basename),1)]),Ct(_("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>l.value=p),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:Lr(c,["enter"])},null,544),[[oi,l.value]])])])])]),_:1}))}});function fr(){const e=rt(),t=se(()=>e.features);return{enabled:n=>t.value[n]??!1}}function Xq(e,t=null){return new Date(e*1e3).toLocaleString(t??navigator.language??"en-US")}const Jq={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"vuefinder__breadcrumb__close-icon",viewBox:"0 0 24 24"};function Zq(e,t){return C(),R("svg",Jq,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const qC={render:Zq},eW={class:"vuefinder__preview-chrome"},tW={class:"vuefinder__preview-chrome__popover-host vuefinder__preview-chrome__info-host"},nW=["title","aria-label"],rW={key:0,class:"vuefinder__preview-chrome__popover"},iW={class:"vuefinder__preview-chrome__popover-label"},oW={class:"vuefinder__preview-chrome__popover-value"},sW=["title"],aW={class:"vuefinder__preview-chrome__actions"},lW=["aria-label"],cW={key:1,class:"vuefinder__preview-chrome__popover-host"},uW=["title","aria-label"],dW={key:0,class:"vuefinder__preview-chrome__popover"},fW=["href","download"],pW={class:"vuefinder__preview-chrome__popover-hint"},hW=["title","aria-label"],mW=ze({name:"PreviewChrome",__name:"PreviewChrome",emits:["close-request"],setup(e,{emit:t}){const n=t,r=rt(),{enabled:i}=fr(),{t:o}=r.i18n,s=Qe(r.fs.sortedFiles),l=se(()=>s.value.filter(S=>S.type==="file")),c=se(()=>l.value.findIndex(S=>S.path===r.modal.data.item.path)),d=se(()=>l.value.length),f=se(()=>r.modal.controls??null),p=se(()=>!!w(f.value?.isEditing)),v=re(!1),y=re(!1),g=S=>{S==="info"?(v.value=!v.value,y.value=!1):(y.value=!y.value,v.value=!1)},m=S=>{S.target.closest(".vuefinder__preview-chrome__popover-host")||(v.value=!1,y.value=!1)};xt(()=>document.addEventListener("mousedown",m)),ns(()=>document.removeEventListener("mousedown",m));const b=se(()=>{const S=r.modal.data.item,O=[{label:o("File Size"),value:r.filesize(S.file_size??0)},{label:o("Last Modified"),value:Xq(S.last_modified??0)}];S.mime_type&&O.push({label:o("Type"),value:S.mime_type});const T=w(f.value?.extraInfo);if(Array.isArray(T))for(const A of T)O.push(A);return O.push({label:o("Path"),value:S.path}),O}),x=se(()=>r.adapter.getDownloadUrl(r.modal.data.item));return(S,O)=>(C(),R("div",eW,[_("div",tW,[_("button",{type:"button",class:Be(["vuefinder__preview-chrome__info-btn",{"vuefinder__preview-chrome__info-btn--active":v.value}]),title:w(o)("File info"),"aria-label":w(o)("File info"),onClick:O[0]||(O[0]=T=>g("info"))},[Z(w(qm),{class:"vuefinder__preview-chrome__icon"})],10,nW),v.value?(C(),R("div",rW,[(C(!0),R(We,null,ut(b.value,T=>(C(),R("div",{key:T.label,class:"vuefinder__preview-chrome__popover-row"},[_("span",iW,q(T.label),1),_("span",oW,q(T.value),1)]))),128))])):Se("",!0)]),_("div",{id:"modal-title",class:"vuefinder__preview-chrome__title",title:w(r).modal.data.item.path},q(w(r).modal.data.item.basename),9,sW),_("div",aW,[d.value>1&&!p.value?(C(),R("span",{key:0,class:"vuefinder__preview-chrome__counter","aria-label":w(o)("File %s of %s",String(c.value+1),String(d.value))},q(c.value+1)+" / "+q(d.value),9,lW)):Se("",!0),w(i)("download")&&!p.value?(C(),R("div",cW,[_("button",{type:"button",class:Be(["vuefinder__preview-chrome__info-btn",{"vuefinder__preview-chrome__info-btn--active":y.value}]),title:w(o)("Download"),"aria-label":w(o)("Download"),onClick:O[1]||(O[1]=T=>g("download"))},[...O[3]||(O[3]=[_("svg",{class:"vuefinder__preview-chrome__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M12 3v12"}),_("path",{d:"M7 10l5 5 5-5"}),_("path",{d:"M5 21h14"})],-1)])],10,uW),y.value?(C(),R("div",dW,[_("a",{href:x.value,download:x.value,target:"_blank",class:"vuefinder__preview-chrome__popover-action"},[O[4]||(O[4]=_("svg",{class:"vuefinder__preview-chrome__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M12 3v12"}),_("path",{d:"M7 10l5 5 5-5"}),_("path",{d:"M5 21h14"})],-1)),_("span",null,q(w(o)("Download")),1)],8,fW),_("p",pW,q(w(o)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):Se("",!0)])):Se("",!0),_("button",{type:"button",class:"vuefinder__preview-chrome__btn vuefinder__preview-chrome__btn--icon vuefinder__preview-chrome__btn--close",title:w(o)("Close"),"aria-label":w(o)("Close"),onClick:O[2]||(O[2]=T=>n("close-request"))},[Z(w(qC),{class:"vuefinder__preview-chrome__icon vuefinder__preview-chrome__icon--lg"})],8,hW)])]))}});function Wm(e){const t=rt();xt(()=>{if(typeof t.modal.registerControls!="function"){console.warn("[vuefinder] PreviewControls registration skipped: app.modal.registerControls is missing. Hard refresh the page to pick up the latest modal API.");return}t.modal.registerControls(e)}),ns(()=>{typeof t.modal.unregisterControls=="function"&&t.modal.unregisterControls(e)})}const vW={class:"vuefinder__text-preview"},gW={class:"vuefinder__text-preview__body"},_W={key:0,class:"vuefinder__text-preview__content"},yW=ze({__name:"Text",emits:["success"],setup(e,{emit:t}){const n=Jr({loader:()=>Rt(()=>import("./CodeMirrorEditor-Cqow8ROO-D5a3bJrn.js"),__vite__mapDeps([93,2,1]),import.meta.url).then(S=>S.C),delay:100}),r=t,i=re(""),o=re(""),s=re(!1),l=re(!1),c=rt(),d=ur(c),{enabled:f}=fr(),{t:p}=c.i18n;xt(async()=>{try{const S=await c.adapter.getContent({path:c.modal.data.item.path});i.value=S.content,o.value=S.content,r("success")}catch(S){bn(S,"Failed to load text content"),r("success")}});const v=se(()=>f("edit")&&!c.fs.isReadOnly(c.modal.data.item)),y=se(()=>s.value),g=se(()=>s.value&&o.value!==i.value),m=()=>{o.value=i.value,s.value=!0,c.modal.setEditMode(!0)},b=()=>{s.value=!1,o.value=i.value,c.modal.setEditMode(!1)},x=async()=>{try{await c.adapter.save({path:c.modal.data.item.path,content:o.value}),i.value=o.value,d.success(p("Updated.")),s.value=!1,c.modal.setEditMode(!1),r("success")}catch(S){d.error(bn(S,p("Failed to save file")))}};return Wm({isEditable:v,isEditing:y,isDirty:g,primaryActionLabel:se(()=>p("Save")),enterEdit:m,commitEdit:x,cancelEdit:b}),(S,O)=>(C(),R("div",vW,[_("div",gW,[(C(),Ee(Dh,{onResolve:O[2]||(O[2]=T=>l.value=!0)},{fallback:Le(()=>[s.value?Ct((C(),R("textarea",{key:1,"onUpdate:modelValue":O[1]||(O[1]=T=>o.value=T),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512)),[[oi,o.value]]):(C(),R("pre",_W,q(i.value),1))]),default:Le(()=>[Z(w(n),{"model-value":s.value?o.value:i.value,readonly:!s.value,filename:w(c).modal.data.item.basename,"onUpdate:modelValue":O[0]||(O[0]=T=>s.value?o.value=T:null)},null,8,["model-value","readonly","filename"])]),_:1})),Ct(_("span",null,q(l.value),513),[[Nr,!1]])])]))}}),bW={class:"vuefinder__text-preview"},wW={class:"vuefinder__text-preview__body vuefinder__csv-preview__body"},EW={key:0,class:"vuefinder__text-preview__content"},SW={key:0,class:"vuefinder__csv-preview__error"},CW={key:1,class:"vuefinder__csv-preview__empty"},xW={key:2,class:"vuefinder__csv-preview__table-wrap"},TW={class:"vuefinder__csv-preview__table"},kW=["title"],OW={class:"vuefinder__csv-preview__row-num"},$W=["title"],AW={key:0,class:"vuefinder__csv-preview__truncated"},RW={key:2,class:"vuefinder__csv-preview__view-checkbox"},Sp=1e3,PW=ze({name:"CsvPreview",__name:"Csv",emits:["success"],setup(e,{emit:t}){const n=Jr({loader:()=>Rt(()=>import("./CodeMirrorEditor-Cqow8ROO-D5a3bJrn.js"),__vite__mapDeps([93,2,1]),import.meta.url).then(ve=>ve.C),delay:100}),r=t,i=re(""),o=re(""),s=yn([]),l=yn([]),c=re(null),d=re(!1),f=re(!1),p=se(()=>s.value.length>Sp),v=se(()=>p.value?s.value.slice(0,Sp):s.value),y=rt(),g=ur(y),{enabled:m}=fr(),{t:b}=y.i18n;async function x(ve){try{const{parse:W}=await Rt(()=>import("./papaparse.min-Brc8PWCw-BsyFjD51.js"),[],import.meta.url).then(D=>D.p),X=W(ve,{skipEmptyLines:!0,delimiter:""});if(!X.data.length){l.value=[],s.value=[];return}const[K,...L]=X.data;l.value=K??[],s.value=L,c.value=null}catch(W){c.value=bn(W,b("Failed to parse CSV")),l.value=[],s.value=[]}}xt(async()=>{try{const ve=await y.adapter.getContent({path:y.modal.data.item.path});i.value=ve.content,o.value=ve.content,await x(ve.content),r("success")}catch(ve){bn(ve,"Failed to load CSV content"),r("success")}});const S=se(()=>!d.value&&f.value),O=se(()=>m("edit")&&!y.fs.isReadOnly(y.modal.data.item)),T=se(()=>d.value),A=se(()=>d.value&&o.value!==i.value),M=()=>{o.value=i.value,d.value=!0,f.value=!1,y.modal.setEditMode(!0)},z=()=>{d.value=!1,o.value=i.value,y.modal.setEditMode(!1)},Y=async()=>{try{await y.adapter.save({path:y.modal.data.item.path,content:o.value}),i.value=o.value,await x(i.value),g.success(b("Updated.")),d.value=!1,y.modal.setEditMode(!1),r("success")}catch(ve){g.error(bn(ve,b("Failed to save file")))}};return Wm({isEditable:O,isEditing:T,isDirty:A,primaryActionLabel:se(()=>b("Save")),enterEdit:M,commitEdit:Y,cancelEdit:z}),(ve,W)=>(C(),R("div",bW,[_("div",wW,[S.value?(C(),R(We,{key:1},[c.value?(C(),R("div",SW,q(c.value),1)):!s.value.length&&!l.value.length?(C(),R("div",CW,q(w(b)("No rows to display")),1)):(C(),R("div",xW,[_("table",TW,[_("thead",null,[_("tr",null,[W[3]||(W[3]=_("th",{class:"vuefinder__csv-preview__row-num"},null,-1)),(C(!0),R(We,null,ut(l.value,(X,K)=>(C(),R("th",{key:K,title:X},q(X),9,kW))),128))])]),_("tbody",null,[(C(!0),R(We,null,ut(v.value,(X,K)=>(C(),R("tr",{key:K},[_("td",OW,q(K+1),1),(C(!0),R(We,null,ut(X,(L,D)=>(C(),R("td",{key:D,title:L},q(L),9,$W))),128))]))),128))])]),p.value?(C(),R("div",AW,q(w(b)("Showing first %s rows out of %s",Sp,s.value.length)),1)):Se("",!0)]))],64)):(C(),Ee(Dh,{key:0},{fallback:Le(()=>[d.value?Ct((C(),R("textarea",{key:1,"onUpdate:modelValue":W[1]||(W[1]=X=>o.value=X),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512)),[[oi,o.value]]):(C(),R("pre",EW,q(i.value),1))]),default:Le(()=>[Z(w(n),{"model-value":d.value?o.value:i.value,readonly:!d.value,filename:w(y).modal.data.item.basename,"onUpdate:modelValue":W[0]||(W[0]=X=>d.value?o.value=X:null)},null,8,["model-value","readonly","filename"])]),_:1})),d.value?Se("",!0):(C(),R("label",RW,[Ct(_("input",{"onUpdate:modelValue":W[2]||(W[2]=X=>f.value=X),type:"checkbox"},null,512),[[Zs,f.value]]),_("span",null,q(w(b)("Show as table")),1)]))])]))}}),Ym=async(e,t)=>{if(t){if(t.isFile){const n=await new Promise(r=>{t.file(r)});e(t,n)}if(t.isDirectory){const n=t.createReader(),r=await new Promise(i=>{n.readEntries(i)});for(const i of r)await Ym(e,i)}}},cn={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function WC(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.path),o=t.config,s=re({QUEUE_ENTRY_STATUS:cn}),l=re(null),c=re(null),d=re(null),f=re(null),p=re(null),v=re([]),y=re(""),g=re(!1),m=re(!1),b=re(null);let x;const S=j=>{j.preventDefault(),j.stopPropagation(),m.value=!0},O=j=>{j.preventDefault(),j.stopPropagation(),m.value=!0},T=j=>{j.preventDefault(),j.stopPropagation(),(!j.relatedTarget||j.relatedTarget===document.body)&&(m.value=!1)},A=j=>{j.preventDefault(),j.stopPropagation(),m.value=!1;const de=/^[/\\](.+)/,U=j.dataTransfer;U&&(U.items&&U.items.length?Array.from(U.items).forEach(ee=>{if(ee.kind==="file"){const Q=ee.webkitGetAsEntry?.();if(Q)Ym((B,oe)=>{const V=de.exec(B?.fullPath||"");z(oe,V?V[1]:oe.name)},Q);else{const B=ee.getAsFile?.();B&&z(B)}}}):U.files&&U.files.length&&Array.from(U.files).forEach(ee=>z(ee)))},M=j=>v.value.findIndex(de=>de.id===j),z=(j,de)=>x.addFile({name:de||j.name,type:j.type,data:j,source:"Local"}),Y=j=>j.status===cn.DONE?"text-green-600":j.status===cn.ERROR||j.status===cn.CANCELED?"text-red-600":"",ve=j=>j.status===cn.DONE?"✓":j.status===cn.ERROR||j.status===cn.CANCELED?"!":"...",W=()=>f.value?.click(),X=()=>t.modal.close(),K=j=>{if(g.value||!v.value.filter(de=>de.status!==cn.DONE).length){g.value||(y.value=n("Please select file to upload first."));return}y.value="",b.value=j||i.value,x.upload()},L=()=>{x.cancelAll(),v.value.forEach(j=>{j.status!==cn.DONE&&(j.status=cn.CANCELED,j.statusName=n("Canceled"))}),g.value=!1},D=j=>{g.value||(x.removeFile(j.id),v.value.splice(M(j.id),1))},ne=j=>{if(!g.value)if(x.cancelAll(),j){const de=v.value.filter(U=>U.status!==cn.DONE);v.value=[],de.forEach(U=>z(U.originalFile,U.name))}else v.value=[]},le=j=>{j.forEach(de=>{z(de)})},je=(j,de)=>j.endsWith("://")||j.endsWith("/")?j+de:j+"/"+de,J=async(j,de)=>{const U=de.trim();if(g.value||!U)return;if(U.includes("/")||U.includes("\\")){y.value=n("Name cannot contain slashes.");return}const ee=j.name.split("/");ee[ee.length-1]=U;const Q=ee.join("/");if(Q===j.name)return;if(j.status===cn.DONE){const G=b.value?.path||i.value.path,N=je(G,j.name),ie=j.name.split("/");ie.pop();const ge=ie.length?je(G,ie.join("/")):G;try{await t.adapter.rename({path:ge,item:N,name:U}),j.name=Q,t.adapter.invalidateListQuery(G),G===i.value.path&&t.adapter.open(G)}catch(fe){y.value=fe?.message||n("Failed to rename")}return}const B=M(j.id);if(B===-1)return;const oe=j.originalFile,V=j.name;x.removeFile(j.id),v.value.splice(B,1);let P;try{P=z(oe,Q)}catch(G){y.value=G?.message||n("Failed to rename");try{z(oe,V)}catch{}return}if(!P)return;const F=M(P);if(F!==-1&&F!==B){const G=v.value.splice(F,1)[0];G&&v.value.splice(B,0,G)}};return xt(()=>{x=new cm({debug:t.debug,restrictions:{maxFileSize:Q9(o.get("maxFileSize")??"10mb")},locale:t.i18n.t("uppy"),onBeforeFileAdded:(ee,Q)=>{if(Q[ee.id]!=null){const B=M(ee.id);v.value[B]?.status===cn.PENDING&&(y.value=x.i18n("noDuplicates",{fileName:ee.name})),v.value=v.value.filter(oe=>oe.id!==ee.id)}return v.value.push({id:ee.id,name:ee.name,size:t.filesize(ee.size),status:cn.PENDING,statusName:n("Pending upload"),percent:null,originalFile:ee.data}),!0}});const j={getTargetPath:()=>(b.value||i.value).path};if(e)e(x,j);else if(t.adapter.getDriver().configureUploader)t.adapter.getDriver().configureUploader(x,j);else throw new Error("No uploader configured");x.on("restriction-failed",(ee,Q)=>{const B=v.value[M(ee.id)];B&&D(B),y.value=Q.message}),x.on("upload-start",ee=>{ee.forEach(Q=>{const B=v.value[M(Q.id)];B&&(B.status=cn.UPLOADING,B.statusName=n("Uploading"),B.percent="0%")})}),x.on("upload-progress",(ee,Q)=>{const B=Q.bytesTotal??1,oe=Math.floor(Q.bytesUploaded/B*100),V=M(ee.id);V!==-1&&v.value[V]&&(v.value[V].percent=`${oe}%`)}),x.on("upload-success",ee=>{const Q=v.value[M(ee.id)];Q&&(Q.status=cn.DONE,Q.statusName=n("Done"))}),x.on("upload-error",(ee,Q)=>{const B=v.value[M(ee.id)];B&&(B.percent=null,B.status=cn.ERROR,B.statusName=Q?.isNetworkError?n("Network Error, Unable establish connection to the server or interrupted."):Q?.message||n("Unknown Error"))}),x.on("error",ee=>{y.value=ee.message,g.value=!1}),x.on("complete",ee=>{g.value=!1;const Q=b.value||i.value;t.adapter.invalidateListQuery(Q.path),t.adapter.open(Q.path);const B=v.value.filter(oe=>oe.status===cn.DONE&&ee.successful.includes(oe.id)).map(oe=>oe.name);t.emitter.emit("vf-upload-complete",B)}),f.value?.addEventListener("click",()=>c.value?.click()),p.value?.addEventListener("click",()=>d.value?.click());const de={capture:!0};document.addEventListener("dragover",S,de),document.addEventListener("dragenter",O,de),document.addEventListener("dragleave",T,de),document.addEventListener("drop",A,de);const U=ee=>{const Q=ee.target,B=Q.files;if(B){for(const oe of B)z(oe);Q.value=""}};c.value?.addEventListener("change",U),d.value?.addEventListener("change",U)}),Tn(()=>{const j={capture:!0};document.removeEventListener("dragover",S,j),document.removeEventListener("dragenter",O,j),document.removeEventListener("dragleave",T,j),document.removeEventListener("drop",A,j)}),{container:l,internalFileInput:c,internalFolderInput:d,pickFiles:f,pickFolders:p,queue:v,message:y,uploading:g,hasFilesInDropArea:m,definitions:s,openFileSelector:W,upload:K,cancel:L,remove:D,clear:ne,close:X,getClassNameForEntry:Y,getIconForEntry:ve,addExternalFiles:le,renameEntry:J}}const H0="image/png",Km="image/jpeg",IW="image/webp";function MW(e){const t=(e.split(".").pop()??"").toLowerCase();return t==="png"?H0:t==="webp"?IW:t==="gif"?H0:Km}function YC(e){return new Promise((t,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>n(new Error("Failed to load image")),r.src=e})}function KC(e,t){const n=document.createElement("canvas");n.width=e,n.height=t;const r=n.getContext("2d");if(!r)throw new Error("Could not acquire 2D canvas context");return{canvas:n,ctx:r}}async function q0(e,t,n){const r=await YC(e),{canvas:i,ctx:o}=KC(r.naturalWidth,r.naturalHeight);return o.filter=t,o.drawImage(r,0,0),i.toDataURL(n,n===Km?.92:void 0)}async function DW(e,t,n,r,i){const o=await YC(e),s=o.naturalWidth,l=o.naturalHeight,c=t===90||t===270,{canvas:d,ctx:f}=KC(c?l:s,c?s:l);return f.translate(d.width/2,d.height/2),t&&f.rotate(t*Math.PI/180),(n||r)&&f.scale(n?-1:1,r?-1:1),f.drawImage(o,-s/2,-l/2),d.toDataURL(i,i===Km?.92:void 0)}function FW(e,t,n){const r=1+e/100,i=1+t/100,o=1+n/100;return`brightness(${r}) contrast(${i}) saturate(${o})`}async function LW(e){return await(await fetch(e)).blob()}const jW={class:"vuefinder__image-editor"},UW={class:"vuefinder__image-editor__strip",role:"tablist"},NW=["aria-selected","onClick"],zW={key:0,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},BW={key:1,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},VW={key:2,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},HW={key:3,class:"vuefinder__image-editor__tab-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},qW={class:"vuefinder__image-editor__tab-label"},WW={key:0,class:"vuefinder__image-editor__panel"},YW={class:"vuefinder__image-editor__stage"},KW={class:"vuefinder__image-editor__controls"},GW={class:"vuefinder__image-editor__chips"},QW=["onClick"],XW=["disabled"],JW={key:1,class:"vuefinder__image-editor__panel"},ZW={class:"vuefinder__image-editor__stage"},eY=["src","alt"],tY={class:"vuefinder__image-editor__controls"},nY={class:"vuefinder__image-editor__rotate-btns"},rY=["title"],iY=["title"],oY=["title"],sY=["title"],aY=["disabled"],lY={key:2,class:"vuefinder__image-editor__panel"},cY={class:"vuefinder__image-editor__stage"},uY=["src","alt"],dY={class:"vuefinder__image-editor__controls"},fY={class:"vuefinder__image-editor__toggle"},pY=["disabled"],hY={key:3,class:"vuefinder__image-editor__panel"},mY={class:"vuefinder__image-editor__stage"},vY=["src","alt"],gY={class:"vuefinder__image-editor__controls vuefinder__image-editor__controls--stacked"},_Y={class:"vuefinder__image-editor__slider"},yY={class:"vuefinder__image-editor__slider"},bY={class:"vuefinder__image-editor__slider"},wY={class:"vuefinder__image-editor__row"},EY=["disabled"],SY=ze({name:"ImageEditor",__name:"ImageEditor",props:{src:{},filename:{}},emits:["update:src"],setup(e,{emit:t}){const n=e,r=t,i=rt(),{t:o}=i.i18n,s=re("crop"),l=re(!1),c=re(null),d=[{label:"Original",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],f=_i("cropperRef"),p=re(0),v=re(!1),y=re(!1),g=re(!1),m=re(0),b=re(0),x=re(0),S=se(()=>FW(m.value,b.value,x.value));He([()=>n.src,s],()=>{p.value=0,v.value=!1,y.value=!1,g.value=!1,m.value=0,b.value=0,x.value=0});const O=se(()=>MW(n.filename)),T=se(()=>{const j=[];return p.value&&j.push(`rotate(${p.value}deg)`),v.value&&j.push("scaleX(-1)"),y.value&&j.push("scaleY(-1)"),j.length?{transform:j.join(" ")}:{}}),A=j=>{l.value||(s.value=j)},M=()=>{const j=f.value?.getResult()?.canvas;if(!j)return;const de=j.toDataURL(O.value,O.value==="image/jpeg"?.92:void 0);r("update:src",de)},z=async()=>{if(le.value){l.value=!0;try{const j=await DW(n.src,ne.value,v.value,y.value,O.value);r("update:src",j)}finally{l.value=!1}}},Y=async()=>{if(g.value){l.value=!0;try{const j=await q0(n.src,"grayscale(1)",O.value);r("update:src",j)}finally{l.value=!1}}},ve=async()=>{if(!(m.value===0&&b.value===0&&x.value===0)){l.value=!0;try{const j=await q0(n.src,S.value,O.value);r("update:src",j)}finally{l.value=!1}}},W=()=>{m.value=0,b.value=0,x.value=0},X=()=>{p.value-=90},K=()=>{p.value+=90},L=()=>{v.value=!v.value},D=()=>{y.value=!y.value},ne=se(()=>(p.value%360+360)%360),le=se(()=>ne.value!==0||v.value||y.value),je=se(()=>m.value!==0||b.value!==0||x.value!==0),J=se(()=>g.value);return(j,de)=>(C(),R("div",jW,[_("div",UW,[(C(),R(We,null,ut(["crop","rotate","grayscale","adjust"],U=>_("button",{key:U,type:"button",role:"tab","aria-selected":s.value===U,class:Be(["vuefinder__image-editor__tab",{"vuefinder__image-editor__tab--active":s.value===U}]),onClick:ee=>A(U)},[U==="crop"?(C(),R("svg",zW,[...de[4]||(de[4]=[_("path",{d:"M6 2v16a2 2 0 0 0 2 2h14"},null,-1),_("path",{d:"M2 6h16a2 2 0 0 1 2 2v14"},null,-1)])])):U==="rotate"?(C(),R("svg",BW,[...de[5]||(de[5]=[_("polyline",{points:"23 4 23 10 17 10"},null,-1),_("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"},null,-1)])])):U==="grayscale"?(C(),R("svg",VW,[...de[6]||(de[6]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{d:"M12 3v18"},null,-1),_("path",{d:"M12 3a9 9 0 0 0 0 18",fill:"currentColor"},null,-1)])])):(C(),R("svg",HW,[...de[7]||(de[7]=[Lc('<line x1="4" y1="6" x2="14" y2="6"></line><circle cx="17" cy="6" r="2"></circle><line x1="10" y1="12" x2="20" y2="12"></line><circle cx="7" cy="12" r="2"></circle><line x1="4" y1="18" x2="14" y2="18"></line><circle cx="17" cy="18" r="2"></circle>',6)])])),_("span",qW,q(U==="crop"?w(o)("Crop"):U==="rotate"?w(o)("Rotate"):U==="grayscale"?w(o)("Grayscale"):w(o)("Adjust")),1)],10,NW)),64))]),s.value==="crop"?(C(),R("div",WW,[_("div",YW,[Z(w(WS),{ref_key:"cropperRef",ref:f,class:"vuefinder__image-editor__cropper",crossorigin:"anonymous",src:n.src,"stencil-props":c.value===null?{}:{aspectRatio:c.value},"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src","stencil-props"])]),_("div",KW,[_("div",GW,[(C(),R(We,null,ut(d,U=>_("button",{key:U.label,type:"button",class:Be(["vuefinder__image-editor__chip",{"vuefinder__image-editor__chip--active":c.value===U.value}]),onClick:ee=>c.value=U.value},q(w(o)(U.label)),11,QW)),64))]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value,onClick:M},q(w(o)("Apply")),9,XW)])])):s.value==="rotate"?(C(),R("div",JW,[_("div",ZW,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an(T.value),alt:n.filename},null,12,eY)]),_("div",tY,[_("div",nY,[_("button",{type:"button",class:"vuefinder__image-editor__icon-btn",title:w(o)("Rotate left 90°"),onClick:X},[...de[8]||(de[8]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("polyline",{points:"1 4 1 10 7 10"}),_("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})],-1)])],8,rY),_("button",{type:"button",class:"vuefinder__image-editor__icon-btn",title:w(o)("Rotate right 90°"),onClick:K},[...de[9]||(de[9]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("polyline",{points:"23 4 23 10 17 10"}),_("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})],-1)])],8,iY),_("button",{type:"button",class:Be(["vuefinder__image-editor__icon-btn",{"vuefinder__image-editor__icon-btn--active":v.value}]),title:w(o)("Flip horizontal"),onClick:L},[...de[10]||(de[10]=[Lc('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 3 4 7 8 11"></polyline><polyline points="16 3 20 7 16 11"></polyline><line x1="4" y1="7" x2="20" y2="7"></line><line x1="12" y1="13" x2="12" y2="21"></line></svg>',1)])],10,oY),_("button",{type:"button",class:Be(["vuefinder__image-editor__icon-btn",{"vuefinder__image-editor__icon-btn--active":y.value}]),title:w(o)("Flip vertical"),onClick:D},[...de[11]||(de[11]=[Lc('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 8 7 4 11 8"></polyline><polyline points="3 16 7 20 11 16"></polyline><line x1="7" y1="4" x2="7" y2="20"></line><line x1="13" y1="12" x2="21" y2="12"></line></svg>',1)])],10,sY)]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!le.value,onClick:z},q(w(o)("Apply")),9,aY)])])):s.value==="grayscale"?(C(),R("div",lY,[_("div",cY,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an(g.value?{filter:"grayscale(1)"}:{}),alt:n.filename},null,12,uY)]),_("div",dY,[_("label",fY,[Ct(_("input",{"onUpdate:modelValue":de[0]||(de[0]=U=>g.value=U),type:"checkbox"},null,512),[[Zs,g.value]]),_("span",null,q(w(o)("Grayscale")),1)]),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!J.value,onClick:Y},q(w(o)("Apply")),9,pY)])])):(C(),R("div",hY,[_("div",mY,[_("img",{class:"vuefinder__image-editor__preview",src:n.src,style:an({filter:S.value}),alt:n.filename},null,12,vY)]),_("div",gY,[_("div",_Y,[_("label",null,[Et(q(w(o)("Brightness")),1),_("span",null,q(m.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[1]||(de[1]=U=>m.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,m.value,void 0,{number:!0}]])]),_("div",yY,[_("label",null,[Et(q(w(o)("Contrast")),1),_("span",null,q(b.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[2]||(de[2]=U=>b.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,b.value,void 0,{number:!0}]])]),_("div",bY,[_("label",null,[Et(q(w(o)("Saturation")),1),_("span",null,q(x.value),1)]),Ct(_("input",{"onUpdate:modelValue":de[3]||(de[3]=U=>x.value=U),type:"range",min:"-100",max:"100",step:"1"},null,512),[[oi,x.value,void 0,{number:!0}]])]),_("div",wY,[_("button",{type:"button",class:"vuefinder__image-editor__reset",onClick:W},q(w(o)("Reset")),1),_("button",{type:"button",class:"vuefinder__image-editor__apply",disabled:l.value||!je.value,onClick:ve},q(w(o)("Apply")),9,EY)])])]))]))}}),CY={class:"vuefinder__image-preview"},xY=["src"],TY=["aria-label","title"],kY=["aria-label","title"],OY=["aria-label","title"],$Y=.5,AY=3,W0=.25,RY=ze({name:"ImagePreview",__name:"Image",emits:["success"],setup(e,{emit:t}){const n=t,r=rt(),i=ur(r),{enabled:o}=fr(),{t:s}=r.i18n,l=re(!1),c=re(r.modal.data.item.previewUrl??r.adapter.getPreviewUrl({path:r.modal.data.item.path})),d=re(c.value),f=re(!1),p=re(1),v=re(null),y=re(0),g=re(0),m=re(1),b=re(!1),x=re(0),S=re(0);let O=null,T=0,A=0,M=0,z=0;const{addExternalFiles:Y,upload:ve,queue:W}=WC(r.customUploader),X=r.fs,K=Qe(X.path),L=se(()=>y.value*m.value),D=se(()=>g.value*m.value),ne=(N,ie)=>{const ge=v.value?.clientWidth??0,fe=v.value?.clientHeight??0,pe=Math.max(0,(L.value*p.value-ge)/2),Ce=Math.max(0,(D.value*p.value-fe)/2);return{x:Math.min(pe,Math.max(-pe,N)),y:Math.min(Ce,Math.max(-Ce,ie))}},le=se(()=>{if(!y.value||!g.value)return{};const{x:N,y:ie}=ne(x.value,S.value);return{width:`${L.value}px`,height:`${D.value}px`,transform:`translate(${N}px, ${ie}px) scale(${p.value})`,transformOrigin:"center center"}}),je=()=>{if(!v.value||!y.value||!g.value)return;const N=v.value.getBoundingClientRect();!N.width||!N.height||(m.value=Math.min(N.width/y.value,N.height/g.value))},J=N=>{const ie=N.target;ie instanceof HTMLImageElement&&(y.value=ie.naturalWidth||ie.clientWidth,g.value=ie.naturalHeight||ie.clientHeight,je())},j=N=>Math.min(AY,Math.max($Y,N)),de=()=>{p.value=j(Number((p.value+W0).toFixed(2)));const N=ne(x.value,S.value);x.value=N.x,S.value=N.y},U=()=>{p.value=j(Number((p.value-W0).toFixed(2)));const N=ne(x.value,S.value);x.value=N.x,S.value=N.y},ee=()=>{p.value=1,x.value=0,S.value=0},Q=N=>{l.value||(N.deltaY>0?U():N.deltaY<0&&de())},B=N=>{if(l.value)return;const ie=N.target;if(ie instanceof HTMLInputElement||ie instanceof HTMLTextAreaElement||ie?.isContentEditable)return;const ge=N.key==="="||N.key==="+",fe=N.key==="-"||N.key==="_",pe=N.key==="0";if(!(!ge&&!fe&&!pe)){if(N.preventDefault(),ge){de();return}if(fe){U();return}ee()}},oe=()=>{b.value=!1},V=N=>{l.value||p.value<=1||!v.value||(b.value=!0,T=N.clientX,A=N.clientY,M=x.value,z=S.value,N.currentTarget?.setPointerCapture?.(N.pointerId))},P=N=>{if(!b.value)return;const ie=N.clientX-T,ge=N.clientY-A,fe=ne(M+ie,z+ge);x.value=fe.x,S.value=fe.y};Wm({isEditable:se(()=>o("edit")&&!r.fs.isReadOnly(r.modal.data.item)),isEditing:se(()=>l.value),isDirty:se(()=>l.value&&f.value),primaryActionLabel:se(()=>s("Save")),enterEdit:()=>{d.value=c.value,f.value=!1,l.value=!0,r.modal.setEditMode(!0)},commitEdit:()=>G(),cancelEdit:()=>{l.value=!1,d.value=c.value,f.value=!1,r.modal.setEditMode(!1)},extraInfo:se(()=>!y.value||!g.value?[]:[{label:s("Dimensions"),value:`${y.value} × ${g.value}`}])});const F=N=>{d.value=N,f.value=!0},G=async()=>{if(!f.value)return;const N=r.modal.data.item.basename,ie=N.split(".").pop()?.toLowerCase()||"jpg",ge=ie==="png"?"image/png":ie==="gif"?"image/gif":"image/jpeg";try{const fe=await LW(d.value),pe=new File([fe],N,{type:ge}),Ce=r.modal.data.item.path.split("/");Ce.pop();const $e={path:Ce.join("/")||(K.value?.path??"")};Y([pe]),await new Promise(Ge=>setTimeout(Ge,100));const Ke=W.value.find(Ge=>Ge.name===pe.name);if(!Ke)throw new Error("File was not added to upload queue");ve($e);let Ne=0;for(;Ne<150;){await new Promise(Ze=>setTimeout(Ze,200));const Ge=W.value.find(Ze=>Ze.id===Ke.id);if(Ge?.status===cn.DONE)break;if(Ge?.status===cn.ERROR)throw new Error(Ge.statusName||"Upload failed");Ne++}i.success(s("Updated.")),await fetch(c.value,{cache:"reload",mode:"no-cors"});const tt=r.root?.querySelector?.('[data-src="'+c.value+'"]');tt&&tt instanceof HTMLElement&&Ho.resetStatus(tt),r.emitter.emit("vf-refresh-thumbnails"),l.value=!1,f.value=!1,d.value=c.value,r.modal.setEditMode(!1),n("success")}catch(fe){i.error(bn(fe,s("Failed to save image")))}};return xt(()=>{O=new ResizeObserver(()=>{je()}),v.value&&O.observe(v.value),window.addEventListener("keydown",B),n("success")}),ns(()=>{window.removeEventListener("keydown",B),O?.disconnect()}),(N,ie)=>(C(),R("div",CY,[_("div",{ref_key:"imageContainer",ref:v,class:"vuefinder__image-preview__image-container"},[l.value?(C(),Ee(SY,{key:1,src:d.value,filename:w(r).modal.data.item.basename,"onUpdate:src":F},null,8,["src","filename"])):(C(),R("div",{key:0,class:"vuefinder__image-preview__stage",onWheel:ht(Q,["prevent"])},[_("img",{style:an(le.value),src:w(r).modal.data.item.previewUrl??w(r).adapter.getPreviewUrl({path:w(r).modal.data.item.path}),class:Be(["vuefinder__image-preview__image",{"vuefinder__image-preview__image--zoomed":p.value>1,"vuefinder__image-preview__image--panning":b.value}]),draggable:!1,onLoad:J,onPointerdown:V,onPointermove:P,onPointerup:oe,onPointercancel:oe,onLostpointercapture:oe},null,46,xY),_("div",{class:"vuefinder__image-preview__zoom-controls",onPointerdown:ie[0]||(ie[0]=ht(()=>{},["stop"])),onWheel:ie[1]||(ie[1]=ht(()=>{},["stop"]))},[_("button",{type:"button",class:"vuefinder__image-preview__zoom-button","aria-label":w(s)("Zoom out"),title:w(s)("Zoom out"),onClick:U},[...ie[2]||(ie[2]=[_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("circle",{cx:"11",cy:"11",r:"7"}),_("line",{x1:"8",y1:"11",x2:"14",y2:"11"}),_("line",{x1:"16.5",y1:"16.5",x2:"21",y2:"21"})],-1)])],8,TY),_("button",{type:"button",class:"vuefinder__image-preview__zoom-reset","aria-label":w(s)("Reset zoom"),title:w(s)("Reset zoom"),onClick:ee},q(Math.round(p.value*100))+"% ",9,kY),_("button",{type:"button",class:"vuefinder__image-preview__zoom-button","aria-label":w(s)("Zoom in"),title:w(s)("Zoom in"),onClick:de},[...ie[3]||(ie[3]=[Lc('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"></circle><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line><line x1="16.5" y1="16.5" x2="21" y2="21"></line></svg>',1)])],8,OY)],32)],32))],512)]))}}),PY={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function IY(e,t){return C(),R("svg",PY,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const Ga={render:IY},MY={class:"vuefinder__default-preview"},DY={class:"vuefinder__default-preview__content"},FY={class:"vuefinder__default-preview__icon-container"},LY=["title"],jY=ze({__name:"Default",emits:["success"],setup(e,{emit:t}){const n=rt(),r=t;return xt(()=>{r("success")}),(i,o)=>(C(),R("div",MY,[_("div",DY,[_("div",FY,[Z(w(Ga),{class:"vuefinder__default-preview__file-icon"}),_("div",{class:"vuefinder__default-preview__file-name",title:w(n).modal.data.item.path},q(w(n).modal.data.item.basename),9,LY)])])]))}}),UY={class:"vuefinder__video-preview"},NY={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},zY=["src"],BY=ze({__name:"Video",emits:["success"],setup(e,{emit:t}){const n=rt(),r=t,i=()=>n.adapter.getPreviewUrl({path:n.modal.data.item.path});return xt(()=>{r("success")}),(o,s)=>(C(),R("div",UY,[_("div",null,[_("video",NY,[_("source",{src:i(),type:"video/mp4"},null,8,zY),s[0]||(s[0]=Et(" Your browser does not support the video tag. ",-1))])])]))}}),VY={class:"vuefinder__audio-preview"},HY={class:"vuefinder__audio-preview__audio",controls:""},qY=["src"],WY=ze({__name:"Audio",emits:["success"],setup(e,{emit:t}){const n=t;rt();const r=()=>{const i=rt();return i.adapter.getPreviewUrl({path:i.modal.data.item.path})};return xt(()=>{n("success")}),(i,o)=>(C(),R("div",VY,[_("div",null,[_("audio",HY,[_("source",{src:r(),type:"audio/mpeg"},null,8,qY),o[0]||(o[0]=Et(" Your browser does not support the audio element. ",-1))])])]))}}),YY={class:"vuefinder__pdf-preview"},KY=["data"],GY=["src"],QY=ze({__name:"Pdf",emits:["success"],setup(e,{emit:t}){rt();const n=t,r=()=>{const i=rt();return i.adapter.getPreviewUrl({path:i.modal.data.item.path})};return xt(()=>{n("success")}),(i,o)=>(C(),R("div",YY,[_("div",null,[_("object",{class:"vuefinder__pdf-preview__object",data:r(),type:"application/pdf",width:"100%",height:"100%"},[_("iframe",{class:"vuefinder__pdf-preview__iframe",src:r(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,GY)],8,KY)])]))}}),XY=["data-theme"],JY=["disabled","title"],ZY=["disabled","title"],eK={class:"vuefinder__preview-modal__content"},tK={key:0},nK={key:1,class:"vuefinder__preview-modal__status-strip"},rK=["aria-label"],iK={class:"vuefinder__preview-modal__loading"},oK={key:0,class:"vuefinder__preview-modal__loading-indicator"},sK={class:"vuefinder__preview-modal__edit-actions"},aK=["disabled"],Y0=8,lK=1.4,cK=.22,Ta=220,uK=".vuefinder__preview-chrome__title, .vuefinder__preview-modal__status-strip",qi=ze({__name:"ModalPreview",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,i=re(!1),o=Q=>{const B=(Q||"").split("/").pop()||"",oe=B.lastIndexOf(".");return oe>=0?B.slice(oe+1).toLowerCase():""},s=(Q,B)=>B?Q==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(B):Q==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(B):Q==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(B):Q==="csv"?B==="csv"||B==="tsv":Q==="text"?new Set(["txt","md","markdown","json","jsonc","js","mjs","cjs","ts","tsx","jsx","vue","svelte","css","scss","sass","less","html","htm","xml","svg","csv","tsv","log","yml","yaml","toml","ini","conf","env","sh","bash","zsh","fish","py","rb","php","go","rs","java","kt","swift","c","h","cpp","hpp","cs","sql","graphql","gql","dockerfile","gitignore","gitattributes","editorconfig","prettierrc","eslintrc","lock"]).has(B):Q==="application/pdf"?B==="pdf":!1:!1,l=Q=>{const B=t.modal.data.forceType;if(B)return B===Q;const oe=t.modal.data.item.mime_type;if(oe&&typeof oe=="string"&&oe.startsWith(Q))return!0;const V=o(t.modal.data.item.path);return s(Q,V)},c=n("preview");c||(i.value=!0);const d=se(()=>t.modal.data.item),f=Qe(t.fs.sortedFiles),p=se(()=>f.value.filter(Q=>Q.type==="file")),v=se(()=>p.value.findIndex(Q=>Q.path===d.value.path)),y=se(()=>!!w(t.modal.controls?.isEditable)),g=se(()=>!!w(t.modal.controls?.isEditing)),m=se(()=>!!w(t.modal.controls?.isDirty)),b=se(()=>w(t.modal.controls?.primaryActionLabel)??r("Save")),x=async()=>{await t.modal.controls?.enterEdit?.()},S=async()=>{await t.modal.controls?.commitEdit?.()},O=async()=>{m.value&&!window.confirm(r("Discard unsaved changes?"))||await t.modal.controls?.cancelEdit?.()},T=se(()=>!g.value&&v.value>0),A=se(()=>!g.value&&v.value<p.value.length-1),M=()=>{if(!T.value)return;const Q=p.value[v.value-1];Q&&(t.fs.clearSelection(),t.fs.select(Q.path),t.modal.data.item=Q,i.value=!1)},z=()=>{if(!A.value)return;const Q=p.value[v.value+1];Q&&(t.fs.clearSelection(),t.fs.select(Q.path),t.modal.data.item=Q,i.value=!1)},Y=()=>{g.value&&m.value&&!window.confirm(r("Discard unsaved changes?"))||t.modal.close()},ve=re(0),W=re(!1);let X=0,K=0,L=!1,D=!1;const ne=se(()=>({transform:`translate3d(${ve.value}px, 0, 0)`,transition:W.value?`transform ${Ta}ms ease-out`:"none"})),le=(Q,B)=>{setTimeout(B,Q)},je=Q=>{if(g.value||Q.touches.length!==1||!Q.target?.closest?.(uK))return;const B=Q.touches[0];B&&(L=!0,D=!1,X=B.clientX,K=B.clientY,W.value=!1)},J=Q=>{if(!L)return;const B=Q.touches[0];if(!B)return;const oe=B.clientX-X,V=B.clientY-K;if(!D){if(Math.abs(oe)<Y0&&Math.abs(V)<Y0)return;if(Math.abs(oe)<Math.abs(V)*lK){L=!1;return}D=!0}let P=oe;oe>0&&!T.value&&(P=oe*.3),oe<0&&!A.value&&(P=oe*.3),ve.value=P,Q.cancelable&&Q.preventDefault()},j=Q=>{const B=window.innerWidth||1,oe=Q==="prev"?B:-B,V=Q==="prev"?-B:B,P=Q==="prev"?M:z;W.value=!0,ve.value=oe,le(Ta,()=>{P(),W.value=!1,ve.value=V,requestAnimationFrame(()=>{requestAnimationFrame(()=>{W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})})})})},de=()=>{if(!L||(L=!1,!D))return;const Q=window.innerWidth||1,B=ve.value,oe=Math.abs(B)>=Q*cK;if(oe&&B>0&&T.value){j("prev");return}if(oe&&B<0&&A.value){j("next");return}W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})},U=()=>{L&&(L=!1,D&&(W.value=!0,ve.value=0,le(Ta,()=>{W.value=!1})))},ee=Q=>{if(Q.key==="Escape"){Q.preventDefault(),Q.stopPropagation(),Y();return}if((Q.metaKey||Q.ctrlKey)&&Q.key.toLowerCase()==="s"){const B=t.modal.controls;if(B&&w(B.isEditing)){Q.preventDefault(),B.commitEdit();return}}g.value||(Q.key==="ArrowLeft"||Q.key==="ArrowRight")&&(Q.preventDefault(),Q.stopPropagation(),Q.key==="ArrowLeft"?M():z())};return xt(()=>{const Q=document.querySelector(".vuefinder__preview-modal");Q&&Q.focus()}),(Q,B)=>(C(),Ee(dr,{"on-request-close":Y,"body-style":ne.value,"body-class":"vuefinder__modal-layout__body--swipeable "+(g.value?"vuefinder__modal-layout__body--editing":""),"on-body-touchstart":je,"on-body-touchmove":J,"on-body-touchend":de,"on-body-touchcancel":U},Ow({default:Le(()=>[_("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:ee},[Z(mW,{onCloseRequest:Y}),(C(),Ee(el,{to:"body"},[g.value?Se("",!0):(C(),R("div",{key:0,class:"vuefinder__themer vuefinder__preview-modal__nav-overlay","data-theme":w(t).theme.current},[_("button",{disabled:!T.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:w(r)("Previous file"),onClick:M},[...B[7]||(B[7]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,JY),_("button",{disabled:!A.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:w(r)("Next file"),onClick:z},[...B[8]||(B[8]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,ZY)],8,XY))])),_("div",eK,[w(c)?(C(),R("div",tK,[l("csv")?(C(),Ee(PW,{key:`csv-${d.value.path}`,onSuccess:B[0]||(B[0]=oe=>i.value=!0)})):l("text")?(C(),Ee(yW,{key:`text-${d.value.path}`,onSuccess:B[1]||(B[1]=oe=>i.value=!0)})):l("image")?(C(),Ee(RY,{key:`image-${d.value.path}`,onSuccess:B[2]||(B[2]=oe=>i.value=!0)})):l("video")?(C(),Ee(BY,{key:`video-${d.value.path}`,onSuccess:B[3]||(B[3]=oe=>i.value=!0)})):l("audio")?(C(),Ee(WY,{key:`audio-${d.value.path}`,onSuccess:B[4]||(B[4]=oe=>i.value=!0)})):l("application/pdf")?(C(),Ee(QY,{key:`pdf-${d.value.path}`,onSuccess:B[5]||(B[5]=oe=>i.value=!0)})):(C(),Ee(jY,{key:`default-${d.value.path}`,onSuccess:B[6]||(B[6]=oe=>i.value=!0)}))])):Se("",!0),g.value||p.value.length>1?(C(),R("div",nK,[g.value?(C(),R("span",{key:0,class:Be(["vuefinder__preview-modal__edit-chip",{"vuefinder__preview-modal__edit-chip--dirty":m.value}])},q(m.value?w(r)("Unsaved"):w(r)("Editing")),3)):(C(),R("span",{key:1,class:"vuefinder__preview-modal__pagination-text","aria-label":w(r)("File %s of %s",String(v.value+1),String(p.value.length))},q(v.value+1)+" / "+q(p.value.length),9,rK))])):Se("",!0),_("div",iK,[i.value===!1?(C(),R("div",oK,[B[9]||(B[9]=_("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[_("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),_("path",{class:"vuefinder__preview-modal__spinner-path",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),_("span",null,q(w(r)("Loading")),1)])):Se("",!0)])])],32)]),_:2},[y.value?{name:"buttons",fn:Le(()=>[_("div",sK,[g.value?(C(),R(We,{key:1},[_("button",{type:"button",class:"vf-btn vf-btn-primary vuefinder__preview-modal__edit-btn",disabled:!m.value,onClick:S},q(b.value),9,aK),_("button",{type:"button",class:"vf-btn vf-btn-secondary vuefinder__preview-modal__edit-btn",onClick:O},q(w(r)("Cancel")),1)],64)):(C(),R("button",{key:0,type:"button",class:"vf-btn vf-btn-primary vuefinder__preview-modal__edit-btn",onClick:x},q(w(r)("Edit")),1))])]),key:"0"}:void 0]),1032,["body-style","body-class"]))}}),dK={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"};function fK(e,t){return C(),R("svg",dK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M13 19H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v4M16 22l5-5M21 21.5V17h-4.5"},null,-1)])])}const pK={render:fK},hK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function mK(e,t){return C(),R("svg",hK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 16H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2m-6 12h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2"},null,-1)])])}const Gm={render:mK},vK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function gK(e,t){return C(),R("svg",vK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1)])])}const ar={render:gK},_K={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function yK(e,t){return C(),R("svg",_K,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const ed={render:yK},bK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function wK(e,t){return C(),R("svg",bK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M5 12h14"},null,-1)])])}const td={render:wK},EK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"};function SK(e,t){return C(),R("svg",EK,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1)])])}const Qa={render:SK},CK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function xK(e,t){return C(),R("svg",CK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1)])])}const Qm={render:xK},TK={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function kK(e,t){return C(),R("svg",TK,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1)])])}const nd={render:kK},OK={class:"vuefinder__modal-tree__folder-item"},$K={class:"vuefinder__modal-tree__folder-content"},AK={key:1,class:"vuefinder__modal-tree__folder-spacer"},RK={class:"vuefinder__modal-tree__folder-text"},PK={key:0,class:"vuefinder__modal-tree__subfolders"},IK={key:0,class:"vuefinder__modal-tree__more-note"},MK=300,DK=ze({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(e,{emit:t}){const n=rt(),{t:r}=n.i18n,i=n.fs,o=re({}),s=e,l=t;Qe(i.path);const c=se(()=>{const z=`${s.storage}:${s.folder.path}`;return s.expandedFolders[z]||!1}),d=se(()=>s.modelValue?.path===s.folder.path),f=se(()=>s.currentPath?.path===s.folder.path),p=se(()=>s.modalTreeData[s.folder.path]||[]),v=se(()=>{const z=p.value,Y=o.value[s.folder.path]||50;return z.length>Y?z.slice(0,Y):z}),y=se(()=>p.value.length),g=se(()=>o.value[s.folder.path]||50),m=se(()=>y.value>g.value),b=()=>{o.value[s.folder.path]=(g.value||50)+50},x=se(()=>p.value.length>0||s.folder.type==="dir"),S=()=>{l("toggleFolder",s.storage,s.folder.path)},O=()=>{l("update:modelValue",s.folder)},T=()=>{l("update:modelValue",s.folder),l("selectAndClose",s.folder)};let A=0;const M=()=>{const z=Date.now();z-A<MK?T():O(),A=z};return(z,Y)=>{const ve=ft("ModalTreeFolderItem",!0);return C(),R("div",OK,[_("div",$K,[x.value?(C(),R("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:S},[c.value?(C(),Ee(w(td),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(C(),Ee(w(ed),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(C(),R("div",AK)),_("div",{class:Be(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":d.value,"vuefinder__modal-tree__folder-link--current":f.value}]),onClick:O,onDblclick:T,onTouchend:M},[c.value?(C(),Ee(w(nd),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(C(),Ee(w(ar),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),_("span",RK,q(e.folder.basename),1)],34)]),c.value&&x.value?(C(),R("div",PK,[(C(!0),R(We,null,ut(v.value,W=>(C(),Ee(ve,{key:W.path,folder:W,storage:e.storage,"model-value":e.modelValue,"expanded-folders":e.expandedFolders,"modal-tree-data":e.modalTreeData,"current-path":e.currentPath,"onUpdate:modelValue":Y[0]||(Y[0]=X=>z.$emit("update:modelValue",X)),onSelectAndClose:Y[1]||(Y[1]=X=>z.$emit("selectAndClose",X)),onToggleFolder:Y[2]||(Y[2]=(X,K)=>z.$emit("toggleFolder",X,K))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),m.value?(C(),R("div",IK,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:b},q(w(r)("load more")),1)])):Se("",!0)])):Se("",!0)])}}}),FK={class:"vuefinder__modal-tree"},LK={class:"vuefinder__modal-tree__header"},jK={class:"vuefinder__modal-tree__title"},UK={key:0,class:"vuefinder__modal-tree__section"},NK={class:"vuefinder__modal-tree__section-title"},zK={class:"vuefinder__modal-tree__list"},BK=["onClick","onDblclick","onTouchend"],VK={class:"vuefinder__modal-tree__text"},HK={class:"vuefinder__modal-tree__text-storage"},qK={class:"vuefinder__modal-tree__section-title"},WK={class:"vuefinder__modal-tree__list"},YK={class:"vuefinder__modal-tree__storage-item"},KK={class:"vuefinder__modal-tree__storage-content"},GK=["onClick"],QK=["onClick","onDblclick","onTouchend"],XK={class:"vuefinder__modal-tree__storage-text"},JK={key:0,class:"vuefinder__modal-tree__subfolders"},ZK={key:0,class:"vuefinder__modal-tree__more-note"},eG=["onClick"],K0=300,pl=ze({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(e,{emit:t}){const n=rt(),{t:r}=n.i18n,i=n.fs,o=n.config,s=t,l=Qe(i.sortedFiles),c=Qe(i.storages),d=se(()=>c.value||[]),f=Qe(i.path),p=re(null),v=re({}),y=re({}),g=re({});He(l,L=>{const D=L.filter(le=>le.type==="dir"),ne=f.value?.path||"";ne&&(y.value[ne]=D.map(le=>({...le,type:"dir"})))});const m=(L,D)=>{const ne=`${L}:${D}`;v.value={...v.value,[ne]:!v.value[ne]},v.value[ne]&&!y.value[D]&&n.adapter.list(D).then(le=>{const je=(le.files||[]).filter(J=>J.type==="dir");y.value[D]=je.map(J=>({...J,type:"dir"}))})},b=L=>y.value[L]||[],x=L=>g.value[L]||50,S=L=>{const D=b(L),ne=x(L);return D.length>ne?D.slice(0,ne):D},O=L=>b(L).length,T=L=>O(L)>x(L),A=L=>{g.value[L]=x(L)+50},M=L=>{L&&s("update:modelValue",L)},z=L=>{L&&(s("update:modelValue",L),s("selectAndClose",L))},Y=L=>{const D={storage:L,path:L+"://",basename:L,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:L+"://"};s("update:modelValue",D)},ve=L=>{const D={storage:L,path:L+"://",basename:L,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:L+"://"};s("update:modelValue",D),s("selectAndClose",D)};let W=0;const X=L=>{if(!L)return;const D=Date.now();D-W<K0?z(L):M(L),W=D},K=L=>{const D=Date.now();D-W<K0?ve(L):Y(L),W=D};return xt(()=>{p.value&&Hr(p.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(L,D)=>(C(),R("div",FK,[_("div",LK,[_("div",jK,q(w(r)("Select Target Folder")),1)]),_("div",{ref_key:"modalContentElement",ref:p,class:"vuefinder__modal-tree__content"},[e.showPinnedFolders&&w(n).features.pinned&&w(o).get("pinnedFolders").length?(C(),R("div",UK,[_("div",NK,q(w(r)("Pinned Folders")),1),_("div",zK,[(C(!0),R(We,null,ut(w(o).get("pinnedFolders"),ne=>(C(),R("div",{key:ne.path,class:Be(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":e.modelValue?.path===ne.path}]),onClick:le=>M(ne),onDblclick:le=>z(ne),onTouchend:le=>X(ne)},[Z(w(ar),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),_("div",VK,q(ne.basename),1),_("div",HK,q(ne.storage),1),Z(w(Qa),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,BK))),128))])])):Se("",!0),_("div",qK,q(w(r)("Storages")),1),(C(!0),R(We,null,ut(d.value,ne=>(C(),R("div",{key:ne,class:"vuefinder__modal-tree__section"},[_("div",WK,[_("div",YK,[_("div",KK,[_("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:ht(le=>m(ne,ne+"://"),["stop"])},[v.value[`${ne}:${ne}://`]?(C(),Ee(w(td),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(C(),Ee(w(ed),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,GK),_("div",{class:Be(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":e.modelValue?.path===ne+"://"}]),onClick:le=>Y(ne),onDblclick:le=>ve(ne),onTouchend:le=>K(ne)},[Z(w(Qm),{class:"vuefinder__modal-tree__storage-icon"}),_("span",XK,q(ne),1)],42,QK)]),v.value[`${ne}:${ne}://`]?(C(),R("div",JK,[(C(!0),R(We,null,ut(S(ne+"://"),le=>(C(),Ee(DK,{key:le.path,folder:le,storage:ne,"model-value":e.modelValue,"expanded-folders":v.value,"modal-tree-data":y.value,"current-path":e.currentPath,"onUpdate:modelValue":M,onSelectAndClose:z,onToggleFolder:m},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),T(ne+"://")?(C(),R("div",ZK,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:le=>A(ne+"://")},q(w(r)("load more")),9,eG)])):Se("",!0)])):Se("",!0)])])]))),128))],512)]))}}),tG=["title"],xh=ze({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(e,{emit:t}){const n=t,r=rt(),{t:i}=r.i18n,o=re(!1),s=re(null),l=re(s.value?.innerHTML);He(l,()=>o.value=!1);const c=()=>{n("hidden"),o.value=!0};return(d,f)=>(C(),R("div",null,[o.value?Se("",!0):(C(),R("div",{key:0,ref_key:"strMessage",ref:s,class:Be(["vuefinder__message",e.error?"vuefinder__message--error":"vuefinder__message--success"])},[mt(d.$slots,"default"),_("div",{class:"vuefinder__message__close",title:w(i)("Close"),onClick:c},[...f[0]||(f[0]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,tG)],2))]))}}),nG={class:"vuefinder__move-modal__content"},rG={class:"vuefinder__move-modal__description"},iG={class:"vuefinder__move-modal__files vf-scrollbar"},oG={class:"vuefinder__move-modal__file-name"},sG={class:"vuefinder__move-modal__target-title"},aG={class:"vuefinder__move-modal__target-container"},lG={class:"vuefinder__move-modal__target-path"},cG={class:"vuefinder__move-modal__target-storage"},uG={key:0,class:"vuefinder__move-modal__destination-folder"},dG={class:"vuefinder__move-modal__target-badge"},fG={key:0,class:"vuefinder__move-modal__options"},pG={class:"vuefinder__move-modal__checkbox-label"},hG={class:"vuefinder__move-modal__checkbox-text"},mG=["disabled"],vG={class:"vuefinder__move-modal__selected-items"},GC=ze({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(e){const t=rt(),n=ur(t),{enabled:r}=fr(),{t:i}=t.i18n,o=e,s=re(t.modal.data.items.from),l=re(t.modal.data.items.to),c=re(""),d=re(o.copy||!r("move")),f=se(()=>d.value?"copy":"move"),p=re(!1),v=Qe(t.fs.path),y=se(()=>d.value?i("Copy files"):i("Move files")),g=se(()=>d.value?i("Are you sure you want to copy these files?"):i("Are you sure you want to move these files?")),m=se(()=>d.value?i("Yes, Copy!"):i("Yes, Move!")),b=M=>{M&&(l.value=M)},x=M=>{M&&(l.value=M,p.value=!1)},S=se(()=>{const M=l.value;return M?s.value.some(z=>!!(M.path===z.path||z.type==="dir"&&M.path.startsWith(z.path+"/"))):!0}),O=se(()=>{if(!S.value)return"";const M=l.value;return M?s.value.find(z=>M.path===z.path||z.type==="dir"&&M.path.startsWith(z.path+"/"))?i("Cannot move/copy item to itself or its own subfolder"):i("Invalid destination directory"):i("Please select a destination directory")}),T=()=>{const M=l.value.path;if(!M)return{storage:"local",path:""};if(M.endsWith("://"))return{storage:M.replace("://",""),path:""};const z=M.split("://");return{storage:z[0]||"local",path:z[1]||""}},A=async()=>{if(s.value.length)try{const{files:M}=await t.adapter[f.value]({path:v.value.path,sources:s.value.map(({path:z})=>z),destination:l.value.path});t.fs.setFiles(M),t.modal.close()}catch(M){n.error(bn(M,i("Failed to transfer files")))}};return(M,z)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:S.value,onClick:A},q(m.value),9,mG),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:z[4]||(z[4]=Y=>w(t).modal.close())},q(w(i)("Cancel")),1),_("div",vG,q(w(i)("%s item(s) selected.",s.value.length)),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:d.value?w(Gm):w(pK),title:y.value},null,8,["icon","title"]),_("div",nG,[_("p",rG,q(g.value),1),_("div",iG,[(C(!0),R(We,null,ut(s.value,Y=>(C(),R("div",{key:Y.path,class:"vuefinder__move-modal__file"},[_("div",null,[Y.type==="dir"?(C(),Ee(w(ar),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(C(),Ee(w(Ga),{key:1,class:"vuefinder__move-modal__icon"}))]),_("div",oG,q(Y.path),1)]))),128))]),_("h4",sG,q(w(i)("Target Directory")),1),_("div",aG,[_("div",{class:"vuefinder__move-modal__target-display",onClick:z[0]||(z[0]=Y=>p.value=!p.value)},[_("div",lG,[_("span",cG,q(T().storage)+"://",1),T().path?(C(),R("span",uG,q(T().path),1)):Se("",!0)]),_("span",dG,q(w(i)("Browse")),1)])]),_("div",{class:Be(["vuefinder__move-modal__tree-selector",p.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[Z(pl,{modelValue:l.value,"onUpdate:modelValue":[z[1]||(z[1]=Y=>l.value=Y),b],"show-pinned-folders":!0,onSelectAndClose:x},null,8,["modelValue"])],2),w(r)("copy")&&w(r)("move")?(C(),R("div",fG,[_("label",pG,[Ct(_("input",{"onUpdate:modelValue":z[2]||(z[2]=Y=>d.value=Y),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[Zs,d.value]]),_("span",hG,q(w(i)("Create a copy instead of moving")),1)])])):Se("",!0),O.value?(C(),Ee(xh,{key:1,error:""},{default:Le(()=>[Et(q(O.value),1)]),_:1})):Se("",!0),c.value.length&&!O.value?(C(),Ee(xh,{key:2,error:"",onHidden:z[3]||(z[3]=Y=>c.value="")},{default:Le(()=>[Et(q(c.value),1)]),_:1})):Se("",!0)])])]),_:1}))}}),Xs=ze({__name:"ModalMove",setup(e){return(t,n)=>(C(),Ee(GC,{copy:!1}))}}),Xm=ze({__name:"ModalCopy",setup(e){return(t,n)=>(C(),Ee(GC,{copy:!0}))}}),gG=(e,t=0,n=!1)=>{let r;return(...i)=>{n&&!r&&e(...i),clearTimeout(r),r=setTimeout(()=>{e(...i)},t)}},QC=(e,t,n)=>{const r=re(e);return Cw((i,o)=>({get(){return i(),r.value},set:gG(s=>{r.value=s,o()},t,!1)}))},_G={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function yG(e,t){return C(),R("svg",_G,[...t[0]||(t[0]=[_("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1)])])}const Jm={render:yG},bG={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"};function wG(e,t){return C(),R("svg",bG,[...t[0]||(t[0]=[_("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),_("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1)])])}const rd={render:wG},EG={class:"vuefinder__search-modal__search-input"},SG=["value","placeholder","disabled"],CG={key:0,class:"vuefinder__search-modal__loading"},xG=ze({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(e,{expose:t,emit:n}){const r=n,i=rt(),{t:o}=i.i18n,s=re(null),l=d=>{const f=d.target;r("update:modelValue",f.value)},c=d=>{r("keydown",d)};return t({focus:()=>{s.value&&s.value.focus()}}),(d,f)=>(C(),R("div",EG,[Z(w(Jm),{class:"vuefinder__search-modal__search-icon"}),_("input",{ref_key:"searchInput",ref:s,value:e.modelValue,type:"text",placeholder:w(o)("Search files"),disabled:e.disabled,class:"vuefinder__search-modal__input",onKeydown:c,onKeyup:f[0]||(f[0]=ht(()=>{},["stop"])),onInput:l},null,40,SG),e.isSearching?(C(),R("div",CG,[Z(w(rd),{class:"vuefinder__search-modal__loading-icon"})])):Se("",!0)]))}}),TG={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function kG(e,t){return C(),R("svg",TG,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1)])])}const XC={render:kG},OG=["disabled","title"],$G=["data-theme"],AG={class:"vuefinder__search-modal__dropdown-content"},RG={class:"vuefinder__search-modal__dropdown-section"},PG={class:"vuefinder__search-modal__dropdown-title"},IG={class:"vuefinder__search-modal__dropdown-options"},MG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},DG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},FG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},LG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},jG={class:"vuefinder__search-modal__dropdown-section"},UG={class:"vuefinder__search-modal__dropdown-title"},NG={class:"vuefinder__search-modal__dropdown-options"},zG=["onClick"],BG={key:0,class:"vuefinder__search-modal__dropdown-option-check"},VG=ze({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{},sortBy:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","update:sortBy","keydown"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=rt(),{t:s}=o.i18n,l=re(null),c=re(null);let d=null;const f=[{value:"name-asc",key:"Name (A-Z)"},{value:"name-desc",key:"Name (Z-A)"},{value:"size-asc",key:"Size (smallest)"},{value:"size-desc",key:"Size (largest)"},{value:"date-desc",key:"Date (newest)"},{value:"date-asc",key:"Date (oldest)"}],p=x=>{if(i("update:selectedOption",x),x.startsWith("size-")){const S=x.split("-")[1];i("update:sizeFilter",S)}},v=x=>{i("update:sortBy",x)},y=async()=>{r.disabled||(r.visible?(i("update:visible",!1),d&&(d(),d=null)):(i("update:visible",!0),await gt(),await g()))},g=async()=>{if(!(!l.value||!c.value)&&(await gt(),!(!l.value||!c.value))){Object.assign(c.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x,y:S}=await Us(l.value,c.value,{placement:"bottom-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(c.value.style,{left:`${x}px`,top:`${S}px`}),requestAnimationFrame(()=>{c.value&&Object.assign(c.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(x){console.warn("Floating UI initial positioning error:",x);return}try{d=Lh(l.value,c.value,async()=>{if(!(!l.value||!c.value))try{const{x,y:S}=await Us(l.value,c.value,{placement:"bottom-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(c.value.style,{left:`${x}px`,top:`${S}px`})}catch(x){console.warn("Floating UI positioning error:",x)}})}catch(x){console.warn("Floating UI autoUpdate setup error:",x),d=null}}},m=x=>{if(!r.visible)return;const S=["size-all","size-small","size-medium","size-large"],O=S.findIndex(T=>T===r.selectedOption);if(x.key==="ArrowDown"){x.preventDefault();const T=(O+1)%S.length;i("update:selectedOption",S[T]||null)}else if(x.key==="ArrowUp"){x.preventDefault();const T=O<=0?S.length-1:O-1;i("update:selectedOption",S[T]||null)}else x.key==="Enter"?(x.preventDefault(),r.selectedOption?.startsWith("size-")&&i("update:sizeFilter",r.selectedOption.split("-")[1])):x.key==="Escape"&&(x.preventDefault(),i("update:visible",!1),d&&(d(),d=null))},b=()=>{d&&(d(),d=null)};return He(()=>r.visible,x=>{!x&&d&&(d(),d=null)}),Tn(()=>{b()}),t({cleanup:b}),(x,S)=>(C(),R(We,null,[_("button",{ref_key:"dropdownBtn",ref:l,class:Be(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":e.visible}]),disabled:e.disabled,title:w(s)("Search Options"),onClick:ht(y,["stop"])},[Z(w(XC),{class:"vuefinder__search-modal__dropdown-icon"})],10,OG),(C(),Ee(el,{to:"body"},[e.visible?(C(),R("div",{key:0,ref_key:"dropdownContent",ref:c,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":w(o).theme.current,tabindex:"-1",onClick:S[4]||(S[4]=ht(()=>{},["stop"])),onKeydown:m},[_("div",AG,[_("div",RG,[_("div",PG,q(w(s)("File Size")),1),_("div",IG,[_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="all"}]),onClick:S[0]||(S[0]=ht(O=>p("size-all"),["stop"]))},[_("span",null,q(w(s)("All Files")),1),e.sizeFilter==="all"?(C(),R("div",MG,[...S[5]||(S[5]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="small"}]),onClick:S[1]||(S[1]=ht(O=>p("size-small"),["stop"]))},[_("span",null,q(w(s)("Small (< 1MB)")),1),e.sizeFilter==="small"?(C(),R("div",DG,[...S[6]||(S[6]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="medium"}]),onClick:S[2]||(S[2]=ht(O=>p("size-medium"),["stop"]))},[_("span",null,q(w(s)("Medium (1-10MB)")),1),e.sizeFilter==="medium"?(C(),R("div",FG,[...S[7]||(S[7]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2),_("div",{class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sizeFilter==="large"}]),onClick:S[3]||(S[3]=ht(O=>p("size-large"),["stop"]))},[_("span",null,q(w(s)("Large (> 10MB)")),1),e.sizeFilter==="large"?(C(),R("div",LG,[...S[8]||(S[8]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],2)])]),_("div",jG,[_("div",UG,q(w(s)("Sort by")),1),_("div",NG,[(C(),R(We,null,ut(f,O=>_("div",{key:O.value,class:Be(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":e.sortBy===O.value}]),onClick:ht(T=>v(O.value),["stop"])},[_("span",null,q(w(s)(O.key)),1),e.sortBy===O.value?(C(),R("div",BG,[...S[9]||(S[9]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):Se("",!0)],10,zG)),64))])])])],40,$G)):Se("",!0)]))],64))}});function id(e,t=40){const n=e.match(/^([^:]+:\/\/)(.*)$/);if(!n)return e;const r=n[1],i=n[2]??"",o=i.split("/").filter(Boolean),s=o.pop();if(!s)return r+i;let l=`${r}${o.join("/")}${o.length?"/":""}${s}`;if(l.length<=t)return l;const c=s.split(/\.(?=[^\.]+$)/),d=c[0]??"",f=c[1]??"",p=d.length>10?`${d.slice(0,6)}...${d.slice(-5)}`:d,v=f?`${p}.${f}`:p;return l=`${r}${o.join("/")}${o.length?"/":""}${v}`,l.length>t&&(l=`${r}.../${v}`),l}async function JC(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Xa(e){await JC(e)}async function HG(e){await JC(e)}const qG={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function WG(e,t){return C(),R("svg",qG,[...t[0]||(t[0]=[_("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1)])])}const ZC={render:WG},YG=["title"],KG={class:"vuefinder__search-modal__result-icon"},GG={class:"vuefinder__search-modal__result-content"},QG={class:"vuefinder__search-modal__result-name"},XG={key:1,class:"vuefinder__search-modal__result-size"},JG=["title"],ZG=["title"],eQ=["data-item-dropdown","data-theme"],tQ={class:"vuefinder__search-modal__item-dropdown-content"},nQ=ze({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","open","preview","activate"],setup(e,{emit:t}){const n=e,r=t,i=rt(),{t:o}=i.i18n,{enabled:s}=fr(),l=Qe(i.config.state),c=se(()=>s("pinned")),d=se(()=>l.value.pinnedFolders.some(L=>L.path===n.item.path)),f=L=>{const D=i.config.get("pinnedFolders");D.some(ne=>ne.path===L.path)?i.config.set("pinnedFolders",D.filter(ne=>ne.path!==L.path)):i.config.set("pinnedFolders",[...D,L])},p=re(null);let v=null,y=null,g=[],m=null;He(()=>n.activeDropdown,L=>{v&&(v(),v=null),y&&(g.forEach(D=>{D===window?window.removeEventListener("scroll",y,!0):D.removeEventListener("scroll",y,!0)}),y=null,g=[]),m&&(document.removeEventListener("mousedown",m,!0),document.removeEventListener("touchstart",m,!0),m=null),L===n.item.path&&p.value&&gt(()=>{M(n.item.path,p.value),x(),S()})});const b=L=>{const D=[];let ne=L;for(;ne&&ne!==document.body&&ne!==document.documentElement;){const le=window.getComputedStyle(ne),je=le.overflow+le.overflowX+le.overflowY;(je.includes("scroll")||je.includes("auto"))&&D.push(ne),ne=ne.parentElement}return D},x=()=>{if(n.activeDropdown!==n.item.path)return;const L=b(p.value);g=[window,...L],y=()=>{n.activeDropdown===n.item.path&&r("toggleItemDropdown",n.item.path,new MouseEvent("click"))};const D=y;D&&g.forEach(ne=>{ne===window?window.addEventListener("scroll",D,!0):ne.addEventListener("scroll",D,!0)})},S=()=>{n.activeDropdown===n.item.path&&(m=L=>{if(n.activeDropdown!==n.item.path)return;const D=L.target;if(!D)return;const ne=document.querySelector(`[data-item-dropdown="${n.item.path}"]`);if(ne&&ne.contains(D)||p.value&&p.value.contains(D))return;const le=i.root;if(le&&le.contains(D)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}const je=document.querySelector(".vuefinder__modal-layout");if(je&&je.contains(D)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}r("toggleItemDropdown",n.item.path,new MouseEvent("click"))},setTimeout(()=>{m&&(document.addEventListener("mousedown",m,!0),document.addEventListener("touchstart",m,!0))},100))};Tn(()=>{v&&(v(),v=null),y&&(g.forEach(L=>{L===window?window.removeEventListener("scroll",y,!0):L.removeEventListener("scroll",y,!0)}),y=null,g=[]),m&&(document.removeEventListener("mousedown",m,!0),document.removeEventListener("touchstart",m,!0),m=null)});const O=L=>n.expandedPaths.has(L),T=L=>L.type==="dir"||!L.file_size?"":Hm(L.file_size),A=(L,D)=>{D.stopPropagation(),r("toggleItemDropdown",L,D)},M=async(L,D)=>{const ne=document.querySelector(`[data-item-dropdown="${L}"]`);if(!(!ne||!D)&&(await gt(),!(!ne||!D))){Object.assign(ne.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:le,y:je}=await Us(D,ne,{placement:"left-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(ne.style,{left:`${le}px`,top:`${je}px`}),requestAnimationFrame(()=>{ne&&Object.assign(ne.style,{opacity:"1",transform:"translateY(0)"})})}catch(le){console.warn("Floating UI initial positioning error:",le);return}try{v=Lh(D,ne,async()=>{if(!(!D||!ne))try{const{x:le,y:je}=await Us(D,ne,{placement:"left-start",strategy:"fixed",middleware:[Da(8),Fa({padding:16}),La({padding:16})]});Object.assign(ne.style,{left:`${le}px`,top:`${je}px`})}catch(le){console.warn("Floating UI positioning error:",le)}})}catch(le){console.warn("Floating UI autoUpdate setup error:",le),v=null}}},z=L=>{r("update:selectedItemDropdownOption",L)},Y=async L=>{await Xa(L.path),r("copyPath",L)},ve=L=>{r("openContainingFolder",L)},W=L=>{r("preview",L)},X=L=>{r("open",L)},K=L=>{if(!n.activeDropdown)return;const D=["copy-path","open-folder","preview"],ne=n.selectedItemDropdownOption,le=D.findIndex(je=>ne?.includes(je));if(L.key==="ArrowDown"){L.preventDefault();const je=(le+1)%D.length;r("update:selectedItemDropdownOption",`${D[je]||""}-${n.activeDropdown}`)}else if(L.key==="ArrowUp"){L.preventDefault();const je=le<=0?D.length-1:le-1;r("update:selectedItemDropdownOption",`${D[je]||""}-${n.activeDropdown}`)}else L.key==="Enter"?(L.preventDefault(),ne&&(ne.includes("copy-path")?Y(n.item):ne.includes("open-folder")?ve(n.item):ne.includes("preview")&&W(n.item))):L.key==="Escape"&&(L.preventDefault(),r("update:selectedItemDropdownOption",null))};return(L,D)=>(C(),R("div",{class:Be(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":e.index===e.selectedIndex}]),title:e.item.basename,onClick:D[13]||(D[13]=ne=>r("select",e.index)),onDblclick:D[14]||(D[14]=ht(ne=>r("activate",e.item),["stop"]))},[_("div",KG,[e.item.type==="dir"?(C(),Ee(w(ar),{key:0})):(C(),Ee(w(Ga),{key:1}))]),_("div",GG,[_("div",QG,[e.item.type==="dir"&&c.value&&d.value?(C(),Ee(w(Qa),{key:0,class:"vuefinder__search-modal__result-pin",title:w(o)("Pinned")},null,8,["title"])):Se("",!0),Et(" "+q(e.item.basename)+" ",1),T(e.item)?(C(),R("span",XG,q(T(e.item)),1)):Se("",!0)]),_("div",{class:"vuefinder__search-modal__result-path",title:e.item.path,onClick:D[0]||(D[0]=ht(ne=>{r("select",e.index),r("togglePathExpansion",e.item.path)},["stop"]))},q(O(e.item.path)?e.item.path:w(id)(e.item.path)),9,JG)]),_("button",{ref_key:"buttonElementRef",ref:p,class:"vuefinder__search-modal__result-actions",title:w(o)("More actions"),onClick:D[1]||(D[1]=ne=>{r("selectWithDropdown",e.index),A(e.item.path,ne)})},[Z(w(ZC),{class:"vuefinder__search-modal__result-actions-icon"})],8,ZG),(C(),Ee(el,{to:"body"},[e.activeDropdown===e.item.path?(C(),R("div",{key:0,"data-item-dropdown":e.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":w(i).theme.current,tabindex:"-1",onClick:D[12]||(D[12]=ht(()=>{},["stop"])),onKeydown:K},[_("div",tQ,[_("div",{class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`copy-path-${e.item.path}`}]),onClick:D[2]||(D[2]=ne=>{z(`copy-path-${e.item.path}`),Y(e.item)}),onFocus:D[3]||(D[3]=ne=>z(`copy-path-${e.item.path}`))},[Z(w(Gm),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Copy Path")),1)],34),_("div",{class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`open-folder-${e.item.path}`}]),onClick:D[4]||(D[4]=ne=>{z(`open-folder-${e.item.path}`),ve(e.item)}),onFocus:D[5]||(D[5]=ne=>z(`open-folder-${e.item.path}`))},[Z(w(ar),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Open Containing Folder")),1)],34),e.item.type==="dir"?(C(),R("div",{key:0,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`open-${e.item.path}`}]),onClick:D[6]||(D[6]=ne=>{z(`open-${e.item.path}`),X(e.item)}),onFocus:D[7]||(D[7]=ne=>z(`open-${e.item.path}`))},[Z(w(ar),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Open")),1)],34)):Se("",!0),e.item.type==="dir"&&c.value?(C(),R("div",{key:1,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`pin-${e.item.path}`}]),onClick:D[8]||(D[8]=ne=>{z(`pin-${e.item.path}`),f(e.item)}),onFocus:D[9]||(D[9]=ne=>z(`pin-${e.item.path}`))},[Z(w(Qa),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(d.value?w(o)("Unpin Folder"):w(o)("Pin Folder")),1)],34)):(C(),R("div",{key:2,class:Be(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":e.selectedItemDropdownOption===`preview-${e.item.path}`}]),onClick:D[10]||(D[10]=ne=>{z(`preview-${e.item.path}`),W(e.item)}),onFocus:D[11]||(D[11]=ne=>z(`preview-${e.item.path}`))},[Z(w(Ga),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,q(w(o)("Preview")),1)],34))])],40,eQ)):Se("",!0)]))],42,YG))}}),rQ={key:0,class:"vuefinder__search-modal__searching"},iQ={class:"vuefinder__search-modal__loading-icon"},oQ={key:1,class:"vuefinder__search-modal__no-results"},sQ={key:2,class:"vuefinder__search-modal__results-list"},aQ={class:"vuefinder__search-modal__results-header"},zo=60,G0=5,lQ=ze({name:"SearchResultsList",__name:"SearchResultsList",props:{searchResults:{},isSearching:{type:Boolean},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{},resultsEnter:{type:Boolean}},emits:["selectResultItem","selectResultItemWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","open","preview","activate"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=rt(),{t:s}=o.i18n,l=_i("scrollableContainer"),c=se(()=>r.searchResults.length>0),d=se(()=>r.searchResults.length),f=re(0),p=re(600),v=se(()=>r.searchResults.length*zo),y=se(()=>{const O=Math.max(0,Math.floor(f.value/zo)-G0),T=Math.min(r.searchResults.length,Math.ceil((f.value+p.value)/zo)+G0);return{start:O,end:T}}),g=se(()=>{const{start:O,end:T}=y.value;return r.searchResults.slice(O,T).map((A,M)=>({item:A,index:O+M,top:(O+M)*zo}))}),m=O=>{const T=O.target;f.value=T.scrollTop},b=()=>{l.value&&(p.value=l.value.clientHeight)},x=()=>{if(r.selectedIndex>=0&&l.value){const O=r.selectedIndex*zo,T=O+zo,A=l.value.scrollTop,M=l.value.clientHeight,z=A+M;let Y=A;O<A?Y=O:T>z&&(Y=T-M),Y!==A&&l.value.scrollTo({top:Y,behavior:"smooth"})}},S=()=>{l.value&&(l.value.scrollTop=0,f.value=0)};return xt(()=>{b(),window.addEventListener("resize",b)}),Tn(()=>{window.removeEventListener("resize",b)}),He(()=>l.value,()=>{b()}),t({scrollSelectedIntoView:x,resetScroll:S,getContainerHeight:()=>p.value,scrollTop:()=>f.value}),(O,T)=>(C(),R("div",{class:Be(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":e.resultsEnter}])},[e.isSearching?(C(),R("div",rQ,[_("div",iQ,[Z(w(rd),{class:"vuefinder__search-modal__loading-icon"})]),_("span",null,q(w(s)("Searching...")),1)])):c.value?(C(),R("div",sQ,[_("div",aQ,[_("span",null,q(w(s)("Found %s results",d.value)),1)]),_("div",{ref_key:"scrollableContainer",ref:l,class:"vuefinder__search-modal__results-scrollable",onScroll:m},[_("div",{class:"vuefinder__search-modal__results-items",style:an({height:`${v.value}px`,position:"relative"})},[(C(!0),R(We,null,ut(g.value,A=>(C(),R("div",{key:A.item.path,style:an({position:"absolute",top:`${A.top}px`,left:"0",width:"100%",height:`${zo}px`})},[Z(nQ,{item:A.item,index:A.index,"selected-index":e.selectedIndex,"expanded-paths":e.expandedPaths,"active-dropdown":e.activeDropdown,"selected-item-dropdown-option":e.selectedItemDropdownOption,onSelect:T[0]||(T[0]=M=>i("selectResultItem",M)),onSelectWithDropdown:T[1]||(T[1]=M=>i("selectResultItemWithDropdown",M)),onTogglePathExpansion:T[2]||(T[2]=M=>i("togglePathExpansion",M)),onToggleItemDropdown:T[3]||(T[3]=(M,z)=>i("toggleItemDropdown",M,z)),"onUpdate:selectedItemDropdownOption":T[4]||(T[4]=M=>i("update:selectedItemDropdownOption",M)),onCopyPath:T[5]||(T[5]=M=>i("copyPath",M)),onOpenContainingFolder:T[6]||(T[6]=M=>i("openContainingFolder",M)),onOpen:T[7]||(T[7]=M=>i("open",M)),onPreview:T[8]||(T[8]=M=>i("preview",M)),onActivate:T[9]||(T[9]=M=>i("activate",M))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(C(),R("div",oQ,[_("span",null,q(w(s)("No results found")),1)]))],2))}}),cQ={class:"vuefinder__search-modal"},uQ={class:"vuefinder__search-modal__content"},dQ={class:"vuefinder__search-modal__search-bar"},fQ={class:"vuefinder__search-modal__search-location"},pQ=["title"],hQ=["disabled"],mQ={key:0,class:"vuefinder__search-modal__folder-selector"},vQ={class:"vuefinder__search-modal__folder-selector-content"},gQ={key:1,class:"vuefinder__search-modal__instructions"},_Q={class:"vuefinder__search-modal__instructions-text"},Zm=ze({name:"ModalSearch",__name:"ModalSearch",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=re(null),s=re(null),l=re(null),c=QC("",300),d=re([]),f=re(!1),p=re(-1);let v=null;const y=re(!1),g=re(!1),m=re(null),b=re("all"),x=re(!1),S=re("name-asc"),O={"name-asc":{column:"basename",direction:1},"name-desc":{column:"basename",direction:-1},"size-asc":{column:"file_size",direction:1},"size-desc":{column:"file_size",direction:-1},"date-asc":{column:"last_modified",direction:1},"date-desc":{column:"last_modified",direction:-1}},T=se(()=>{const{column:V,direction:P}=O[S.value];return d.value.slice().sort((F,G)=>NC(F[V],G[V])*P)}),A=re(`size-${b.value}`),M=re(null),z=re(new Set),Y=re(null),ve=Qe(i.path),W=V=>{z.value.has(V)?z.value.delete(V):z.value.add(V)},X=(V,P)=>{P&&typeof P.stopPropagation=="function"&&P.stopPropagation(),Y.value===V?Y.value=null:Y.value=V},K=()=>{Y.value=null},L=V=>{try{const P=V.dir||`${V.storage}://`;t.adapter.open(P),t.modal.close(),K()}catch{n.error(r("Failed to open containing folder"))}},D=V=>{t.modal.open(qi,{storage:ve?.value?.storage??"local",item:V}),K()},ne=V=>{t.adapter.open(V.path),t.modal.close(),K()},le=V=>{V.type==="dir"?ne(V):D(V)},je=V=>{p.value=V,K()},J=V=>{p.value=V},j=async V=>{await Xa(V.path),K()};He(c,async V=>{V.trim()?(await U(V.trim()),p.value=0):(v&&(v.abort(),v=null),d.value=[],f.value=!1,p.value=-1)}),He(b,async V=>{A.value=`size-${V}`,c.value.trim()&&!g.value&&(await U(c.value.trim()),p.value=0)}),He(x,async()=>{c.value.trim()&&!g.value&&(await U(c.value.trim()),p.value=0)});const de=V=>{if(!V||typeof V!="object")return!1;const P=V.name;return P==="AbortError"||P==="CanceledError"},U=async V=>{if(!V)return;v&&v.abort();const P=new AbortController;v=P,f.value=!0;try{const F=m.value?.path||ve?.value?.path,G=await t.adapter.search({path:F,filter:V,deep:x.value,size:b.value,signal:P.signal});if(P.signal.aborted)return;d.value=G||[],f.value=!1}catch(F){if(de(F)||P.signal.aborted)return;n.error(bn(F,r("Search failed"))),d.value=[],f.value=!1}};xt(()=>{document.addEventListener("click",oe),A.value=`size-${b.value}`});const ee=()=>{g.value?(g.value=!1,c.value.trim()&&(U(c.value.trim()),p.value=0)):(y.value=!1,g.value=!0)},Q=V=>{V&&(m.value=V)},B=V=>{V&&(Q(V),g.value=!1,c.value.trim()&&(U(c.value.trim()),p.value=0))};Tn(()=>{document.removeEventListener("click",oe),v&&(v.abort(),v=null),s.value&&s.value.cleanup()});const oe=V=>{const P=V.target;if(y.value&&(P.closest(".vuefinder__search-modal__dropdown")||(y.value=!1,gt(()=>{o.value&&o.value.focus()}))),Y.value){const F=P.closest(".vuefinder__search-modal__item-dropdown"),G=P.closest(".vuefinder__search-modal__result-item");!F&&!G&&K()}};return(V,P)=>(C(),Ee(dr,{class:"vuefinder__search-modal-layout"},{default:Le(()=>[_("div",cQ,[Z(xr,{icon:w(Jm),title:w(r)("Search files")},null,8,["icon","title"]),_("div",uQ,[_("div",dQ,[Z(xG,{ref_key:"searchInputRef",ref:o,modelValue:w(c),"onUpdate:modelValue":P[0]||(P[0]=F=>Za(c)?c.value=F:null),"is-searching":f.value,disabled:g.value},null,8,["modelValue","is-searching","disabled"]),Z(VG,{ref_key:"searchOptionsDropdownRef",ref:s,visible:y.value,"onUpdate:visible":P[1]||(P[1]=F=>y.value=F),"size-filter":b.value,"onUpdate:sizeFilter":P[2]||(P[2]=F=>b.value=F),"selected-option":A.value,"onUpdate:selectedOption":P[3]||(P[3]=F=>A.value=F),"sort-by":S.value,"onUpdate:sortBy":P[4]||(P[4]=F=>S.value=F),disabled:g.value},null,8,["visible","size-filter","selected-option","sort-by","disabled"])]),_("div",{class:"vuefinder__search-modal__options",onClick:P[8]||(P[8]=ht(()=>{},["stop"]))},[_("div",fQ,[_("button",{class:Be(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":g.value}]),onClick:ht(ee,["stop"])},[Z(w(ar),{class:"vuefinder__search-modal__location-icon"}),_("span",{class:"vuefinder__search-modal__location-text",title:m.value?.path||w(ve).path},q(w(id)(m.value?.path||w(ve).path)),9,pQ),P[11]||(P[11]=_("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2)]),_("label",{class:"vuefinder__search-modal__deep-search",onClick:P[7]||(P[7]=ht(()=>{},["stop"]))},[Ct(_("input",{"onUpdate:modelValue":P[5]||(P[5]=F=>x.value=F),type:"checkbox",disabled:g.value,class:"vuefinder__search-modal__checkbox",onClick:P[6]||(P[6]=ht(()=>{},["stop"]))},null,8,hQ),[[Zs,x.value]]),_("span",null,q(w(r)("Include subfolders")),1)])]),g.value?(C(),R("div",mQ,[_("div",vQ,[Z(pl,{modelValue:m.value,"onUpdate:modelValue":[P[9]||(P[9]=F=>m.value=F),Q],"show-pinned-folders":!0,"current-path":w(ve),onSelectAndClose:B},null,8,["modelValue","current-path"])])])):Se("",!0),!w(c).trim()&&!g.value?(C(),R("div",gQ,[_("p",_Q,q(w(r)("Start typing to search files. Use options to filter or include subfolders.")),1)])):Se("",!0),w(c).trim()&&!g.value?(C(),Ee(lQ,{key:2,ref_key:"searchResultsListRef",ref:l,"search-results":T.value,"is-searching":f.value,"selected-index":p.value,"expanded-paths":z.value,"active-dropdown":Y.value,"selected-item-dropdown-option":M.value,"results-enter":!0,onSelectResultItem:je,onSelectResultItemWithDropdown:J,onTogglePathExpansion:W,onToggleItemDropdown:X,"onUpdate:selectedItemDropdownOption":P[10]||(P[10]=F=>M.value=F),onCopyPath:j,onOpenContainingFolder:L,onOpen:ne,onPreview:D,onActivate:le},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):Se("",!0)])])]),_:1}))}}),yQ={props:{on:{type:String,required:!0}},setup(e,{emit:t,slots:n}){const r=rt(),i=re(!1),{t:o}=r.i18n;let s=null;const l=()=>{s&&clearTimeout(s),i.value=!0,s=setTimeout(()=>{i.value=!1},2e3)};return xt(()=>{r.emitter.on(e.on,l)}),Tn(()=>{s&&clearTimeout(s)}),{shown:i,t:o}}},bQ=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},wQ={key:1};function EQ(e,t,n,r,i,o){return C(),R("div",{class:Be(["vuefinder__action-message",{"vuefinder__action-message--hidden":!r.shown}])},[e.$slots.default?mt(e.$slots,"default",{key:0}):(C(),R("span",wQ,q(r.t("Saved.")),1))],2)}const Q0=bQ(yQ,[["render",EQ]]),SQ=[{name:"silver",displayName:"Silver"},{name:"valorite",displayName:"Valorite"},{name:"midnight",displayName:"Midnight"},{name:"latte",displayName:"Latte"},{name:"rose",displayName:"Rose"},{name:"mythril",displayName:"Mythril"},{name:"lime",displayName:"lime"},{name:"sky",displayName:"Sky"},{name:"ocean",displayName:"Oceanic"},{name:"palenight",displayName:"Palenight"},{name:"arctic",displayName:"Arctic"},{name:"code",displayName:"Code"}],CQ={class:"vuefinder__settings-modal__content"},xQ={class:"vuefinder__settings-modal__main"},TQ={class:"vuefinder__settings-modal__sections"},kQ={key:0,class:"vuefinder__settings-modal__section"},OQ={for:"theme",class:"vuefinder__settings-modal__label"},$Q={class:"vuefinder__settings-modal__input-group"},AQ=["value"],RQ=["value"],PQ={key:1,class:"vuefinder__settings-modal__section"},IQ={for:"language",class:"vuefinder__settings-modal__label"},MQ={class:"vuefinder__settings-modal__input-group"},DQ=["value"],FQ={class:"vuefinder__settings-modal__reset-section"},LQ={class:"vuefinder__settings-modal__reset-content"},jQ={class:"vuefinder__settings-modal__reset-title"},UQ={class:"vuefinder__settings-modal__reset-description"},e2=ze({__name:"ModalSettings",setup(e){const t=rt(),{enabled:n}=fr(),r=t.config,{clearStore:i}=t.storage,{t:o,localeAtom:s}=t.i18n,l=Qe(s),c=se({get:()=>String(l.value||"en"),set:m=>s.set(m||"en")}),d=Qe(r.state),f=se(()=>d.value.theme||"silver"),p=async()=>{r.reset(),i(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},v=m=>{r.set("theme",m),t.emitter.emit("vf-theme-saved")},{i18n:y}=Ls("VueFinderOptions"),g=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",zhCN:"Chinese-Simplified (简体中文)",zhTW:"Chinese-Traditional (繁體中文)",nl:"Dutch (Nederlands)",en:"English",fr:"French (Français)",de:"German (Deutsch)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",it:"Italian (Italiano)",ja:"Japanese (日本語)",fa:"Persian (فارسی)",pl:"Polish (Polski)",pt:"Portuguese (Português)",ru:"Russian (Pусский)",es:"Spanish (Español)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)"}).filter(([m])=>Object.keys(y).includes(m)));return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=x=>w(t).modal.close())},q(w(o)("Close")),1)]),default:Le(()=>[_("div",CQ,[Z(xr,{icon:w(XC),title:w(o)("Settings")},null,8,["icon","title"]),_("div",xQ,[_("div",TQ,[w(n)("theme")?(C(),R("div",kQ,[_("label",OQ,[Et(q(w(o)("Theme"))+" ",1),Z(Q0,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:Le(()=>[Et(q(w(o)("Saved.")),1)]),_:1})]),_("div",$Q,[_("select",{id:"theme",value:f.value,class:"vuefinder__settings-modal__select",onChange:b[0]||(b[0]=x=>v(x.target?.value))},[(C(!0),R(We,null,ut(w(SQ),x=>(C(),R("option",{key:x.name,value:x.name},q(x.displayName),9,RQ))),128))],40,AQ)])])):Se("",!0),Object.keys(w(g)).length>1?(C(),R("div",PQ,[_("label",IQ,[Et(q(w(o)("Language"))+" ",1),Z(Q0,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:Le(()=>[Et(q(w(o)("Saved.")),1)]),_:1})]),_("div",MQ,[Ct(_("select",{id:"language","onUpdate:modelValue":b[1]||(b[1]=x=>c.value=x),class:"vuefinder__settings-modal__select"},[(C(!0),R(We,null,ut(w(g),(x,S)=>(C(),R("option",{key:S,value:S},q(x),9,DQ))),128))],512),[[$p,c.value]])])])):Se("",!0)]),_("div",FQ,[_("div",LQ,[_("div",jQ,q(w(o)("Reset")),1),_("div",UQ,q(w(o)("Reset all settings to default")),1)]),_("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:p},q(w(o)("Reset Settings")),1)])])])]),_:1}))}}),Qn={ESCAPE:"Escape",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF",SPACE:"Space",KEY_C:"KeyC",KEY_X:"KeyX",KEY_V:"KeyV",KEY_S:"KeyS",KEY_R:"KeyR"};function NQ(){const e=rt(),t=ur(e),n=e.fs,r=e.config,{enabled:i}=fr(),o=Qe(n.path),s=Qe(n.selectedItems),l=c=>{if(c.code===Qn.ESCAPE&&(e.modal.close(),e.root.focus()),!e.modal.visible){if(c.metaKey&&c.code===Qn.KEY_R&&!c.shiftKey&&(e.adapter.invalidateListQuery(o.value.path),e.adapter.open(o.value.path),c.preventDefault()),c.metaKey&&c.shiftKey&&c.code===Qn.KEY_R&&i("rename")&&s.value.length===1&&(e.modal.open(Zu,{items:s.value}),c.preventDefault()),c.code===Qn.DELETE&&s.value.length!==0&&e.modal.open(Ju,{items:s.value}),c.metaKey&&c.code===Qn.BACKSLASH&&e.modal.open(BC),c.metaKey&&c.code===Qn.KEY_F&&i("search")&&(e.modal.open(Zm),c.preventDefault()),c.metaKey&&c.code===Qn.KEY_E&&(r.toggle("showTreeView"),c.preventDefault()),c.metaKey&&c.code===Qn.KEY_S&&(e.modal.open(e2),c.preventDefault()),c.metaKey&&c.code===Qn.ENTER&&(r.toggle("fullScreen"),e.root.focus()),c.metaKey&&c.code===Qn.KEY_A&&(n.selectAll(e.selectionMode||"multiple",e),c.preventDefault()),c.code===Qn.SPACE&&s.value.length===1&&s.value[0]?.type!=="dir"&&e.modal.open(qi,{storage:n.path.get().storage,item:s.value[0]}),c.metaKey&&c.code===Qn.KEY_C&&i("copy")){if(s.value.length===0){t.error(e.i18n.t("No items selected"));return}n.setClipboard("copy",new Set(s.value.map(d=>Jt(d)))),t.success(s.value.length===1?e.i18n.t("Item copied to clipboard"):e.i18n.t("%s items copied to clipboard",s.value.length)),c.preventDefault()}if(c.metaKey&&c.code===Qn.KEY_X&&i("copy")){if(s.value.length===0){t.error(e.i18n.t("No items selected"));return}n.setClipboard("cut",new Set(s.value.map(d=>Jt(d)))),t.success(s.value.length===1?e.i18n.t("Item cut to clipboard"):e.i18n.t("%s items cut to clipboard",s.value.length)),c.preventDefault()}if(c.metaKey&&c.code===Qn.KEY_V&&i("copy")){if(n.getClipboard().items.size===0){t.error(e.i18n.t("No items in clipboard"));return}if(n.getClipboard().path===n.path.get().path){t.error(e.i18n.t("Cannot paste items to the same directory"));return}if(n.getClipboard().type==="cut"){e.modal.open(Xs,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}}),n.clearClipboard();return}if(n.getClipboard().type==="copy"){e.modal.open(Xm,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}});return}c.preventDefault()}}};xt(async()=>{if(await gt(),!e.root){console.warn("app.root is not available. Event listeners will not be attached.");return}e.root.addEventListener("keydown",l)}),ns(()=>{e.root&&e.root.removeEventListener("keydown",l)})}function zQ(){const e=re(!1),t=re([]);return{isDraggingExternal:e,externalFiles:t,handleDragEnter:n=>{n.preventDefault(),n.stopPropagation();const r=n.dataTransfer?.items;r&&Array.from(r).some(i=>i.kind==="file")&&(e.value=!0,n.isExternalDrag=!0)},handleDragOver:n=>{e.value&&n.dataTransfer&&(n.dataTransfer.dropEffect="copy",n.preventDefault(),n.stopPropagation())},handleDragLeave:n=>{n.preventDefault();const r=n.currentTarget.getBoundingClientRect(),i=n.clientX,o=n.clientY;(i<r.left||i>r.right||o<r.top||o>r.bottom)&&(e.value=!1)},handleDrop:async n=>{n.preventDefault(),n.stopPropagation(),e.value=!1;const r=n.dataTransfer?.items;if(r){const i=Array.from(r).filter(o=>o.kind==="file");if(i.length>0){t.value=[];for(const o of i){const s=o.webkitGetAsEntry?.();if(s)await Ym((l,c)=>{t.value.push({name:c.name,size:c.size,type:c.type,lastModified:new Date(c.lastModified),file:c})},s);else{const l=o.getAsFile();l&&t.value.push({name:l.name,size:l.size,type:l.type,lastModified:new Date(l.lastModified),file:l})}}return t.value}}return[]},clearExternalFiles:()=>{t.value=[]}}}const BQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function VQ(e,t){return C(),R("svg",BQ,[...t[0]||(t[0]=[_("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1)])])}const t2={render:VQ},HQ={class:"vuefinder__new-folder-modal__content"},qQ={class:"vuefinder__new-folder-modal__form"},WQ={class:"vuefinder__new-folder-modal__description"},YQ=["placeholder"],ev=ze({__name:"ModalNewFolder",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=()=>{s.value!==""&&t.adapter.createFolder({path:o.value.path,name:s.value}).then(c=>{n.success(r("%s is created.",s.value)),t.fs.setFiles(c.files),t.modal.close()}).catch(c=>{n.error(bn(c,r("Failed to create folder")))})};return(c,d)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},q(w(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:d[1]||(d[1]=f=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(t2),title:w(r)("New Folder")},null,8,["icon","title"]),_("div",HQ,[_("div",qQ,[_("p",WQ,q(w(r)("Create a new folder")),1),Ct(_("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),class:"vuefinder__new-folder-modal__input",placeholder:w(r)("Folder Name"),type:"text",autofocus:"",onKeyup:Lr(l,["enter"])},null,40,YQ),[[oi,s.value]])])])])]),_:1}))}}),KQ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function GQ(e,t){return C(),R("svg",KQ,[...t[0]||(t[0]=[_("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1)])])}const n2={render:GQ},QQ={class:"vuefinder__new-file-modal__content"},XQ={class:"vuefinder__new-file-modal__form"},JQ={class:"vuefinder__new-file-modal__description"},ZQ=["placeholder"],r2=ze({__name:"ModalNewFile",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=()=>{s.value!==""&&t.adapter.createFile({path:o.value.path,name:s.value}).then(c=>{n.success(r("%s is created.",s.value)),t.fs.setFiles(c.files),t.modal.close()}).catch(c=>{n.error(bn(c,r("Failed to create file")))})};return(c,d)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},q(w(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:d[1]||(d[1]=f=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(n2),title:w(r)("New File")},null,8,["icon","title"]),_("div",QQ,[_("div",XQ,[_("p",JQ,q(w(r)("Create a new file")),1),Ct(_("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),class:"vuefinder__new-file-modal__input",placeholder:w(r)("File Name"),type:"text",onKeyup:Lr(l,["enter"])},null,40,ZQ),[[oi,s.value]])])])])]),_:1}))}}),eX={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function tX(e,t){return C(),R("svg",eX,[...t[0]||(t[0]=[_("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1)])])}const i2={render:tX};function Th(e,t=14){const n=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{${t+1},})([\\w\\W]{8,}))`;return e.replace(new RegExp(n),"$2..$4")}const nX={class:"vuefinder__upload-modal__content relative"},rX={class:"vuefinder__upload-modal__target-section"},iX={class:"vuefinder__upload-modal__target-label"},oX={class:"vuefinder__upload-modal__target-container"},sX={class:"vuefinder__upload-modal__target-path"},aX={class:"vuefinder__upload-modal__target-storage"},lX={key:0,class:"vuefinder__upload-modal__target-folder"},cX={class:"vuefinder__upload-modal__target-badge"},uX={class:"vuefinder__upload-modal__drag-hint"},dX={class:"vuefinder__upload-modal__file-list vf-scrollbar"},fX=["textContent"],pX={class:"vuefinder__upload-modal__file-info"},hX={key:0,class:"vuefinder__upload-modal__file-rename"},mX=["placeholder","onKeyup"],vX=["title","onClick"],gX=["title"],_X={class:"vuefinder__upload-modal__file-name hidden md:block"},yX={class:"vuefinder__upload-modal__file-name md:hidden"},bX={key:0,class:"ml-auto"},wX=["title","disabled","onClick"],EX=["title","disabled","onClick"],SX={key:0,class:"py-2"},CX=["aria-expanded"],xX={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},TX=["disabled"],kX=["aria-expanded"],OX={key:0,class:"vuefinder__upload-actions__menu"},tv=ze({__name:"ModalUpload",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.path),o=re(i.value),s=re(!1),l=()=>{const oe=o.value.path;if(!oe)return{storage:"local",path:""};if(oe.endsWith("://"))return{storage:oe.replace("://",""),path:""};const V=oe.split("://");return{storage:V[0]||"local",path:V[1]||""}},c=oe=>{oe&&(o.value=oe)},d=oe=>{oe&&(o.value=oe,s.value=!1)},{container:f,internalFileInput:p,internalFolderInput:v,pickFiles:y,queue:g,message:m,uploading:b,hasFilesInDropArea:x,definitions:S,openFileSelector:O,upload:T,cancel:A,remove:M,clear:z,close:Y,getClassNameForEntry:ve,getIconForEntry:W,addExternalFiles:X,renameEntry:K}=WC(t.customUploader),L=re(null),D=re(""),ne=re(null),le=oe=>{const V=oe.lastIndexOf("/");return V===-1?oe:oe.slice(V+1)},je=oe=>{b.value||oe.status!==S.value.QUEUE_ENTRY_STATUS.UPLOADING&&(L.value=oe.id,D.value=le(oe.name),gt(()=>{const V=ne.value;if(V){V.focus();const P=D.value.lastIndexOf(".");P>0?V.setSelectionRange(0,P):V.select()}}))},J=()=>{L.value=null,D.value=""},j=async oe=>{const V=D.value.trim();if(!V||V===le(oe.name)){J();return}await K(oe,V),J()},de=()=>{T(o.value)};xt(()=>{t.emitter.on("vf-external-files-dropped",oe=>{X(oe)})}),Tn(()=>{t.emitter.off("vf-external-files-dropped")});const U=re(!1),ee=re(null),Q=re(null),B=oe=>{if(!U.value)return;const V=oe.target,P=ee.value?.contains(V)??!1,F=Q.value?.contains(V)??!1;!P&&!F&&(U.value=!1)};return xt(()=>document.addEventListener("click",B)),Tn(()=>document.removeEventListener("click",B)),(oe,V)=>(C(),Ee(dr,{"show-drag-overlay":w(x),"drag-overlay-text":w(n)("Drag and drop the files/folders to here.")},{buttons:Le(()=>[_("div",{ref_key:"actionsMenuMobileRef",ref:ee,class:"relative mb-2 w-full sm:hidden"},[_("div",{class:Be(["vuefinder__upload-actions","vuefinder__upload-actions--block",U.value?"vuefinder__upload-actions--ring":""])},[_("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:V[4]||(V[4]=P=>w(O)())},q(w(n)("Select Files")),1),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":U.value?"true":"false",onClick:V[5]||(V[5]=ht(P=>U.value=!U.value,["stop"]))},[...V[21]||(V[21]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,CX)],2),U.value?(C(),R("div",xX,[_("div",{class:"vuefinder__upload-actions__item",onClick:V[6]||(V[6]=P=>{w(O)(),U.value=!1})},q(w(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:V[7]||(V[7]=P=>{w(v)?.click(),U.value=!1})},q(w(n)("Select Folders")),1),V[22]||(V[22]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[8]||(V[8]=P=>w(b)?null:(w(z)(!1),U.value=!1))},q(w(n)("Clear all")),3),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[9]||(V[9]=P=>w(b)?null:(w(z)(!0),U.value=!1))},q(w(n)("Clear only successful")),3)])):Se("",!0)],512),_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:w(b)||!w(g).length,onClick:ht(de,["prevent"])},q(w(n)("Upload")),9,TX),w(b)?(C(),R("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:V[10]||(V[10]=ht((...P)=>w(A)&&w(A)(...P),["prevent"]))},q(w(n)("Cancel")),1)):(C(),R("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:V[11]||(V[11]=ht((...P)=>w(Y)&&w(Y)(...P),["prevent"]))},q(w(n)("Close")),1)),_("div",{ref_key:"actionsMenuDesktopRef",ref:Q,class:"relative mr-auto hidden sm:block"},[_("div",{class:Be(["vuefinder__upload-actions",U.value?"vuefinder__upload-actions--ring":""])},[_("button",{ref_key:"pickFiles",ref:y,type:"button",class:"vuefinder__upload-actions__main"},q(w(n)("Select Files")),513),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":U.value?"true":"false",onClick:V[12]||(V[12]=ht(P=>U.value=!U.value,["stop"]))},[...V[23]||(V[23]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,kX)],2),U.value?(C(),R("div",OX,[_("div",{class:"vuefinder__upload-actions__item",onClick:V[13]||(V[13]=P=>{w(O)(),U.value=!1})},q(w(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:V[14]||(V[14]=P=>{w(v)?.click(),U.value=!1})},q(w(n)("Select Folders")),1),V[24]||(V[24]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[15]||(V[15]=P=>w(b)?null:(w(z)(!1),U.value=!1))},q(w(n)("Clear all")),3),_("div",{class:Be(["vuefinder__upload-actions__item",w(b)?"disabled":""]),onClick:V[16]||(V[16]=P=>w(b)?null:(w(z)(!0),U.value=!1))},q(w(n)("Clear only successful")),3)])):Se("",!0)],512)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(i2),title:w(n)("Upload Files")},null,8,["icon","title"]),_("div",nX,[_("div",rX,[_("div",iX,q(w(n)("Target Directory")),1),_("div",oX,[_("div",{class:"vuefinder__upload-modal__target-display",onClick:V[0]||(V[0]=P=>s.value=!s.value)},[_("div",sX,[_("span",aX,q(l().storage)+"://",1),l().path?(C(),R("span",lX,q(l().path),1)):Se("",!0)]),_("span",cX,q(w(n)("Browse")),1)])]),_("div",{class:Be(["vuefinder__upload-modal__tree-selector",s.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[Z(pl,{modelValue:o.value,"onUpdate:modelValue":[V[1]||(V[1]=P=>o.value=P),c],"show-pinned-folders":!0,onSelectAndClose:d},null,8,["modelValue"])],2)]),_("div",uX,q(w(n)("You can drag & drop files anywhere while this modal is open.")),1),_("div",{ref_key:"container",ref:f,class:"hidden"},null,512),_("div",dX,[(C(!0),R(We,null,ut(w(g),P=>(C(),R("div",{key:P.id,class:"vuefinder__upload-modal__file-entry"},[_("span",{class:Be(["vuefinder__upload-modal__file-icon",w(ve)(P)])},[_("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:q(w(W)(P))},null,8,fX)],2),_("div",pX,[L.value===P.id?(C(),R("div",hX,[Ct(_("input",{ref_for:!0,ref_key:"renameInputRef",ref:ne,"onUpdate:modelValue":V[2]||(V[2]=F=>D.value=F),type:"text",class:"vuefinder__upload-modal__file-rename-input",placeholder:w(n)("Rename"),onKeyup:[Lr(F=>j(P),["enter"]),Lr(J,["esc"])]},null,40,mX),[[oi,D.value]]),_("button",{type:"button",class:"vuefinder__upload-modal__file-rename-btn vuefinder__upload-modal__file-rename-btn--save",title:w(n)("Save"),onClick:F=>j(P)},[...V[17]||(V[17]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})],-1)])],8,vX),_("button",{type:"button",class:"vuefinder__upload-modal__file-rename-btn",title:w(n)("Cancel"),onClick:J},[...V[18]||(V[18]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,gX)])):(C(),R(We,{key:1},[_("div",_X,q(w(Th)(P.name,40))+" ("+q(P.size)+") ",1),_("div",yX,q(w(Th)(P.name,16))+" ("+q(P.size)+") ",1),_("div",{class:Be(["vuefinder__upload-modal__file-status",w(ve)(P)])},[Et(q(P.statusName)+" ",1),P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING?(C(),R("b",bX,q(P.percent),1)):Se("",!0)],2)],64))]),L.value!==P.id?(C(),R("button",{key:0,type:"button",class:Be(["vuefinder__upload-modal__file-rename-action",w(b)||P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING?"disabled":""]),title:w(n)("Rename"),disabled:w(b)||P.status===w(S).QUEUE_ENTRY_STATUS.UPLOADING,onClick:F=>je(P)},[...V[19]||(V[19]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-rename-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125"})],-1)])],10,wX)):Se("",!0),L.value!==P.id?(C(),R("button",{key:1,type:"button",class:Be(["vuefinder__upload-modal__file-remove",w(b)?"disabled":""]),title:w(n)("Delete"),disabled:w(b),onClick:F=>w(M)(P)},[...V[20]||(V[20]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,EX)):Se("",!0)]))),128)),w(g).length?Se("",!0):(C(),R("div",SX,q(w(n)("No files selected!")),1))]),w(m).length?(C(),Ee(xh,{key:0,error:"",onHidden:V[3]||(V[3]=P=>m.value="")},{default:Le(()=>[Et(q(w(m)),1)]),_:1})):Se("",!0)])]),_("input",{ref_key:"internalFileInput",ref:p,type:"file",multiple:"",class:"hidden"},null,512),_("input",{ref_key:"internalFolderInput",ref:v,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),$X={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function AX(e,t){return C(),R("svg",$X,[...t[0]||(t[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const o2={render:AX},RX={class:"vuefinder__unarchive-modal__content"},PX={class:"vuefinder__unarchive-modal__items"},IX={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},MX={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},DX={class:"vuefinder__unarchive-modal__item-name"},FX={class:"vuefinder__unarchive-modal__info"},LX={class:"vuefinder__unarchive-modal__target"},jX={class:"vuefinder__unarchive-modal__target-label"},UX=["title"],NX={key:0,class:"vuefinder__unarchive-modal__target-selector"},nv=ze({__name:"ModalUnarchive",setup(e){const t=rt(),n=ur(t),r=t.fs,i=Qe(r.path),{t:o}=t.i18n,s=re(t.modal.data.items[0]),l=re([]),c=re(null),d=re(!1),f=se(()=>c.value?.path||i.value.path),p=()=>{d.value=!d.value},v=m=>{m&&(c.value=m)},y=m=>{m&&(c.value=m,d.value=!1)},g=()=>{const m=c.value?.path;t.adapter.unarchive({item:s.value.path,path:i.value.path,...m&&m!==i.value.path?{destination:m}:{}}).then(b=>{n.success(o("The file unarchived.")),t.fs.setFiles(b.files),t.modal.close()}).catch(b=>{n.error(bn(b,o("Failed to unarchive")))})};return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:g},q(w(o)("Unarchive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[1]||(b[1]=x=>w(t).modal.close())},q(w(o)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(o2),title:w(o)("Unarchive")},null,8,["icon","title"]),_("div",RX,[_("div",PX,[(C(!0),R(We,null,ut(l.value,x=>(C(),R("p",{key:x.path,class:"vuefinder__unarchive-modal__item"},[x.type==="dir"?(C(),R("svg",IX,[...b[2]||(b[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",MX,[...b[3]||(b[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",DX,q(x.basename),1)]))),128)),_("p",FX,q(w(o)("The archive will be unarchived at"))+" ("+q(f.value)+") ",1),_("div",LX,[_("div",jX,q(w(o)("Target folder")),1),_("button",{type:"button",class:Be(["vuefinder__unarchive-modal__target-btn",{"vuefinder__unarchive-modal__target-btn--open":d.value}]),onClick:p},[Z(w(ar),{class:"vuefinder__unarchive-modal__target-icon"}),_("span",{class:"vuefinder__unarchive-modal__target-text",title:f.value},q(w(id)(f.value)),9,UX),b[4]||(b[4]=_("svg",{class:"vuefinder__unarchive-modal__target-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2),d.value?(C(),R("div",NX,[Z(pl,{modelValue:c.value,"onUpdate:modelValue":[b[0]||(b[0]=x=>c.value=x),v],"show-pinned-folders":!0,"current-path":w(i),onSelectAndClose:y},null,8,["modelValue","current-path"])])):Se("",!0)])])])])]),_:1}))}}),zX={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function BX(e,t){return C(),R("svg",zX,[...t[0]||(t[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const s2={render:BX},VX={class:"vuefinder__archive-modal__content"},HX={class:"vuefinder__archive-modal__form"},qX={class:"vuefinder__archive-modal__files vf-scrollbar"},WX={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},YX={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},KX={class:"vuefinder__archive-modal__file-name"},GX=["placeholder"],QX={class:"vuefinder__archive-modal__target"},XX={class:"vuefinder__archive-modal__target-label"},JX=["title"],ZX={key:0,class:"vuefinder__archive-modal__target-selector"},rv=ze({__name:"ModalArchive",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=Qe(i.path),s=re(""),l=re(t.modal.data.items),c=re(null),d=re(!1),f=se(()=>c.value?.path||o.value.path),p=()=>{d.value=!d.value},v=m=>{m&&(c.value=m)},y=m=>{m&&(c.value=m,d.value=!1)},g=()=>{if(l.value.length){const m=c.value?.path;t.adapter.archive({path:o.value.path,items:l.value.map(({path:b,type:x})=>({path:b,type:x})),name:s.value,...m&&m!==o.value.path?{destination:m}:{}}).then(b=>{n.success(r("The file(s) archived.")),t.fs.setFiles(b.files),t.modal.close()}).catch(b=>{n.error(bn(b,r("Failed to archive files")))})}};return(m,b)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:g},q(w(r)("Archive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=x=>w(t).modal.close())},q(w(r)("Cancel")),1)]),default:Le(()=>[_("div",null,[Z(xr,{icon:w(s2),title:w(r)("Archive the files")},null,8,["icon","title"]),_("div",VX,[_("div",HX,[_("div",qX,[(C(!0),R(We,null,ut(l.value,x=>(C(),R("p",{key:x.path,class:"vuefinder__archive-modal__file"},[x.type==="dir"?(C(),R("svg",WX,[...b[3]||(b[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(C(),R("svg",YX,[...b[4]||(b[4]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",KX,q(x.basename),1)]))),128))]),Ct(_("input",{"onUpdate:modelValue":b[0]||(b[0]=x=>s.value=x),class:"vuefinder__archive-modal__input",placeholder:w(r)("Archive name. (.zip file will be created)"),type:"text",onKeyup:Lr(g,["enter"])},null,40,GX),[[oi,s.value]]),_("div",QX,[_("div",XX,q(w(r)("Target folder")),1),_("button",{type:"button",class:Be(["vuefinder__archive-modal__target-btn",{"vuefinder__archive-modal__target-btn--open":d.value}]),onClick:p},[Z(w(ar),{class:"vuefinder__archive-modal__target-icon"}),_("span",{class:"vuefinder__archive-modal__target-text",title:f.value},q(w(id)(f.value)),9,JX),b[5]||(b[5]=_("svg",{class:"vuefinder__archive-modal__target-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2),d.value?(C(),R("div",ZX,[Z(pl,{modelValue:c.value,"onUpdate:modelValue":[b[1]||(b[1]=x=>c.value=x),v],"show-pinned-folders":!0,"current-path":w(o),onSelectAndClose:y},null,8,["modelValue","current-path"])])):Se("",!0)])])])])]),_:1}))}}),eJ={class:"vuefinder__about-modal__content"},tJ={class:"vuefinder__about-modal__main"},nJ={class:"vuefinder__about-modal__shortcuts"},rJ={class:"vuefinder__about-modal__shortcut"},iJ={key:0,class:"vuefinder__about-modal__shortcut"},oJ={key:1,class:"vuefinder__about-modal__shortcut"},sJ={class:"vuefinder__about-modal__shortcut"},aJ={class:"vuefinder__about-modal__shortcut"},lJ={key:2,class:"vuefinder__about-modal__shortcut"},cJ={key:3,class:"vuefinder__about-modal__shortcut"},uJ={key:4,class:"vuefinder__about-modal__shortcut"},dJ={key:5,class:"vuefinder__about-modal__shortcut"},fJ={class:"vuefinder__about-modal__shortcut"},pJ={class:"vuefinder__about-modal__shortcut"},hJ={key:6,class:"vuefinder__about-modal__shortcut"},mJ={key:7,class:"vuefinder__about-modal__shortcut"},vJ=ze({__name:"ModalShortcuts",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n;return(i,o)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:o[0]||(o[0]=s=>w(t).modal.close())},q(w(r)("Close")),1)]),default:Le(()=>[_("div",eJ,[Z(xr,{icon:w(qm),title:w(r)("Shortcuts")},null,8,["icon","title"]),_("div",tJ,[_("div",nJ,[_("div",rJ,[_("div",null,q(w(r)("Refresh")),1),o[1]||(o[1]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"R")],-1))]),w(n)("rename")?(C(),R("div",iJ,[_("div",null,q(w(r)("Rename")),1),o[2]||(o[2]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"Shift"),Et(" + "),_("kbd",null,"R")],-1))])):Se("",!0),w(n)("delete")?(C(),R("div",oJ,[_("div",null,q(w(r)("Delete")),1),o[3]||(o[3]=_("kbd",null,"Del",-1))])):Se("",!0),_("div",sJ,[_("div",null,q(w(r)("Escape")),1),o[4]||(o[4]=_("kbd",null,"Esc",-1))]),_("div",aJ,[_("div",null,q(w(r)("Select All")),1),o[5]||(o[5]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"A")],-1))]),w(n)("copy")?(C(),R("div",lJ,[_("div",null,q(w(r)("Cut")),1),o[6]||(o[6]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"X")],-1))])):Se("",!0),w(n)("copy")?(C(),R("div",cJ,[_("div",null,q(w(r)("Copy")),1),o[7]||(o[7]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"C")],-1))])):Se("",!0),w(n)("copy")?(C(),R("div",uJ,[_("div",null,q(w(r)("Paste")),1),o[8]||(o[8]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"V")],-1))])):Se("",!0),w(n)("search")?(C(),R("div",dJ,[_("div",null,q(w(r)("Search")),1),o[9]||(o[9]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"F")],-1))])):Se("",!0),_("div",fJ,[_("div",null,q(w(r)("Toggle Sidebar")),1),o[10]||(o[10]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"E")],-1))]),_("div",pJ,[_("div",null,q(w(r)("Open Settings")),1),o[11]||(o[11]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"S")],-1))]),w(n)("fullscreen")?(C(),R("div",hJ,[_("div",null,q(w(r)("Toggle Full Screen")),1),o[12]||(o[12]=_("div",null,[_("kbd",null,"⌘"),Et(" + "),_("kbd",null,"Enter")],-1))])):Se("",!0),w(n)("preview")?(C(),R("div",mJ,[_("div",null,q(w(r)("Preview")),1),o[13]||(o[13]=_("kbd",null,"Space",-1))])):Se("",!0)])])])]),_:1}))}}),gJ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function _J(e,t){return C(),R("svg",gJ,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1)])])}const a2={render:_J},iv="vuefinder:recent-paths",l2=4,ov=typeof window<"u"&&typeof window.localStorage<"u";function sv(){if(!ov)return[];try{const e=window.localStorage.getItem(iv);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string").slice(0,l2):[]}catch{return[]}}function yJ(e){if(!(!ov||!e))try{const t=sv().filter(n=>n!==e);t.unshift(e),window.localStorage.setItem(iv,JSON.stringify(t.slice(0,l2)))}catch{}}function bJ(e){if(!(!ov||!e))try{const t=sv().filter(n=>n!==e);window.localStorage.setItem(iv,JSON.stringify(t))}catch{}}const wJ={class:"vuefinder__go-to-folder-modal"},EJ={class:"vuefinder__go-to-folder-modal__content"},SJ=["placeholder","onKeydown"],CJ={key:0,class:"vuefinder__go-to-folder-modal__error"},xJ=["onMouseenter","onClick","onDblclick"],TJ={class:"vuefinder__go-to-folder-modal__suggestion-label"},kJ={key:0,class:"vuefinder__go-to-folder-modal__suggestion-tag"},OJ=["title","onClick"],$J=["title","onClick"],AJ={key:2,class:"vuefinder__go-to-folder-modal__empty"},RJ={key:3,class:"vuefinder__go-to-folder-modal__loading"},PJ=["disabled"],IJ=ze({name:"ModalGoToFolder",__name:"ModalGoToFolder",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.storages),o=re(""),s=re([]),l=re(0),c=re(!1),d=re(!1),f=re(""),p=re(null),v=re(null);let y=0;const g=se(()=>i.value??[]),m=J=>{const j=J??"",de=j.indexOf("://");if(de===-1)return{storage:null,parent:"",filter:j.trim(),hasProtocol:!1};const U=j.slice(0,de),ee=j.slice(de+3),Q=ee.lastIndexOf("/"),B=Q===-1?`${U}://`:`${U}://${ee.slice(0,Q).replace(/^\/+/,"")}`,oe=Q===-1?ee:ee.slice(Q+1);return{storage:U,parent:B,filter:oe,hasProtocol:!0}},b=J=>{const j=J.toLowerCase();s.value=g.value.filter(de=>!j||de.toLowerCase().includes(j)).map(de=>({path:`${de}://`,label:`${de}://`,kind:"storage"})),l.value=s.value.length?0:-1,f.value=""},x=()=>{const J=sv();s.value=J.map(j=>({path:j,label:j,kind:"recent"})),l.value=s.value.length?0:-1,f.value=""},S=async(J,j)=>{const de=++y;c.value=!0,f.value="";try{const U=await t.adapter.list(J);if(de!==y)return;const ee=j.toLowerCase(),Q=(U?.files??[]).filter(B=>B.type==="dir"&&(!ee||B.basename.toLowerCase().startsWith(ee)));s.value=Q.map(B=>({path:B.path,label:B.basename,kind:"dir"})),l.value=s.value.length?0:-1}catch(U){if(de!==y)return;s.value=[],l.value=-1,f.value=bn(U,n("Folder not found"))}finally{de===y&&(c.value=!1)}};let O=null;const T=J=>{O&&clearTimeout(O),O=setTimeout(()=>A(J),150)},A=J=>{const j=J.trim();if(!j){y++,c.value=!1,x();return}const{hasProtocol:de,parent:U,filter:ee}=m(j);if(!de){y++,c.value=!1,b(j);return}S(U,ee)};He(o,J=>T(J)),xt(()=>{x(),gt(()=>p.value?.focus())});const M=()=>{gt(()=>{const J=v.value;if(!J)return;const j=J.children[l.value];if(!j)return;const de=J.scrollTop,U=de+J.clientHeight,ee=j.offsetTop,Q=ee+j.offsetHeight;ee<de?J.scrollTop=ee:Q>U&&(J.scrollTop=Q-J.clientHeight)})},z=J=>{if(!s.value.length)return;const j=s.value.length;l.value=((l.value+J)%j+j)%j,M()},Y=J=>{o.value=J.kind==="dir"?`${J.path}/`:J.path,gt(()=>{p.value?.setSelectionRange(o.value.length,o.value.length)})},ve=J=>{if(!J.includes("://"))return{ok:!1,reason:n("Invalid path format. Path must be in format: storage://path/to/folder")};const j=J.slice(0,J.indexOf("://"));return g.value.includes(j)?{ok:!0}:{ok:!1,reason:n('Invalid storage. Storage "%s" is not available.',j)}},W=async J=>{if(d.value)return;const j=J.trim();if(!j)return;const de=ve(j);if(!de.ok){f.value=de.reason??"";return}d.value=!0;try{if(await t.adapter.open(j)===void 0)return;yJ(j),t.modal.close()}catch(U){f.value=bn(U,n("Failed to navigate to folder")),r.setLoading(!1)}finally{d.value=!1}},X=()=>{const J=s.value[l.value];W(J?J.path:o.value)},K=J=>{if(!s.value.length)return;J.preventDefault();const j=s.value[l.value];j&&Y(j)},L=J=>{if(J.kind==="dir"){Y(J);return}W(J.path)},D=J=>{W(J.path)},ne=(J,j)=>{J.stopPropagation(),J.preventDefault(),bJ(j),x()},le=(J,j)=>{J.stopPropagation(),J.preventDefault(),o.value=j,gt(()=>{p.value?.focus(),p.value?.setSelectionRange(o.value.length,o.value.length)})},je=se(()=>{const J=g.value[0];return J?`${J}://path/to/folder`:"storage://path/to/folder"});return(J,j)=>(C(),Ee(dr,null,{buttons:Le(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:d.value,onClick:X},q(w(n)("Go")),9,PJ),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:j[3]||(j[3]=de=>w(t).modal.close())},q(w(n)("Cancel")),1)]),default:Le(()=>[_("div",wJ,[Z(xr,{icon:w(nd),title:w(n)("Go to Folder")},null,8,["icon","title"]),_("div",EJ,[Ct(_("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":j[0]||(j[0]=de=>o.value=de),class:"vuefinder__go-to-folder-modal__input",type:"text",autocomplete:"off",spellcheck:"false",placeholder:je.value,onKeydown:[j[1]||(j[1]=Lr(ht(de=>z(1),["prevent"]),["down"])),j[2]||(j[2]=Lr(ht(de=>z(-1),["prevent"]),["up"])),Lr(ht(X,["prevent"]),["enter"]),Lr(K,["tab"])]},null,40,SJ),[[oi,o.value]]),f.value?(C(),R("div",CJ,q(f.value),1)):Se("",!0),s.value.length?(C(),R("div",{key:1,ref_key:"suggestionListRef",ref:v,class:"vuefinder__go-to-folder-modal__suggestions"},[(C(!0),R(We,null,ut(s.value,(de,U)=>(C(),R("div",{key:`${de.kind}:${de.path}`,class:Be(["vuefinder__go-to-folder-modal__suggestion",{"vuefinder__go-to-folder-modal__suggestion--active":U===l.value}]),onMouseenter:ee=>l.value=U,onClick:ee=>L(de),onDblclick:ee=>D(de)},[Z(w(ar),{class:"vuefinder__go-to-folder-modal__suggestion-icon"}),_("span",TJ,q(de.label),1),de.kind==="recent"?(C(),R("span",kJ,q(w(n)("Recent")),1)):Se("",!0),de.kind==="recent"?(C(),R("button",{key:1,type:"button",class:"vuefinder__go-to-folder-modal__suggestion-fill",title:w(n)("Edit this path"),onClick:ee=>le(ee,de.path)},[Z(w(a2),{class:"vuefinder__go-to-folder-modal__suggestion-fill-icon"})],8,OJ)):Se("",!0),de.kind==="recent"?(C(),R("button",{key:2,type:"button",class:"vuefinder__go-to-folder-modal__suggestion-remove",title:w(n)("Remove from recent"),onClick:ee=>ne(ee,de.path)}," × ",8,$J)):Se("",!0)],42,xJ))),128))],512)):c.value?Se("",!0):(C(),R("div",AJ,[o.value.trim()?(C(),R(We,{key:1},[Et(q(w(n)("No matching folders.")),1)],64)):(C(),R(We,{key:0},[Et(q(w(n)("No recent folders yet.")),1)],64))])),c.value?(C(),R("div",RJ,q(w(n)("Loading…")),1)):Se("",!0)])])]),_:1}))}}),MJ={class:"vuefinder__menubar__container"},DJ=["onClick","onMouseenter"],FJ={class:"vuefinder__menubar__label"},LJ=["onMouseenter"],jJ=["onClick"],UJ={key:0,class:"vuefinder__menubar__dropdown__label"},NJ={key:1,class:"vuefinder__menubar__dropdown__checkmark"},zJ={key:2,class:"vuefinder__menubar__dropdown__chevron",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},BJ={key:3,class:"vuefinder__menubar__dropdown__submenu"},VJ=["onClick"],HJ={class:"vuefinder__menubar__dropdown__label"},qJ=ze({__name:"MenuBar",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t?.i18n||{t:S=>S},i=t?.fs,o=t?.config,s=Qe(o.state),l=Qe(i.selectedItems),c=Qe(i?.storages||[]),d=re(null),f=re(!1),p=se(()=>window.opener!==null||window.name!==""||window.history.length<=1),v=se(()=>[{id:"file",label:r("File"),items:[{id:"new-folder",label:r("New Folder"),action:()=>t?.modal?.open(ev,{items:l.value}),hidden:()=>!n("newfolder")},{id:"new-file",label:r("New File"),action:()=>t?.modal?.open(r2,{items:l.value}),hidden:()=>!n("newfile")},{type:"separator",hidden:()=>!n("newfolder")&&!n("newfile")||!n("upload")},{id:"upload",label:r("Upload"),action:()=>t?.modal?.open(tv,{items:l.value}),hidden:()=>!n("upload")},{type:"separator",hidden:()=>!n("search")},{id:"search",label:r("Search"),action:()=>t.modal.open(Zm),hidden:()=>!n("search")},{type:"separator",hidden:()=>!n("archive")&&!n("unarchive")},{id:"archive",label:r("Archive"),action:()=>{l.value.length>0&&t?.modal?.open(rv,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!n("archive")},{id:"unarchive",label:r("Unarchive"),action:()=>{l.value.length===1&&l.value[0]?.mime_type==="application/zip"&&t?.modal?.open(nv,{items:l.value})},enabled:()=>l.value.length===1&&l.value[0]?.mime_type==="application/zip",hidden:()=>!n("unarchive")},{type:"separator",hidden:()=>!n("preview")},{id:"preview",label:r("Preview"),action:()=>{l.value.length===1&&l.value[0]?.type!=="dir"&&t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0]})},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!n("preview")},{id:"open-as",label:r("Preview as"),items:[{id:"open-as-text",label:r("Text"),action:()=>t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0],forceType:"text"}),enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{id:"open-as-image",label:r("Image"),action:()=>t?.modal?.open(qi,{storage:i?.path?.get()?.storage,item:l.value[0],forceType:"image"}),enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"}],enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!n("preview")},...p.value?[{type:"separator"},{id:"exit",label:r("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:r("Edit"),items:[...t?.selectionMode==="multiple"?[{id:"select-all",label:r("Select All"),action:()=>i?.selectAll(t?.selectionMode||"multiple",t),enabled:()=>!0},{id:"deselect",label:r("Deselect All"),action:()=>i?.clearSelection(),enabled:()=>l.value.length>0},{type:"separator"}]:[],...n("copy")?[{id:"cut",label:r("Cut"),action:()=>{l.value.length>0&&i?.setClipboard("cut",new Set(l.value.map(S=>Jt(S))))},enabled:()=>l.value.length>0},{id:"copy",label:r("Copy"),action:()=>{l.value.length>0&&i?.setClipboard("copy",new Set(l.value.map(S=>Jt(S))))},enabled:()=>l.value.length>0},{id:"paste",label:r("Paste"),action:()=>{const S=i?.getClipboard();S?.items?.size>0&&t?.modal?.open(S.type==="cut"?Xs:Xm,{items:{from:Array.from(S.items),to:i?.path?.get()}})},enabled:()=>i?.getClipboard()?.items?.size>0}]:[],...n("move")?[{id:"move",label:r("Move files"),action:()=>{if(l.value.length>0){const S=t?.fs,O={storage:S?.path?.get()?.storage||"",path:S?.path?.get()?.path||"",type:"dir"};t?.modal?.open(Xs,{items:{from:l.value,to:O}})}},enabled:()=>l.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:r("Copy Path"),action:async()=>{if(l.value.length===1){const S=l.value[0];await Xa(S.path)}else{const S=i?.path?.get();S?.path&&await Xa(S.path)}},enabled:()=>!0},{id:"copy-download-url",label:r("Copy Download URL"),action:async()=>{if(l.value.length===1){const S=l.value[0];i?.path?.get()?.storage;const O=t?.adapter?.getDownloadUrl({path:S.path});O&&await HG(O)}},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!n("rename")&&!n("delete")},{id:"rename",label:r("Rename"),action:()=>{l.value.length===1&&t?.modal?.open(Zu,{items:l.value})},enabled:()=>l.value.length===1,hidden:()=>!n("rename")},{id:"delete",label:r("Delete"),action:()=>{l.value.length>0&&t?.modal?.open(Ju,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!n("delete")}]},{id:"view",label:r("View"),items:[{id:"refresh",label:r("Refresh"),action:()=>{t.adapter.invalidateListQuery(i.path.get().path),t.adapter.open(i.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:r("Grid View"),action:()=>o?.set("view","grid"),enabled:()=>!0,checked:()=>s.value?.view==="grid"},{id:"list-view",label:r("List View"),action:()=>o?.set("view","list"),enabled:()=>!0,checked:()=>s.value?.view==="list"},{type:"separator"},{id:"tree-view",label:r("Tree View"),action:()=>o?.toggle("showTreeView"),enabled:()=>!0,checked:()=>s.value?.showTreeView},{id:"thumbnails",label:r("Show Thumbnails"),action:()=>o?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>s.value?.showThumbnails},{id:"show-hidden-files",label:r("Show Hidden Files"),action:()=>o?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>s.value?.showHiddenFiles},{type:"separator",hidden:()=>!n("fullscreen")},{id:"fullscreen",label:r("Full Screen"),action:()=>o?.toggle("fullScreen"),enabled:()=>n("fullscreen"),checked:()=>s.value?.fullScreen,hidden:()=>!n("fullscreen")},{type:"separator"},{id:"persist-path",label:r("Persist Path"),action:()=>{o?.toggle("persist"),t.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>s.value?.persist},{id:"metric-units",label:r("Metric Units"),action:()=>{o?.toggle("metricUnits"),t.filesize=o?.get("metricUnits")?jC:Hm,t.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>s.value?.metricUnits}]},{id:"go",label:r("Go"),items:[...n("history")?[{id:"forward",label:r("Forward"),action:()=>{i?.goForward();const S=i?.path?.get();S?.path&&t?.adapter.open(S.path)},enabled:()=>i?.canGoForward?.get()??!1},{id:"back",label:r("Back"),action:()=>{i?.goBack();const S=i?.path?.get();S?.path&&t?.adapter.open(S.path)},enabled:()=>i?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:r("Open containing folder"),action:()=>{const S=i?.path?.get();if(S?.breadcrumb&&S.breadcrumb.length>1){const O=S.breadcrumb[S.breadcrumb.length-2]?.path??`${S.storage}://`;t?.adapter.open(O)}},enabled:()=>{const S=i?.path?.get();return S?.breadcrumb&&S.breadcrumb.length>1}},{type:"separator"},...(c.value||[]).map(S=>({id:`storage-${S}`,label:S,action:()=>{const O=`${S}://`;t?.adapter.open(O)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:r("Go to Folder"),action:()=>t?.modal?.open(IJ),enabled:()=>!0}]},{id:"help",label:r("Help"),items:[{id:"settings",label:r("Settings"),action:()=>t?.modal?.open(e2),enabled:()=>!0},{id:"shortcuts",label:r("Shortcuts"),action:()=>t?.modal?.open(vJ),enabled:()=>!0},{id:"about",label:r("About"),action:()=>t?.modal?.open(BC),enabled:()=>!0}]}]),y=S=>{d.value===S?m():(d.value=S,f.value=!0)},g=S=>{f.value&&(d.value=S)},m=()=>{d.value=null,f.value=!1},b=S=>{m(),S()},x=S=>{S.target.closest(".vuefinder__menubar")||m()};return xt(()=>{document.addEventListener("click",x)}),Tn(()=>{document.removeEventListener("click",x)}),(S,O)=>(C(),R("div",{class:"vuefinder__menubar",onClick:O[0]||(O[0]=ht(()=>{},["stop"]))},[_("div",MJ,[(C(!0),R(We,null,ut(v.value,T=>(C(),R("div",{key:T.id,class:Be(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":d.value===T.id}]),onClick:A=>y(T.id),onMouseenter:A=>g(T.id)},[_("span",FJ,q(T.label),1),d.value===T.id?(C(),R("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:A=>g(T.id)},[(C(!0),R(We,null,ut(T.items,A=>(C(),R("div",{key:A.id||A.type,class:Be(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":A.type==="separator","vuefinder__menubar__dropdown__item--disabled":A.enabled&&!A.enabled(),"vuefinder__menubar__dropdown__item--checked":A.checked&&A.checked(),"vuefinder__menubar__dropdown__item--hidden":A.hidden&&A.hidden(),"vuefinder__menubar__dropdown__item--has-children":A.items?.length}]),onClick:ht(M=>A.type!=="separator"&&!A.items?.length&&(!A.enabled||A.enabled())?b(A.action):null,["stop"])},[A.type!=="separator"?(C(),R("span",UJ,q(A.label),1)):Se("",!0),A.checked&&A.checked()?(C(),R("span",NJ," ✓ ")):Se("",!0),A.items?.length?(C(),R("svg",zJ,[...O[1]||(O[1]=[_("path",{d:"M6 4l4 4-4 4z"},null,-1)])])):Se("",!0),A.items?.length?(C(),R("div",BJ,[(C(!0),R(We,null,ut(A.items,M=>(C(),R("div",{key:M.id,class:Be(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--disabled":M.enabled&&!M.enabled()}]),onClick:ht(z=>!M.enabled||M.enabled()?b(M.action):null,["stop"])},[_("span",HJ,q(M.label),1)],10,VJ))),128))])):Se("",!0)],10,jJ))),128))],40,LJ)):Se("",!0)],42,DJ))),128))])]))}}),WJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function YJ(e,t){return C(),R("svg",WJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1)])])}const KJ={render:YJ},GJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function QJ(e,t){return C(),R("svg",GJ,[...t[0]||(t[0]=[_("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1)])])}const XJ={render:QJ},JJ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function ZJ(e,t){return C(),R("svg",JJ,[...t[0]||(t[0]=[_("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1)])])}const eZ={render:ZJ},tZ={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function nZ(e,t){return C(),R("svg",tZ,[...t[0]||(t[0]=[_("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1)])])}const rZ={render:nZ},iZ={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function oZ(e,t){return C(),R("svg",iZ,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586z"},null,-1)])])}const sZ={render:oZ},aZ={class:"vuefinder__toolbar"},lZ={class:"vuefinder__toolbar__actions"},cZ=["title"],uZ=["title"],dZ=["title"],fZ=["title"],pZ=["title"],hZ=["title"],mZ=["title"],vZ={class:"vuefinder__toolbar__controls"},gZ=["title"],_Z={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},yZ=["title"],bZ={class:"relative"},wZ={key:0,class:"vuefinder__toolbar__filter-indicator"},EZ={key:0,class:"vuefinder__toolbar__dropdown"},SZ={class:"vuefinder__toolbar__dropdown-content"},CZ={class:"vuefinder__toolbar__dropdown-section"},xZ={class:"vuefinder__toolbar__dropdown-label"},TZ={class:"vuefinder__toolbar__dropdown-row"},kZ={value:"name"},OZ={value:"size"},$Z={value:"modified"},AZ={value:""},RZ={value:"asc"},PZ={value:"desc"},IZ={class:"vuefinder__toolbar__dropdown-section"},MZ={class:"vuefinder__toolbar__dropdown-label"},DZ={class:"vuefinder__toolbar__dropdown-options"},FZ={class:"vuefinder__toolbar__dropdown-option"},LZ={class:"vuefinder__toolbar__option-text"},jZ={class:"vuefinder__toolbar__dropdown-option"},UZ={class:"vuefinder__toolbar__option-text"},NZ={class:"vuefinder__toolbar__dropdown-option"},zZ={class:"vuefinder__toolbar__option-text"},BZ={class:"vuefinder__toolbar__dropdown-toggle"},VZ={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},HZ={class:"vuefinder__toolbar__dropdown-reset"},qZ=["title"],WZ=["title"],YZ=ze({name:"VfToolbar",__name:"Toolbar",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,i=t.fs,o=t.config,s=Qe(o.state),l=Qe(i.selectedItems),c=Qe(i.sort),d=Qe(i.filter);He(()=>s.value.fullScreen,()=>{const b=document.querySelector("body");b&&(b.style.overflow=s.value.fullScreen?"hidden":"")},{immediate:!0});const f=re(!1),p=b=>{b.target.closest(".vuefinder__toolbar__dropdown-container")||(f.value=!1)};xt(()=>{const b=document.querySelector("body");b&&s.value.fullScreen&&setTimeout(()=>b.style.overflow="hidden"),document.addEventListener("click",p)}),Tn(()=>{document.removeEventListener("click",p)});const v=re({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:s.value.showHiddenFiles});He(()=>v.value.sortBy,b=>{if(!v.value.sortOrder){i.clearSort();return}b==="name"?i.setSort("basename",v.value.sortOrder):b==="size"?i.setSort("file_size",v.value.sortOrder):b==="modified"&&i.setSort("last_modified",v.value.sortOrder)}),He(()=>v.value.sortOrder,b=>{if(!b){i.clearSort();return}v.value.sortBy==="name"?i.setSort("basename",b):v.value.sortBy==="size"?i.setSort("file_size",b):v.value.sortBy==="modified"&&i.setSort("last_modified",b)}),He(c,b=>{b.active?(b.column==="basename"?v.value.sortBy="name":b.column==="file_size"?v.value.sortBy="size":b.column==="last_modified"&&(v.value.sortBy="modified"),v.value.sortOrder=b.order):v.value.sortOrder=""},{immediate:!0}),He(()=>v.value.filterKind,b=>{i.setFilter(b,s.value.showHiddenFiles)}),He(()=>v.value.showHidden,b=>{o.set("showHiddenFiles",b),i.setFilter(v.value.filterKind,b)}),He(d,b=>{v.value.filterKind=b.kind},{immediate:!0}),He(()=>s.value.showHiddenFiles,b=>{v.value.showHidden=b,i.setFilter(v.value.filterKind,b)},{immediate:!0});const y=()=>o.set("view",s.value.view==="grid"?"list":"grid"),g=se(()=>d.value.kind!=="all"||!s.value.showHiddenFiles||c.value.active),m=()=>{v.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},o.set("showHiddenFiles",!0),i.clearSort(),i.clearFilter()};return(b,x)=>(C(),R("div",aZ,[_("div",lZ,[w(n)("newfolder")?(C(),R("div",{key:0,class:"mx-1.5",title:w(r)("New Folder"),onClick:x[0]||(x[0]=S=>w(t).modal.open(ev,{items:w(l)}))},[Z(w(t2))],8,cZ)):Se("",!0),w(n)("newfile")?(C(),R("div",{key:1,class:"mx-1.5",title:w(r)("New File"),onClick:x[1]||(x[1]=S=>w(t).modal.open(r2,{items:w(l)}))},[Z(w(n2))],8,uZ)):Se("",!0),w(n)("rename")?(C(),R("div",{key:2,class:"mx-1.5",title:w(r)("Rename"),onClick:x[2]||(x[2]=S=>w(l).length!==1||w(t).modal.open(Zu,{items:w(l)}))},[Z(w(HC),{class:Be(w(l).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,dZ)):Se("",!0),w(n)("delete")?(C(),R("div",{key:3,class:"mx-1.5",title:w(r)("Delete"),onClick:x[3]||(x[3]=S=>!w(l).length||w(t).modal.open(Ju,{items:w(l)}))},[Z(w(VC),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,fZ)):Se("",!0),w(n)("upload")?(C(),R("div",{key:4,class:"mx-1.5",title:w(r)("Upload"),onClick:x[4]||(x[4]=S=>w(t).modal.open(tv,{items:w(l)}))},[Z(w(i2))],8,pZ)):Se("",!0),w(n)("unarchive")&&w(l).length===1&&w(l)[0].mime_type==="application/zip"?(C(),R("div",{key:5,class:"mx-1.5",title:w(r)("Unarchive"),onClick:x[5]||(x[5]=S=>!w(l).length||w(t).modal.open(nv,{items:w(l)}))},[Z(w(o2),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,hZ)):Se("",!0),w(n)("archive")?(C(),R("div",{key:6,class:"mx-1.5",title:w(r)("Archive"),onClick:x[6]||(x[6]=S=>!w(l).length||w(t).modal.open(rv,{items:w(l)}))},[Z(w(s2),{class:Be(w(l).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,mZ)):Se("",!0)]),_("div",vZ,[w(n)("search")?(C(),R("div",{key:0,class:"mx-1.5",title:w(r)("Search Files"),onClick:x[7]||(x[7]=S=>w(t).modal.open(Zm))},[Z(w(Jm),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,gZ)):Se("",!0),_("div",_Z,[_("div",{title:w(r)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:x[8]||(x[8]=S=>f.value=!f.value)},[_("div",bZ,[Z(w(sZ),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),g.value?(C(),R("div",wZ)):Se("",!0)])],8,yZ),f.value?(C(),R("div",EZ,[_("div",SZ,[_("div",CZ,[_("div",xZ,q(w(r)("Sorting")),1),_("div",TZ,[Ct(_("select",{"onUpdate:modelValue":x[9]||(x[9]=S=>v.value.sortBy=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",kZ,q(w(r)("Name")),1),_("option",OZ,q(w(r)("Size")),1),_("option",$Z,q(w(r)("Date")),1)],512),[[$p,v.value.sortBy]]),Ct(_("select",{"onUpdate:modelValue":x[10]||(x[10]=S=>v.value.sortOrder=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",AZ,q(w(r)("None")),1),_("option",RZ,q(w(r)("Asc")),1),_("option",PZ,q(w(r)("Desc")),1)],512),[[$p,v.value.sortOrder]])])]),_("div",IZ,[_("div",MZ,q(w(r)("Show")),1),_("div",DZ,[_("label",FZ,[Ct(_("input",{"onUpdate:modelValue":x[11]||(x[11]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[xf,v.value.filterKind]]),_("span",LZ,q(w(r)("All items")),1)]),_("label",jZ,[Ct(_("input",{"onUpdate:modelValue":x[12]||(x[12]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[xf,v.value.filterKind]]),_("span",UZ,q(w(r)("Files only")),1)]),_("label",NZ,[Ct(_("input",{"onUpdate:modelValue":x[13]||(x[13]=S=>v.value.filterKind=S),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[xf,v.value.filterKind]]),_("span",zZ,q(w(r)("Folders only")),1)])])]),_("div",BZ,[_("label",VZ,q(w(r)("Show hidden files")),1),Ct(_("input",{id:"showHidden","onUpdate:modelValue":x[14]||(x[14]=S=>v.value.showHidden=S),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[Zs,v.value.showHidden]])]),_("div",HZ,[_("button",{class:"vuefinder__toolbar__reset-button",onClick:m},q(w(r)("Reset")),1)])])])):Se("",!0)]),w(n)("fullscreen")?(C(),R("div",{key:1,class:"mx-1.5",title:w(r)("Toggle Full Screen"),onClick:x[15]||(x[15]=S=>w(o).toggle("fullScreen"))},[w(s).fullScreen?(C(),Ee(w(XJ),{key:0,class:"vf-toolbar-icon"})):(C(),Ee(w(KJ),{key:1,class:"vf-toolbar-icon"}))],8,qZ)):Se("",!0),_("div",{class:"mx-1.5",title:w(r)("Change View"),onClick:x[16]||(x[16]=S=>y())},[w(s).view==="grid"?(C(),Ee(w(eZ),{key:0,class:"vf-toolbar-icon"})):Se("",!0),w(s).view==="list"?(C(),Ee(w(rZ),{key:1,class:"vf-toolbar-icon"})):Se("",!0)],8,WZ)])]))}}),KZ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function GZ(e,t){return C(),R("svg",KZ,[...t[0]||(t[0]=[_("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1)])])}const QZ={render:GZ},XZ={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function JZ(e,t){return C(),R("svg",XZ,[...t[0]||(t[0]=[_("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1)])])}const ZZ={render:JZ},eee={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"};function tee(e,t){return C(),R("svg",eee,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const nee={render:tee},ree={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function iee(e,t){return C(),R("svg",ree,[...t[0]||(t[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const oee={render:iee},see={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function aee(e,t){return C(),R("svg",see,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0-4-4m4 4-4 4m0 6H4m0 0 4 4m-4-4 4-4"},null,-1)])])}const lee={render:aee};function hl(e,t=[]){const n="vfDragEnterCounter",r=e.fs,i=Qe(r.selectedItems);function o(p,v){return!!(!p||p.type!=="dir"||p.path===v||p.path.startsWith(`${v}/`)||i.value.some(y=>y.path===v?!1:!!(p.path===y.path||p.path.startsWith(`${y.path}/`))))}function s(p,v){if(p.isExternalDrag)return;if(!(e.features?.move??!1)){p.dataTransfer&&(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none");return}p.preventDefault();const y=r.getDraggedItem(),g=r.sortedFiles.get().find(m=>Jt(m)===y)?.path??"";o(v,g)?p.dataTransfer&&(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none"):(p.dataTransfer&&(p.dataTransfer.dropEffect="copy",p.dataTransfer.effectAllowed="all"),p.currentTarget.classList.add(...t))}function l(p){if(p.isExternalDrag||!(e.features?.move??!1))return;p.preventDefault();const v=p.currentTarget,y=Number(v.dataset[n]||0);v.dataset[n]=String(y+1)}function c(p){if(p.isExternalDrag||!(e.features?.move??!1))return;p.preventDefault();const v=p.currentTarget,y=Number(v.dataset[n]||0)-1;y<=0?(delete v.dataset[n],v.classList.remove(...t)):v.dataset[n]=String(y)}function d(p,v){if(p.isExternalDrag||!(e.features?.move??!1)||!v)return;p.preventDefault();const y=p.currentTarget;delete y.dataset[n],y.classList.remove(...t);const g=p.dataTransfer?.getData("items")||"[]",m=JSON.parse(g).map(b=>r.sortedFiles.get().find(x=>Jt(x)===b)).filter(b=>!!b);r.clearDraggedItem(),e.modal.open(Xs,{items:{from:m,to:v}})}function f(p){return{dragover:v=>s(v,p),dragenter:l,dragleave:c,drop:v=>d(v,p)}}return{events:f}}const cee={class:"vuefinder__breadcrumb__container"},uee=["title"],dee=["title"],fee=["title"],pee=["title"],hee={class:"vuefinder__breadcrumb__path-container"},mee={class:"vuefinder__breadcrumb__list"},vee={key:0,class:"vuefinder__breadcrumb__hidden-list"},gee={class:"relative"},_ee=["title","onClick"],yee=["title"],bee={class:"vuefinder__breadcrumb__path-mode"},wee={class:"vuefinder__breadcrumb__path-mode-content"},Eee=["title"],See={class:"vuefinder__breadcrumb__path-text"},Cee=["title"],xee=["data-theme"],Tee=["onClick"],kee={class:"vuefinder__breadcrumb__hidden-item-content"},Oee={class:"vuefinder__breadcrumb__hidden-item-text"},ka=5,X0=1,$ee=40,Aee=ze({__name:"Breadcrumb",setup(e){const t=rt(),n=ur(t),{t:r}=t.i18n,i=t.fs,o=t.config,s=Qe(o.state),l=Qe(i.path),c=Qe(i.loading),d=re(null),f=QC(0,100),p=re(5),v=re(!1),y=re(!1),g=se(()=>l.value?.breadcrumb??[]),m=new Map;function b(U,ee){return U.length>ee?[U.slice(-ee),U.slice(0,-ee)]:[U,[]]}const x=se(()=>b(g.value,p.value)[0]),S=se(()=>b(g.value,p.value)[1]);function O(){const U=g.value,ee=f.value;if(!U.length||ee<=0)return null;let Q=0,B=0;for(let oe=U.length-1;oe>=0;oe--){const V=U[oe]?.name;if(!V)continue;const P=m.get(V);if(P===void 0)return null;if(Q+P>ee-$ee||(Q+=P,B++,B>=ka))break}return B<X0&&(B=X0),B>ka&&(B=ka),B}function T(){if(!d.value)return;const U=d.value.children,ee=x.value;for(let Q=0;Q<U.length;Q++){const B=ee[Q]?.name;if(!B)continue;const oe=U[Q].offsetWidth;oe>0&&m.set(B,oe)}}async function A(){if(!g.value.length){p.value=ka;return}const U=O();if(U!==null){p.value=U;return}p.value=ka,await gt(),T();const ee=O();ee!==null&&(p.value=ee)}He(f,A),He(g,A,{immediate:!0});const M=()=>{d.value&&(f.value=d.value.offsetWidth)},z=re(null);xt(()=>{z.value=new ResizeObserver(M),d.value&&z.value.observe(d.value)}),Tn(()=>{z.value&&z.value.disconnect()});const Y=hl(t,["vuefinder__drag-over"]);function ve(U=null){U??=g.value.length-2;const ee={basename:l.value?.storage??"local",extension:"",path:(l.value?.storage??"local")+"://",storage:l.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return g.value[U]??ee}const W=()=>{t.adapter.invalidateListQuery(l.value.path),t.adapter.open(l.value.path)},X=()=>{x.value.length>0&&t.adapter.open(g.value[g.value.length-2]?.path??(l.value?.storage??"local")+"://")},K=U=>{t.adapter.open(U.path),v.value=!1},L=()=>{v.value&&(v.value=!1)},D={mounted(U,ee){U.clickOutsideEvent=function(Q){U===Q.target||U.contains(Q.target)||ee.value()},document.body.addEventListener("click",U.clickOutsideEvent)},beforeUnmount(U){document.body.removeEventListener("click",U.clickOutsideEvent)}},ne=()=>{o.toggle("showTreeView")},le=re({x:0,y:0}),je=(U,ee=null)=>{if(U.currentTarget instanceof HTMLElement){const{x:Q,y:B,height:oe}=U.currentTarget.getBoundingClientRect();le.value={x:Q,y:B+oe}}v.value=ee??!v.value},J=()=>{y.value=!y.value},j=async()=>{await Xa(l.value?.path||""),n.success(r("Path copied to clipboard"))},de=()=>{y.value=!1};return(U,ee)=>(C(),R("div",cee,[_("span",{title:w(r)("Toggle Tree View")},[Z(w(oee),{class:Be(["vuefinder__breadcrumb__toggle-tree",w(s).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:ne},null,8,["class"])],8,uee),_("span",{title:w(r)("Go up a directory")},[Z(w(a2),Ot({class:g.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},ni(g.value.length?w(Y).events(ve()):{}),{onClick:X}),null,16,["class"])],8,dee),w(i).isLoading()?(C(),R("span",{key:1,title:w(r)("Cancel")},[Z(w(qC),{onClick:ee[0]||(ee[0]=Q=>w(t).emitter.emit("vf-fetch-abort"))})],8,pee)):(C(),R("span",{key:0,title:w(r)("Refresh")},[Z(w(QZ),{onClick:W})],8,fee)),Ct(_("div",hee,[_("div",null,[Z(w(ZZ),Ot({class:"vuefinder__breadcrumb__home-icon"},ni(w(Y).events(ve(-1))),{onClick:ee[1]||(ee[1]=ht(Q=>w(t).adapter.open(w(l).storage+"://"),["stop"]))}),null,16)]),_("div",mee,[S.value.length?Ct((C(),R("div",vee,[ee[3]||(ee[3]=_("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("div",gee,[_("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:ee[2]||(ee[2]=Q=>je(Q,!0)),onClick:ht(je,["stop"])},[Z(w(ZC),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[D,L]]):Se("",!0)]),_("div",{ref_key:"breadcrumbContainer",ref:d,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(C(!0),R(We,null,ut(x.value,(Q,B)=>(C(),R("div",{key:B},[ee[4]||(ee[4]=_("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("span",Ot({class:"vuefinder__breadcrumb__item pointer-events-auto",title:Q.basename},ni(w(Y).events(Q),!0),{onClick:ht(oe=>w(t).adapter.open(Q.path),["stop"])}),q(Q.name),17,_ee)]))),128))],512),w(o).get("loadingIndicator")==="circular"&&w(c)?(C(),Ee(w(rd),{key:0})):Se("",!0),_("span",{title:w(r)("Toggle Path Copy Mode"),onClick:J},[Z(w(lee),{class:"vuefinder__breadcrumb__toggle-icon"})],8,yee)],512),[[Nr,!y.value]]),Ct(_("div",bee,[_("div",wee,[_("div",{title:w(r)("Copy Path")},[Z(w(Gm),{class:"vuefinder__breadcrumb__copy-icon",onClick:j})],8,Eee),_("div",See,q(w(l).path),1),_("div",{title:w(r)("Exit")},[Z(w(nee),{class:"vuefinder__breadcrumb__exit-icon",onClick:de})],8,Cee)])],512),[[Nr,y.value]]),(C(),Ee(el,{to:"body"},[_("div",null,[Ct(_("div",{style:an({position:"absolute",top:le.value.y+"px",left:le.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":w(t).theme.current},[(C(!0),R(We,null,ut(S.value,(Q,B)=>(C(),R("div",Ot({key:B,class:"vuefinder__breadcrumb__hidden-item"},ni(w(Y).events(Q),!0),{onClick:oe=>K(Q)}),[_("div",kee,[_("span",null,[Z(w(ar),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),_("span",Oee,q(Q.name),1)])],16,Tee))),128))],12,xee),[[Nr,v.value]])])]))]))}}),Ree={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Pee(e,t){return C(),R("svg",Ree,[...t[0]||(t[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const J0={render:Pee},Iee={class:"vuefinder__drag-item__container"},Mee={class:"vuefinder__drag-item__count"},Dee=ze({__name:"DragItem",props:{count:{}},setup(e){const t=e;return(n,r)=>(C(),R("div",Iee,[t.count>1?(C(),Ee(w(J0),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):Se("",!0),Z(w(J0),{class:"vuefinder__drag-item__icon"}),_("div",Mee,q(t.count),1)]))}}),Fee={key:2,class:"vuefinder__item-icon__extension"},Z0=ze({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(e){const t=e,n=rt(),r=Qe(n.config.state),i=se(()=>t.small!==void 0?t.small?"small":"large":t.view==="list"?"small":"large"),o=se(()=>{const l=i.value,c=r.value?.listIconSize,d=r.value?.gridIconSize;return r.value?.gridItemWidth,r.value?.gridItemHeight,t.view==="list"||l==="small"?{"--vf-icon-size":`${c??16}px`}:{"--vf-icon-size":`${d??48}px`}}),s={app:n,config:r.value,item:t.item,view:t.view};return(l,c)=>(C(),R("div",{class:Be(["vuefinder__item-icon",{"vuefinder__item-icon--small":i.value==="small","vuefinder__item-icon--large":i.value==="large","vuefinder__item-icon--grid":e.view==="grid","vuefinder__item-icon--list":e.view==="list"}]),style:an(o.value)},[mt(l.$slots,"icon",ii(Vi(s)),()=>[e.item.type==="dir"?(C(),Ee(w(ar),{key:0,class:"vuefinder__item-icon__folder"})):(C(),Ee(w(Ga),{key:1,class:"vuefinder__item-icon__file"})),e.ext&&e.item.type!=="dir"&&e.item.extension?(C(),R("div",Fee,q(e.item.extension.substring(0,3)),1)):Se("",!0)])],6))}}),Lee={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function jee(e,t){return C(),R("svg",Lee,[...t[0]||(t[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3V7a5 5 0 0 1 5-5m0 12a2 2 0 0 0-1.995 1.85L10 16a2 2 0 1 0 2-2m0-10a3 3 0 0 0-3 3v3h6V7a3 3 0 0 0-3-3"},null,-1)])])}const ew={render:jee},Uee=["data-key","data-row","data-col","draggable"],Nee={key:0},zee={class:"vuefinder__explorer__item-grid-content"},Bee=["data-src","alt"],Vee={class:"vuefinder__explorer__item-title"},Hee={key:1,class:"vuefinder__explorer__item-list-content"},qee={class:"vuefinder__explorer__item-list-name"},Wee={class:"vuefinder__explorer__item-list-icon"},Yee={class:"vuefinder__explorer__item-name"},Kee={key:0,class:"vuefinder__explorer__item-path"},Gee={key:1,class:"vuefinder__explorer__item-size"},Qee={key:0},Xee={key:2,class:"vuefinder__explorer__item-date"},Jee=ze({__name:"FileItem",props:{item:{},view:{},showThumbnails:{type:Boolean},isSelected:{type:Boolean},isDragging:{type:Boolean},rowIndex:{},colIndex:{},showPath:{type:Boolean},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,i=rt(),o=i.fs,s=i.config,l=se(()=>{const K=i.selectionFilterType;return!K||K==="both"?!0:K==="files"&&n.item.type==="file"||K==="dirs"&&n.item.type==="dir"}),c=se(()=>{const K=i.selectionFilterMimeIncludes;return!K||!K.length||n.item.type==="dir"?!0:n.item.mime_type?K.some(L=>n.item.mime_type?.startsWith(L)):!1}),d=se(()=>l.value&&c.value),f=se(()=>n.item.type==="dir"||d.value),p=se(()=>["file-item-"+n.explorerId,n.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",n.isSelected?"vf-explorer-selected":"",f.value?"":"vf-explorer-item--unselectable",f.value&&!d.value?"vf-explorer-item--no-select":""]),v=se(()=>({opacity:n.isDragging||o.isCut(Jt(n.item))||!f.value?.5:""})),y=re(null);let g=!1,m=null,b=null,x=!1;const{enabled:S}=fr(),O=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),T=se(()=>O?!1:S("move")),A=()=>{m&&(clearTimeout(m),m=null),b=null},M=K=>{A(),b=K,x=!1,K.stopPropagation(),m=setTimeout(()=>{!b||m===null||(x=!0,b.cancelable&&b.preventDefault(),b.stopPropagation(),r("contextmenu",b),A())},500)},z=K=>{if(x){K.preventDefault(),K.stopPropagation(),A();return}setTimeout(()=>{x||(A(),X(K))},100)},Y=K=>{if(!b)return;const L=b.touches[0]||b.changedTouches[0],D=K.touches[0]||K.changedTouches[0];if(L&&D){const ne=Math.abs(D.clientX-L.clientX),le=Math.abs(D.clientY-L.clientY);(ne>15||le>15)&&A()}},ve=K=>{O&&K.type!=="click"||r("click",K)},W=K=>{if(x)return K.preventDefault(),K.stopPropagation(),!1;r("dragstart",K)},X=K=>{if(!g)g=!0,r("click",K),y.value=setTimeout(()=>{g=!1},300);else return g=!1,r("dblclick",K),!1};return(K,L)=>(C(),R("div",{class:Be(p.value),style:an(v.value),"data-key":w(Jt)(e.item),"data-row":e.rowIndex,"data-col":e.colIndex,draggable:T.value,onTouchstartCapture:L[1]||(L[1]=D=>M(D)),onTouchendCapture:L[2]||(L[2]=D=>z(D)),onTouchmoveCapture:Y,onTouchcancelCapture:L[3]||(L[3]=()=>A()),onClick:ve,onDblclick:L[4]||(L[4]=D=>r("dblclick",D)),onContextmenu:L[5]||(L[5]=ht(D=>r("contextmenu",D),["prevent","stop"])),onDragstart:W,onDragend:L[6]||(L[6]=D=>r("dragend",D))},[e.view==="grid"?(C(),R("div",Nee,[w(o).isReadOnly(e.item)?(C(),Ee(w(ew),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):Se("",!0),_("div",zee,[(e.item.mime_type??"").startsWith("image")&&e.showThumbnails?(C(),R("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":e.item.previewUrl??w(i).adapter.getPreviewUrl({path:e.item.path}),alt:e.item.basename,onTouchstart:L[0]||(L[0]=D=>D.preventDefault())},null,40,Bee)):(C(),Ee(Z0,{key:1,item:e.item,ext:!0,view:e.view},{icon:Le(D=>[mt(K.$slots,"icon",ii(Vi(D)))]),_:3},8,["item","view"]))]),_("span",Vee,q(w(Th)(e.item.basename)),1)])):(C(),R("div",Hee,[_("div",qee,[_("div",Wee,[Z(Z0,{item:e.item,view:e.view},{icon:Le(D=>[mt(K.$slots,"icon",ii(Vi(D)))]),_:3},8,["item","view"])]),_("span",Yee,q(e.item.basename),1),_("div",null,[w(o).isReadOnly(e.item)?(C(),Ee(w(ew),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):Se("",!0)])]),e.showPath?(C(),R("div",Kee,q(e.item.path),1)):Se("",!0),e.showPath?Se("",!0):(C(),R("div",Gee,[e.item.file_size?(C(),R("div",Qee,q(w(i).filesize(e.item.file_size)),1)):Se("",!0)])),!e.showPath&&e.item.last_modified?(C(),R("div",Xee,q(new Date(e.item.last_modified*1e3).toLocaleString()),1)):Se("",!0)])),w(S)("pinned")&&w(s).get("pinnedFolders").find(D=>D.path===e.item.path)?(C(),Ee(w(Qa),{key:2,class:"vuefinder__item--pinned"})):Se("",!0)],46,Uee))}}),Zee=["data-row"],tw=ze({__name:"FileRow",props:{rowIndex:{},rowHeight:{},view:{},itemsPerRow:{},items:{},showThumbnails:{type:Boolean},showPath:{type:Boolean},isDraggingItem:{type:Function},isSelected:{type:Function},dragNDropEvents:{type:Function},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,i=se(()=>[n.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),o=se(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${n.rowHeight}px`,transform:`translateY(${n.rowIndex*n.rowHeight}px)`})),s=se(()=>n.view==="grid"?{gridTemplateColumns:`repeat(${n.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(l,c)=>(C(),R("div",{class:Be(i.value),"data-row":e.rowIndex,style:an(o.value)},[_("div",{class:Be(["grid justify-self-start",{"w-full":e.view==="list"}]),style:an(s.value)},[(C(!0),R(We,null,ut(e.items,(d,f)=>(C(),Ee(Jee,Ot({key:w(Jt)(d),item:d,view:e.view,"show-thumbnails":e.showThumbnails,"show-path":e.showPath,"is-selected":e.isSelected(w(Jt)(d)),"is-dragging":e.isDraggingItem(w(Jt)(d)),"row-index":e.rowIndex,"col-index":f,"explorer-id":e.explorerId},ni(e.dragNDropEvents(d)),{onClick:c[0]||(c[0]=p=>r("click",p)),onDblclick:c[1]||(c[1]=p=>r("dblclick",p)),onContextmenu:c[2]||(c[2]=p=>r("contextmenu",p)),onDragstart:c[3]||(c[3]=p=>r("dragstart",p)),onDragend:c[4]||(c[4]=p=>r("dragend",p))}),{icon:Le(p=>[mt(l.$slots,"icon",Ot({ref_for:!0},p))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,Zee))}}),ete={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function tte(e,t){return C(),R("svg",ete,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1)])])}const nte={render:tte},rte={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function ite(e,t){return C(),R("svg",rte,[...t[0]||(t[0]=[_("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1)])])}const ote={render:ite},Cp=ze({__name:"SortIcon",props:{direction:{}},setup(e){return(t,n)=>(C(),R("div",null,[e.direction==="asc"?(C(),Ee(w(nte),{key:0,class:"vuefinder__explorer__sort-icon"})):Se("",!0),e.direction==="desc"?(C(),Ee(w(ote),{key:1,class:"vuefinder__explorer__sort-icon"})):Se("",!0)]))}}),ste={class:"vuefinder__explorer__header"},ate=ze({__name:"ExplorerHeader",setup(e){const t=rt(),n=t.fs,{t:r}=t.i18n,i=Qe(n.sort);return(o,s)=>(C(),R("div",ste,[_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:s[0]||(s[0]=l=>w(n).toggleSort("basename"))},[Et(q(w(r)("Name"))+" ",1),Ct(Z(Cp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="basename"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:s[1]||(s[1]=l=>w(n).toggleSort("file_size"))},[Et(q(w(r)("Size"))+" ",1),Ct(Z(Cp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="file_size"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:s[2]||(s[2]=l=>w(n).toggleSort("last_modified"))},[Et(q(w(r)("Date"))+" ",1),Ct(Z(Cp,{direction:w(i).order},null,8,["direction"]),[[Nr,w(i).active&&w(i).column==="last_modified"]])])]))}});function lte(e,t){const{scrollContainer:n,itemWidth:r=100,rowHeight:i,overscan:o=2,containerPadding:s=48,lockItemsPerRow:l}=t,c=e,d=()=>typeof i=="number"?i:i.value,f=()=>r?typeof r=="number"?r:r.value:100,p=()=>s?typeof s=="number"?s:s.value:0,v=re(0),y=re(6),g=re(600);let m=null;const b=se(()=>Math.ceil(c.value.length/y.value)),x=se(()=>b.value*d()),S=se(()=>{const X=d(),K=Math.max(0,Math.floor(v.value/X)-o),L=Math.min(b.value,Math.ceil((v.value+g.value)/X)+o);return{start:K,end:L}}),O=se(()=>{const{start:X,end:K}=S.value;return Array.from({length:K-X},(L,D)=>X+D)}),T=()=>g.value,A=()=>typeof l=="object"?l.value:!1,M=()=>{if(A()){y.value=1;return}if(n.value){const X=p(),K=n.value.clientWidth-X,L=f();L>0&&(y.value=Math.max(Math.floor(K/L),2))}},z=X=>{const K=X.target;v.value=K.scrollTop};He(()=>c.value.length,()=>{M()}),r&&typeof r!="number"&&He(r,()=>{M()}),s&&typeof s!="number"&&He(s,()=>{M()}),i&&typeof i!="number"&&He(i,()=>{});const Y=(X,K)=>{if(!X||!Array.isArray(X))return[];const L=K*y.value;return X.slice(L,L+y.value)},ve=(X,K,L,D,ne)=>{if(!X||!Array.isArray(X))return[];const le=[];for(let je=K;je<=L;je++)for(let J=D;J<=ne;J++){const j=je*y.value+J;j<X.length&&X[j]&&le.push(X[j])}return le},W=X=>({row:Math.floor(X/y.value),col:X%y.value});return xt(async()=>{await gt(),n.value&&(g.value=n.value.clientHeight||600),M(),window.addEventListener("resize",()=>{n.value&&(g.value=n.value.clientHeight||600),M()}),n.value&&"ResizeObserver"in window&&(m=new ResizeObserver(X=>{const K=X[0];K&&(g.value=Math.round(K.contentRect.height)),M()}),m.observe(n.value))}),Tn(()=>{window.removeEventListener("resize",M),m&&(m.disconnect(),m=null)}),{scrollTop:v,itemsPerRow:y,totalRows:b,totalHeight:x,visibleRange:S,visibleRows:O,updateItemsPerRow:M,handleScroll:z,getRowItems:Y,getItemsInRange:ve,getItemPosition:W,getContainerHeight:T}}function cte(e){const{itemsPerRow:t,totalHeight:n,getItemsInRange:r,getKey:i,selectionObject:o,rowHeight:s,itemWidth:l,osInstance:c}=e,d=()=>typeof l=="number"?l:l.value,f=Math.floor(Math.random()*2**32).toString(),p=rt(),v=p.fs,y=Qe(v.selectedKeys),g=Qe(v.sortedFiles),m=se(()=>{const J=new Map;return g.value&&g.value.forEach(j=>{J.set(i(j),j)}),J}),b=re(new Set),x=re(!1),S=re(!1),O=J=>J.map(j=>j.getAttribute("data-key")).filter(j=>!!j),T=J=>{J.selection.clearSelection(!0,!0)},A=J=>{if(y.value&&y.value.size>0){const j=document.querySelectorAll(`.file-item-${f}[data-key]`),de=new Map;j.forEach(ee=>{const Q=ee.getAttribute("data-key");Q&&de.set(Q,ee)});const U=[];y.value.forEach(ee=>{const Q=de.get(ee);Q&&M(ee)&&U.push(Q)}),U.forEach(ee=>{J.selection.select(ee,!0)})}},M=J=>{const j=m.value.get(J);if(!j)return!1;const de=p.selectionFilterType,U=p.selectionFilterMimeIncludes;return de==="files"&&j.type==="dir"||de==="dirs"&&j.type==="file"?!1:U&&Array.isArray(U)&&U.length>0?j.type==="dir"?!0:j.mime_type?U.some(ee=>j.mime_type?.startsWith(ee)):!1:!0},z=J=>{if(p.selectionMode==="single")return!1;x.value=!1,!J.event?.metaKey&&!J.event?.ctrlKey&&(S.value=!0),J.selection.resolveSelectables(),T(J),A(J)},Y=re(0),ve=({event:J,selection:j})=>{Y.value=(o.value?.getAreaLocation().y1??0)-(p.root.getBoundingClientRect().top??0);const de=document.querySelector(".selection-area-container");if(de&&(de.dataset.theme=p.theme.current),p.selectionMode==="single")return;const U=J;U&&"type"in U&&U.type==="touchend"&&U.preventDefault();const ee=J;!ee?.ctrlKey&&!ee?.metaKey&&(v.clearSelection(),j.clearSelection(!0,!0)),b.value.clear()},W=J=>{if(p.selectionMode==="single")return;const j=O(J.store.changed.added),de=O(J.store.changed.removed);S.value=!1,x.value=!0,j.forEach(U=>{y.value&&!y.value.has(U)&&M(U)&&(b.value.add(U),v.select(U,p.selectionMode||"multiple"))}),de.forEach(U=>{document.querySelector(`[data-key="${U}"]`)&&m.value.has(U)&&b.value.delete(U),v.deselect(U)}),J.selection.resolveSelectables(),A(J)},X=()=>{b.value.clear()},K=J=>{if(!J.event)return;const j=document.querySelector(".scroller-"+f);if(!j)return;const de=j.getBoundingClientRect(),U=de.left,ee=de.top;let Q=j.scrollTop;if(c?.value){const{viewport:Wt}=c.value.elements();Wt&&(Q=Wt.scrollTop)}const B=o.value?.getAreaLocation();if(!B)return;const oe=Math.min(B.x1,B.x2),V=Q+Math.min(B.y1,B.y2),P=Math.max(B.x1,B.x2),F=Q+Math.max(B.y1,B.y2),G=4,N=d();let ie=Math.floor((oe-U-G)/N),ge=Math.floor((P-U-G)/N);const fe=oe-U-G-ie*N,pe=P-U-G-ge*N;fe>N-G&&(ie=ie+1),pe<G&&(ge=ge-1);const Ce=Math.max(0,ie),$e=Math.min(t.value-1,ge);let Ke=Math.floor((V-ee-G)/s.value),Ne=Math.floor((F-ee-G)/s.value);const tt=V-ee-G-Ke*s.value,Ge=F-ee-G-Ne*s.value,Ze=Math.floor((n.value-G)/s.value);tt>s.value-G&&(Ke=Ke+1),Ge<G&&(Ne=Ne-1);const Pt=Math.max(0,Ke),St=Math.min(Ne,Ze),Nt=r(g.value,Pt,St,Ce,$e),It=document.querySelectorAll(`.file-item-${f}[data-key]`),qt=new Map;It.forEach(Wt=>{const nn=Wt.getAttribute("data-key");nn&&qt.set(nn,Wt)});const Gt=[];if(Nt.forEach(Wt=>{const nn=i(Wt);qt.get(nn)||Gt.push(nn)}),Gt.length>0){const Wt=p.selectionMode||"multiple";v.selectMultiple(Gt,Wt)}},L=J=>{K(J),T(J),A(J),v.setSelectedCount(y.value?.size||0),x.value=!1},D=()=>{let J=[".scroller-"+f];if(c?.value){const{viewport:j}=c.value.elements();j&&(J=j)}o.value=new D9({selectables:[".file-item-"+f+":not(.vf-explorer-item--unselectable):not(.vf-explorer-item--no-select)"],boundaries:J,selectionContainerClass:"selection-area-container",behaviour:{overlap:"invert",intersect:"touch",startThreshold:0,triggers:[0],scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:10}}},features:{touch:!0,range:!0,deselectOnBlur:!0,singleTap:{allow:!1,intersect:"native"}}}),o.value.on("beforestart",z),o.value.on("start",ve),o.value.on("move",W),o.value.on("stop",L)},ne=()=>{o.value&&(o.value.destroy(),o.value=null)},le=()=>{o.value&&(Array.from(y.value??new Set).forEach(J=>{M(J)||v.deselect(J)}),ne(),D())},je=J=>{S.value&&(o.value?.clearSelection(),X(),S.value=!1);const j=J;!b.value.size&&!S.value&&!j?.ctrlKey&&!j?.metaKey&&(v.clearSelection(),o.value?.clearSelection())};return xt(()=>{const J=j=>{!j.buttons&&x.value&&(x.value=!1)};document.addEventListener("dragleave",J),Tn(()=>{document.removeEventListener("dragleave",J)})}),{explorerId:f,isDragging:x,initializeSelectionArea:D,updateSelectionArea:le,handleContentClick:je}}function ute(e){const t=n=>{if(!n)return{typeAllowed:!1,mimeAllowed:!1};const r=e.selectionFilterType,i=e.selectionFilterMimeIncludes,o=!r||r==="both"||r==="files"&&n.type==="file"||r==="dirs"&&n.type==="dir";let s=!0;return i&&Array.isArray(i)&&i.length>0&&(n.type==="dir"?s=!0:n.mime_type?s=i.some(l=>n.mime_type.startsWith(l)):s=!1),{typeAllowed:o,mimeAllowed:s}};return{isItemSelectable:t,canSelectItem:n=>{const{typeAllowed:r,mimeAllowed:i}=t(n);return r&&i}}}function dte(e){const t=n=>({item:n,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:t,openItem:(n,r,i)=>{const o=t(n);if(n.type==="file"&&r){if(e.emitter.emit("vf-file-dclick",o),o.defaultPrevented)return}else if(n.type==="dir"&&i&&(e.emitter.emit("vf-folder-dclick",o),o.defaultPrevented))return;const s=e.contextMenuItems?.find(l=>l.show(e,{items:[n],target:n,searchQuery:""}));s&&s.action(e,[n])}}}function fte(e,t,n,r,i,o,s){const l=e.fs,{canSelectItem:c}=ute(e),{openItem:d}=dte(e),f=v=>{const y=v.target?.closest(".file-item-"+t);if(!y)return null;const g=String(y.getAttribute("data-key")),m=n.value?.find(b=>Jt(b)===g);return{key:g,item:m}},p=()=>{const v=r.value;return n.value?.filter(y=>v?.has(Jt(y)))||[]};return{handleItemClick:v=>{const y=f(v);if(!y)return;const{key:g,item:m}=y,b=v;if(!c(m)){m?.type==="dir"&&(l.clearSelection(),i.value?.clearSelection(!0,!0),l.setSelectedCount(0));return}const x=e.selectionMode||"multiple";!b?.ctrlKey&&!b?.metaKey&&(v.type!=="touchstart"||!l.isSelected(g))&&(l.clearSelection(),i.value?.clearSelection(!0,!0)),i.value?.resolveSelectables(),v.type==="touchstart"&&l.isSelected(g)?l.select(g,x):l.toggleSelect(g,x),l.setSelectedCount(r.value?.size||0)},handleItemDblClick:v=>{const y=f(v);if(!y)return;const{item:g}=y;g&&(g.type==="file"&&!c(g)||d(g,o,s))},handleItemContextMenu:v=>{v.preventDefault(),v.stopPropagation();const y=f(v);if(!y)return;const{key:g,item:m}=y;c(m)&&(r.value?.has(g)||(l.clearSelection(),l.select(g)),e.emitter.emit("vf-contextmenu-show",{event:v,items:p(),target:m}))},handleContentContextMenu:v=>{v.preventDefault(),e.emitter.emit("vf-contextmenu-show",{event:v,items:p()})},getSelectedItems:p}}function pte(e,t){const n=re(null);return xt(()=>{if(Hr.plugin([i9]),e.value){const r=Hr(e.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:i=>{n.value=i;const{viewport:o}=i.elements();o&&o.addEventListener("scroll",t)},updated:i=>{const{viewport:o}=i.elements()}});n.value=r}}),Tn(()=>{if(n.value){const{viewport:r}=n.value.elements();r&&r.removeEventListener("scroll",t),n.value.destroy(),n.value=null}}),{osInstance:n}}const hte=4,mte=600;function vte(e,t){const n=re(null),r=new WeakMap,i=new WeakMap;return xt(()=>{e.value&&(n.value=new Ho({elements_selector:".lazy",container:e.value,restore_on_error:!0,callback_error:(o,s)=>{const l=(r.get(o)??0)+1;if(l>hte)return;r.set(o,l);const c=mte*2**(l-1)+Math.random()*250,d=i.get(o);d&&clearTimeout(d),i.set(o,setTimeout(()=>{o.isConnected&&(Ho.resetStatus(o),s.update())},c))}})),t?.emitter&&t.emitter.on("vf-refresh-thumbnails",()=>{n.value&&n.value.update()})}),$w(()=>{n.value&&n.value.update()}),Tn(()=>{n.value&&(n.value.destroy(),n.value=null)}),{vfLazyLoad:n}}const gte={class:"vuefinder__explorer__container"},_te={key:0,class:"vuefinder__linear-loader"},yte=ze({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(e){const t=e,n=rt(),r=hl(n,["vuefinder__drag-over"]),i=_i("dragImage"),o=yn(null),s=_i("scrollContainer"),l=_i("scrollContent"),c=n.fs,d=n.config,f=Qe(d.state),p=Qe(c.sortedFiles),v=Qe(c.selectedKeys),y=Qe(c.loading),g=N=>v.value?.has(N)??!1,m=se(()=>{if(f.value?.view==="grid"){const ge=f.value?.gridItemHeight??80,fe=f.value?.gridItemGap??8;return ge+fe*2}const N=f.value?.listItemHeight??32,ie=f.value?.listItemGap??2;return N+ie*2}),b=se(()=>{if(f.value?.view==="grid"){const N=f.value?.gridItemWidth??96,ie=f.value?.gridItemGap??8;return N+ie*2}return 104}),x=se(()=>f.value?.view==="grid"?(f.value?.gridItemGap??8)*2:0),{t:S}=n.i18n,{itemsPerRow:O,totalHeight:T,visibleRows:A,handleScroll:M,getRowItems:z,getItemsInRange:Y,updateItemsPerRow:ve}=lte(se(()=>p.value??[]),{scrollContainer:s,itemWidth:b,rowHeight:m,overscan:2,containerPadding:x,lockItemsPerRow:se(()=>f.value.view==="list")}),{osInstance:W}=pte(s,M),{explorerId:X,isDragging:K,initializeSelectionArea:L,updateSelectionArea:D,handleContentClick:ne}=cte({itemsPerRow:O,totalHeight:T,getItemsInRange:Y,getKey:N=>Jt(N),selectionObject:o,rowHeight:m,itemWidth:b,osInstance:W}),le=re(null),je=N=>{if(!N||!le.value)return!1;const ie=v.value?.has(le.value)??!1;return K.value&&(ie?v.value?.has(N)??!1:N===le.value)};He(()=>d.get("view"),N=>{N==="list"?O.value=1:ve()},{immediate:!0}),He(O,N=>{d.get("view")==="list"&&N!==1&&(O.value=1)});const J=N=>p.value?.[N];vte(s,n);const{handleItemClick:j,handleItemDblClick:de,handleItemContextMenu:U,handleContentContextMenu:ee}=fte(n,X,p,v,o,t.onFileDclick,t.onFolderDclick);xt(()=>{const N=()=>{o.value||L(),o.value&&o.value.on("beforestart",({event:ie})=>{const ge=ie?.target===l.value;if(!ie?.metaKey&&!ie?.ctrlKey&&!ie?.altKey&&!ge)return!1})};if(W.value)N();else{const ie=setInterval(()=>{W.value&&(clearInterval(ie),N())},50);setTimeout(()=>{clearInterval(ie),o.value||N()},500)}He(()=>[n.selectionFilterType,n.selectionFilterMimeIncludes],D,{deep:!0})});const Q=N=>{if(!(n.features?.move??!1)||N.altKey||N.ctrlKey||N.metaKey)return N.preventDefault(),!1;K.value=!0;const ie=N.target?.closest(".file-item-"+X);if(le.value=ie?String(ie.dataset.key):null,N.dataTransfer&&le.value){N.dataTransfer.setDragImage(i.value,0,15),N.dataTransfer.effectAllowed="all",N.dataTransfer.dropEffect="copy";const ge=v.value?.has(le.value)?Array.from(v.value):[le.value];N.dataTransfer.setData("items",JSON.stringify(ge)),c.setDraggedItem(le.value)}},B=()=>{le.value=null};let oe=null,V=null;const P=N=>{N.target?.closest(".file-item-"+X)||(V=N,oe&&clearTimeout(oe),oe=setTimeout(()=>{V&&(V.cancelable&&V.preventDefault(),V.stopPropagation(),ee(V)),V=null,oe=null},500))},F=N=>{oe&&(clearTimeout(oe),oe=null),V=null},G=N=>{if(!V)return;const ie=V.touches[0]||V.changedTouches[0],ge=N.touches[0]||N.changedTouches[0];if(ie&&ge){const fe=Math.abs(ge.clientX-ie.clientX),pe=Math.abs(ge.clientY-ie.clientY);(fe>15||pe>15)&&(oe&&(clearTimeout(oe),oe=null),V=null)}};return(N,ie)=>(C(),R("div",gte,[w(f).view==="list"?(C(),Ee(ate,{key:0})):Se("",!0),_("div",{ref_key:"scrollContainer",ref:s,class:Be(["vuefinder__explorer__selector-area","scroller-"+w(X)])},[w(d).get("loadingIndicator")==="linear"&&w(y)?(C(),R("div",_te)):Se("",!0),_("div",{ref_key:"scrollContent",ref:l,class:"scrollContent vuefinder__explorer__scroll-content",style:an({height:`${w(T)}px`,position:"relative",width:"100%"}),onContextmenu:ie[0]||(ie[0]=ht((...ge)=>w(ee)&&w(ee)(...ge),["self","prevent"])),onClick:ie[1]||(ie[1]=ht((...ge)=>w(ne)&&w(ne)(...ge),["self"])),onTouchstartCapture:ht(P,["self"]),onTouchendCapture:ht(F,["self"]),onTouchmoveCapture:ht(G,["self"]),onTouchcancelCapture:ht(F,["self"])},[_("div",{ref_key:"dragImage",ref:i,class:"vuefinder__explorer__drag-item"},[Z(Dee,{count:le.value&&w(v).has(le.value)?w(v).size:1},null,8,["count"])],512),w(f).view==="grid"?(C(!0),R(We,{key:0},ut(w(A),ge=>(C(),Ee(tw,{key:ge,"row-index":ge,"row-height":m.value,view:"grid","items-per-row":w(O),items:w(z)(w(p),ge),"show-thumbnails":w(f).showThumbnails,"is-dragging-item":je,"is-selected":g,"drag-n-drop-events":fe=>w(r).events(fe),"explorer-id":w(X),onClick:w(j),onDblclick:w(de),onContextmenu:w(U),onDragstart:Q,onDragend:B},{icon:Le(fe=>[mt(N.$slots,"icon",Ot({ref_for:!0},fe))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(C(!0),R(We,{key:1},ut(w(A),ge=>(C(),Ee(tw,{key:ge,"row-index":ge,"row-height":m.value,view:"list",items:J(ge)?[J(ge)]:[],"is-dragging-item":je,"is-selected":g,"drag-n-drop-events":fe=>w(r).events(fe),"explorer-id":w(X),onClick:w(j),onDblclick:w(de),onContextmenu:w(U),onDragstart:Q,onDragend:B},{icon:Le(fe=>[mt(N.$slots,"icon",Ot({ref_for:!0},fe))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),bte=["href","download"],wte={class:"vuefinder__context-menu__action vuefinder__context-menu__action--parent"},Ete={class:"vuefinder__context-menu vuefinder__context-menu__submenu"},Ste=["onClick"],Cte=["onClick"],xte=ze({__name:"ContextMenu",setup(e){const t=rt(),n=re(null),r=re([]);let i=null,o=null,s=null,l=[],c=null;const d=Hn({active:!1,items:[],positions:{}});t.emitter.on("vf-context-selected",y=>{r.value=y});const f=y=>y.link(t,r.value),p=y=>{t.emitter.emit("vf-contextmenu-hide"),y.action(t,r.value)};t.emitter.on("vf-contextmenu-show",y=>{const{event:g,items:m,target:b=null}=y||{};d.items=(t.contextMenuItems||[]).filter(x=>x.show(t,{items:m,target:b})).sort((x,S)=>{const O=x.order??1/0,T=S.order??1/0;return O-T}),b?m.length>1&&m.some(x=>x.path===b.path)?t.emitter.emit("vf-context-selected",m):t.emitter.emit("vf-context-selected",[b]):t.emitter.emit("vf-context-selected",[]),v(g)}),t.emitter.on("vf-contextmenu-hide",()=>{d.active=!1,i&&(i(),i=null),s&&(l.forEach(y=>{y===window?window.removeEventListener("scroll",s,!0):y.removeEventListener("scroll",s,!0)}),s=null,l=[]),c&&(document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),c=null),o=null,d.positions={}});const v=async y=>{i&&(i(),i=null);const g=(T=>{if("clientX"in T&&"clientY"in T)return{x:T.clientX,y:T.clientY};const A="touches"in T&&T.touches[0]||"changedTouches"in T&&T.changedTouches[0];return A?{x:A.clientX,y:A.clientY}:{x:0,y:0}})(y);if(o={getBoundingClientRect:()=>({width:0,height:0,x:g.x,y:g.y,top:g.y,left:g.x,right:g.x,bottom:g.y})},d.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},d.active=!0,await gt(),!n.value||!o)return;await new Promise(T=>{requestAnimationFrame(()=>{requestAnimationFrame(T)})});const m=[Da(8),Fa({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),La({padding:16})];let b=0,x=0;try{const T=await Us(o,n.value,{placement:"right-start",strategy:"fixed",middleware:m});b=T.x,x=T.y}catch(T){console.warn("[ContextMenu] Floating UI initial positioning error:",T);return}d.positions={position:"fixed",zIndex:"10001",left:`${b}px`,top:`${x}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{n.value&&(d.positions={...d.positions,opacity:"1",transform:"translateY(0)"})});const S=(T=>{const A=[];let M=T;for(;M&&M!==document.body&&M!==document.documentElement;){const z=window.getComputedStyle(M),Y=z.overflow+z.overflowX+z.overflowY;(Y.includes("scroll")||Y.includes("auto"))&&A.push(M),M=M.parentElement}return A})(n.value);l=[window,...S],s=()=>{d.active&&t.emitter.emit("vf-contextmenu-hide")};const O=s;O&&l.forEach(T=>{T===window?window.addEventListener("scroll",O,!0):T.addEventListener("scroll",O,!0)}),c=T=>{if(!d.active)return;const A=T.target;if(!A||n.value&&n.value.contains(A))return;const M=t.root;M&&M.contains(A)||t.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{c&&(document.addEventListener("mousedown",c,!0),document.addEventListener("touchstart",c,!0))},100),setTimeout(()=>{if(!(!n.value||!o))try{i=Lh(o,n.value,async()=>{if(!(!o||!n.value))try{const{x:T,y:A}=await Us(o,n.value,{placement:"right-start",strategy:"fixed",middleware:m});d.positions={...d.positions,left:`${T}px`,top:`${A}px`}}catch(T){console.warn("Floating UI positioning error:",T)}})}catch(T){console.warn("Floating UI autoUpdate setup error:",T),i=null}},200)};return Tn(()=>{i&&(i(),i=null),s&&(l.forEach(y=>{y===window?window.removeEventListener("scroll",s,!0):y.removeEventListener("scroll",s,!0)}),s=null,l=[]),c&&(document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),c=null),o=null}),(y,g)=>Ct((C(),R("ul",{ref_key:"contextmenu",ref:n,class:Be([{"vuefinder__context-menu--active":d.active,"vuefinder__context-menu--inactive":!d.active},"vuefinder__context-menu"]),style:an(d.positions)},[(C(!0),R(We,null,ut(d.items,m=>(C(),R("li",{key:m.title,class:Be(["vuefinder__context-menu__item",{"vuefinder__context-menu__item--has-children":m.children?.length}])},[m.link?(C(),R("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:f(m),download:f(m),onClick:g[0]||(g[0]=b=>w(t).emitter.emit("vf-contextmenu-hide"))},[_("span",null,q(m.title(w(t).i18n)),1)],8,bte)):m.children?.length?(C(),R(We,{key:1},[_("div",wte,[_("span",null,q(m.title(w(t).i18n)),1),g[1]||(g[1]=_("svg",{class:"vuefinder__context-menu__chevron",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},[_("path",{d:"M6 4l4 4-4 4z"})],-1))]),_("ul",Ete,[(C(!0),R(We,null,ut(m.children,b=>(C(),R("li",{key:b.id,class:"vuefinder__context-menu__item"},[_("div",{class:"vuefinder__context-menu__action",onClick:x=>p(b)},[_("span",null,q(b.title(w(t).i18n)),1)],8,Ste)]))),128))])],64)):(C(),R("div",{key:2,class:"vuefinder__context-menu__action",onClick:b=>p(m)},[_("span",null,q(m.title(w(t).i18n)),1)],8,Cte))],2))),128))],6)),[[Nr,d.active]])}}),Tte={class:"vuefinder__status-bar__wrapper"},kte={class:"vuefinder__status-bar__storage"},Ote=["title"],$te={class:"vuefinder__status-bar__storage-icon"},Ate=["value"],Rte=["value"],Pte={class:"vuefinder__status-bar__info space-x-2"},Ite={key:0},Mte={key:1},Dte={key:0,class:"vuefinder__status-bar__size"},Fte={class:"vuefinder__status-bar__actions"},Lte=ze({__name:"Statusbar",setup(e){const t=rt(),{t:n}=t.i18n,r=t.fs,i=Qe(r.sortedFiles),o=Qe(r.path),s=Qe(r.selectedCount),l=Qe(r.storages),c=Qe(r.selectedItems),d=Qe(r.path),f=b=>{const x=b.target.value;t.adapter.open(x+"://")},p=se(()=>!c.value||c.value.length===0?0:c.value.reduce((b,x)=>b+(x.file_size||0),0)),v=se(()=>l.value),y=se(()=>i.value),g=se(()=>s.value||0),m=se(()=>c.value||[]);return(b,x)=>(C(),R("div",Tte,[_("div",kte,[_("div",{class:"vuefinder__status-bar__storage-container",title:w(n)("Storage")},[_("div",$te,[Z(w(Qm))]),_("select",{name:"vuefinder-media-selector",value:w(o).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:f},[(C(!0),R(We,null,ut(v.value,S=>(C(),R("option",{key:S,value:S},q(S),9,Rte))),128))],40,Ate),x[0]||(x[0]=_("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,Ote),_("div",Pte,[g.value===0?(C(),R("span",Ite,q(y.value.length)+" "+q(w(n)("items")),1)):(C(),R("span",Mte,[Et(q(g.value)+" "+q(w(n)("selected"))+" ",1),p.value?(C(),R("span",Dte,q(w(t).filesize(p.value)),1)):Se("",!0)]))])]),_("div",Fte,[mt(b.$slots,"actions",{path:w(d).path,count:g.value||0,selected:m.value})])]))}}),jte={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function Ute(e,t){return C(),R("svg",jte,[...t[0]||(t[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1)])])}const Nte={render:Ute};function c2(e,t){const n=e.findIndex(r=>r.path===t.path);n>-1?e[n]=t:e.push(t)}const zte={class:"vuefinder__folder-loader-indicator"},Bte={key:1,class:"vuefinder__folder-loader-indicator--icon"},u2=ze({__name:"FolderLoaderIndicator",props:kw({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=rt(),r=Ph(e,"modelValue"),i=re(!1);He(()=>r.value,()=>o());const o=async()=>{i.value=!0;try{const s=(await n.adapter.list(t.path)).files.filter(l=>l.type==="dir");c2(n.treeViewData,{path:t.path,type:"dir",folders:s})}catch(s){bn(s,"Failed to fetch subfolders")}finally{i.value=!1}};return(s,l)=>(C(),R("div",zte,[i.value?(C(),Ee(w(rd),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(C(),R("div",Bte,[r.value?(C(),Ee(w(td),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):Se("",!0),r.value?Se("",!0):(C(),Ee(w(ed),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),Vte={key:0},Hte={class:"vuefinder__treesubfolderlist__no-folders"},qte={class:"vuefinder__treesubfolderlist__item-content"},Wte=["onClick"],Yte=["title","onDblclick","onClick"],Kte={class:"vuefinder__treesubfolderlist__item-icon"},Gte={class:"vuefinder__treesubfolderlist__subfolder"},Qte={key:1,class:"vuefinder__treesubfolderlist__more-note"},Xte=ze({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(e){const t=rt(),n=t.fs,r=hl(t,["vuefinder__drag-over"]),i=re({}),o=t.config,s=Qe(o.state),{t:l}=t.i18n,c=Qe(n.path),d=e,f=re(null),p=re(50);xt(()=>{d.path===d.storage+"://"&&f.value&&Hr(f.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const v=se(()=>{const S=t.treeViewData.find(O=>O.path===d.path)?.folders||[];return S.length>p.value?S.slice(0,p.value):S}),y=se(()=>t.treeViewData.find(S=>S.path===d.path)?.folders?.length||0),g=se(()=>y.value>p.value),m=se(()=>`${d.storage}://`),b=(S,O)=>S===O||S.startsWith(`${O}/`);He(v,S=>{const O=s.value.expandTreeByDefault&&d.path===m.value,T=s.value.expandedTreePaths||[];S.forEach(A=>{const M=T.some(z=>b(z,A.path));(O||M)&&i.value[A.path]===void 0&&(i.value[A.path]=!0)})},{immediate:!0});const x=()=>{p.value+=50};return(S,O)=>{const T=ft("TreeSubfolderList",!0);return C(),R("ul",{ref_key:"parentSubfolderList",ref:f,class:"vuefinder__treesubfolderlist__container"},[v.value.length?Se("",!0):(C(),R("li",Vte,[_("div",Hte,q(w(l)("No folders")),1)])),(C(!0),R(We,null,ut(v.value,A=>(C(),R("li",{key:A.path,class:"vuefinder__treesubfolderlist__item"},[_("div",qte,[_("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:M=>i.value[A.path]=!i.value[A.path]},[Z(u2,{modelValue:i.value[A.path],"onUpdate:modelValue":M=>i.value[A.path]=M,storage:e.storage,path:A.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,Wte),_("div",Ot({class:"vuefinder__treesubfolderlist__item-link",title:A.path},ni(w(r).events({...A,dir:A.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:M=>i.value[A.path]=!i.value[A.path],onClick:M=>w(t).adapter.open(A.path)}),[_("div",Kte,[w(c)?.path===A.path?(C(),Ee(w(nd),{key:0,class:"vuefinder__item-icon__folder--open"})):(C(),Ee(w(ar),{key:1,class:"vuefinder__item-icon__folder"}))]),_("div",{class:Be(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":w(c).path===A.path}])},q(A.basename),3)],16,Yte)]),_("div",Gte,[Ct(Z(T,{storage:d.storage,path:A.path},null,8,["storage","path"]),[[Nr,i.value[A.path]]])])]))),128)),g.value?(C(),R("li",Qte,[_("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:x},q(w(l)("load more")),1)])):Se("",!0)],512)}}}),Jte=ze({__name:"TreeStorageItem",props:{storage:{}},setup(e){const t=rt(),n=t.fs,r=t.config,i=e,o=Qe(r.state),s=se(()=>{const y=o.value.expandedTreePaths||[],g=`${i.storage}://`;return y.some(m=>m===g||m.startsWith(`${g}`))}),l=re(o.value.expandTreeByDefault||s.value),c=hl(t,["vuefinder__drag-over"]),d=Qe(n.path),f=se(()=>i.storage===d.value?.storage);He(()=>({expandTreeByDefault:o.value.expandTreeByDefault,hasExpandedPathInStorage:s.value}),y=>{(y.expandTreeByDefault||y.hasExpandedPathInStorage)&&(l.value=!0)});const p={storage:i.storage,path:i.storage+"://",dir:i.storage+"://",type:"dir",basename:i.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function v(y){y===d.value?.storage?l.value=!l.value:t.adapter.open(y+"://")}return(y,g)=>(C(),R(We,null,[_("div",{class:"vuefinder__treestorageitem__header",onClick:g[2]||(g[2]=m=>v(e.storage))},[_("div",Ot({class:["vuefinder__treestorageitem__info",f.value?"vuefinder__treestorageitem__info--active":""]},ni(w(c).events(p),!0)),[_("div",{class:Be(["vuefinder__treestorageitem__icon",f.value?"vuefinder__treestorageitem__icon--active":""])},[Z(w(Qm))],2),_("div",null,q(e.storage),1)],16),_("div",{class:"vuefinder__treestorageitem__loader",onClick:g[1]||(g[1]=ht(m=>l.value=!l.value,["stop"]))},[Z(u2,{modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),storage:e.storage,path:e.storage+"://"},null,8,["modelValue","storage","path"])])]),Ct(Z(Xte,{storage:e.storage,path:e.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[Nr,l.value]])],64))}}),Zte={class:"vuefinder__folder-indicator"},ene={class:"vuefinder__folder-indicator--icon"},tne=ze({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ph(e,"modelValue");return(n,r)=>(C(),R("div",Zte,[_("div",ene,[t.value?(C(),Ee(w(td),{key:0,class:"vuefinder__folder-indicator--minus"})):Se("",!0),t.value?Se("",!0):(C(),Ee(w(ed),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),nne={key:0,class:"vuefinder__treeview__header"},rne={class:"vuefinder__treeview__pinned-label"},ine={class:"vuefinder__treeview__pin-text text-nowrap"},one={key:0,class:"vuefinder__treeview__pinned-list"},sne=["onClick"],ane=["title"],lne=["onClick"],cne={key:0},une={class:"vuefinder__treeview__no-pinned"},dne=ze({__name:"TreeView",setup(e){const t=rt(),{enabled:n}=fr(),{t:r}=t.i18n,{getStore:i,setStore:o}=t.storage,s=t.fs,l=t.config,c=Qe(l.state),d=Qe(s.sortedFiles),f=Qe(s.storages),p=se(()=>f.value||[]),v=Qe(s.path),y=hl(t,["vuefinder__drag-over"]),g=re(190),m=re(i("pinned-folders-opened",!0));He(m,O=>o("pinned-folders-opened",O));const b=O=>{const T=l.get("pinnedFolders");l.set("pinnedFolders",T.filter(A=>A.path!==O.path))},x=O=>{const T=O.clientX,A=O.target.parentElement;if(!A)return;const M=A.getBoundingClientRect().width;A.classList.remove("transition-[width]"),A.classList.add("transition-none");const z=ve=>{g.value=M+ve.clientX-T,g.value<50&&(g.value=0,l.set("showTreeView",!1)),g.value>50&&l.set("showTreeView",!0)},Y=()=>{const ve=A.getBoundingClientRect();g.value=ve.width,A.classList.add("transition-[width]"),A.classList.remove("transition-none"),window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",Y)};window.addEventListener("mousemove",z),window.addEventListener("mouseup",Y)},S=re(null);return xt(()=>{S.value&&Hr(S.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),He(d,O=>{const T=O.filter(A=>A.type==="dir");c2(t.treeViewData,{path:v.value.path||"",folders:T.map(A=>({storage:A.storage,path:A.path,basename:A.basename,type:"dir"}))})}),(O,T)=>(C(),R(We,null,[_("div",{class:Be(["vuefinder__treeview__overlay",w(c).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:T[0]||(T[0]=A=>w(l).toggle("showTreeView"))},null,2),_("div",{style:an(w(c).showTreeView?"min-width:100px;max-width:75%; width: "+g.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[_("div",{ref_key:"treeViewScrollElement",ref:S,class:"vuefinder__treeview__scroll"},[w(n)("pinned")?(C(),R("div",nne,[_("div",{class:"vuefinder__treeview__pinned-toggle",onClick:T[2]||(T[2]=A=>m.value=!m.value)},[_("div",rne,[Z(w(Qa),{class:"vuefinder__treeview__pin-icon"}),_("div",ine,q(w(r)("Pinned Folders")),1)]),Z(tne,{modelValue:m.value,"onUpdate:modelValue":T[1]||(T[1]=A=>m.value=A)},null,8,["modelValue"])]),m.value?(C(),R("ul",one,[(C(!0),R(We,null,ut(w(c).pinnedFolders,A=>(C(),R("li",{key:A.path,class:"vuefinder__treeview__pinned-item"},[_("div",Ot({class:"vuefinder__treeview__pinned-folder"},ni(w(y).events(A),!0),{onClick:M=>w(t).adapter.open(A.path)}),[w(v).path!==A.path?(C(),Ee(w(ar),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):Se("",!0),w(v).path===A.path?(C(),Ee(w(nd),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):Se("",!0),_("div",{title:A.path,class:Be(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":w(v).path===A.path}])},q(A.basename),11,ane)],16,sne),_("div",{class:"vuefinder__treeview__remove-folder",onClick:M=>b(A)},[Z(w(Nte),{class:"vuefinder__treeview__remove-icon"})],8,lne)]))),128)),w(c).pinnedFolders.length?Se("",!0):(C(),R("li",cne,[_("div",une,q(w(r)("No folders pinned")),1)]))])):Se("",!0)])):Se("",!0),(C(!0),R(We,null,ut(p.value,A=>(C(),R("div",{key:A,class:"vuefinder__treeview__storage"},[Z(Jte,{storage:A},null,8,["storage"])]))),128))],512),_("div",{class:"vuefinder__treeview__resize-handle",onMousedown:x},null,32)],4)],64))}}),hn={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",openAs:"openAs",openAsText:"openAsText",openAsImage:"openAsImage",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function fne(e){return e.items.length>1&&e.items.some(t=>t.path===e.target?.path)?"many":e.target?"one":"none"}function sn(e){const t=Object.assign({needsSearchQuery:!1},e);return(n,r)=>!(t.needsSearchQuery!==!!r.searchQuery||t.target!==void 0&&t.target!==fne(r)||t.targetType!==void 0&&t.targetType!==r.target?.type||t.mimeType!==void 0&&t.mimeType!==r.target?.mime_type||t.feature!==void 0&&!(n.features[t.feature]??!1))}function Oa(...e){return(t,n)=>e.some(r=>r(t,n))}function Cs(...e){return(t,n)=>e.every(r=>r(t,n))}const d2=[{id:hn.openDir,title:({t:e})=>e("Open containing folder"),action:(e,t)=>{const n=t[0];n&&e.adapter.open(n.dir)},show:sn({target:"one",needsSearchQuery:!0}),order:10},{id:hn.refresh,title:({t:e})=>e("Refresh"),action:e=>{const t=e.fs;e.adapter.invalidateListQuery(t.path.get().path),e.adapter.open(t.path.get().path)},show:Oa(sn({target:"none"}),sn({target:"many"})),order:20},{id:hn.selectAll,title:({t:e})=>e("Select All"),action:e=>{e.fs.selectAll(e.selectionMode||"multiple")},show:(e,t)=>e.selectionMode==="multiple"&&sn({target:"none"})(e,t),order:30},{id:hn.new_folder,title:({t:e})=>e("New Folder"),action:e=>e.modal.open(ev),show:sn({target:"none",feature:"newfolder"}),order:40},{id:hn.open,title:({t:e})=>e("Open"),action:(e,t)=>{t[0]&&e.adapter.open(t[0].path)},show:sn({target:"one",targetType:"dir"}),order:50},{id:hn.pinFolder,title:({t:e})=>e("Pin Folder"),action:(e,t)=>{const n=e.config,r=n.get("pinnedFolders"),i=r.concat(t.filter(o=>r.findIndex(s=>s.path===o.path)===-1));n.set("pinnedFolders",i)},show:Cs(sn({target:"one",targetType:"dir",feature:"pinned"}),(e,t)=>e.config.get("pinnedFolders").findIndex(n=>n.path===t.target?.path)===-1),order:60},{id:hn.unpinFolder,title:({t:e})=>e("Unpin Folder"),action:(e,t)=>{const n=e.config,r=n.get("pinnedFolders");n.set("pinnedFolders",r.filter(i=>!t.find(o=>o.path===i.path)))},show:Cs(sn({target:"one",targetType:"dir",feature:"pinned"}),(e,t)=>e.config.get("pinnedFolders").findIndex(n=>n.path===t.target?.path)!==-1),order:70},{id:hn.preview,title:({t:e})=>e("Preview"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0]}),show:Cs(sn({target:"one",feature:"preview"}),(e,t)=>t.target?.type!=="dir"),order:80},{id:hn.openAs,title:({t:e})=>e("Preview as"),action:()=>{},children:[{id:hn.openAsText,title:({t:e})=>e("Text"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0],forceType:"text"}),show:()=>!0},{id:hn.openAsImage,title:({t:e})=>e("Image"),action:(e,t)=>e.modal.open(qi,{storage:t[0]?.storage,item:t[0],forceType:"image"}),show:()=>!0}],show:Cs(sn({target:"one",feature:"preview"}),(e,t)=>t.target?.type!=="dir"),order:81},{id:hn.download,link:(e,t)=>{if(t[0])return e.adapter.getDownloadUrl(t[0])},title:({t:e})=>e("Download"),action:()=>{},show:Cs(sn({target:"one",feature:"download"}),(e,t)=>t.target?.type!=="dir"),order:90},{id:hn.rename,title:({t:e})=>e("Rename"),action:(e,t)=>e.modal.open(Zu,{items:t}),show:sn({target:"one",feature:"rename"}),order:100},{id:hn.move,title:({t:e})=>e("Move files"),action:(e,t)=>{const n=e.fs,r={storage:n.path.get().storage||"",path:n.path.get().path||"",type:"dir"};e.modal.open(Xs,{items:{from:t,to:r}})},show:Oa(sn({target:"one",feature:"move"}),sn({target:"many",feature:"move"})),order:110},{id:hn.copy,title:({t:e})=>e("Copy"),action:(e,t)=>{t.length>0&&e.fs.setClipboard("copy",new Set(t.map(n=>Jt(n))))},show:Oa(sn({target:"one",feature:"copy"}),sn({target:"many",feature:"copy"})),order:120},{id:hn.paste,title:({t:e})=>e("Paste"),action:(e,t)=>{const n=e.fs.getClipboard();if(n?.items?.size>0){const r=e.fs.path.get();let i=r.path,o=r.storage;t.length===1&&t[0]?.type==="dir"&&(i=t[0].path,o=t[0].storage);const s={storage:o||"",path:i||"",type:"dir"};e.modal.open(n.type==="cut"?Xs:Xm,{items:{from:Array.from(n.items),to:s}})}},show:(e,t)=>e.features?.copy??!1?e.fs.getClipboard()?.items?.size>0:!1,order:130},{id:hn.archive,title:({t:e})=>e("Archive"),action:(e,t)=>e.modal.open(rv,{items:t}),show:Oa(sn({target:"many",feature:"archive"}),Cs(sn({target:"one",feature:"archive"}),(e,t)=>t.target?.mime_type!=="application/zip")),order:140},{id:hn.unarchive,title:({t:e})=>e("Unarchive"),action:(e,t)=>e.modal.open(nv,{items:t}),show:sn({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:hn.delete,title:({t:e})=>e("Delete"),action:(e,t)=>{e.modal.open(Ju,{items:t})},show:Oa(sn({feature:"delete",target:"one"}),sn({feature:"delete",target:"many"})),order:160}],pne=["data-theme"],hne={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},mne={class:"vuefinder__external-drop-message"},vne={class:"vuefinder__main__content"},gne=ze({__name:"VueFinderView",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean},locale:{},contextMenuItems:{},selectionMode:{},selectionFilterType:{},selectionFilterMimeIncludes:{},onError:{type:Function},onSelect:{type:Function},onPathChange:{type:Function},onUploadComplete:{type:Function},onDeleteComplete:{type:Function},onNotify:{type:Function},onReady:{type:Function},onFileDclick:{type:Function},onFolderDclick:{type:Function},customUploader:{type:Function}},emits:["select","path-change","upload-complete","delete-complete","notify","error","ready","file-dclick","folder-dclick","update:locale"],setup(e,{emit:t}){const n=t,r=e,i=rt(),o=_i("root"),s=i.config;He(()=>r.features,S=>{const O=LC(S);Object.keys(i.features).forEach(T=>{delete i.features[T]}),Object.assign(i.features,O)},{deep:!0});const l=i.fs,c=Qe(i.i18n.localeAtom),d=Qe(s.state),f=se(()=>{const S=d.value;return{"--vf-grid-item-width":`${S.gridItemWidth}px`,"--vf-grid-item-height":`${S.gridItemHeight}px`,"--vf-grid-item-gap":`${S.gridItemGap}px`,"--vf-grid-icon-size":`${S.gridIconSize}px`,"--vf-list-item-height":`${S.listItemHeight}px`,"--vf-list-item-gap":`${S.listItemGap}px`,"--vf-list-icon-size":`${S.listIconSize}px`}});NQ();const{isDraggingExternal:p,handleDragEnter:v,handleDragOver:y,handleDragLeave:g,handleDrop:m}=zQ();function b(S){l.setPath(S.dirname),s.get("persist")&&s.set("path",S.dirname),l.setReadOnly(S.read_only??!1),i.modal.close(),l.setFiles(S.files),l.clearSelection(),l.setSelectedCount(0),l.setStorages(S.storages)}i.adapter.onBeforeOpen=()=>{l.setLoading(!0)},i.adapter.onAfterOpen=S=>{b(S),l.setLoading(!1)},i.emitter.on("vf-fetch-abort",()=>{i.adapter.cancelOpen(),l.setLoading(!1)}),i.emitter.on("vf-upload-complete",S=>{n("upload-complete",S)}),i.emitter.on("vf-delete-complete",S=>{n("delete-complete",S)}),i.emitter.on("vf-notify",S=>{n("notify",S);const{type:O,message:T}=S??{};O==="error"&&n("error",T)}),i.emitter.on("vf-file-dclick",S=>{n("file-dclick",S)}),i.emitter.on("vf-folder-dclick",S=>{n("folder-dclick",S)}),He(()=>r.config?.theme,S=>{S&&s.set("theme",w(S))},{immediate:!0}),He(c,(S,O)=>{S!==O&&n("update:locale",String(S))},{immediate:!1}),xt(()=>{i.root=o.value,He(()=>s.get("path"),O=>{i.adapter.open(O)});const S=s.get("persist")?s.get("path"):s.get("initialPath")??"";l.setPath(S),i.adapter.open(S),l.path.listen(O=>{n("path-change",O.path)}),l.selectedItems.listen(O=>{n("select",O)}),n("ready")});const x=async S=>{const O=await m(S);O.length>0&&(i.modal.open(tv),setTimeout(()=>{i.emitter.emit("vf-external-files-dropped",O.map(T=>T.file))},100))};return(S,O)=>(C(),R("div",{ref_key:"root",ref:o,tabindex:"0",class:Be(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":w(p)}]),"data-theme":w(i).theme.current,style:an(f.value),onDragenter:O[2]||(O[2]=(...T)=>w(v)&&w(v)(...T)),onDragover:O[3]||(O[3]=(...T)=>w(y)&&w(y)(...T)),onDragleave:O[4]||(O[4]=(...T)=>w(g)&&w(g)(...T)),onDrop:x},[_("div",{class:Be(w(i).theme.current),style:{height:"100%",width:"100%"}},[_("div",{class:Be([w(d)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:O[0]||(O[0]=T=>w(i).emitter.emit("vf-contextmenu-hide")),onTouchstart:O[1]||(O[1]=T=>w(i).emitter.emit("vf-contextmenu-hide"))},[w(p)?(C(),R("div",hne,[_("div",mne,q(w(i).i18n.t("Drag and drop the files/folders to here.")),1)])):Se("",!0),w(d).showMenuBar?(C(),Ee(qJ,{key:1})):Se("",!0),w(d).showToolbar?(C(),Ee(YZ,{key:2})):Se("",!0),Z(Aee),_("div",vne,[Z(dne),Z(yte,{"on-file-dclick":r.onFileDclick,"on-folder-dclick":r.onFolderDclick},{icon:Le(T=>[mt(S.$slots,"icon",ii(Vi(T)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),Z(Lte,null,{actions:Le(T=>[mt(S.$slots,"status-bar",ii(Vi(T)))]),_:3})],34),(C(),Ee(el,{to:"body"},[Z(Tw,{name:"fade"},{default:Le(()=>[w(i).modal.visible?(C(),Ee(Pn(w(i).modal.type),{key:0})):Se("",!0)]),_:1})])),Z(xte,{items:w(d2)},null,8,["items"]),w(d).notificationsEnabled?(C(),Ee(w(uV),{key:0,position:w(d).notificationPosition,duration:w(d).notificationDuration,"visible-toasts":w(d).notificationVisibleToasts,"rich-colors":w(d).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):Se("",!0)],2)],46,pne))}}),_ne=ze({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>d2},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(e){const t=e,n=t.id??Ls(Ch);if(!n)throw new Error('VueFinderProvider requires an "id" prop.');const r=oq(t,Ls("VueFinderOptions")||{});return He(()=>t.config,i=>{if(i){const o={};for(const s in i){const l=w(i[s]);l!==void 0&&(o[s]=l)}r.config.init(o)}},{deep:!0,immediate:!0}),He(()=>t.locale,i=>{i&&r.i18n.localeAtom&&r.i18n.localeAtom.get()!==i&&r.i18n.localeAtom.set(i)},{immediate:!0}),B9(n,r),Aw(Ch,n),ns(()=>{V9(n)}),(i,o)=>(C(),Ee(gne,ii(Vi(t)),{icon:Le(s=>[mt(i.$slots,"icon",ii(Vi(s)))]),"status-bar":Le(s=>[mt(i.$slots,"status-bar",ii(Vi(s)))]),_:3},16))}});function aoe(e){const t=rt(e),n=Qe(t.fs.path),r=se(()=>n.value?.path??""),i=s=>s||t.fs.path.get().path||"",o=s=>{Array.isArray(s.files)&&t.fs.setFiles(s.files)};return{async refresh(){const s=t.fs.path.get().path||"";t.adapter.invalidateListQuery(s),await t.adapter.open(s)},async open(s){await t.adapter.open(s)},preview(s){const l=(t.fs.files.get()||[]).find(c=>c.path===s);!l||l.type!=="file"||t.modal.open(qi,{storage:l.storage,item:l})},notify(s,l){Os(t,s,l)},getPath(){return t.fs.path.get().path||""},path:r,select(s){const l=new Set((t.fs.files.get()||[]).map(d=>d.path)),c=(s||[]).filter(d=>l.has(d));t.fs.setSelection(c)},selectOne(s){new Set((t.fs.files.get()||[]).map(l=>l.path)).has(s)&&t.fs.setSelection([s])},clearSelection(){t.fs.clearSelection()},getSelectedPaths(){return(t.fs.selectedItems.get()||[]).map(s=>s.path)},async createFolder(s,l){const c=await t.adapter.createFolder({path:i(l),name:s});o(c)},async createFile(s,l){const c=await t.adapter.createFile({path:i(l),name:s});o(c)},async delete(s,l){const c=i(l),d=new Map((t.fs.files.get()||[]).map(v=>[v.path,v])),f=(s||[]).map(v=>d.get(v)).filter(v=>!!v).map(v=>({path:v.path,type:v.type})),p=await t.adapter.delete({path:c,items:f});o(p)},async rename(s,l,c){const d=await t.adapter.rename({path:i(c),item:s,name:l});o(d)},async copy(s,l,c){const d=await t.adapter.copy({path:i(c),sources:s,destination:l});o(d)},async move(s,l,c){const d=await t.adapter.move({path:i(c),sources:s,destination:l});o(d)},getFiles(){return t.fs.files.get()||[]},getStorages(){return t.fs.storages.get()||[]},isLoading(){return t.fs.isLoading()},isReadOnly(){return t.fs.getReadOnly()}}}const yne={install(e,t={}){t.i18n=t.i18n??{};const[n]=Object.keys(t.i18n);t.locale=t.locale??n??"en",e.provide("VueFinderOptions",t),e.component("VueFinder",_ne)}};function bne(e){e.use(yne,{i18n:{zhCN:()=>Rt(()=>import("./zhCN-VSAW5gZn.js"),[],import.meta.url),en:()=>Rt(()=>import("./en-DJCBTPEu.js"),[],import.meta.url)}})}function f2(e,t){return function(){return e.apply(t,arguments)}}const{toString:wne}=Object.prototype,{getPrototypeOf:od}=Object,{iterator:sd,toStringTag:p2}=Symbol,ad=(e=>t=>{const n=wne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ci=e=>(e=e.toLowerCase(),t=>ad(t)===e),ld=e=>t=>typeof t===e,{isArray:oa}=Array,Js=ld("undefined");function ml(e){return e!==null&&!Js(e)&&e.constructor!==null&&!Js(e.constructor)&&lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h2=ci("ArrayBuffer");function Ene(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&h2(e.buffer),t}const Sne=ld("string"),lr=ld("function"),m2=ld("number"),vl=e=>e!==null&&typeof e=="object",Cne=e=>e===!0||e===!1,ru=e=>{if(ad(e)!=="object")return!1;const t=od(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(p2 in e)&&!(sd in e)},xne=e=>{if(!vl(e)||ml(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Tne=ci("Date"),kne=ci("File"),One=e=>!!(e&&typeof e.uri<"u"),$ne=e=>e&&typeof e.getParts<"u",Ane=ci("Blob"),Rne=ci("FileList"),Pne=e=>vl(e)&&lr(e.pipe);function Ine(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const nw=Ine(),rw=typeof nw.FormData<"u"?nw.FormData:void 0,Mne=e=>{if(!e)return!1;if(rw&&e instanceof rw)return!0;const t=od(e);if(!t||t===Object.prototype||!lr(e.append))return!1;const n=ad(e);return n==="formdata"||n==="object"&&lr(e.toString)&&e.toString()==="[object FormData]"},Dne=ci("URLSearchParams"),[Fne,Lne,jne,Une]=["ReadableStream","Request","Response","Headers"].map(ci),Nne=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oa(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ml(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let l;for(r=0;r<s;r++)l=o[r],t.call(null,e[l],l,e)}}function v2(e,t){if(ml(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const qo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,g2=e=>!Js(e)&&e!==qo;function kh(){const{caseless:e,skipUndefined:t}=g2(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&v2(n,o)||o;ru(n[s])&&ru(i)?n[s]=kh(n[s],i):ru(i)?n[s]=kh({},i):oa(i)?n[s]=i.slice():(!t||!Js(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&gl(arguments[i],r);return n}const zne=(e,t,n,{allOwnKeys:r}={})=>(gl(t,(i,o)=>{n&&lr(i)?Object.defineProperty(e,o,{value:f2(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Bne=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Vne=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Hne=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&od(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qne=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Wne=e=>{if(!e)return null;if(oa(e))return e;let t=e.length;if(!m2(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yne=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&od(Uint8Array)),Kne=(e,t)=>{const r=(e&&e[sd]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Gne=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Qne=ci("HTMLFormElement"),Xne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),iw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jne=ci("RegExp"),_2=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};gl(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Zne=e=>{_2(e,(t,n)=>{if(lr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(lr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ere=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return oa(e)?r(e):r(String(e).split(t)),n},tre=()=>{},nre=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rre(e){return!!(e&&lr(e.append)&&e[p2]==="FormData"&&e[sd])}const ire=e=>{const t=new Array(10),n=(r,i)=>{if(vl(r)){if(t.indexOf(r)>=0)return;if(ml(r))return r;if(!("toJSON"in r)){t[i]=r;const o=oa(r)?[]:{};return gl(r,(s,l)=>{const c=n(s,i+1);!Js(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},ore=ci("AsyncFunction"),sre=e=>e&&(vl(e)||lr(e))&&lr(e.then)&&lr(e.catch),y2=((e,t)=>e?setImmediate:t?((n,r)=>(qo.addEventListener("message",({source:i,data:o})=>{i===qo&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),qo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",lr(qo.postMessage)),are=typeof queueMicrotask<"u"?queueMicrotask.bind(qo):typeof process<"u"&&process.nextTick||y2,lre=e=>e!=null&&lr(e[sd]),me={isArray:oa,isArrayBuffer:h2,isBuffer:ml,isFormData:Mne,isArrayBufferView:Ene,isString:Sne,isNumber:m2,isBoolean:Cne,isObject:vl,isPlainObject:ru,isEmptyObject:xne,isReadableStream:Fne,isRequest:Lne,isResponse:jne,isHeaders:Une,isUndefined:Js,isDate:Tne,isFile:kne,isReactNativeBlob:One,isReactNative:$ne,isBlob:Ane,isRegExp:Jne,isFunction:lr,isStream:Pne,isURLSearchParams:Dne,isTypedArray:Yne,isFileList:Rne,forEach:gl,merge:kh,extend:zne,trim:Nne,stripBOM:Bne,inherits:Vne,toFlatObject:Hne,kindOf:ad,kindOfTest:ci,endsWith:qne,toArray:Wne,forEachEntry:Kne,matchAll:Gne,isHTMLForm:Qne,hasOwnProperty:iw,hasOwnProp:iw,reduceDescriptors:_2,freezeMethods:Zne,toObjectSet:ere,toCamelCase:Xne,noop:tre,toFiniteNumber:nre,findKey:v2,global:qo,isContextDefined:g2,isSpecCompliantForm:rre,toJSONObject:ire,isAsyncFn:ore,isThenable:sre,setImmediate:y2,asap:are,isIterable:lre};let lt=class b2 extends Error{static from(t,n,r,i,o,s){const l=new b2(t.message,n||t.code,r,i,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:me.toJSONObject(this.config),code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";lt.ERR_BAD_OPTION="ERR_BAD_OPTION";lt.ECONNABORTED="ECONNABORTED";lt.ETIMEDOUT="ETIMEDOUT";lt.ERR_NETWORK="ERR_NETWORK";lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";lt.ERR_DEPRECATED="ERR_DEPRECATED";lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";lt.ERR_CANCELED="ERR_CANCELED";lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";lt.ERR_INVALID_URL="ERR_INVALID_URL";lt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cre=null;function Oh(e){return me.isPlainObject(e)||me.isArray(e)}function w2(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function xp(e,t,n){return e?e.concat(t).map(function(i,o){return i=w2(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function ure(e){return me.isArray(e)&&!e.some(Oh)}const dre=me.toFlatObject(me,{},null,function(t){return/^is[A-Z]/.test(t)});function cd(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=me.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,x){return!me.isUndefined(x[b])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,d=l&&me.isSpecCompliantForm(t);if(!me.isFunction(i))throw new TypeError("visitor must be a function");function f(m){if(m===null)return"";if(me.isDate(m))return m.toISOString();if(me.isBoolean(m))return m.toString();if(!d&&me.isBlob(m))throw new lt("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(m)||me.isTypedArray(m)?d&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,b,x){let S=m;if(me.isReactNative(t)&&me.isReactNativeBlob(m))return t.append(xp(x,b,o),f(m)),!1;if(m&&!x&&typeof m=="object"){if(me.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=JSON.stringify(m);else if(me.isArray(m)&&ure(m)||(me.isFileList(m)||me.endsWith(b,"[]"))&&(S=me.toArray(m)))return b=w2(b),S.forEach(function(T,A){!(me.isUndefined(T)||T===null)&&t.append(s===!0?xp([b],A,o):s===null?b:b+"[]",f(T))}),!1}return Oh(m)?!0:(t.append(xp(x,b,o),f(m)),!1)}const v=[],y=Object.assign(dre,{defaultVisitor:p,convertValue:f,isVisitable:Oh});function g(m,b,x=0){if(!me.isUndefined(m)){if(x>c)throw new lt("Object is too deeply nested ("+x+" levels). Max depth: "+c,lt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(v.indexOf(m)!==-1)throw Error("Circular reference detected in "+b.join("."));v.push(m),me.forEach(m,function(O,T){(!(me.isUndefined(O)||O===null)&&i.call(t,O,me.isString(T)?T.trim():T,b,y))===!0&&g(O,b?b.concat(T):[T],x+1)}),v.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return g(e),t}function ow(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function av(e,t){this._pairs=[],e&&cd(e,this,t)}const E2=av.prototype;E2.append=function(t,n){this._pairs.push([t,n])};E2.toString=function(t){const n=t?function(r){return t.call(this,r,ow)}:ow;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function fre(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function S2(e,t,n){if(!t)return e;const r=n&&n.encode||fre,i=me.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let s;if(o?s=o(t,i):s=me.isURLSearchParams(t)?t.toString():new av(t,i).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class sw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){me.forEach(this.handlers,function(r){r!==null&&t(r)})}}const lv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},pre=typeof URLSearchParams<"u"?URLSearchParams:av,hre=typeof FormData<"u"?FormData:null,mre=typeof Blob<"u"?Blob:null,vre={isBrowser:!0,classes:{URLSearchParams:pre,FormData:hre,Blob:mre},protocols:["http","https","file","blob","url","data"]},cv=typeof window<"u"&&typeof document<"u",$h=typeof navigator=="object"&&navigator||void 0,gre=cv&&(!$h||["ReactNative","NativeScript","NS"].indexOf($h.product)<0),_re=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yre=cv&&window.location.href||"http://localhost",bre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cv,hasStandardBrowserEnv:gre,hasStandardBrowserWebWorkerEnv:_re,navigator:$h,origin:yre},Symbol.toStringTag,{value:"Module"})),Mn={...bre,...vre};function wre(e,t){return cd(e,new Mn.classes.URLSearchParams,{visitor:function(n,r,i,o){return Mn.isNode&&me.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Ere(e){return me.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Sre(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function C2(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=o>=n.length;return s=!s&&me.isArray(i)?i.length:s,c?(me.hasOwnProp(i,s)?i[s]=me.isArray(i[s])?i[s].concat(r):[i[s],r]:i[s]=r,!l):((!i[s]||!me.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&me.isArray(i[s])&&(i[s]=Sre(i[s])),!l)}if(me.isFormData(e)&&me.isFunction(e.entries)){const n={};return me.forEachEntry(e,(r,i)=>{t(Ere(r),i,n,0)}),n}return null}const xs=(e,t)=>e!=null&&me.hasOwnProp(e,t)?e[t]:void 0;function Cre(e,t,n){if(me.isString(e))try{return(t||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _l={transitional:lv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=me.isObject(t);if(o&&me.isHTMLForm(t)&&(t=new FormData(t)),me.isFormData(t))return i?JSON.stringify(C2(t)):t;if(me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t)||me.isReadableStream(t))return t;if(me.isArrayBufferView(t))return t.buffer;if(me.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const c=xs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return wre(t,c).toString();if((l=me.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=xs(this,"env"),f=d&&d.FormData;return cd(l?{"files[]":t}:t,f&&new f,c)}}return o||i?(n.setContentType("application/json",!1),Cre(t)):t}],transformResponse:[function(t){const n=xs(this,"transitional")||_l.transitional,r=n&&n.forcedJSONParsing,i=xs(this,"responseType"),o=i==="json";if(me.isResponse(t)||me.isReadableStream(t))return t;if(t&&me.isString(t)&&(r&&!i||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,xs(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?lt.from(c,lt.ERR_BAD_RESPONSE,this,null,xs(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mn.classes.FormData,Blob:Mn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],e=>{_l.headers[e]={}});const xre=me.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tre=e=>{const t={};let n,r,i;return e&&e.split(`
43
- `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&xre[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},aw=Symbol("internals"),kre=/[^\x09\x20-\x7E\x80-\xFF]/g;function Ore(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function $a(e){return e&&String(e).trim().toLowerCase()}function $re(e){return Ore(e.replace(kre,""))}function iu(e){return e===!1||e==null?e:me.isArray(e)?e.map(iu):$re(String(e))}function Are(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Rre=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Tp(e,t,n,r,i){if(me.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!me.isString(t)){if(me.isString(r))return t.indexOf(r)!==-1;if(me.isRegExp(r))return r.test(t)}}function Pre(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ire(e,t){const n=me.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let cr=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,c,d){const f=$a(c);if(!f)throw new Error("header name must be a non-empty string");const p=me.findKey(i,f);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||c]=iu(l))}const s=(l,c)=>me.forEach(l,(d,f)=>o(d,f,c));if(me.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(me.isString(t)&&(t=t.trim())&&!Rre(t))s(Tre(t),n);else if(me.isObject(t)&&me.isIterable(t)){let l={},c,d;for(const f of t){if(!me.isArray(f))throw TypeError("Object iterator must return a key-value pair");l[d=f[0]]=(c=l[d])?me.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=$a(t),t){const r=me.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Are(i);if(me.isFunction(n))return n.call(this,i,r);if(me.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$a(t),t){const r=me.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Tp(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=$a(s),s){const l=me.findKey(r,s);l&&(!n||Tp(r,r[l],l,n))&&(delete r[l],i=!0)}}return me.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Tp(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return me.forEach(this,(i,o)=>{const s=me.findKey(r,o);if(s){n[s]=iu(i),delete n[o];return}const l=t?Pre(o):String(o).trim();l!==o&&delete n[o],n[l]=iu(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return me.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&me.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
44
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[aw]=this[aw]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=$a(s);r[l]||(Ire(i,s),r[l]=!0)}return me.isArray(t)?t.forEach(o):o(t),this}};cr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(cr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});me.freezeMethods(cr);function kp(e,t){const n=this||_l,r=t||n,i=cr.from(r.headers);let o=r.data;return me.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function x2(e){return!!(e&&e.__CANCEL__)}let yl=class extends lt{constructor(t,n,r){super(t??"canceled",lt.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function T2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new lt("Request failed with status code "+n.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Mre(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Dre(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=r[o];s||(s=d),n[i]=c,r[i]=d;let p=o,v=0;for(;p!==i;)v+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-s<t)return;const y=f&&d-f;return y?Math.round(v*1e3/y):void 0}}function Fre(e,t){let n=0,r=1e3/t,i,o;const s=(d,f=Date.now())=>{n=f,i=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const f=Date.now(),p=f-n;p>=r?s(d,f):(i=d,o||(o=setTimeout(()=>{o=null,s(i)},r-p)))},()=>i&&s(i)]}const Su=(e,t,n=3)=>{let r=0;const i=Dre(50,250);return Fre(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,c=l!=null?Math.min(s,l):s,d=Math.max(0,c-r),f=i(d);r=Math.max(r,c);const p={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:f||void 0,estimated:f&&l?(l-c)/f:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},lw=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},cw=e=>(...t)=>me.asap(()=>e(...t)),Lre=Mn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mn.origin),Mn.navigator&&/(msie|trident)/i.test(Mn.navigator.userAgent)):()=>!0,jre=Mn.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];me.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),me.isString(r)&&l.push(`path=${r}`),me.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),me.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ure(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nre(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function k2(e,t,n){let r=!Ure(t);return e&&(r||n===!1)?Nre(e,t):t}const uw=e=>e instanceof cr?{...e}:e;function ts(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,f,p,v){return me.isPlainObject(d)&&me.isPlainObject(f)?me.merge.call({caseless:v},d,f):me.isPlainObject(f)?me.merge({},f):me.isArray(f)?f.slice():f}function i(d,f,p,v){if(me.isUndefined(f)){if(!me.isUndefined(d))return r(void 0,d,p,v)}else return r(d,f,p,v)}function o(d,f){if(!me.isUndefined(f))return r(void 0,f)}function s(d,f){if(me.isUndefined(f)){if(!me.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function l(d,f,p){if(me.hasOwnProp(t,p))return r(d,f);if(me.hasOwnProp(e,p))return r(void 0,d)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:l,headers:(d,f,p)=>i(uw(d),uw(f),p,!0)};return me.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=me.hasOwnProp(c,f)?c[f]:i,v=me.hasOwnProp(e,f)?e[f]:void 0,y=me.hasOwnProp(t,f)?t[f]:void 0,g=p(v,y,f);me.isUndefined(g)&&p!==l||(n[f]=g)}),n}const O2=e=>{const t=ts({},e),n=v=>me.hasOwnProp(t,v)?t[v]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),s=n("xsrfCookieName");let l=n("headers");const c=n("auth"),d=n("baseURL"),f=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=cr.from(l),t.url=S2(k2(d,p,f),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),me.isFormData(r)){if(Mn.hasStandardBrowserEnv||Mn.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(me.isFunction(r.getHeaders)){const v=r.getHeaders(),y=["content-type","content-length"];Object.entries(v).forEach(([g,m])=>{y.includes(g.toLowerCase())&&l.set(g,m)})}}if(Mn.hasStandardBrowserEnv&&(me.isFunction(i)&&(i=i(t)),i===!0||i==null&&Lre(t.url))){const y=o&&s&&jre.read(s);y&&l.set(o,y)}return t},zre=typeof XMLHttpRequest<"u",Bre=zre&&function(e){return new Promise(function(n,r){const i=O2(e);let o=i.data;const s=cr.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=i,f,p,v,y,g;function m(){y&&y(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function x(){if(!b)return;const O=cr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:e,request:b};T2(function(z){n(z),m()},function(z){r(z),m()},A),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new lt("Request aborted",lt.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const A=T&&T.message?T.message:"Network Error",M=new lt(A,lt.ERR_NETWORK,e,b);M.event=T||null,r(M),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||lv;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new lt(T,A.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,e,b)),b=null},o===void 0&&s.setContentType(null),"setRequestHeader"in b&&me.forEach(s.toJSON(),function(T,A){b.setRequestHeader(A,T)}),me.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),l&&l!=="json"&&(b.responseType=i.responseType),d&&([v,g]=Su(d,!0),b.addEventListener("progress",v)),c&&b.upload&&([p,y]=Su(c),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(f=O=>{b&&(r(!O||O.type?new yl(null,e,b):O),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const S=Mre(i.url);if(S&&Mn.protocols.indexOf(S)===-1){r(new lt("Unsupported protocol "+S+":",lt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Vre=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(d){if(!i){i=!0,l();const f=d instanceof Error?d:this.reason;r.abort(f instanceof lt?f:new yl(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,o(new lt(`timeout of ${t}ms exceeded`,lt.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>me.asap(l),c}},Hre=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},qre=async function*(e,t){for await(const n of Wre(e))yield*Hre(n,t)},Wre=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},dw=(e,t,n,r)=>{const i=qre(e,t);let o=0,s,l=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await i.next();if(d){l(),c.close();return}let p=f.byteLength;if(n){let v=o+=p;n(v)}c.enqueue(new Uint8Array(f))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},fw=64*1024,{isFunction:Fc}=me,Yre=(({Request:e,Response:t})=>({Request:e,Response:t}))(me.global),{ReadableStream:pw,TextEncoder:hw}=me.global,mw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Kre=e=>{e=me.merge.call({skipUndefined:!0},Yre,e);const{fetch:t,Request:n,Response:r}=e,i=t?Fc(t):typeof fetch=="function",o=Fc(n),s=Fc(r);if(!i)return!1;const l=i&&Fc(pw),c=i&&(typeof hw=="function"?(g=>m=>g.encode(m))(new hw):async g=>new Uint8Array(await new n(g).arrayBuffer())),d=o&&l&&mw(()=>{let g=!1;const m=new n(Mn.origin,{body:new pw,method:"POST",get duplex(){return g=!0,"half"}}),b=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),g&&!b}),f=s&&l&&mw(()=>me.isReadableStream(new r("").body)),p={stream:f&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!p[g]&&(p[g]=(m,b)=>{let x=m&&m[g];if(x)return x.call(m);throw new lt(`Response type '${g}' is not supported`,lt.ERR_NOT_SUPPORT,b)})});const v=async g=>{if(g==null)return 0;if(me.isBlob(g))return g.size;if(me.isSpecCompliantForm(g))return(await new n(Mn.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(me.isArrayBufferView(g)||me.isArrayBuffer(g))return g.byteLength;if(me.isURLSearchParams(g)&&(g=g+""),me.isString(g))return(await c(g)).byteLength},y=async(g,m)=>{const b=me.toFiniteNumber(g.getContentLength());return b??v(m)};return async g=>{let{url:m,method:b,data:x,signal:S,cancelToken:O,timeout:T,onDownloadProgress:A,onUploadProgress:M,responseType:z,headers:Y,withCredentials:ve="same-origin",fetchOptions:W}=O2(g),X=t||fetch;z=z?(z+"").toLowerCase():"text";let K=Vre([S,O&&O.toAbortSignal()],T),L=null;const D=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let ne;try{if(M&&d&&b!=="get"&&b!=="head"&&(ne=await y(Y,x))!==0){let U=new n(m,{method:"POST",body:x,duplex:"half"}),ee;if(me.isFormData(x)&&(ee=U.headers.get("content-type"))&&Y.setContentType(ee),U.body){const[Q,B]=lw(ne,Su(cw(M)));x=dw(U.body,fw,Q,B)}}me.isString(ve)||(ve=ve?"include":"omit");const le=o&&"credentials"in n.prototype;if(me.isFormData(x)){const U=Y.getContentType();U&&/^multipart\/form-data/i.test(U)&&!/boundary=/i.test(U)&&Y.delete("content-type")}const je={...W,signal:K,method:b.toUpperCase(),headers:Y.normalize().toJSON(),body:x,duplex:"half",credentials:le?ve:void 0};L=o&&new n(m,je);let J=await(o?X(L,W):X(m,je));const j=f&&(z==="stream"||z==="response");if(f&&(A||j&&D)){const U={};["status","statusText","headers"].forEach(oe=>{U[oe]=J[oe]});const ee=me.toFiniteNumber(J.headers.get("content-length")),[Q,B]=A&&lw(ee,Su(cw(A),!0))||[];J=new r(dw(J.body,fw,Q,()=>{B&&B(),D&&D()}),U)}z=z||"text";let de=await p[me.findKey(p,z)||"text"](J,g);return!j&&D&&D(),await new Promise((U,ee)=>{T2(U,ee,{data:de,headers:cr.from(J.headers),status:J.status,statusText:J.statusText,config:g,request:L})})}catch(le){throw D&&D(),le&&le.name==="TypeError"&&/Load failed|fetch/i.test(le.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,g,L,le&&le.response),{cause:le.cause||le}):lt.from(le,le&&le.code,g,L,le&&le.response)}}},Gre=new Map,$2=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,c,d,f=Gre;for(;l--;)c=o[l],d=f.get(c),d===void 0&&f.set(c,d=l?new Map:Kre(t)),f=d;return d};$2();const uv={http:cre,xhr:Bre,fetch:{get:$2}};me.forEach(uv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const vw=e=>`- ${e}`,Qre=e=>me.isFunction(e)||e===null||e===!1;function Xre(e,t){e=me.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let l;if(i=r,!Qre(r)&&(i=uv[(l=String(r)).toLowerCase()],i===void 0))throw new lt(`Unknown adapter '${l}'`);if(i&&(me.isFunction(i)||(i=i.get(t))))break;o[l||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since :
45
- `+s.map(vw).join(`
46
- `):" "+vw(s[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const A2={getAdapter:Xre,adapters:uv};function Op(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yl(null,e)}function gw(e){return Op(e),e.headers=cr.from(e.headers),e.data=kp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),A2.getAdapter(e.adapter||_l.adapter,e)(e).then(function(r){return Op(e),r.data=kp.call(e,e.transformResponse,r),r.headers=cr.from(r.headers),r},function(r){return x2(r)||(Op(e),r&&r.response&&(r.response.data=kp.call(e,e.transformResponse,r.response),r.response.headers=cr.from(r.response.headers))),Promise.reject(r)})}const R2="1.15.2",ud={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ud[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _w={};ud.transitional=function(t,n,r){function i(o,s){return"[Axios v"+R2+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new lt(i(s," has been removed"+(n?" in "+n:"")),lt.ERR_DEPRECATED);return n&&!_w[s]&&(_w[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};ud.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jre(e,t,n){if(typeof e!="object")throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(s){const l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new lt("option "+o+" must be "+c,lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new lt("Unknown option "+o,lt.ERR_BAD_OPTION)}}const ou={assertOptions:Jre,validators:ud},Dr=ou.validators;let Xo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new sw,response:new sw}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const s=i.stack.indexOf(`
47
- `);return s===-1?"":i.stack.slice(s+1)})();try{if(!r.stack)r.stack=o;else if(o){const s=o.indexOf(`
48
- `),l=s===-1?-1:o.indexOf(`
49
- `,s+1),c=l===-1?"":o.slice(l+1);String(r.stack).endsWith(c)||(r.stack+=`
50
- `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ts(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&ou.assertOptions(r,{silentJSONParsing:Dr.transitional(Dr.boolean),forcedJSONParsing:Dr.transitional(Dr.boolean),clarifyTimeoutError:Dr.transitional(Dr.boolean),legacyInterceptorReqResOrdering:Dr.transitional(Dr.boolean)},!1),i!=null&&(me.isFunction(i)?n.paramsSerializer={serialize:i}:ou.assertOptions(i,{encode:Dr.function,serialize:Dr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ou.assertOptions(n,{baseUrl:Dr.spelling("baseURL"),withXsrfToken:Dr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&me.merge(o.common,o[n.method]);o&&me.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=cr.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;c=c&&m.synchronous;const b=n.transitional||lv;b&&b.legacyInterceptorReqResOrdering?l.unshift(m.fulfilled,m.rejected):l.push(m.fulfilled,m.rejected)});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let f,p=0,v;if(!c){const g=[gw.bind(this),void 0];for(g.unshift(...l),g.push(...d),v=g.length,f=Promise.resolve(n);p<v;)f=f.then(g[p++],g[p++]);return f}v=l.length;let y=n;for(;p<v;){const g=l[p++],m=l[p++];try{y=g(y)}catch(b){m.call(this,b);break}}try{f=gw.call(this,y)}catch(g){return Promise.reject(g)}for(p=0,v=d.length;p<v;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=ts(this.defaults,t);const n=k2(t.baseURL,t.url,t.allowAbsoluteUrls);return S2(n,t.params,t.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(t){Xo.prototype[t]=function(n,r){return this.request(ts(r||{},{method:t,url:n,data:(r||{}).data}))}});me.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,l){return this.request(ts(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Xo.prototype[t]=n(),Xo.prototype[t+"Form"]=n(!0)});let Zre=class P2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new yl(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new P2(function(i){t=i}),cancel:t}}};function eie(e){return function(n){return e.apply(null,n)}}function tie(e){return me.isObject(e)&&e.isAxiosError===!0}const Ah={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ah).forEach(([e,t])=>{Ah[t]=e});function I2(e){const t=new Xo(e),n=f2(Xo.prototype.request,t);return me.extend(n,Xo.prototype,t,{allOwnKeys:!0}),me.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return I2(ts(e,i))},n}const un=I2(_l);un.Axios=Xo;un.CanceledError=yl;un.CancelToken=Zre;un.isCancel=x2;un.VERSION=R2;un.toFormData=cd;un.AxiosError=lt;un.Cancel=un.CanceledError;un.all=function(t){return Promise.all(t)};un.spread=eie;un.isAxiosError=tie;un.mergeConfig=ts;un.AxiosHeaders=cr;un.formToJSON=e=>C2(me.isHTMLForm(e)?new FormData(e):e);un.getAdapter=A2.getAdapter;un.HttpStatusCode=Ah;un.default=un;const{Axios:doe,AxiosError:foe,CanceledError:poe,isCancel:hoe,CancelToken:moe,VERSION:voe,all:goe,Cancel:_oe,isAxiosError:yoe,spread:boe,toFormData:woe,AxiosHeaders:Eoe,HttpStatusCode:yw,formToJSON:Soe,getAdapter:Coe,mergeConfig:xoe}=un,nie=()=>{const{i18n:e}=Jh;let t=!1,n=null,r=[];async function i(){return t&&n||(t=!0,n=(async()=>{try{return(await Yo.v1Token.tokencontrollerRefresh({headers:{[Bo]:Lo.generateBearerToken(PD())}})).code===0}catch(m){return console.error(m),!1}finally{t=!1,n=null}})()),n}async function o(m){return c(m)?(uc.error(e.global.t("message.error.loginExpired")),Ms().logoutDialog(),Promise.reject(e.global.t("message.error.loginExpired"))):new Promise((b,x)=>{r.push({resolve:b,reject:x,config:m}),t||i().then(S=>{S?r.forEach(({resolve:O,reject:T,config:A})=>{A.headers[co]=Lo.generateBearerToken(au()),l(A),p.request(A).then(O).catch(T)}):(r.forEach(({reject:O})=>O(e.global.t("message.error.refreshFailed"))),uc.error(e.global.t("message.error.loginExpired")),Ms().logoutDialog()),r=[]})})}function s(m){return m.headers[mn.CSRF_TOKEN_HEADER_NAME]=fE.get(mn.CSRF_KEY),m.headers[co]=Lo.generateBearerToken(au()),m.headers[mn.ACCEPT_LANGUAGE_HEADER_NAME]=e.global.locale.value,m}function l(m){m.headers["X-Token-Refreshed"]="true"}function c(m){return m.headers["X-Token-Refreshed"]==="true"}async function d(m){if(m.headers[co]){const b=Lo.extractBearerToken(m.headers[co]);AD(b),m.config.headers[co]=Lo.generateBearerToken(b)}if(m.headers[Bo]){const b=Lo.extractBearerToken(m.headers[Bo]);ID(b),m.config.headers[Bo]=Lo.generateBearerToken(b)}if(m.data.code===yw.Unauthorized&&!m.config.url?.includes("/api/v1/token/refresh"))return o(m.config);if(m.data.code===yw.Forbidden)return Ms().logoutDialog(),Promise.reject(e.global.t("user.notLoggedIn"));if(m.data.code!==0){const b=m.data.message||e.global.t("message.error.requestFailed");return uc.error(b),Promise.reject(b)}return m.data}function f(m){return console.error(m),uc.error(m.message),Promise.reject(m)}const p=Jy(mn.REMOTE_SERVICE_PREFIX,{baseURL:`/${mn.REMOTE_SERVICE_PREFIX}`},m=>m.replace(mn.REMOTE_SERVICE_PREFIX,""));p.interceptors.request.use(s,f),p.interceptors.response.use(d,f);const v=CD(),y=window.__GLOBAL_CONFIG__?.projectHash,g=Jy(mn.LOCAL_SERVICE_PREFIX,{baseURL:`${v}/${y}`},m=>m.replace(mn.LOCAL_SERVICE_PREFIX,""));g.interceptors.request.use(s,f),g.interceptors.response.use(d,f)},M2=Eo("setting",{state:()=>({dependencies:[],devDependencies:[],packageJson:{}}),getters:{vueVersion:e=>e.dependencies.find(t=>t.name==="vue")?.version||"",deps:e=>[...e.dependencies,...e.devDependencies],compHubVersion:()=>window.__GLOBAL_CONFIG__.version||""},actions:{setDependencies(e){this.$patch(t=>{t.dependencies=e})},setDevDependencies(e){this.$patch(t=>{t.devDependencies=e})},setPackageJson(e){this.$patch(t=>{t.packageJson=e})},async initSetting(){await this.fetchPackageJson(),await this.initPreviewSetting()},async fetchPackageJson(){await Tj.comp.compcontrollerPackagejson().then(e=>{const t=e.data?.packageJson??{};this.setPackageJson(t)})},async initPreviewSetting(){const e=js(jD,{dependencies:[],devDependencies:[]}),{dependencies:t=[],devDependencies:n=[]}=e.value,r=Object.entries(this.packageJson?.dependencies??{}).map(([o,s])=>{const l=t.find(c=>c.name===o);return{name:o,version:s,match:l?.match??mn.COMP_MATCH_TYPE_AUTO}}),i=Object.entries(this.packageJson?.devDependencies??{}).map(([o,s])=>{const l=n.find(c=>c.name===o);return{name:o,version:s,match:l?.match??mn.COMP_MATCH_TYPE_AUTO}});e.value={dependencies:r,devDependencies:i},this.setDependencies(r),this.setDevDependencies(i)}}}),rie=Eo("upgrade",{state:()=>({upgradeInfo:{}}),getters:{isForceUpgrade:e=>e.upgradeInfo.hasUpgrade&&e.upgradeInfo.isForce,isUpgrade:e=>e.upgradeInfo.hasUpgrade,upgradeDesc:e=>e.upgradeInfo.desc,latestVersion:e=>e.upgradeInfo.latestVersion,hasUpgrade:e=>e.upgradeInfo.hasUpgrade},actions:{setUpgradeInfo(e){this.$patch(t=>{t.upgradeInfo=e})},async getUpgradeInfo(){if(Object.keys(this.upgradeInfo).length>0)return;const e=M2(),t=await Yo.v2Upgrade.upgradecontrollerv2Check({compHubVersion:e.compHubVersion});this.setUpgradeInfo(t.data)}}});var su={exports:{}};var iie=su.exports,bw;function oie(){return bw||(bw=1,(function(e,t){(function(n,r){e.exports=r()})(iie,function(){var n={};n.version="0.2.0";var r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(g){var m,b;for(m in g)b=g[m],b!==void 0&&g.hasOwnProperty(m)&&(r[m]=b);return this},n.status=null,n.set=function(g){var m=n.isStarted();g=i(g,r.minimum,1),n.status=g===1?null:g;var b=n.render(!m),x=b.querySelector(r.barSelector),S=r.speed,O=r.easing;return b.offsetWidth,l(function(T){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),c(x,s(g,S,O)),g===1?(c(b,{transition:"none",opacity:1}),b.offsetWidth,setTimeout(function(){c(b,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){n.remove(),T()},S)},S)):setTimeout(T,S)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var g=function(){setTimeout(function(){n.status&&(n.trickle(),g())},r.trickleSpeed)};return r.trickle&&g(),this},n.done=function(g){return!g&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(g){var m=n.status;return m?(typeof g!="number"&&(g=(1-m)*i(Math.random()*m,.1,.95)),m=i(m+g,0,.994),n.set(m)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},(function(){var g=0,m=0;n.promise=function(b){return!b||b.state()==="resolved"?this:(m===0&&n.start(),g++,m++,b.always(function(){m--,m===0?(g=0,n.done()):n.set((g-m)/g)}),this)}})(),n.render=function(g){if(n.isRendered())return document.getElementById("nprogress");f(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=r.template;var b=m.querySelector(r.barSelector),x=g?"-100":o(n.status||0),S=document.querySelector(r.parent),O;return c(b,{transition:"all 0 linear",transform:"translate3d("+x+"%,0,0)"}),r.showSpinner||(O=m.querySelector(r.spinnerSelector),O&&y(O)),S!=document.body&&f(S,"nprogress-custom-parent"),S.appendChild(m),m},n.remove=function(){p(document.documentElement,"nprogress-busy"),p(document.querySelector(r.parent),"nprogress-custom-parent");var g=document.getElementById("nprogress");g&&y(g)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var g=document.body.style,m="WebkitTransform"in g?"Webkit":"MozTransform"in g?"Moz":"msTransform"in g?"ms":"OTransform"in g?"O":"";return m+"Perspective"in g?"translate3d":m+"Transform"in g?"translate":"margin"};function i(g,m,b){return g<m?m:g>b?b:g}function o(g){return(-1+g)*100}function s(g,m,b){var x;return r.positionUsing==="translate3d"?x={transform:"translate3d("+o(g)+"%,0,0)"}:r.positionUsing==="translate"?x={transform:"translate("+o(g)+"%,0)"}:x={"margin-left":o(g)+"%"},x.transition="all "+m+"ms "+b,x}var l=(function(){var g=[];function m(){var b=g.shift();b&&b(m)}return function(b){g.push(b),g.length==1&&m()}})(),c=(function(){var g=["Webkit","O","Moz","ms"],m={};function b(T){return T.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(A,M){return M.toUpperCase()})}function x(T){var A=document.body.style;if(T in A)return T;for(var M=g.length,z=T.charAt(0).toUpperCase()+T.slice(1),Y;M--;)if(Y=g[M]+z,Y in A)return Y;return T}function S(T){return T=b(T),m[T]||(m[T]=x(T))}function O(T,A,M){A=S(A),T.style[A]=M}return function(T,A){var M=arguments,z,Y;if(M.length==2)for(z in A)Y=A[z],Y!==void 0&&A.hasOwnProperty(z)&&O(T,z,Y);else O(T,M[1],M[2])}})();function d(g,m){var b=typeof g=="string"?g:v(g);return b.indexOf(" "+m+" ")>=0}function f(g,m){var b=v(g),x=b+m;d(b,m)||(g.className=x.substring(1))}function p(g,m){var b=v(g),x;d(g,m)&&(x=b.replace(" "+m+" "," "),g.className=x.substring(1,x.length-1))}function v(g){return(" "+(g.className||"")+" ").replace(/\s+/gi," ")}function y(g){g&&g.parentNode&&g.parentNode.removeChild(g)}return n})})(su)),su.exports}var sie=oie();const Rh=rs(sie),{i18n:aie}=Jh;function lie(){Bs.beforeEach(async(e,t)=>{Rh.start();const n=tl(),r=Ms(),i=M2(),o=rie();if(e.path!==t.path&&(await i.initSetting(),await r.fetchCsrfToken(),await o.getUpgradeInfo()),o.isForceUpgrade&&!e.path.startsWith("/upgrade"))return{path:"/upgrade"};if(e.path===t.path&&e.fullPath!==t.fullPath)return;const s=n.visitedViews.find(l=>l.path===e.path);if(s){if(e.fullPath===s.fullPath)return;const{hash:l="",query:c={}}=e,{query:d={},hash:f=""}=s,p=xP(d);if(!e.redirectedFrom){const v={query:{...p,...c},hash:l||f};return{path:e.path,...v}}}if(r.isAccessTokenExist()){if(e.meta.noAuth){if(e.path.startsWith("/login")){const l=e.query.type==="logout";if(r.isAccessTokenExist()&&!l)return"/"}else r.isRealUserLogin()||await r.fetchWhoAmI();return}if(r.isRealUserLogin()||await r.fetchWhoAmI(),!r.isRealUserLogin())return r.logoutDialog(),!1}else if(!e.meta.noAuth)return r.logoutDialog(),!1}),Bs.afterEach(e=>{const t=e.meta.title;document.title=aie.global.t(t)||mn.SITE_TITLE,Rh.done()})}Rh.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,parent:"body"});async function cie(e){await lB(),nie(),hE(e),mE(e),lN(e),aN(e),$N(e),lie(),RN(),FN(),aB(e),cB(e),bne(e)}async function uie(){const e=Fh(kD);await cie(e),e.mount("#app")}uie();export{CD as $,co as A,i4 as B,Cie as C,jD as D,Aie as E,Mie as F,mn as G,Oie as H,pL as I,rt as J,hy as K,vie as L,xie as M,gie as N,Die as O,yU as P,Xh as Q,ID as R,Sie as S,WL as T,Yo as U,kie as V,bM as W,Tie as X,zC as Y,aoe as Z,Uh as _,Ms as a,d2 as a0,AD as b,M2 as c,rie as d,ja as e,Rie as f,Tj as g,hF as h,pie as i,tl as j,bie as k,hie as l,wie as m,yie as n,Pie as o,Fie as p,Rt as q,gU as r,Jh as s,jh as t,mie as u,$ie as v,d4 as w,_ie as x,Eie as y,Iie as z};