@gkd-kit/inspect 0.0.1768899386743 → 0.0.1768900570874

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 (48) hide show
  1. package/dist/404.html +3 -3
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-D3bnVzwa.js → ActionCard.vue_vue_type_script_setup_true_lang-BKq24yyT.js} +2 -2
  3. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-D3bnVzwa.js.map → ActionCard.vue_vue_type_script_setup_true_lang-BKq24yyT.js.map} +1 -1
  4. package/dist/assets/{DevicePage-mq-WEqpi.js → DevicePage-LsTFe71m.js} +2 -2
  5. package/dist/assets/{DevicePage-mq-WEqpi.js.map → DevicePage-LsTFe71m.js.map} +1 -1
  6. package/dist/assets/{HomePage-e1LOh-Dn.js → HomePage-Csw7C8jF.js} +2 -2
  7. package/dist/assets/{HomePage-e1LOh-Dn.js.map → HomePage-Csw7C8jF.js.map} +1 -1
  8. package/dist/assets/{ImportPage-KwuCL8gp.js → ImportPage-RGB4LPNf.js} +2 -2
  9. package/dist/assets/{ImportPage-KwuCL8gp.js.map → ImportPage-RGB4LPNf.js.map} +1 -1
  10. package/dist/assets/{Input-D79PaINL.js → Input-ByXBRWmO.js} +2 -2
  11. package/dist/assets/{Input-D79PaINL.js.map → Input-ByXBRWmO.js.map} +1 -1
  12. package/dist/assets/{SelectorPage-uwLg3OLz.js → SelectorPage-17Z-Jk1F.js} +2 -2
  13. package/dist/assets/{SelectorPage-uwLg3OLz.js.map → SelectorPage-17Z-Jk1F.js.map} +1 -1
  14. package/dist/assets/{SnapshotPage-BhCeehdr.js → SnapshotPage-gqLV0Ajt.js} +56 -56
  15. package/dist/assets/SnapshotPage-gqLV0Ajt.js.map +1 -0
  16. package/dist/assets/{SvgPage-CHqh1Dep.js → SvgPage-CGTHxB9M.js} +2 -2
  17. package/dist/assets/{SvgPage-CHqh1Dep.js.map → SvgPage-CGTHxB9M.js.map} +1 -1
  18. package/dist/assets/{TrackGraph-DAhZ5MqZ.js → TrackGraph-S8eceX9R.js} +3 -3
  19. package/dist/assets/{TrackGraph-DAhZ5MqZ.js.map → TrackGraph-S8eceX9R.js.map} +1 -1
  20. package/dist/assets/{_404Page-K5bJT3ja.js → _404Page-9FO_quL4.js} +2 -2
  21. package/dist/assets/{_404Page-K5bJT3ja.js.map → _404Page-9FO_quL4.js.map} +1 -1
  22. package/dist/assets/chunk-Cg4L9mG4.js +3 -0
  23. package/dist/assets/{chunk-BjFMWQ52.js.map → chunk-Cg4L9mG4.js.map} +1 -1
  24. package/dist/assets/{dayjs.min-DJ0e80dV.js → dayjs.min-CSVABQRJ.js} +2 -2
  25. package/dist/assets/{dayjs.min-DJ0e80dV.js.map → dayjs.min-CSVABQRJ.js.map} +1 -1
  26. package/dist/assets/{error-D07AJnEL.js → error-np4WIvmm.js} +2 -2
  27. package/dist/assets/{error-D07AJnEL.js.map → error-np4WIvmm.js.map} +1 -1
  28. package/dist/assets/{import-BI5MgCQJ.js → import-C0XCCThd.js} +2 -2
  29. package/dist/assets/{import-BI5MgCQJ.js.map → import-C0XCCThd.js.map} +1 -1
  30. package/dist/assets/index-Br8FJwQH.css +1 -0
  31. package/dist/assets/{index-ntw83SyO.js → index-jqB-Fx47.js} +26 -44
  32. package/dist/assets/index-jqB-Fx47.js.map +1 -0
  33. package/dist/assets/{index-rOcLe529.js → index-xkPltE-0.js} +3 -3
  34. package/dist/assets/{index-rOcLe529.js.map → index-xkPltE-0.js.map} +1 -1
  35. package/dist/assets/{jszip.min-JbLFkbDH.js → jszip.min-MMSrEo5_.js} +2 -2
  36. package/dist/assets/{jszip.min-JbLFkbDH.js.map → jszip.min-MMSrEo5_.js.map} +1 -1
  37. package/dist/assets/{node-C5py3z6w.js → node-CUVTs-TZ.js} +2 -2
  38. package/dist/assets/{node-C5py3z6w.js.map → node-CUVTs-TZ.js.map} +1 -1
  39. package/dist/assets/{snapshot-BABYD0yq.js → snapshot-BR91A-ol.js} +2 -2
  40. package/dist/assets/{snapshot-BABYD0yq.js.map → snapshot-BR91A-ol.js.map} +1 -1
  41. package/dist/assets/{table-Bnum63XL.js → table-Cd44ejmV.js} +2 -2
  42. package/dist/assets/{table-Bnum63XL.js.map → table-Cd44ejmV.js.map} +1 -1
  43. package/dist/index.html +3 -3
  44. package/package.json +1 -1
  45. package/dist/assets/SnapshotPage-BhCeehdr.js.map +0 -1
  46. package/dist/assets/chunk-BjFMWQ52.js +0 -3
  47. package/dist/assets/index-ntw83SyO.js.map +0 -1
  48. package/dist/assets/index-oSiLgSuU.css +0 -1
@@ -1,47 +1,47 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768899386743/files/dist/assets/TrackGraph-DAhZ5MqZ.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768899386743/files/dist/assets/node-C5py3z6w.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768899386743/files/dist/assets/index-ntw83SyO.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768899386743/files/dist/assets/index-oSiLgSuU.css","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768899386743/files/dist/assets/index-rOcLe529.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768899386743/files/dist/assets/index-CdMJYWIX.css"])))=>i.map(i=>d[i]);
2
- import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as ht,a2 as Wt,a3 as No,d as Vt,a4 as jt,o as le,p as ct,s as K,m as He,q as Gt,a5 as Yt,v as se,a6 as Rn,a7 as $n,a8 as Pn,a9 as _o,t as V,aa as sn,ab as Ro,ac as $o,ad as ce,ae as je,af as Po,ag as Dn,ah as Ie,ai as Do,aj as Io,ak as To,c as Eo,al as Lo,am as Ko,an as Ao,w as Ft,W as Fo,ao as Bt,N as Bo,l as zo,ap as Oo,z as Rt,aq as Mo,x as In,i as Uo,ar as zt,as as dn,y as st,at as cn,C as Se,D as Te,au as tt,av as Nt,F as j,E as Qt,aw as ee,ax as Xt,H as te,L as ae,M as a,ay as De,az as _t,aA as Tn,R as Ne,I as $,Q as z,aB as Ho,aC as En,aD as Ln,aE as qt,aF as jo,aG as un,aH as qo,aI as Wo,aJ as yt,aK as $t,G as Ue,K as S,J as R,P as rt,aL as Oe,aM as Pe,T as q,S as J,aN as Vo,aO as Go,aP as Yo,V as Me,aQ as Qo,aR as Xo,aS as kt,O as Jo,aT as Ot,aU as Ke,aV as fn,X as Zo,Y as er,aW as hn,aX as tr,aY as wt,aZ as nr,a_ as or,a$ as rr,b0 as Kn,A as lr,b1 as An,b2 as Mt,b3 as vn}from"./index-ntw83SyO.js";import{g as Re,f as ir,l as ar,a as Jt,N as Fn,b as sr,c as ut,d as ot,e as gn,h as dr}from"./node-C5py3z6w.js";import{e as cr,f as ur,g as fr,_ as hr}from"./ActionCard.vue_vue_type_script_setup_true_lang-D3bnVzwa.js";import{a as vr,b as gr,g as pr}from"./snapshot-BABYD0yq.js";import{h as nt,C as mr,e as br,V as xr,f as pn,N as mn,c as bn,b as yr,u as kr,d as wr,a as Bn,g as zn,i as Cr,j as Sr,_ as Nr}from"./dayjs.min-DJ0e80dV.js";import{p as Ct,w as _r,d as xn,_ as St,F as Ut,G as Rr,U as yn}from"./index-rOcLe529.js";import{l as On,e as kn,a as $r}from"./error-D07AJnEL.js";import{_ as Mn}from"./Input-D79PaINL.js";import{_ as Pr}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./chunk-BjFMWQ52.js";function Un(e){return typeof e=="string"?`s-${e}`:`n-${e}`}const Dr=G({name:"ChevronLeft",render(){return I("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),Ir=G({name:"Switcher",render(){return I("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},I("path",{d:"M12 8l10 8l-10 8z"}))}}),oe="0!important",Hn="-1px!important";function Je(e){return U(`${e}-type`,[O("& +",[M("button",{},[U(`${e}-type`,[X("border",{borderLeftWidth:oe}),X("state-border",{left:Hn})])])])])}function Ze(e){return U(`${e}-type`,[O("& +",[M("button",[U(`${e}-type`,[X("border",{borderTopWidth:oe}),X("state-border",{top:Hn})])])])])}const Tr=M("button-group",`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768900570874/files/dist/assets/TrackGraph-S8eceX9R.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768900570874/files/dist/assets/node-CUVTs-TZ.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768900570874/files/dist/assets/index-jqB-Fx47.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768900570874/files/dist/assets/index-Br8FJwQH.css","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768900570874/files/dist/assets/index-xkPltE-0.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1768900570874/files/dist/assets/index-CdMJYWIX.css"])))=>i.map(i=>d[i]);
2
+ import{h as G,k as T,a as O,g as $e,f as M,e as z,b as X,u as ft,a0 as So,a1 as ht,a2 as Wt,a3 as No,d as Vt,a4 as jt,o as le,p as ct,s as A,m as He,q as Gt,a5 as Yt,v as se,a6 as _n,a7 as Rn,a8 as $n,a9 as _o,t as V,aa as an,ab as Ro,ac as $o,ad as ce,ae as je,af as Po,ag as Pn,ah as Ie,ai as Do,aj as Io,ak as To,c as Eo,al as Lo,am as Ko,an as Ao,w as Ft,W as Fo,ao as Bt,N as Bo,l as zo,ap as Oo,z as Rt,aq as Mo,x as Dn,i as Uo,ar as zt,as as sn,y as st,at as dn,C as Se,D as Te,au as tt,av as Nt,F as j,E as Qt,aw as ee,ax as Xt,H as te,L as ae,M as a,ay as De,az as _t,aA as In,R as Ne,I as $,Q as B,aB as Ho,aC as Tn,aD as En,aE as qt,aF as jo,aG as cn,aH as qo,aI as Wo,aJ as yt,aK as $t,G as Ue,K as S,J as R,P as rt,aL as Oe,aM as Pe,T as q,S as J,aN as Vo,aO as Go,aP as Yo,V as Me,aQ as Qo,aR as Xo,aS as kt,O as Jo,aT as Ot,aU as Ke,aV as un,X as Zo,Y as er,aW as fn,aX as tr,aY as wt,aZ as nr,a_ as or,a$ as rr,b0 as Ln,A as lr,b1 as Kn,b2 as Mt,b3 as hn}from"./index-jqB-Fx47.js";import{g as Re,f as ir,l as ar,a as Jt,N as An,b as sr,c as ut,d as ot,e as vn,h as dr}from"./node-CUVTs-TZ.js";import{e as cr,f as ur,g as fr,_ as hr}from"./ActionCard.vue_vue_type_script_setup_true_lang-BKq24yyT.js";import{a as vr,b as gr,g as pr}from"./snapshot-BR91A-ol.js";import{h as nt,C as mr,e as br,V as xr,f as gn,N as pn,c as mn,b as yr,u as kr,d as wr,a as Fn,g as Bn,i as Cr,j as Sr,_ as Nr}from"./dayjs.min-CSVABQRJ.js";import{p as Ct,w as _r,d as bn,_ as St,F as Ut,G as Rr,U as xn}from"./index-xkPltE-0.js";import{l as zn,e as yn,a as $r}from"./error-np4WIvmm.js";import{_ as On}from"./Input-ByXBRWmO.js";import{_ as Pr}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./chunk-Cg4L9mG4.js";function Mn(e){return typeof e=="string"?`s-${e}`:`n-${e}`}const Dr=G({name:"ChevronLeft",render(){return T("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},T("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),Ir=G({name:"Switcher",render(){return T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T("path",{d:"M12 8l10 8l-10 8z"}))}}),oe="0!important",Un="-1px!important";function Je(e){return M(`${e}-type`,[z("& +",[O("button",{},[M(`${e}-type`,[X("border",{borderLeftWidth:oe}),X("state-border",{left:Un})])])])])}function Ze(e){return M(`${e}-type`,[z("& +",[O("button",[M(`${e}-type`,[X("border",{borderTopWidth:oe}),X("state-border",{top:Un})])])])])}const Tr=O("button-group",`
3
3
  flex-wrap: nowrap;
4
4
  display: inline-flex;
5
5
  position: relative;
6
- `,[$e("vertical",{flexDirection:"row"},[$e("rtl",[M("button",[O("&:first-child:not(:last-child)",`
6
+ `,[$e("vertical",{flexDirection:"row"},[$e("rtl",[O("button",[z("&:first-child:not(:last-child)",`
7
7
  margin-right: ${oe};
8
8
  border-top-right-radius: ${oe};
9
9
  border-bottom-right-radius: ${oe};
10
- `),O("&:last-child:not(:first-child)",`
10
+ `),z("&:last-child:not(:first-child)",`
11
11
  margin-left: ${oe};
12
12
  border-top-left-radius: ${oe};
13
13
  border-bottom-left-radius: ${oe};
14
- `),O("&:not(:first-child):not(:last-child)",`
14
+ `),z("&:not(:first-child):not(:last-child)",`
15
15
  margin-left: ${oe};
16
16
  margin-right: ${oe};
17
17
  border-radius: ${oe};
18
- `),Je("default"),U("ghost",[Je("primary"),Je("info"),Je("success"),Je("warning"),Je("error")])])])]),U("vertical",{flexDirection:"column"},[M("button",[O("&:first-child:not(:last-child)",`
18
+ `),Je("default"),M("ghost",[Je("primary"),Je("info"),Je("success"),Je("warning"),Je("error")])])])]),M("vertical",{flexDirection:"column"},[O("button",[z("&:first-child:not(:last-child)",`
19
19
  margin-bottom: ${oe};
20
20
  margin-left: ${oe};
21
21
  margin-right: ${oe};
22
22
  border-bottom-left-radius: ${oe};
23
23
  border-bottom-right-radius: ${oe};
24
- `),O("&:last-child:not(:first-child)",`
24
+ `),z("&:last-child:not(:first-child)",`
25
25
  margin-top: ${oe};
26
26
  margin-left: ${oe};
27
27
  margin-right: ${oe};
28
28
  border-top-left-radius: ${oe};
29
29
  border-top-right-radius: ${oe};
30
- `),O("&:not(:first-child):not(:last-child)",`
30
+ `),z("&:not(:first-child):not(:last-child)",`
31
31
  margin: ${oe};
32
32
  border-radius: ${oe};
33
- `),Ze("default"),U("ghost",[Ze("primary"),Ze("info"),Ze("success"),Ze("warning"),Ze("error")])])])]),Er={size:{type:String,default:void 0},vertical:Boolean},Lr=G({name:"ButtonGroup",props:Er,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:r}=ft(e);return So("-button-group",Tr,t),Wt(No,e),{rtlEnabled:ht("ButtonGroup",r,t),mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return I("div",{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:"group"},this.$slots)}});function Kr(e){const{fontWeight:t,textColor1:r,textColor2:i,textColorDisabled:s,dividerColor:n,fontSize:d}=e;return{titleFontSize:d,titleFontWeight:t,dividerColor:n,titleTextColor:r,titleTextColorDisabled:s,fontSize:d,textColor:i,arrowColor:i,arrowColorDisabled:s,itemMargin:"16px 0 0 0",titlePadding:"16px 0 0 0"}}const Ar={common:Vt,self:Kr},Fr=M("collapse","width: 100%;",[M("collapse-item",`
33
+ `),Ze("default"),M("ghost",[Ze("primary"),Ze("info"),Ze("success"),Ze("warning"),Ze("error")])])])]),Er={size:{type:String,default:void 0},vertical:Boolean},Lr=G({name:"ButtonGroup",props:Er,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:r}=ft(e);return So("-button-group",Tr,t),Wt(No,e),{rtlEnabled:ht("ButtonGroup",r,t),mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return T("div",{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:"group"},this.$slots)}});function Kr(e){const{fontWeight:t,textColor1:r,textColor2:i,textColorDisabled:s,dividerColor:n,fontSize:d}=e;return{titleFontSize:d,titleFontWeight:t,dividerColor:n,titleTextColor:r,titleTextColorDisabled:s,fontSize:d,textColor:i,arrowColor:i,arrowColorDisabled:s,itemMargin:"16px 0 0 0",titlePadding:"16px 0 0 0"}}const Ar={common:Vt,self:Kr},Fr=O("collapse","width: 100%;",[O("collapse-item",`
34
34
  font-size: var(--n-font-size);
35
35
  color: var(--n-text-color);
36
36
  transition:
37
37
  color .3s var(--n-bezier),
38
38
  border-color .3s var(--n-bezier);
39
39
  margin: var(--n-item-margin);
40
- `,[U("disabled",[X("header","cursor: not-allowed;",[X("header-main",`
40
+ `,[M("disabled",[X("header","cursor: not-allowed;",[X("header-main",`
41
41
  color: var(--n-title-text-color-disabled);
42
- `),M("collapse-item-arrow",`
42
+ `),O("collapse-item-arrow",`
43
43
  color: var(--n-arrow-color-disabled);
44
- `)])]),M("collapse-item","margin-left: 32px;"),O("&:first-child","margin-top: 0;"),O("&:first-child >",[X("header","padding-top: 0;")]),U("left-arrow-placement",[X("header",[M("collapse-item-arrow","margin-right: 4px;")])]),U("right-arrow-placement",[X("header",[M("collapse-item-arrow","margin-left: 4px;")])]),X("content-wrapper",[X("content-inner","padding-top: 16px;"),jt({duration:"0.15s"})]),U("active",[X("header",[U("active",[M("collapse-item-arrow","transform: rotate(90deg);")])])]),O("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),$e("disabled",[U("trigger-area-main",[X("header",[X("header-main","cursor: pointer;"),M("collapse-item-arrow","cursor: default;")])]),U("trigger-area-arrow",[X("header",[M("collapse-item-arrow","cursor: pointer;")])]),U("trigger-area-extra",[X("header",[X("header-extra","cursor: pointer;")])])]),X("header",`
44
+ `)])]),O("collapse-item","margin-left: 32px;"),z("&:first-child","margin-top: 0;"),z("&:first-child >",[X("header","padding-top: 0;")]),M("left-arrow-placement",[X("header",[O("collapse-item-arrow","margin-right: 4px;")])]),M("right-arrow-placement",[X("header",[O("collapse-item-arrow","margin-left: 4px;")])]),X("content-wrapper",[X("content-inner","padding-top: 16px;"),jt({duration:"0.15s"})]),M("active",[X("header",[M("active",[O("collapse-item-arrow","transform: rotate(90deg);")])])]),z("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),$e("disabled",[M("trigger-area-main",[X("header",[X("header-main","cursor: pointer;"),O("collapse-item-arrow","cursor: default;")])]),M("trigger-area-arrow",[X("header",[O("collapse-item-arrow","cursor: pointer;")])]),M("trigger-area-extra",[X("header",[X("header-extra","cursor: pointer;")])])]),X("header",`
45
45
  font-size: var(--n-title-font-size);
46
46
  display: flex;
47
47
  flex-wrap: nowrap;
@@ -63,14 +63,14 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
63
63
  align-items: center;
64
64
  transition: color .3s var(--n-bezier);
65
65
  color: var(--n-text-color);
66
- `),M("collapse-item-arrow",`
66
+ `),O("collapse-item-arrow",`
67
67
  display: flex;
68
68
  transition:
69
69
  transform .15s var(--n-bezier),
70
70
  color .3s var(--n-bezier);
71
71
  font-size: 18px;
72
72
  color: var(--n-arrow-color);
73
- `)])])]),Br=Object.assign(Object.assign({},He.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:"left"},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:"if"},triggerAreas:{type:Array,default:()=>["main","extra","arrow"]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),jn=Yt("n-collapse"),zr=G({name:"Collapse",props:Br,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:s}=ft(e),n=le(e.defaultExpandedNames),d=K(()=>e.expandedNames),h=ct(d,n),u=He("Collapse","-collapse",Fr,Ar,e,r);function v(k){const{"onUpdate:expandedNames":w,onUpdateExpandedNames:c,onExpandedNamesChange:g}=e;c&&se(c,k),w&&se(w,k),g&&se(g,k),n.value=k}function b(k){const{onItemHeaderClick:w}=e;w&&se(w,k)}function y(k,w,c){const{accordion:g}=e,{value:D}=h;if(g)k?(v([w]),b({name:w,expanded:!0,event:c})):(v([]),b({name:w,expanded:!1,event:c}));else if(!Array.isArray(D))v([w]),b({name:w,expanded:!0,event:c});else{const p=D.slice(),l=p.findIndex(_=>w===_);~l?(p.splice(l,1),v(p),b({name:w,expanded:!1,event:c})):(p.push(w),v(p),b({name:w,expanded:!0,event:c}))}}Wt(jn,{props:e,mergedClsPrefixRef:r,expandedNamesRef:h,slots:t,toggleItem:y});const f=ht("Collapse",s,r),m=K(()=>{const{common:{cubicBezierEaseInOut:k},self:{titleFontWeight:w,dividerColor:c,titlePadding:g,titleTextColor:D,titleTextColorDisabled:p,textColor:l,arrowColor:_,fontSize:C,titleFontSize:F,arrowColorDisabled:A,itemMargin:B}}=u.value;return{"--n-font-size":C,"--n-bezier":k,"--n-text-color":l,"--n-divider-color":c,"--n-title-padding":g,"--n-title-font-size":F,"--n-title-text-color":D,"--n-title-text-color-disabled":p,"--n-title-font-weight":w,"--n-arrow-color":_,"--n-arrow-color-disabled":A,"--n-item-margin":B}}),N=i?Gt("collapse",void 0,m,e):void 0;return{rtlEnabled:f,mergedTheme:u,mergedClsPrefix:r,cssVars:i?void 0:m,themeClass:N==null?void 0:N.themeClass,onRender:N==null?void 0:N.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),I("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),Or=G({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){return{onceTrue:_o(V(e,"show"))}},render(){return I(Rn,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:r,clsPrefix:i}=this,s=t==="show"&&r,n=I("div",{class:`${i}-collapse-item__content-wrapper`},I("div",{class:`${i}-collapse-item__content-inner`},this.$slots));return s?$n(n,[[Pn,e]]):e?n:null}})}}),Mr={title:String,name:[String,Number],disabled:Boolean,displayDirective:String},Ur=G({name:"CollapseItem",props:Mr,setup(e){const{mergedRtlRef:t}=ft(e),r=$o(),i=ce(()=>{var y;return(y=e.name)!==null&&y!==void 0?y:r}),s=je(jn);s||Po("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:n,props:d,mergedClsPrefixRef:h,slots:u}=s,v=K(()=>{const{value:y}=n;if(Array.isArray(y)){const{value:f}=i;return!~y.findIndex(m=>m===f)}else if(y){const{value:f}=i;return f!==y}return!0});return{rtlEnabled:ht("Collapse",t,h),collapseSlots:u,randomName:r,mergedClsPrefix:h,collapsed:v,triggerAreas:V(d,"triggerAreas"),mergedDisplayDirective:K(()=>{const{displayDirective:y}=e;return y||d.displayDirective}),arrowPlacement:K(()=>d.arrowPlacement),handleClick(y){let f="main";nt(y,"arrow")&&(f="arrow"),nt(y,"extra")&&(f="extra"),d.triggerAreas.includes(f)&&s&&!e.disabled&&s.toggleItem(v.value,i.value,y)}}},render(){const{collapseSlots:e,$slots:t,arrowPlacement:r,collapsed:i,mergedDisplayDirective:s,mergedClsPrefix:n,disabled:d,triggerAreas:h}=this,u=sn(t.header,{collapsed:i},()=>[this.title]),v=t["header-extra"]||e["header-extra"],b=t.arrow||e.arrow;return I("div",{class:[`${n}-collapse-item`,`${n}-collapse-item--${r}-arrow-placement`,d&&`${n}-collapse-item--disabled`,!i&&`${n}-collapse-item--active`,h.map(y=>`${n}-collapse-item--trigger-area-${y}`)]},I("div",{class:[`${n}-collapse-item__header`,!i&&`${n}-collapse-item__header--active`]},I("div",{class:`${n}-collapse-item__header-main`,onClick:this.handleClick},r==="right"&&u,I("div",{class:`${n}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},sn(b,{collapsed:i},()=>[I(Dn,{clsPrefix:n},{default:()=>this.rtlEnabled?I(Dr,null):I(mr,null)})])),r==="left"&&u),Ro(v,{collapsed:i},y=>I("div",{class:`${n}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},y))),I(Or,{clsPrefix:n,displayDirective:s,show:!i},t))}}),Hr={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};function jr(e){const{dividerColor:t,cardColor:r,modalColor:i,popoverColor:s,tableHeaderColor:n,tableColorStriped:d,textColor1:h,textColor2:u,borderRadius:v,fontWeightStrong:b,lineHeight:y,fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:N}=e;return Object.assign(Object.assign({},Hr),{fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:N,lineHeight:y,borderRadius:v,borderColor:Ie(r,t),borderColorModal:Ie(i,t),borderColorPopover:Ie(s,t),tdColor:r,tdColorModal:i,tdColorPopover:s,tdColorStriped:Ie(r,d),tdColorStripedModal:Ie(i,d),tdColorStripedPopover:Ie(s,d),thColor:Ie(r,n),thColorModal:Ie(i,n),thColorPopover:Ie(s,n),thTextColor:h,tdTextColor:u,thFontWeight:b})}const qr={common:Vt,self:jr};function Wr(e){const{borderRadiusSmall:t,dividerColor:r,hoverColor:i,pressedColor:s,primaryColor:n,textColor3:d,textColor2:h,textColorDisabled:u,fontSize:v}=e;return{fontSize:v,lineHeight:"1.5",nodeHeight:"30px",nodeWrapperPadding:"3px 0",nodeBorderRadius:t,nodeColorHover:i,nodeColorPressed:s,nodeColorActive:Eo(n,{alpha:.1}),arrowColor:d,nodeTextColor:h,nodeTextColorDisabled:u,loadingColor:n,dropMarkColor:n,lineColor:r}}const Vr=Do({name:"Tree",common:Vt,peers:{Checkbox:To,Scrollbar:Io,Empty:br},self:Wr}),Gr=Object.assign(Object.assign({},He.props),{trigger:String,xScrollable:Boolean,onScroll:Function,contentClass:String,contentStyle:[Object,String],size:Number,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),Zt=G({name:"Scrollbar",props:Gr,setup(){const e=le(null);return Object.assign(Object.assign({},{scrollTo:(...r)=>{var i;(i=e.value)===null||i===void 0||i.scrollTo(r[0],r[1])},scrollBy:(...r)=>{var i;(i=e.value)===null||i===void 0||i.scrollBy(r[0],r[1])}}),{scrollbarInstRef:e})},render(){return I(Lo,Object.assign({ref:"scrollbarInstRef"},this.$props),this.$slots)}}),Yr=O([M("table",`
73
+ `)])])]),Br=Object.assign(Object.assign({},He.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:"left"},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:"if"},triggerAreas:{type:Array,default:()=>["main","extra","arrow"]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),Hn=Yt("n-collapse"),zr=G({name:"Collapse",props:Br,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:s}=ft(e),n=le(e.defaultExpandedNames),d=A(()=>e.expandedNames),h=ct(d,n),u=He("Collapse","-collapse",Fr,Ar,e,r);function v(k){const{"onUpdate:expandedNames":w,onUpdateExpandedNames:c,onExpandedNamesChange:g}=e;c&&se(c,k),w&&se(w,k),g&&se(g,k),n.value=k}function b(k){const{onItemHeaderClick:w}=e;w&&se(w,k)}function y(k,w,c){const{accordion:g}=e,{value:D}=h;if(g)k?(v([w]),b({name:w,expanded:!0,event:c})):(v([]),b({name:w,expanded:!1,event:c}));else if(!Array.isArray(D))v([w]),b({name:w,expanded:!0,event:c});else{const p=D.slice(),l=p.findIndex(_=>w===_);~l?(p.splice(l,1),v(p),b({name:w,expanded:!1,event:c})):(p.push(w),v(p),b({name:w,expanded:!0,event:c}))}}Wt(Hn,{props:e,mergedClsPrefixRef:r,expandedNamesRef:h,slots:t,toggleItem:y});const f=ht("Collapse",s,r),m=A(()=>{const{common:{cubicBezierEaseInOut:k},self:{titleFontWeight:w,dividerColor:c,titlePadding:g,titleTextColor:D,titleTextColorDisabled:p,textColor:l,arrowColor:_,fontSize:C,titleFontSize:F,arrowColorDisabled:I,itemMargin:U}}=u.value;return{"--n-font-size":C,"--n-bezier":k,"--n-text-color":l,"--n-divider-color":c,"--n-title-padding":g,"--n-title-font-size":F,"--n-title-text-color":D,"--n-title-text-color-disabled":p,"--n-title-font-weight":w,"--n-arrow-color":_,"--n-arrow-color-disabled":I,"--n-item-margin":U}}),N=i?Gt("collapse",void 0,m,e):void 0;return{rtlEnabled:f,mergedTheme:u,mergedClsPrefix:r,cssVars:i?void 0:m,themeClass:N==null?void 0:N.themeClass,onRender:N==null?void 0:N.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),T("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),Or=G({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){return{onceTrue:_o(V(e,"show"))}},render(){return T(_n,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:r,clsPrefix:i}=this,s=t==="show"&&r,n=T("div",{class:`${i}-collapse-item__content-wrapper`},T("div",{class:`${i}-collapse-item__content-inner`},this.$slots));return s?Rn(n,[[$n,e]]):e?n:null}})}}),Mr={title:String,name:[String,Number],disabled:Boolean,displayDirective:String},Ur=G({name:"CollapseItem",props:Mr,setup(e){const{mergedRtlRef:t}=ft(e),r=$o(),i=ce(()=>{var y;return(y=e.name)!==null&&y!==void 0?y:r}),s=je(Hn);s||Po("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:n,props:d,mergedClsPrefixRef:h,slots:u}=s,v=A(()=>{const{value:y}=n;if(Array.isArray(y)){const{value:f}=i;return!~y.findIndex(m=>m===f)}else if(y){const{value:f}=i;return f!==y}return!0});return{rtlEnabled:ht("Collapse",t,h),collapseSlots:u,randomName:r,mergedClsPrefix:h,collapsed:v,triggerAreas:V(d,"triggerAreas"),mergedDisplayDirective:A(()=>{const{displayDirective:y}=e;return y||d.displayDirective}),arrowPlacement:A(()=>d.arrowPlacement),handleClick(y){let f="main";nt(y,"arrow")&&(f="arrow"),nt(y,"extra")&&(f="extra"),d.triggerAreas.includes(f)&&s&&!e.disabled&&s.toggleItem(v.value,i.value,y)}}},render(){const{collapseSlots:e,$slots:t,arrowPlacement:r,collapsed:i,mergedDisplayDirective:s,mergedClsPrefix:n,disabled:d,triggerAreas:h}=this,u=an(t.header,{collapsed:i},()=>[this.title]),v=t["header-extra"]||e["header-extra"],b=t.arrow||e.arrow;return T("div",{class:[`${n}-collapse-item`,`${n}-collapse-item--${r}-arrow-placement`,d&&`${n}-collapse-item--disabled`,!i&&`${n}-collapse-item--active`,h.map(y=>`${n}-collapse-item--trigger-area-${y}`)]},T("div",{class:[`${n}-collapse-item__header`,!i&&`${n}-collapse-item__header--active`]},T("div",{class:`${n}-collapse-item__header-main`,onClick:this.handleClick},r==="right"&&u,T("div",{class:`${n}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},an(b,{collapsed:i},()=>[T(Pn,{clsPrefix:n},{default:()=>this.rtlEnabled?T(Dr,null):T(mr,null)})])),r==="left"&&u),Ro(v,{collapsed:i},y=>T("div",{class:`${n}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},y))),T(Or,{clsPrefix:n,displayDirective:s,show:!i},t))}}),Hr={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};function jr(e){const{dividerColor:t,cardColor:r,modalColor:i,popoverColor:s,tableHeaderColor:n,tableColorStriped:d,textColor1:h,textColor2:u,borderRadius:v,fontWeightStrong:b,lineHeight:y,fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:N}=e;return Object.assign(Object.assign({},Hr),{fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:N,lineHeight:y,borderRadius:v,borderColor:Ie(r,t),borderColorModal:Ie(i,t),borderColorPopover:Ie(s,t),tdColor:r,tdColorModal:i,tdColorPopover:s,tdColorStriped:Ie(r,d),tdColorStripedModal:Ie(i,d),tdColorStripedPopover:Ie(s,d),thColor:Ie(r,n),thColorModal:Ie(i,n),thColorPopover:Ie(s,n),thTextColor:h,tdTextColor:u,thFontWeight:b})}const qr={common:Vt,self:jr};function Wr(e){const{borderRadiusSmall:t,dividerColor:r,hoverColor:i,pressedColor:s,primaryColor:n,textColor3:d,textColor2:h,textColorDisabled:u,fontSize:v}=e;return{fontSize:v,lineHeight:"1.5",nodeHeight:"30px",nodeWrapperPadding:"3px 0",nodeBorderRadius:t,nodeColorHover:i,nodeColorPressed:s,nodeColorActive:Eo(n,{alpha:.1}),arrowColor:d,nodeTextColor:h,nodeTextColorDisabled:u,loadingColor:n,dropMarkColor:n,lineColor:r}}const Vr=Do({name:"Tree",common:Vt,peers:{Checkbox:To,Scrollbar:Io,Empty:br},self:Wr}),Gr=Object.assign(Object.assign({},He.props),{trigger:String,xScrollable:Boolean,onScroll:Function,contentClass:String,contentStyle:[Object,String],size:Number,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),jn=G({name:"Scrollbar",props:Gr,setup(){const e=le(null);return Object.assign(Object.assign({},{scrollTo:(...r)=>{var i;(i=e.value)===null||i===void 0||i.scrollTo(r[0],r[1])},scrollBy:(...r)=>{var i;(i=e.value)===null||i===void 0||i.scrollBy(r[0],r[1])}}),{scrollbarInstRef:e})},render(){return T(Lo,Object.assign({ref:"scrollbarInstRef"},this.$props),this.$slots)}}),Yr=z([O("table",`
74
74
  font-size: var(--n-font-size);
75
75
  font-variant-numeric: tabular-nums;
76
76
  line-height: var(--n-line-height);
@@ -87,7 +87,7 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
87
87
  border-color .3s var(--n-bezier),
88
88
  color .3s var(--n-bezier);
89
89
  --n-merged-border-color: var(--n-border-color);
90
- `,[O("th",`
90
+ `,[z("th",`
91
91
  white-space: nowrap;
92
92
  transition:
93
93
  background-color .3s var(--n-bezier),
@@ -103,9 +103,9 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
103
103
  background-color: var(--n-th-color);
104
104
  border-bottom: 1px solid var(--n-merged-border-color);
105
105
  border-right: 1px solid var(--n-merged-border-color);
106
- `,[O("&:last-child",`
106
+ `,[z("&:last-child",`
107
107
  border-right: 0px solid var(--n-merged-border-color);
108
- `)]),O("td",`
108
+ `)]),z("td",`
109
109
  transition:
110
110
  background-color .3s var(--n-bezier),
111
111
  border-color .3s var(--n-bezier),
@@ -116,74 +116,74 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
116
116
  border: 0px solid var(--n-merged-border-color);
117
117
  border-right: 1px solid var(--n-merged-border-color);
118
118
  border-bottom: 1px solid var(--n-merged-border-color);
119
- `,[O("&:last-child",`
119
+ `,[z("&:last-child",`
120
120
  border-right: 0px solid var(--n-merged-border-color);
121
- `)]),U("bordered",`
121
+ `)]),M("bordered",`
122
122
  border: 1px solid var(--n-merged-border-color);
123
123
  border-radius: var(--n-border-radius);
124
- `,[O("tr",[O("&:last-child",[O("td",`
124
+ `,[z("tr",[z("&:last-child",[z("td",`
125
125
  border-bottom: 0 solid var(--n-merged-border-color);
126
- `)])])]),U("single-line",[O("th",`
126
+ `)])])]),M("single-line",[z("th",`
127
127
  border-right: 0px solid var(--n-merged-border-color);
128
- `),O("td",`
128
+ `),z("td",`
129
129
  border-right: 0px solid var(--n-merged-border-color);
130
- `)]),U("single-column",[O("tr",[O("&:not(:last-child)",[O("td",`
130
+ `)]),M("single-column",[z("tr",[z("&:not(:last-child)",[z("td",`
131
131
  border-bottom: 0px solid var(--n-merged-border-color);
132
- `)])])]),U("striped",[O("tr:nth-of-type(even)",[O("td","background-color: var(--n-td-color-striped)")])]),$e("bottom-bordered",[O("tr",[O("&:last-child",[O("td",`
132
+ `)])])]),M("striped",[z("tr:nth-of-type(even)",[z("td","background-color: var(--n-td-color-striped)")])]),$e("bottom-bordered",[z("tr",[z("&:last-child",[z("td",`
133
133
  border-bottom: 0px solid var(--n-merged-border-color);
134
- `)])])])]),Ko(M("table",`
134
+ `)])])])]),Ko(O("table",`
135
135
  background-color: var(--n-td-color-modal);
136
136
  --n-merged-border-color: var(--n-border-color-modal);
137
- `,[O("th",`
137
+ `,[z("th",`
138
138
  background-color: var(--n-th-color-modal);
139
- `),O("td",`
139
+ `),z("td",`
140
140
  background-color: var(--n-td-color-modal);
141
- `)])),Ao(M("table",`
141
+ `)])),Ao(O("table",`
142
142
  background-color: var(--n-td-color-popover);
143
143
  --n-merged-border-color: var(--n-border-color-popover);
144
- `,[O("th",`
144
+ `,[z("th",`
145
145
  background-color: var(--n-th-color-popover);
146
- `),O("td",`
146
+ `),z("td",`
147
147
  background-color: var(--n-td-color-popover);
148
- `)]))]),Qr=Object.assign(Object.assign({},He.props),{bordered:{type:Boolean,default:!0},bottomBordered:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!0},striped:Boolean,singleColumn:Boolean,size:{type:String,default:"medium"}}),Xr=G({name:"Table",props:Qr,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:i}=ft(e),s=He("Table","-table",Yr,qr,e,t),n=ht("Table",i,t),d=K(()=>{const{size:u}=e,{self:{borderColor:v,tdColor:b,tdColorModal:y,tdColorPopover:f,thColor:m,thColorModal:N,thColorPopover:k,thTextColor:w,tdTextColor:c,borderRadius:g,thFontWeight:D,lineHeight:p,borderColorModal:l,borderColorPopover:_,tdColorStriped:C,tdColorStripedModal:F,tdColorStripedPopover:A,[Ft("fontSize",u)]:B,[Ft("tdPadding",u)]:ke,[Ft("thPadding",u)]:we},common:{cubicBezierEaseInOut:ie}}=s.value;return{"--n-bezier":ie,"--n-td-color":b,"--n-td-color-modal":y,"--n-td-color-popover":f,"--n-td-text-color":c,"--n-border-color":v,"--n-border-color-modal":l,"--n-border-color-popover":_,"--n-border-radius":g,"--n-font-size":B,"--n-th-color":m,"--n-th-color-modal":N,"--n-th-color-popover":k,"--n-th-font-weight":D,"--n-th-text-color":w,"--n-line-height":p,"--n-td-padding":ke,"--n-th-padding":we,"--n-td-color-striped":C,"--n-td-color-striped-modal":F,"--n-td-color-striped-popover":A}}),h=r?Gt("table",K(()=>e.size[0]),d,e):void 0;return{rtlEnabled:n,mergedClsPrefix:t,cssVars:r?void 0:d,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender}},render(){var e;const{mergedClsPrefix:t}=this;return(e=this.onRender)===null||e===void 0||e.call(this),I("table",{class:[`${t}-table`,this.themeClass,{[`${t}-table--rtl`]:this.rtlEnabled,[`${t}-table--bottom-bordered`]:this.bottomBordered,[`${t}-table--bordered`]:this.bordered,[`${t}-table--single-line`]:this.singleLine,[`${t}-table--single-column`]:this.singleColumn,[`${t}-table--striped`]:this.striped}],style:this.cssVars},this.$slots)}}),Jr=G({name:"Tbody",render(){return I("tbody",null,this.$slots)}}),Zr=G({name:"Td",render(){return I("td",null,this.$slots)}}),el=G({name:"Tr",render(){return I("tr",null,this.$slots)}}),qn=Yt("n-tree-select");function wn({position:e,offsetLevel:t,indent:r,el:i}){const s={position:"absolute",boxSizing:"border-box",right:0};if(e==="inside")s.left=0,s.top=0,s.bottom=0,s.borderRadius="inherit",s.boxShadow="inset 0 0 0 2px var(--n-drop-mark-color)";else{const n=e==="before"?"top":"bottom";s[n]=0,s.left=`${i.offsetLeft+6-t*r}px`,s.height="2px",s.backgroundColor="var(--n-drop-mark-color)",s.transformOrigin=n,s.borderRadius="1px",s.transform=e==="before"?"translateY(-4px)":"translateY(4px)"}return I("div",{style:s})}function tl({dropPosition:e,node:t}){return t.isLeaf===!1||t.children?!0:e!=="inside"}const vt=Yt("n-tree");function nl({props:e,fNodesRef:t,mergedExpandedKeysRef:r,mergedSelectedKeysRef:i,mergedCheckedKeysRef:s,handleCheck:n,handleSelect:d,handleSwitcherClick:h}){const{value:u}=i,v=je(qn,null),b=v?v.pendingNodeKeyRef:le(u.length?u[u.length-1]:null);function y(f){var m;if(!e.keyboard)return{enterBehavior:null};const{value:N}=b;let k=null;if(N===null){if((f.key==="ArrowDown"||f.key==="ArrowUp")&&f.preventDefault(),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(f.key)&&N===null){const{value:w}=t;let c=0;for(;c<w.length;){if(!w[c].disabled){b.value=w[c].key;break}c+=1}}}else{const{value:w}=t;let c=w.findIndex(g=>g.key===N);if(!~c)return{enterBehavior:null};if(f.key==="Enter"){const g=w[c];switch(k=((m=e.overrideDefaultNodeClickBehavior)===null||m===void 0?void 0:m.call(e,{option:g.rawNode}))||null,k){case"toggleCheck":n(g,!s.value.includes(g.key));break;case"toggleSelect":d(g);break;case"toggleExpand":h(g);break;case"none":break;default:k="default",d(g)}}else if(f.key==="ArrowDown")for(f.preventDefault(),c+=1;c<w.length;){if(!w[c].disabled){b.value=w[c].key;break}c+=1}else if(f.key==="ArrowUp")for(f.preventDefault(),c-=1;c>=0;){if(!w[c].disabled){b.value=w[c].key;break}c-=1}else if(f.key==="ArrowLeft"){const g=w[c];if(g.isLeaf||!r.value.includes(N)){const D=g.getParent();D&&(b.value=D.key)}else h(g)}else if(f.key==="ArrowRight"){const g=w[c];if(g.isLeaf)return{enterBehavior:null};if(!r.value.includes(N))h(g);else for(c+=1;c<w.length;){if(!w[c].disabled){b.value=w[c].key;break}c+=1}}}return{enterBehavior:k}}return{pendingNodeKeyRef:b,handleKeydown:y}}const ol=G({name:"NTreeNodeCheckbox",props:{clsPrefix:{type:String,required:!0},indent:{type:Number,required:!0},right:Boolean,focusable:Boolean,disabled:Boolean,checked:Boolean,indeterminate:Boolean,onCheck:Function},setup(e){const t=je(vt);function r(s){const{onCheck:n}=e;n&&n(s)}function i(s){r(s)}return{handleUpdateValue:i,mergedTheme:t.mergedThemeRef}},render(){const{clsPrefix:e,mergedTheme:t,checked:r,indeterminate:i,disabled:s,focusable:n,indent:d,handleUpdateValue:h}=this;return I("span",{class:[`${e}-tree-node-checkbox`,this.right&&`${e}-tree-node-checkbox--right`],style:{width:`${d}px`},"data-checkbox":!0},I(Fo,{focusable:n,disabled:s,theme:t.peers.Checkbox,themeOverrides:t.peerOverrides.Checkbox,checked:r,indeterminate:i,onUpdateChecked:h}))}}),rl=G({name:"TreeNodeContent",props:{clsPrefix:{type:String,required:!0},disabled:Boolean,checked:Boolean,selected:Boolean,onClick:Function,onDragstart:Function,tmNode:{type:Object,required:!0},nodeProps:Object},setup(e){const{renderLabelRef:t,renderPrefixRef:r,renderSuffixRef:i,labelFieldRef:s}=je(vt),n=le(null);function d(u){const{onClick:v}=e;v&&v(u)}function h(u){d(u)}return{selfRef:n,renderLabel:t,renderPrefix:r,renderSuffix:i,labelField:s,handleClick:h}},render(){const{clsPrefix:e,labelField:t,nodeProps:r,checked:i=!1,selected:s=!1,renderLabel:n,renderPrefix:d,renderSuffix:h,handleClick:u,onDragstart:v,tmNode:{rawNode:b,rawNode:{prefix:y,suffix:f,[t]:m}}}=this;return I("span",Object.assign({},r,{ref:"selfRef",class:[`${e}-tree-node-content`,r==null?void 0:r.class],onClick:u,draggable:v===void 0?void 0:!0,onDragstart:v}),d||y?I("div",{class:`${e}-tree-node-content__prefix`},d?d({option:b,selected:s,checked:i}):Bt(y)):null,I("div",{class:`${e}-tree-node-content__text`},n?n({option:b,selected:s,checked:i}):Bt(m)),h||f?I("div",{class:`${e}-tree-node-content__suffix`},h?h({option:b,selected:s,checked:i}):Bt(f)):null)}}),ll=G({name:"NTreeSwitcher",props:{clsPrefix:{type:String,required:!0},indent:{type:Number,required:!0},expanded:Boolean,selected:Boolean,hide:Boolean,loading:Boolean,onClick:Function,tmNode:{type:Object,required:!0}},setup(e){const{renderSwitcherIconRef:t}=je(vt,null);return()=>{const{clsPrefix:r,expanded:i,hide:s,indent:n,onClick:d}=e;return I("span",{"data-switcher":!0,class:[`${r}-tree-node-switcher`,i&&`${r}-tree-node-switcher--expanded`,s&&`${r}-tree-node-switcher--hide`],style:{width:`${n}px`},onClick:d},I("div",{class:`${r}-tree-node-switcher__icon`},I(Bo,null,{default:()=>{if(e.loading)return I(zo,{clsPrefix:r,key:"loading",radius:85,strokeWidth:20});const{value:h}=t;return h?h({expanded:e.expanded,selected:e.selected,option:e.tmNode.rawNode}):I(Dn,{clsPrefix:r,key:"switcher"},{default:()=>I(Ir,null)})}})))}}});function il(e){return K(()=>e.leafOnly?"child":e.checkStrategy)}function Le(e,t){return!!e.rawNode[t]}function Wn(e,t,r,i){e==null||e.forEach(s=>{r(s),Wn(s[t],t,r,i),i(s)})}function al(e,t,r,i,s){const n=new Set,d=new Set,h=[];return Wn(e,i,u=>{if(h.push(u),s(t,u)){d.add(u[r]);for(let v=h.length-2;v>=0;--v)if(!n.has(h[v][r]))n.add(h[v][r]);else return}},()=>{h.pop()}),{expandedKeys:Array.from(n),highlightKeySet:d}}if(Oo&&Image){const e=new Image;e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}function sl(e,t,r,i,s){const n=new Set,d=new Set,h=new Set,u=[],v=[],b=[];function y(m){m.forEach(N=>{if(b.push(N),t(r,N)){n.add(N[i]),h.add(N[i]);for(let w=b.length-2;w>=0;--w){const c=b[w][i];if(!d.has(c))d.add(c),n.has(c)&&n.delete(c);else break}}const k=N[s];k&&y(k),b.pop()})}y(e);function f(m,N){m.forEach(k=>{const w=k[i],c=n.has(w),g=d.has(w);if(!c&&!g)return;const D=k[s];if(D)if(c)N.push(k);else{u.push(w);const p=Object.assign(Object.assign({},k),{[s]:[]});N.push(p),f(D,p[s])}else N.push(k)})}return f(e,v),{filteredTree:v,highlightKeySet:h,expandedKeys:u}}const Vn=G({name:"TreeNode",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const t=je(vt),{droppingNodeParentRef:r,droppingMouseNodeRef:i,draggingNodeRef:s,droppingPositionRef:n,droppingOffsetLevelRef:d,nodePropsRef:h,indentRef:u,blockLineRef:v,checkboxPlacementRef:b,checkOnClickRef:y,disabledFieldRef:f,showLineRef:m,renderSwitcherIconRef:N,overrideDefaultNodeClickBehaviorRef:k}=t,w=ce(()=>!!e.tmNode.rawNode.checkboxDisabled),c=ce(()=>Le(e.tmNode,f.value)),g=ce(()=>t.disabledRef.value||c.value),D=K(()=>{const{value:T}=h;if(T)return T({option:e.tmNode.rawNode})}),p=le(null),l={value:null};Rt(()=>{l.value=p.value.$el});function _(){const T=()=>{const{tmNode:W}=e;if(!W.isLeaf&&!W.shallowLoaded){if(!t.loadingKeysRef.value.has(W.key))t.loadingKeysRef.value.add(W.key);else return;const{onLoadRef:{value:Z}}=t;Z&&Z(W.rawNode).then(re=>{re!==!1&&t.handleSwitcherClick(W)}).finally(()=>{t.loadingKeysRef.value.delete(W.key)})}else t.handleSwitcherClick(W)};N.value?setTimeout(T,0):T()}const C=ce(()=>!c.value&&t.selectableRef.value&&(t.internalTreeSelect?t.mergedCheckStrategyRef.value!=="child"||t.multipleRef.value&&t.cascadeRef.value||e.tmNode.isLeaf:!0)),F=ce(()=>t.checkableRef.value&&(t.cascadeRef.value||t.mergedCheckStrategyRef.value!=="child"||e.tmNode.isLeaf)),A=ce(()=>t.displayedCheckedKeysRef.value.includes(e.tmNode.key)),B=ce(()=>{const{value:T}=F;if(!T)return!1;const{value:W}=y,{tmNode:Z}=e;return typeof W=="boolean"?!Z.disabled&&W:W(e.tmNode.rawNode)});function ke(T){const{value:W}=t.expandOnClickRef,{value:Z}=C,{value:re}=B;if(!Z&&!W&&!re||nt(T,"checkbox")||nt(T,"switcher"))return;const{tmNode:fe}=e;Z&&t.handleSelect(fe),W&&!fe.isLeaf&&_(),re&&be(!A.value)}function we(T){var W,Z;if(!(nt(T,"checkbox")||nt(T,"switcher"))){if(!g.value){const re=k.value;let fe=!1;if(re)switch(re({option:e.tmNode.rawNode})){case"toggleCheck":fe=!0,be(!A.value);break;case"toggleSelect":fe=!0,t.handleSelect(e.tmNode);break;case"toggleExpand":fe=!0,_(),fe=!0;break;case"none":fe=!0,fe=!0;return}fe||ke(T)}(Z=(W=D.value)===null||W===void 0?void 0:W.onClick)===null||Z===void 0||Z.call(W,T)}}function ie(T){v.value||we(T)}function he(T){v.value&&we(T)}function be(T){t.handleCheck(e.tmNode,T)}function _e(T){t.handleDragStart({event:T,node:e.tmNode})}function lt(T){T.currentTarget===T.target&&t.handleDragEnter({event:T,node:e.tmNode})}function ge(T){T.preventDefault(),t.handleDragOver({event:T,node:e.tmNode})}function H(T){t.handleDragEnd({event:T,node:e.tmNode})}function Fe(T){T.currentTarget===T.target&&t.handleDragLeave({event:T,node:e.tmNode})}function ue(T){T.preventDefault(),n.value!==null&&t.handleDrop({event:T,node:e.tmNode,dropPosition:n.value})}const Be=K(()=>{const{clsPrefix:T}=e,{value:W}=u;if(m.value){const Z=[];let re=e.tmNode.parent;for(;re;)re.isLastChild?Z.push(I("div",{class:`${T}-tree-node-indent`},I("div",{style:{width:`${W}px`}}))):Z.push(I("div",{class:[`${T}-tree-node-indent`,`${T}-tree-node-indent--show-line`]},I("div",{style:{width:`${W}px`}}))),re=re.parent;return Z.reverse()}else return Mo(e.tmNode.level,I("div",{class:`${e.clsPrefix}-tree-node-indent`},I("div",{style:{width:`${W}px`}})))});return{showDropMark:ce(()=>{const{value:T}=s;if(!T)return;const{value:W}=n;if(!W)return;const{value:Z}=i;if(!Z)return;const{tmNode:re}=e;return re.key===Z.key}),showDropMarkAsParent:ce(()=>{const{value:T}=r;if(!T)return!1;const{tmNode:W}=e,{value:Z}=n;return Z==="before"||Z==="after"?T.key===W.key:!1}),pending:ce(()=>t.pendingNodeKeyRef.value===e.tmNode.key),loading:ce(()=>t.loadingKeysRef.value.has(e.tmNode.key)),highlight:ce(()=>{var T;return(T=t.highlightKeySetRef.value)===null||T===void 0?void 0:T.has(e.tmNode.key)}),checked:A,indeterminate:ce(()=>t.displayedIndeterminateKeysRef.value.includes(e.tmNode.key)),selected:ce(()=>t.mergedSelectedKeysRef.value.includes(e.tmNode.key)),expanded:ce(()=>t.mergedExpandedKeysRef.value.includes(e.tmNode.key)),disabled:g,checkable:F,mergedCheckOnClick:B,checkboxDisabled:w,selectable:C,expandOnClick:t.expandOnClickRef,internalScrollable:t.internalScrollableRef,draggable:t.draggableRef,blockLine:v,nodeProps:D,checkboxFocusable:t.internalCheckboxFocusableRef,droppingPosition:n,droppingOffsetLevel:d,indent:u,checkboxPlacement:b,showLine:m,contentInstRef:p,contentElRef:l,indentNodes:Be,handleCheck:be,handleDrop:ue,handleDragStart:_e,handleDragEnter:lt,handleDragOver:ge,handleDragEnd:H,handleDragLeave:Fe,handleLineClick:he,handleContentClick:ie,handleSwitcherClick:_}},render(){const{tmNode:e,clsPrefix:t,checkable:r,expandOnClick:i,selectable:s,selected:n,checked:d,highlight:h,draggable:u,blockLine:v,indent:b,indentNodes:y,disabled:f,pending:m,internalScrollable:N,nodeProps:k,checkboxPlacement:w}=this,c=u&&!f?{onDragenter:this.handleDragEnter,onDragleave:this.handleDragLeave,onDragend:this.handleDragEnd,onDrop:this.handleDrop,onDragover:this.handleDragOver}:void 0,g=N?Un(e.key):void 0,D=w==="right",p=r?I(ol,{indent:b,right:D,focusable:this.checkboxFocusable,disabled:f||this.checkboxDisabled,clsPrefix:t,checked:this.checked,indeterminate:this.indeterminate,onCheck:this.handleCheck}):null;return I("div",Object.assign({class:`${t}-tree-node-wrapper`},c),I("div",Object.assign({},v?k:void 0,{class:[`${t}-tree-node`,{[`${t}-tree-node--selected`]:n,[`${t}-tree-node--checkable`]:r,[`${t}-tree-node--highlight`]:h,[`${t}-tree-node--pending`]:m,[`${t}-tree-node--disabled`]:f,[`${t}-tree-node--selectable`]:s,[`${t}-tree-node--clickable`]:s||i||this.mergedCheckOnClick},k==null?void 0:k.class],"data-key":g,draggable:u&&v,onClick:this.handleLineClick,onDragstart:u&&v&&!f?this.handleDragStart:void 0}),y,e.isLeaf&&this.showLine?I("div",{class:[`${t}-tree-node-indent`,`${t}-tree-node-indent--show-line`,e.isLeaf&&`${t}-tree-node-indent--is-leaf`,e.isLastChild&&`${t}-tree-node-indent--last-child`]},I("div",{style:{width:`${b}px`}})):I(ll,{clsPrefix:t,expanded:this.expanded,selected:n,loading:this.loading,hide:e.isLeaf,tmNode:this.tmNode,indent:b,onClick:this.handleSwitcherClick}),D?null:p,I(rl,{ref:"contentInstRef",clsPrefix:t,checked:d,selected:n,onClick:this.handleContentClick,nodeProps:v?void 0:k,onDragstart:u&&!v&&!f?this.handleDragStart:void 0,tmNode:e}),u?this.showDropMark?wn({el:this.contentElRef.value,position:this.droppingPosition,offsetLevel:this.droppingOffsetLevel,indent:b}):this.showDropMarkAsParent?wn({el:this.contentElRef.value,position:"inside",offsetLevel:this.droppingOffsetLevel,indent:b}):null:null,D?p:null))}}),dl=G({name:"TreeMotionWrapper",props:{clsPrefix:{type:String,required:!0},height:Number,nodes:{type:Array,required:!0},mode:{type:String,required:!0},onAfterEnter:{type:Function,required:!0}},render(){const{clsPrefix:e}=this;return I(Rn,{onAfterEnter:this.onAfterEnter,appear:!0,reverse:this.mode==="collapse"},{default:()=>I("div",{class:[`${e}-tree-motion-wrapper`,`${e}-tree-motion-wrapper--${this.mode}`],style:{height:In(this.height)}},this.nodes.map(t=>I(Vn,{clsPrefix:e,tmNode:t})))})}}),Ht=Uo(),cl=M("tree",`
148
+ `)]))]),Qr=Object.assign(Object.assign({},He.props),{bordered:{type:Boolean,default:!0},bottomBordered:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!0},striped:Boolean,singleColumn:Boolean,size:{type:String,default:"medium"}}),Xr=G({name:"Table",props:Qr,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:i}=ft(e),s=He("Table","-table",Yr,qr,e,t),n=ht("Table",i,t),d=A(()=>{const{size:u}=e,{self:{borderColor:v,tdColor:b,tdColorModal:y,tdColorPopover:f,thColor:m,thColorModal:N,thColorPopover:k,thTextColor:w,tdTextColor:c,borderRadius:g,thFontWeight:D,lineHeight:p,borderColorModal:l,borderColorPopover:_,tdColorStriped:C,tdColorStripedModal:F,tdColorStripedPopover:I,[Ft("fontSize",u)]:U,[Ft("tdPadding",u)]:ke,[Ft("thPadding",u)]:we},common:{cubicBezierEaseInOut:ie}}=s.value;return{"--n-bezier":ie,"--n-td-color":b,"--n-td-color-modal":y,"--n-td-color-popover":f,"--n-td-text-color":c,"--n-border-color":v,"--n-border-color-modal":l,"--n-border-color-popover":_,"--n-border-radius":g,"--n-font-size":U,"--n-th-color":m,"--n-th-color-modal":N,"--n-th-color-popover":k,"--n-th-font-weight":D,"--n-th-text-color":w,"--n-line-height":p,"--n-td-padding":ke,"--n-th-padding":we,"--n-td-color-striped":C,"--n-td-color-striped-modal":F,"--n-td-color-striped-popover":I}}),h=r?Gt("table",A(()=>e.size[0]),d,e):void 0;return{rtlEnabled:n,mergedClsPrefix:t,cssVars:r?void 0:d,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender}},render(){var e;const{mergedClsPrefix:t}=this;return(e=this.onRender)===null||e===void 0||e.call(this),T("table",{class:[`${t}-table`,this.themeClass,{[`${t}-table--rtl`]:this.rtlEnabled,[`${t}-table--bottom-bordered`]:this.bottomBordered,[`${t}-table--bordered`]:this.bordered,[`${t}-table--single-line`]:this.singleLine,[`${t}-table--single-column`]:this.singleColumn,[`${t}-table--striped`]:this.striped}],style:this.cssVars},this.$slots)}}),Jr=G({name:"Tbody",render(){return T("tbody",null,this.$slots)}}),Zr=G({name:"Td",render(){return T("td",null,this.$slots)}}),el=G({name:"Tr",render(){return T("tr",null,this.$slots)}}),qn=Yt("n-tree-select");function kn({position:e,offsetLevel:t,indent:r,el:i}){const s={position:"absolute",boxSizing:"border-box",right:0};if(e==="inside")s.left=0,s.top=0,s.bottom=0,s.borderRadius="inherit",s.boxShadow="inset 0 0 0 2px var(--n-drop-mark-color)";else{const n=e==="before"?"top":"bottom";s[n]=0,s.left=`${i.offsetLeft+6-t*r}px`,s.height="2px",s.backgroundColor="var(--n-drop-mark-color)",s.transformOrigin=n,s.borderRadius="1px",s.transform=e==="before"?"translateY(-4px)":"translateY(4px)"}return T("div",{style:s})}function tl({dropPosition:e,node:t}){return t.isLeaf===!1||t.children?!0:e!=="inside"}const vt=Yt("n-tree");function nl({props:e,fNodesRef:t,mergedExpandedKeysRef:r,mergedSelectedKeysRef:i,mergedCheckedKeysRef:s,handleCheck:n,handleSelect:d,handleSwitcherClick:h}){const{value:u}=i,v=je(qn,null),b=v?v.pendingNodeKeyRef:le(u.length?u[u.length-1]:null);function y(f){var m;if(!e.keyboard)return{enterBehavior:null};const{value:N}=b;let k=null;if(N===null){if((f.key==="ArrowDown"||f.key==="ArrowUp")&&f.preventDefault(),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(f.key)&&N===null){const{value:w}=t;let c=0;for(;c<w.length;){if(!w[c].disabled){b.value=w[c].key;break}c+=1}}}else{const{value:w}=t;let c=w.findIndex(g=>g.key===N);if(!~c)return{enterBehavior:null};if(f.key==="Enter"){const g=w[c];switch(k=((m=e.overrideDefaultNodeClickBehavior)===null||m===void 0?void 0:m.call(e,{option:g.rawNode}))||null,k){case"toggleCheck":n(g,!s.value.includes(g.key));break;case"toggleSelect":d(g);break;case"toggleExpand":h(g);break;case"none":break;default:k="default",d(g)}}else if(f.key==="ArrowDown")for(f.preventDefault(),c+=1;c<w.length;){if(!w[c].disabled){b.value=w[c].key;break}c+=1}else if(f.key==="ArrowUp")for(f.preventDefault(),c-=1;c>=0;){if(!w[c].disabled){b.value=w[c].key;break}c-=1}else if(f.key==="ArrowLeft"){const g=w[c];if(g.isLeaf||!r.value.includes(N)){const D=g.getParent();D&&(b.value=D.key)}else h(g)}else if(f.key==="ArrowRight"){const g=w[c];if(g.isLeaf)return{enterBehavior:null};if(!r.value.includes(N))h(g);else for(c+=1;c<w.length;){if(!w[c].disabled){b.value=w[c].key;break}c+=1}}}return{enterBehavior:k}}return{pendingNodeKeyRef:b,handleKeydown:y}}const ol=G({name:"NTreeNodeCheckbox",props:{clsPrefix:{type:String,required:!0},indent:{type:Number,required:!0},right:Boolean,focusable:Boolean,disabled:Boolean,checked:Boolean,indeterminate:Boolean,onCheck:Function},setup(e){const t=je(vt);function r(s){const{onCheck:n}=e;n&&n(s)}function i(s){r(s)}return{handleUpdateValue:i,mergedTheme:t.mergedThemeRef}},render(){const{clsPrefix:e,mergedTheme:t,checked:r,indeterminate:i,disabled:s,focusable:n,indent:d,handleUpdateValue:h}=this;return T("span",{class:[`${e}-tree-node-checkbox`,this.right&&`${e}-tree-node-checkbox--right`],style:{width:`${d}px`},"data-checkbox":!0},T(Fo,{focusable:n,disabled:s,theme:t.peers.Checkbox,themeOverrides:t.peerOverrides.Checkbox,checked:r,indeterminate:i,onUpdateChecked:h}))}}),rl=G({name:"TreeNodeContent",props:{clsPrefix:{type:String,required:!0},disabled:Boolean,checked:Boolean,selected:Boolean,onClick:Function,onDragstart:Function,tmNode:{type:Object,required:!0},nodeProps:Object},setup(e){const{renderLabelRef:t,renderPrefixRef:r,renderSuffixRef:i,labelFieldRef:s}=je(vt),n=le(null);function d(u){const{onClick:v}=e;v&&v(u)}function h(u){d(u)}return{selfRef:n,renderLabel:t,renderPrefix:r,renderSuffix:i,labelField:s,handleClick:h}},render(){const{clsPrefix:e,labelField:t,nodeProps:r,checked:i=!1,selected:s=!1,renderLabel:n,renderPrefix:d,renderSuffix:h,handleClick:u,onDragstart:v,tmNode:{rawNode:b,rawNode:{prefix:y,suffix:f,[t]:m}}}=this;return T("span",Object.assign({},r,{ref:"selfRef",class:[`${e}-tree-node-content`,r==null?void 0:r.class],onClick:u,draggable:v===void 0?void 0:!0,onDragstart:v}),d||y?T("div",{class:`${e}-tree-node-content__prefix`},d?d({option:b,selected:s,checked:i}):Bt(y)):null,T("div",{class:`${e}-tree-node-content__text`},n?n({option:b,selected:s,checked:i}):Bt(m)),h||f?T("div",{class:`${e}-tree-node-content__suffix`},h?h({option:b,selected:s,checked:i}):Bt(f)):null)}}),ll=G({name:"NTreeSwitcher",props:{clsPrefix:{type:String,required:!0},indent:{type:Number,required:!0},expanded:Boolean,selected:Boolean,hide:Boolean,loading:Boolean,onClick:Function,tmNode:{type:Object,required:!0}},setup(e){const{renderSwitcherIconRef:t}=je(vt,null);return()=>{const{clsPrefix:r,expanded:i,hide:s,indent:n,onClick:d}=e;return T("span",{"data-switcher":!0,class:[`${r}-tree-node-switcher`,i&&`${r}-tree-node-switcher--expanded`,s&&`${r}-tree-node-switcher--hide`],style:{width:`${n}px`},onClick:d},T("div",{class:`${r}-tree-node-switcher__icon`},T(Bo,null,{default:()=>{if(e.loading)return T(zo,{clsPrefix:r,key:"loading",radius:85,strokeWidth:20});const{value:h}=t;return h?h({expanded:e.expanded,selected:e.selected,option:e.tmNode.rawNode}):T(Pn,{clsPrefix:r,key:"switcher"},{default:()=>T(Ir,null)})}})))}}});function il(e){return A(()=>e.leafOnly?"child":e.checkStrategy)}function Le(e,t){return!!e.rawNode[t]}function Wn(e,t,r,i){e==null||e.forEach(s=>{r(s),Wn(s[t],t,r,i),i(s)})}function al(e,t,r,i,s){const n=new Set,d=new Set,h=[];return Wn(e,i,u=>{if(h.push(u),s(t,u)){d.add(u[r]);for(let v=h.length-2;v>=0;--v)if(!n.has(h[v][r]))n.add(h[v][r]);else return}},()=>{h.pop()}),{expandedKeys:Array.from(n),highlightKeySet:d}}if(Oo&&Image){const e=new Image;e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}function sl(e,t,r,i,s){const n=new Set,d=new Set,h=new Set,u=[],v=[],b=[];function y(m){m.forEach(N=>{if(b.push(N),t(r,N)){n.add(N[i]),h.add(N[i]);for(let w=b.length-2;w>=0;--w){const c=b[w][i];if(!d.has(c))d.add(c),n.has(c)&&n.delete(c);else break}}const k=N[s];k&&y(k),b.pop()})}y(e);function f(m,N){m.forEach(k=>{const w=k[i],c=n.has(w),g=d.has(w);if(!c&&!g)return;const D=k[s];if(D)if(c)N.push(k);else{u.push(w);const p=Object.assign(Object.assign({},k),{[s]:[]});N.push(p),f(D,p[s])}else N.push(k)})}return f(e,v),{filteredTree:v,highlightKeySet:h,expandedKeys:u}}const Vn=G({name:"TreeNode",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const t=je(vt),{droppingNodeParentRef:r,droppingMouseNodeRef:i,draggingNodeRef:s,droppingPositionRef:n,droppingOffsetLevelRef:d,nodePropsRef:h,indentRef:u,blockLineRef:v,checkboxPlacementRef:b,checkOnClickRef:y,disabledFieldRef:f,showLineRef:m,renderSwitcherIconRef:N,overrideDefaultNodeClickBehaviorRef:k}=t,w=ce(()=>!!e.tmNode.rawNode.checkboxDisabled),c=ce(()=>Le(e.tmNode,f.value)),g=ce(()=>t.disabledRef.value||c.value),D=A(()=>{const{value:E}=h;if(E)return E({option:e.tmNode.rawNode})}),p=le(null),l={value:null};Rt(()=>{l.value=p.value.$el});function _(){const E=()=>{const{tmNode:W}=e;if(!W.isLeaf&&!W.shallowLoaded){if(!t.loadingKeysRef.value.has(W.key))t.loadingKeysRef.value.add(W.key);else return;const{onLoadRef:{value:Z}}=t;Z&&Z(W.rawNode).then(re=>{re!==!1&&t.handleSwitcherClick(W)}).finally(()=>{t.loadingKeysRef.value.delete(W.key)})}else t.handleSwitcherClick(W)};N.value?setTimeout(E,0):E()}const C=ce(()=>!c.value&&t.selectableRef.value&&(t.internalTreeSelect?t.mergedCheckStrategyRef.value!=="child"||t.multipleRef.value&&t.cascadeRef.value||e.tmNode.isLeaf:!0)),F=ce(()=>t.checkableRef.value&&(t.cascadeRef.value||t.mergedCheckStrategyRef.value!=="child"||e.tmNode.isLeaf)),I=ce(()=>t.displayedCheckedKeysRef.value.includes(e.tmNode.key)),U=ce(()=>{const{value:E}=F;if(!E)return!1;const{value:W}=y,{tmNode:Z}=e;return typeof W=="boolean"?!Z.disabled&&W:W(e.tmNode.rawNode)});function ke(E){const{value:W}=t.expandOnClickRef,{value:Z}=C,{value:re}=U;if(!Z&&!W&&!re||nt(E,"checkbox")||nt(E,"switcher"))return;const{tmNode:fe}=e;Z&&t.handleSelect(fe),W&&!fe.isLeaf&&_(),re&&be(!I.value)}function we(E){var W,Z;if(!(nt(E,"checkbox")||nt(E,"switcher"))){if(!g.value){const re=k.value;let fe=!1;if(re)switch(re({option:e.tmNode.rawNode})){case"toggleCheck":fe=!0,be(!I.value);break;case"toggleSelect":fe=!0,t.handleSelect(e.tmNode);break;case"toggleExpand":fe=!0,_(),fe=!0;break;case"none":fe=!0,fe=!0;return}fe||ke(E)}(Z=(W=D.value)===null||W===void 0?void 0:W.onClick)===null||Z===void 0||Z.call(W,E)}}function ie(E){v.value||we(E)}function he(E){v.value&&we(E)}function be(E){t.handleCheck(e.tmNode,E)}function _e(E){t.handleDragStart({event:E,node:e.tmNode})}function lt(E){E.currentTarget===E.target&&t.handleDragEnter({event:E,node:e.tmNode})}function ge(E){E.preventDefault(),t.handleDragOver({event:E,node:e.tmNode})}function H(E){t.handleDragEnd({event:E,node:e.tmNode})}function Fe(E){E.currentTarget===E.target&&t.handleDragLeave({event:E,node:e.tmNode})}function ue(E){E.preventDefault(),n.value!==null&&t.handleDrop({event:E,node:e.tmNode,dropPosition:n.value})}const Be=A(()=>{const{clsPrefix:E}=e,{value:W}=u;if(m.value){const Z=[];let re=e.tmNode.parent;for(;re;)re.isLastChild?Z.push(T("div",{class:`${E}-tree-node-indent`},T("div",{style:{width:`${W}px`}}))):Z.push(T("div",{class:[`${E}-tree-node-indent`,`${E}-tree-node-indent--show-line`]},T("div",{style:{width:`${W}px`}}))),re=re.parent;return Z.reverse()}else return Mo(e.tmNode.level,T("div",{class:`${e.clsPrefix}-tree-node-indent`},T("div",{style:{width:`${W}px`}})))});return{showDropMark:ce(()=>{const{value:E}=s;if(!E)return;const{value:W}=n;if(!W)return;const{value:Z}=i;if(!Z)return;const{tmNode:re}=e;return re.key===Z.key}),showDropMarkAsParent:ce(()=>{const{value:E}=r;if(!E)return!1;const{tmNode:W}=e,{value:Z}=n;return Z==="before"||Z==="after"?E.key===W.key:!1}),pending:ce(()=>t.pendingNodeKeyRef.value===e.tmNode.key),loading:ce(()=>t.loadingKeysRef.value.has(e.tmNode.key)),highlight:ce(()=>{var E;return(E=t.highlightKeySetRef.value)===null||E===void 0?void 0:E.has(e.tmNode.key)}),checked:I,indeterminate:ce(()=>t.displayedIndeterminateKeysRef.value.includes(e.tmNode.key)),selected:ce(()=>t.mergedSelectedKeysRef.value.includes(e.tmNode.key)),expanded:ce(()=>t.mergedExpandedKeysRef.value.includes(e.tmNode.key)),disabled:g,checkable:F,mergedCheckOnClick:U,checkboxDisabled:w,selectable:C,expandOnClick:t.expandOnClickRef,internalScrollable:t.internalScrollableRef,draggable:t.draggableRef,blockLine:v,nodeProps:D,checkboxFocusable:t.internalCheckboxFocusableRef,droppingPosition:n,droppingOffsetLevel:d,indent:u,checkboxPlacement:b,showLine:m,contentInstRef:p,contentElRef:l,indentNodes:Be,handleCheck:be,handleDrop:ue,handleDragStart:_e,handleDragEnter:lt,handleDragOver:ge,handleDragEnd:H,handleDragLeave:Fe,handleLineClick:he,handleContentClick:ie,handleSwitcherClick:_}},render(){const{tmNode:e,clsPrefix:t,checkable:r,expandOnClick:i,selectable:s,selected:n,checked:d,highlight:h,draggable:u,blockLine:v,indent:b,indentNodes:y,disabled:f,pending:m,internalScrollable:N,nodeProps:k,checkboxPlacement:w}=this,c=u&&!f?{onDragenter:this.handleDragEnter,onDragleave:this.handleDragLeave,onDragend:this.handleDragEnd,onDrop:this.handleDrop,onDragover:this.handleDragOver}:void 0,g=N?Mn(e.key):void 0,D=w==="right",p=r?T(ol,{indent:b,right:D,focusable:this.checkboxFocusable,disabled:f||this.checkboxDisabled,clsPrefix:t,checked:this.checked,indeterminate:this.indeterminate,onCheck:this.handleCheck}):null;return T("div",Object.assign({class:`${t}-tree-node-wrapper`},c),T("div",Object.assign({},v?k:void 0,{class:[`${t}-tree-node`,{[`${t}-tree-node--selected`]:n,[`${t}-tree-node--checkable`]:r,[`${t}-tree-node--highlight`]:h,[`${t}-tree-node--pending`]:m,[`${t}-tree-node--disabled`]:f,[`${t}-tree-node--selectable`]:s,[`${t}-tree-node--clickable`]:s||i||this.mergedCheckOnClick},k==null?void 0:k.class],"data-key":g,draggable:u&&v,onClick:this.handleLineClick,onDragstart:u&&v&&!f?this.handleDragStart:void 0}),y,e.isLeaf&&this.showLine?T("div",{class:[`${t}-tree-node-indent`,`${t}-tree-node-indent--show-line`,e.isLeaf&&`${t}-tree-node-indent--is-leaf`,e.isLastChild&&`${t}-tree-node-indent--last-child`]},T("div",{style:{width:`${b}px`}})):T(ll,{clsPrefix:t,expanded:this.expanded,selected:n,loading:this.loading,hide:e.isLeaf,tmNode:this.tmNode,indent:b,onClick:this.handleSwitcherClick}),D?null:p,T(rl,{ref:"contentInstRef",clsPrefix:t,checked:d,selected:n,onClick:this.handleContentClick,nodeProps:v?void 0:k,onDragstart:u&&!v&&!f?this.handleDragStart:void 0,tmNode:e}),u?this.showDropMark?kn({el:this.contentElRef.value,position:this.droppingPosition,offsetLevel:this.droppingOffsetLevel,indent:b}):this.showDropMarkAsParent?kn({el:this.contentElRef.value,position:"inside",offsetLevel:this.droppingOffsetLevel,indent:b}):null:null,D?p:null))}}),dl=G({name:"TreeMotionWrapper",props:{clsPrefix:{type:String,required:!0},height:Number,nodes:{type:Array,required:!0},mode:{type:String,required:!0},onAfterEnter:{type:Function,required:!0}},render(){const{clsPrefix:e}=this;return T(_n,{onAfterEnter:this.onAfterEnter,appear:!0,reverse:this.mode==="collapse"},{default:()=>T("div",{class:[`${e}-tree-motion-wrapper`,`${e}-tree-motion-wrapper--${this.mode}`],style:{height:Dn(this.height)}},this.nodes.map(t=>T(Vn,{clsPrefix:e,tmNode:t})))})}}),Ht=Uo(),cl=O("tree",`
149
149
  font-size: var(--n-font-size);
150
150
  outline: none;
151
- `,[O("ul, li",`
151
+ `,[z("ul, li",`
152
152
  margin: 0;
153
153
  padding: 0;
154
154
  list-style: none;
155
- `),O(">",[M("tree-node",[O("&:first-child","margin-top: 0;")])]),M("tree-motion-wrapper",[U("expand",[jt({duration:"0.2s"})]),U("collapse",[jt({duration:"0.2s",reverse:!0})])]),M("tree-node-wrapper",`
155
+ `),z(">",[O("tree-node",[z("&:first-child","margin-top: 0;")])]),O("tree-motion-wrapper",[M("expand",[jt({duration:"0.2s"})]),M("collapse",[jt({duration:"0.2s",reverse:!0})])]),O("tree-node-wrapper",`
156
156
  box-sizing: border-box;
157
157
  padding: var(--n-node-wrapper-padding);
158
- `),M("tree-node",`
158
+ `),O("tree-node",`
159
159
  position: relative;
160
160
  display: flex;
161
161
  border-radius: var(--n-node-border-radius);
162
162
  transition: background-color .3s var(--n-bezier);
163
- `,[U("highlight",[M("tree-node-content",[X("text","border-bottom-color: var(--n-node-text-color-disabled);")])]),U("disabled",[M("tree-node-content",`
163
+ `,[M("highlight",[O("tree-node-content",[X("text","border-bottom-color: var(--n-node-text-color-disabled);")])]),M("disabled",[O("tree-node-content",`
164
164
  color: var(--n-node-text-color-disabled);
165
165
  cursor: not-allowed;
166
- `)]),$e("disabled",[U("clickable",[M("tree-node-content",`
166
+ `)]),$e("disabled",[M("clickable",[O("tree-node-content",`
167
167
  cursor: pointer;
168
- `)])])]),U("block-node",[M("tree-node-content",`
168
+ `)])])]),M("block-node",[O("tree-node-content",`
169
169
  flex: 1;
170
170
  min-width: 0;
171
- `)]),$e("block-line",[M("tree-node",[$e("disabled",[M("tree-node-content",[O("&:hover","background: var(--n-node-color-hover);")]),U("selectable",[M("tree-node-content",[O("&:active","background: var(--n-node-color-pressed);")])]),U("pending",[M("tree-node-content",`
171
+ `)]),$e("block-line",[O("tree-node",[$e("disabled",[O("tree-node-content",[z("&:hover","background: var(--n-node-color-hover);")]),M("selectable",[O("tree-node-content",[z("&:active","background: var(--n-node-color-pressed);")])]),M("pending",[O("tree-node-content",`
172
172
  background: var(--n-node-color-hover);
173
- `)]),U("selected",[M("tree-node-content","background: var(--n-node-color-active);")])]),U("selected",[M("tree-node-content","background: var(--n-node-color-active);")])])]),U("block-line",[M("tree-node",[$e("disabled",[O("&:hover","background: var(--n-node-color-hover);"),U("pending",`
173
+ `)]),M("selected",[O("tree-node-content","background: var(--n-node-color-active);")])]),M("selected",[O("tree-node-content","background: var(--n-node-color-active);")])])]),M("block-line",[O("tree-node",[$e("disabled",[z("&:hover","background: var(--n-node-color-hover);"),M("pending",`
174
174
  background: var(--n-node-color-hover);
175
- `),U("selectable",[$e("selected",[O("&:active","background: var(--n-node-color-pressed);")])]),U("selected","background: var(--n-node-color-active);")]),U("selected","background: var(--n-node-color-active);"),U("disabled",`
175
+ `),M("selectable",[$e("selected",[z("&:active","background: var(--n-node-color-pressed);")])]),M("selected","background: var(--n-node-color-active);")]),M("selected","background: var(--n-node-color-active);"),M("disabled",`
176
176
  cursor: not-allowed;
177
- `)])]),U("ellipsis",[M("tree-node",[M("tree-node-content",`
177
+ `)])]),M("ellipsis",[O("tree-node",[O("tree-node-content",`
178
178
  overflow: hidden;
179
179
  `,[X("text",`
180
180
  text-overflow: ellipsis;
181
181
  white-space: nowrap;
182
182
  overflow: hidden;
183
- `)])])]),M("tree-node-indent",`
183
+ `)])])]),O("tree-node-indent",`
184
184
  flex-grow: 0;
185
185
  flex-shrink: 0;
186
- `,[U("show-line","position: relative",[O("&::before",`
186
+ `,[M("show-line","position: relative",[z("&::before",`
187
187
  position: absolute;
188
188
  left: 50%;
189
189
  border-left: 1px solid var(--n-line-color);
@@ -192,9 +192,9 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
192
192
  content: "";
193
193
  top: var(--n-line-offset-top);
194
194
  bottom: var(--n-line-offset-bottom);
195
- `),U("last-child",[O("&::before",`
195
+ `),M("last-child",[z("&::before",`
196
196
  bottom: 50%;
197
- `)]),U("is-leaf",[O("&::after",`
197
+ `)]),M("is-leaf",[z("&::after",`
198
198
  position: absolute;
199
199
  content: "";
200
200
  left: calc(50% + 0.5px);
@@ -202,7 +202,7 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
202
202
  bottom: 50%;
203
203
  transition: border-color .3s var(--n-bezier);
204
204
  border-bottom: 1px solid var(--n-line-color);
205
- `)])]),$e("show-line","height: 0;")]),M("tree-node-switcher",`
205
+ `)])]),$e("show-line","height: 0;")]),O("tree-node-switcher",`
206
206
  cursor: pointer;
207
207
  display: inline-flex;
208
208
  flex-shrink: 0;
@@ -219,20 +219,20 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
219
219
  color: var(--n-arrow-color);
220
220
  transition: color .3s var(--n-bezier);
221
221
  font-size: 14px;
222
- `,[M("icon",[Ht]),M("base-loading",`
222
+ `,[O("icon",[Ht]),O("base-loading",`
223
223
  color: var(--n-loading-color);
224
224
  position: absolute;
225
225
  left: 0;
226
226
  top: 0;
227
227
  right: 0;
228
228
  bottom: 0;
229
- `,[Ht]),M("base-icon",[Ht])]),U("hide","visibility: hidden;"),U("expanded","transform: rotate(90deg);")]),M("tree-node-checkbox",`
229
+ `,[Ht]),O("base-icon",[Ht])]),M("hide","visibility: hidden;"),M("expanded","transform: rotate(90deg);")]),O("tree-node-checkbox",`
230
230
  display: inline-flex;
231
231
  height: var(--n-node-content-height);
232
232
  vertical-align: bottom;
233
233
  align-items: center;
234
234
  justify-content: center;
235
- `),M("tree-node-content",`
235
+ `),O("tree-node-content",`
236
236
  user-select: none;
237
237
  position: relative;
238
238
  display: inline-flex;
@@ -249,7 +249,7 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
249
249
  color .3s var(--n-bezier),
250
250
  background-color .3s var(--n-bezier),
251
251
  border-color .3s var(--n-bezier);
252
- `,[O("&:last-child","margin-bottom: 0;"),X("prefix",`
252
+ `,[z("&:last-child","margin-bottom: 0;"),X("prefix",`
253
253
  display: inline-flex;
254
254
  margin-right: 8px;
255
255
  `),X("text",`
@@ -259,10 +259,10 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
259
259
  max-width: 100%;
260
260
  `),X("suffix",`
261
261
  display: inline-flex;
262
- `)]),X("empty","margin: auto;")]);var ul=function(e,t,r,i){function s(n){return n instanceof r?n:new r(function(d){d(n)})}return new(r||(r=Promise))(function(n,d){function h(b){try{v(i.next(b))}catch(y){d(y)}}function u(b){try{v(i.throw(b))}catch(y){d(y)}}function v(b){b.done?n(b.value):s(b.value).then(h,u)}v((i=i.apply(e,[])).next())})};function Cn(e,t,r,i){return{getIsGroup(){return!1},getKey(n){return n[e]},getChildren:i||(n=>n[t]),getDisabled(n){return!!(n[r]||n.checkboxDisabled)}}}const fl={allowCheckingNotLoaded:Boolean,filter:Function,defaultExpandAll:Boolean,expandedKeys:Array,keyField:{type:String,default:"key"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},disabledField:{type:String,default:"disabled"},defaultExpandedKeys:{type:Array,default:()=>[]},indent:{type:Number,default:24},indeterminateKeys:Array,renderSwitcherIcon:Function,onUpdateIndeterminateKeys:[Function,Array],"onUpdate:indeterminateKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],"onUpdate:expandedKeys":[Function,Array],overrideDefaultNodeClickBehavior:Function},hl=Object.assign(Object.assign(Object.assign(Object.assign({},He.props),{accordion:Boolean,showIrrelevantNodes:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},expandOnDragenter:{type:Boolean,default:!0},expandOnClick:Boolean,checkOnClick:{type:[Boolean,Function],default:!1},cancelable:{type:Boolean,default:!0},checkable:Boolean,draggable:Boolean,blockNode:Boolean,blockLine:Boolean,showLine:Boolean,disabled:Boolean,checkedKeys:Array,defaultCheckedKeys:{type:Array,default:()=>[]},selectedKeys:Array,defaultSelectedKeys:{type:Array,default:()=>[]},multiple:Boolean,pattern:{type:String,default:""},onLoad:Function,cascade:Boolean,selectable:{type:Boolean,default:!0},scrollbarProps:Object,allowDrop:{type:Function,default:tl},animated:{type:Boolean,default:!0},ellipsis:Boolean,checkboxPlacement:{type:String,default:"left"},virtualScroll:Boolean,watchProps:Array,renderLabel:Function,renderPrefix:Function,renderSuffix:Function,nodeProps:Function,keyboard:{type:Boolean,default:!0},getChildren:Function,onDragenter:[Function,Array],onDragleave:[Function,Array],onDragend:[Function,Array],onDragstart:[Function,Array],onDragover:[Function,Array],onDrop:[Function,Array],onUpdateCheckedKeys:[Function,Array],"onUpdate:checkedKeys":[Function,Array],onUpdateSelectedKeys:[Function,Array],"onUpdate:selectedKeys":[Function,Array]}),fl),{internalTreeSelect:Boolean,internalScrollable:Boolean,internalScrollablePadding:String,internalRenderEmpty:Function,internalHighlightKeySet:Object,internalUnifySelectCheck:Boolean,internalCheckboxFocusable:{type:Boolean,default:!0},internalFocusable:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},leafOnly:Boolean}),vl=G({name:"Tree",props:hl,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:i}=ft(e),s=ht("Tree",i,t),n=He("Tree","-tree",cl,Vr,e,t),d=le(null),h=le(null),u=le(null);function v(){var o;return(o=u.value)===null||o===void 0?void 0:o.listElRef}function b(){var o;return(o=u.value)===null||o===void 0?void 0:o.itemsElRef}const y=K(()=>{const{filter:o}=e;if(o)return o;const{labelField:x}=e;return(P,E)=>{if(!P.length)return!0;const L=E[x];return typeof L=="string"?L.toLowerCase().includes(P.toLowerCase()):!1}}),f=K(()=>{const{pattern:o}=e;return o?!o.length||!y.value?{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}:sl(e.data,y.value,o,e.keyField,e.childrenField):{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}}),m=K(()=>bn(e.showIrrelevantNodes?e.data:f.value.filteredTree,Cn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),N=je(qn,null),k=e.internalTreeSelect?N.dataTreeMate:K(()=>e.showIrrelevantNodes?m.value:bn(e.data,Cn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),{watchProps:w}=e,c=le([]);w!=null&&w.includes("defaultCheckedKeys")?Se(()=>{c.value=e.defaultCheckedKeys}):c.value=e.defaultCheckedKeys;const g=V(e,"checkedKeys"),D=ct(g,c),p=K(()=>k.value.getCheckedKeys(D.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})),l=il(e),_=K(()=>p.value.checkedKeys),C=K(()=>{const{indeterminateKeys:o}=e;return o!==void 0?o:p.value.indeterminateKeys}),F=le([]);w!=null&&w.includes("defaultSelectedKeys")?Se(()=>{F.value=e.defaultSelectedKeys}):F.value=e.defaultSelectedKeys;const A=V(e,"selectedKeys"),B=ct(A,F),ke=le([]),we=o=>{ke.value=e.defaultExpandAll?k.value.getNonLeafKeys():o===void 0?e.defaultExpandedKeys:o};w!=null&&w.includes("defaultExpandedKeys")?Se(()=>{we(void 0)}):Se(()=>{we(e.defaultExpandedKeys)});const ie=V(e,"expandedKeys"),he=ct(ie,ke),be=K(()=>m.value.getFlattenedNodes(he.value)),{pendingNodeKeyRef:_e,handleKeydown:lt}=nl({props:e,mergedCheckedKeysRef:D,mergedSelectedKeysRef:B,fNodesRef:be,mergedExpandedKeysRef:he,handleCheck:Lt,handleSelect:Kt,handleSwitcherClick:nn});let ge=null,H=null;const Fe=le(new Set),ue=K(()=>e.internalHighlightKeySet||f.value.highlightKeySet),Be=ct(ue,Fe),T=le(new Set),W=K(()=>he.value.filter(o=>!T.value.has(o)));let Z=0;const re=le(null),fe=le(null),gt=le(null),pt=le(null),mt=le(0),Jn=K(()=>{const{value:o}=fe;return o?o.parent:null});let Dt=!1;Te(V(e,"data"),()=>{Dt=!0,tt(()=>{Dt=!1}),T.value.clear(),_e.value=null,at()},{deep:!1});let It=!1;const Tt=()=>{It=!0,tt(()=>{It=!1})};let it;Te(V(e,"pattern"),(o,x)=>{if(e.showIrrelevantNodes)if(it=void 0,o){const{expandedKeys:P,highlightKeySet:E}=al(e.data,e.pattern,e.keyField,e.childrenField,y.value);Fe.value=E,Tt(),We(P,pe(P),{node:null,action:"filter"})}else Fe.value=new Set;else if(!o.length)it!==void 0&&(Tt(),We(it,pe(it),{node:null,action:"filter"}));else{x.length||(it=he.value);const{expandedKeys:P}=f.value;P!==void 0&&(Tt(),We(P,pe(P),{node:null,action:"filter"}))}});function en(o){return ul(this,void 0,void 0,function*(){const{onLoad:x}=e;if(!x){yield Promise.resolve();return}const{value:P}=T;if(!P.has(o.key)){P.add(o.key);try{(yield x(o.rawNode))===!1&&Ve()}catch(E){console.error(E),Ve()}P.delete(o.key)}})}Se(()=>{var o;const{value:x}=m;if(!x)return;const{getNode:P}=x;(o=he.value)===null||o===void 0||o.forEach(E=>{const L=P(E);L&&!L.shallowLoaded&&en(L)})});const qe=le(!1),Ee=le([]);Te(W,(o,x)=>{if(!e.animated||It){tt(bt);return}if(Dt)return;const P=st(n.value.self.nodeHeight),E=new Set(x);let L=null,ne=null;for(const Q of o)if(!E.has(Q)){if(L!==null)return;L=Q}const ve=new Set(o);for(const Q of x)if(!ve.has(Q)){if(ne!==null)return;ne=Q}if(L===null&&ne===null)return;const{virtualScroll:me}=e,Ye=(me?u.value.listElRef:d.value).offsetHeight,Qe=Math.ceil(Ye/P)+1;let xe;if(L!==null&&(xe=x),ne!==null&&(xe===void 0?xe=o:xe=xe.filter(Q=>Q!==ne)),qe.value=!0,Ee.value=m.value.getFlattenedNodes(xe),L!==null){const Q=Ee.value.findIndex(ye=>ye.key===L);if(~Q){const ye=Ee.value[Q].children;if(ye){const Ce=pn(ye,o);Ee.value.splice(Q+1,0,{__motion:!0,mode:"expand",height:me?Ce.length*P:void 0,nodes:me?Ce.slice(0,Qe):Ce})}}}if(ne!==null){const Q=Ee.value.findIndex(ye=>ye.key===ne);if(~Q){const ye=Ee.value[Q].children;if(!ye)return;qe.value=!0;const Ce=pn(ye,o);Ee.value.splice(Q+1,0,{__motion:!0,mode:"collapse",height:me?Ce.length*P:void 0,nodes:me?Ce.slice(0,Qe):Ce})}}});const Zn=K(()=>yr(be.value)),eo=K(()=>qe.value?Ee.value:be.value);function bt(){const{value:o}=h;o&&o.sync()}function to(){qe.value=!1,e.virtualScroll&&tt(bt)}function pe(o){const{getNode:x}=k.value;return o.map(P=>{var E;return((E=x(P))===null||E===void 0?void 0:E.rawNode)||null})}function We(o,x,P){const{"onUpdate:expandedKeys":E,onUpdateExpandedKeys:L}=e;ke.value=o,E&&se(E,o,x,P),L&&se(L,o,x,P)}function tn(o,x,P){const{"onUpdate:checkedKeys":E,onUpdateCheckedKeys:L}=e;c.value=o,L&&se(L,o,x,P),E&&se(E,o,x,P)}function no(o,x){const{"onUpdate:indeterminateKeys":P,onUpdateIndeterminateKeys:E}=e;P&&se(P,o,x),E&&se(E,o,x)}function Et(o,x,P){const{"onUpdate:selectedKeys":E,onUpdateSelectedKeys:L}=e;F.value=o,L&&se(L,o,x,P),E&&se(E,o,x,P)}function oo(o){const{onDragenter:x}=e;x&&se(x,o)}function ro(o){const{onDragleave:x}=e;x&&se(x,o)}function lo(o){const{onDragend:x}=e;x&&se(x,o)}function io(o){const{onDragstart:x}=e;x&&se(x,o)}function ao(o){const{onDragover:x}=e;x&&se(x,o)}function so(o){const{onDrop:x}=e;x&&se(x,o)}function at(){co(),ze()}function co(){re.value=null}function ze(){mt.value=0,fe.value=null,gt.value=null,pt.value=null,Ve()}function Ve(){ge&&(window.clearTimeout(ge),ge=null),H=null}function Lt(o,x){if(e.disabled||Le(o,e.disabledField))return;if(e.internalUnifySelectCheck&&!e.multiple){Kt(o);return}const P=x?"check":"uncheck",{checkedKeys:E,indeterminateKeys:L}=k.value[P](o.key,_.value,{cascade:e.cascade,checkStrategy:l.value,allowNotLoaded:e.allowCheckingNotLoaded});tn(E,pe(E),{node:o.rawNode,action:P}),no(L,pe(L))}function uo(o){if(e.disabled)return;const{key:x}=o,{value:P}=he,E=P.findIndex(L=>L===x);if(~E){const L=Array.from(P);L.splice(E,1),We(L,pe(L),{node:o.rawNode,action:"collapse"})}else{const L=m.value.getNode(x);if(!L||L.isLeaf)return;let ne;if(e.accordion){const ve=new Set(o.siblings.map(({key:me})=>me));ne=P.filter(me=>!ve.has(me)),ne.push(x)}else ne=P.concat(x);We(ne,pe(ne),{node:o.rawNode,action:"expand"})}}function nn(o){e.disabled||qe.value||uo(o)}function Kt(o){if(!(e.disabled||!e.selectable)){if(_e.value=o.key,e.internalUnifySelectCheck){const{value:{checkedKeys:x,indeterminateKeys:P}}=p;e.multiple?Lt(o,!(x.includes(o.key)||P.includes(o.key))):tn([o.key],pe([o.key]),{node:o.rawNode,action:"check"})}if(e.multiple){const x=Array.from(B.value),P=x.findIndex(E=>E===o.key);~P?e.cancelable&&x.splice(P,1):~P||x.push(o.key),Et(x,pe(x),{node:o.rawNode,action:~P?"unselect":"select"})}else B.value.includes(o.key)?e.cancelable&&Et([],[],{node:o.rawNode,action:"unselect"}):Et([o.key],pe([o.key]),{node:o.rawNode,action:"select"})}}function fo(o){if(ge&&(window.clearTimeout(ge),ge=null),o.isLeaf)return;H=o.key;const x=()=>{if(H!==o.key)return;const{value:P}=gt;if(P&&P.key===o.key&&!he.value.includes(o.key)){const E=he.value.concat(o.key);We(E,pe(E),{node:o.rawNode,action:"expand"})}ge=null,H=null};o.shallowLoaded?ge=window.setTimeout(()=>{x()},1e3):ge=window.setTimeout(()=>{en(o).then(()=>{x()})},1e3)}function ho({event:o,node:x}){!e.draggable||e.disabled||Le(x,e.disabledField)||(on({event:o,node:x},!1),oo({event:o,node:x.rawNode}))}function vo({event:o,node:x}){!e.draggable||e.disabled||Le(x,e.disabledField)||ro({event:o,node:x.rawNode})}function go(o){o.target===o.currentTarget&&ze()}function po({event:o,node:x}){at(),!(!e.draggable||e.disabled||Le(x,e.disabledField))&&lo({event:o,node:x.rawNode})}function mo({event:o,node:x}){!e.draggable||e.disabled||Le(x,e.disabledField)||(Z=o.clientX,re.value=x,io({event:o,node:x.rawNode}))}function on({event:o,node:x},P=!0){var E;if(!e.draggable||e.disabled||Le(x,e.disabledField))return;const{value:L}=re;if(!L)return;const{allowDrop:ne,indent:ve}=e;P&&ao({event:o,node:x.rawNode});const me=o.currentTarget,{height:Ye,top:Qe}=me.getBoundingClientRect(),xe=o.clientY-Qe;let Q;ne({node:x.rawNode,dropPosition:"inside",phase:"drag"})?xe<=8?Q="before":xe>=Ye-8?Q="after":Q="inside":xe<=Ye/2?Q="before":Q="after";const{value:Ce}=Zn;let Y,de;const Xe=Ce(x.key);if(Xe===null){ze();return}let xt=!1;Q==="inside"?(Y=x,de="inside"):Q==="before"?x.isFirstChild?(Y=x,de="before"):(Y=be.value[Xe-1],de="after"):(Y=x,de="after"),!Y.isLeaf&&he.value.includes(Y.key)&&(xt=!0,de==="after"&&(Y=be.value[Xe+1],Y?de="before":(Y=x,de="inside")));const ln=Y;if(gt.value=ln,!xt&&L.isLastChild&&L.key===Y.key&&(de="after"),de==="after"){let an=Z-o.clientX,At=0;for(;an>=ve/2&&Y.parent!==null&&Y.isLastChild&&At<1;)an-=ve,At+=1,Y=Y.parent;mt.value=At}else mt.value=0;if((L.contains(Y)||de==="inside"&&((E=L.parent)===null||E===void 0?void 0:E.key)===Y.key)&&!(L.key===ln.key&&L.key===Y.key)){ze();return}if(!ne({node:Y.rawNode,dropPosition:de,phase:"drag"})){ze();return}if(L.key===Y.key)Ve();else if(H!==Y.key)if(de==="inside"){if(e.expandOnDragenter){if(fo(Y),!Y.shallowLoaded&&H!==Y.key){at();return}}else if(!Y.shallowLoaded){at();return}}else Ve();else de!=="inside"&&Ve();pt.value=de,fe.value=Y}function bo({event:o,node:x,dropPosition:P}){if(!e.draggable||e.disabled||Le(x,e.disabledField))return;const{value:E}=re,{value:L}=fe,{value:ne}=pt;if(!(!E||!L||!ne)&&e.allowDrop({node:L.rawNode,dropPosition:ne,phase:"drag"})&&E.key!==L.key){if(ne==="before"){const ve=E.getNext({includeDisabled:!0});if(ve&&ve.key===L.key){ze();return}}if(ne==="after"){const ve=E.getPrev({includeDisabled:!0});if(ve&&ve.key===L.key){ze();return}}so({event:o,node:L.rawNode,dragNode:E.rawNode,dropPosition:P}),at()}}function xo(){bt()}function yo(){bt()}function ko(o){var x;if(e.virtualScroll||e.internalScrollable){const{value:P}=h;if(!((x=P==null?void 0:P.containerRef)===null||x===void 0)&&x.contains(o.relatedTarget))return;_e.value=null}else{const{value:P}=d;if(P!=null&&P.contains(o.relatedTarget))return;_e.value=null}}Te(_e,o=>{var x,P;if(o!==null){if(e.virtualScroll)(x=u.value)===null||x===void 0||x.scrollTo({key:o});else if(e.internalScrollable){const{value:E}=h;if(E===null)return;const L=(P=E.contentRef)===null||P===void 0?void 0:P.querySelector(`[data-key="${Un(o)}"]`);if(!L)return;E.scrollTo({el:L})}}}),Wt(vt,{loadingKeysRef:T,highlightKeySetRef:Be,displayedCheckedKeysRef:_,displayedIndeterminateKeysRef:C,mergedSelectedKeysRef:B,mergedExpandedKeysRef:he,mergedThemeRef:n,mergedCheckStrategyRef:l,nodePropsRef:V(e,"nodeProps"),disabledRef:V(e,"disabled"),checkableRef:V(e,"checkable"),selectableRef:V(e,"selectable"),expandOnClickRef:V(e,"expandOnClick"),onLoadRef:V(e,"onLoad"),draggableRef:V(e,"draggable"),blockLineRef:V(e,"blockLine"),indentRef:V(e,"indent"),cascadeRef:V(e,"cascade"),checkOnClickRef:V(e,"checkOnClick"),checkboxPlacementRef:e.checkboxPlacement,droppingMouseNodeRef:gt,droppingNodeParentRef:Jn,draggingNodeRef:re,droppingPositionRef:pt,droppingOffsetLevelRef:mt,fNodesRef:be,pendingNodeKeyRef:_e,showLineRef:V(e,"showLine"),disabledFieldRef:V(e,"disabledField"),internalScrollableRef:V(e,"internalScrollable"),internalCheckboxFocusableRef:V(e,"internalCheckboxFocusable"),internalTreeSelect:e.internalTreeSelect,renderLabelRef:V(e,"renderLabel"),renderPrefixRef:V(e,"renderPrefix"),renderSuffixRef:V(e,"renderSuffix"),renderSwitcherIconRef:V(e,"renderSwitcherIcon"),labelFieldRef:V(e,"labelField"),multipleRef:V(e,"multiple"),overrideDefaultNodeClickBehaviorRef:V(e,"overrideDefaultNodeClickBehavior"),handleSwitcherClick:nn,handleDragEnd:po,handleDragEnter:ho,handleDragLeave:vo,handleDragStart:mo,handleDrop:bo,handleDragOver:on,handleSelect:Kt,handleCheck:Lt});function wo(o,x){var P,E;typeof o=="number"?(P=u.value)===null||P===void 0||P.scrollTo(o,x||0):(E=u.value)===null||E===void 0||E.scrollTo(o)}const Co={handleKeydown:lt,scrollTo:wo,getCheckedData:()=>{if(!e.checkable)return{keys:[],options:[]};const{checkedKeys:o}=p.value;return{keys:o,options:pe(o)}},getIndeterminateData:()=>{if(!e.checkable)return{keys:[],options:[]};const{indeterminateKeys:o}=p.value;return{keys:o,options:pe(o)}}},rn=K(()=>{const{common:{cubicBezierEaseInOut:o},self:{fontSize:x,nodeBorderRadius:P,nodeColorHover:E,nodeColorPressed:L,nodeColorActive:ne,arrowColor:ve,loadingColor:me,nodeTextColor:Ye,nodeTextColorDisabled:Qe,dropMarkColor:xe,nodeWrapperPadding:Q,nodeHeight:ye,lineHeight:Ce,lineColor:Y}}=n.value,de=zt(Q,"top"),Xe=zt(Q,"bottom"),xt=In(st(ye)-st(de)-st(Xe));return{"--n-arrow-color":ve,"--n-loading-color":me,"--n-bezier":o,"--n-font-size":x,"--n-node-border-radius":P,"--n-node-color-active":ne,"--n-node-color-hover":E,"--n-node-color-pressed":L,"--n-node-text-color":Ye,"--n-node-text-color-disabled":Qe,"--n-drop-mark-color":xe,"--n-node-wrapper-padding":Q,"--n-line-offset-top":`-${de}`,"--n-line-offset-bottom":`-${Xe}`,"--n-node-content-height":xt,"--n-line-height":Ce,"--n-line-color":Y}}),Ge=r?Gt("tree",void 0,rn,e):void 0;return Object.assign(Object.assign({},Co),{mergedClsPrefix:t,mergedTheme:n,rtlEnabled:s,fNodes:eo,aip:qe,selfElRef:d,virtualListInstRef:u,scrollbarInstRef:h,handleFocusout:ko,handleDragLeaveTree:go,handleScroll:xo,getScrollContainer:v,getScrollContent:b,handleAfterEnter:to,handleResize:yo,cssVars:r?void 0:rn,themeClass:Ge==null?void 0:Ge.themeClass,onRender:Ge==null?void 0:Ge.onRender})},render(){var e;const{fNodes:t,internalRenderEmpty:r}=this;if(!t.length&&r)return r();const{mergedClsPrefix:i,blockNode:s,blockLine:n,draggable:d,disabled:h,ellipsis:u,internalFocusable:v,checkable:b,handleKeydown:y,rtlEnabled:f,handleFocusout:m,scrollbarProps:N}=this,k=v&&!h,w=k?"0":void 0,c=[`${i}-tree`,f&&`${i}-tree--rtl`,b&&`${i}-tree--checkable`,(n||s)&&`${i}-tree--block-node`,n&&`${i}-tree--block-line`,u&&`${i}-tree--ellipsis`],g=p=>"__motion"in p?I(dl,{height:p.height,nodes:p.nodes,clsPrefix:i,mode:p.mode,onAfterEnter:this.handleAfterEnter}):I(Vn,{key:p.key,tmNode:p,clsPrefix:i});if(this.virtualScroll){const{mergedTheme:p,internalScrollablePadding:l}=this,_=zt(l||"0");return I(cn,Object.assign({},N,{ref:"scrollbarInstRef",onDragleave:d?this.handleDragLeaveTree:void 0,container:this.getScrollContainer,content:this.getScrollContent,class:c,theme:p.peers.Scrollbar,themeOverrides:p.peerOverrides.Scrollbar,tabindex:w,onKeydown:k?y:void 0,onFocusout:k?m:void 0}),{default:()=>{var C;return(C=this.onRender)===null||C===void 0||C.call(this),t.length?I(xr,{ref:"virtualListInstRef",items:this.fNodes,itemSize:st(p.self.nodeHeight),ignoreItemResize:this.aip,paddingTop:_.top,paddingBottom:_.bottom,class:this.themeClass,style:[this.cssVars,{paddingLeft:_.left,paddingRight:_.right}],onScroll:this.handleScroll,onResize:this.handleResize,showScrollbar:!1,itemResizable:!0},{default:({item:F})=>g(F)}):dn(this.$slots.empty,()=>[I(mn,{class:`${i}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})])}})}const{internalScrollable:D}=this;return c.push(this.themeClass),(e=this.onRender)===null||e===void 0||e.call(this),D?I(cn,Object.assign({},N,{class:c,tabindex:w,onKeydown:k?y:void 0,onFocusout:k?m:void 0,style:this.cssVars,contentStyle:{padding:this.internalScrollablePadding}}),{default:()=>I("div",{onDragleave:d?this.handleDragLeaveTree:void 0,ref:"selfElRef"},this.fNodes.map(g))}):I("div",{class:c,tabindex:w,ref:"selfElRef",style:this.cssVars,onKeydown:k?y:void 0,onFocusout:k?m:void 0,onDragleave:d?this.handleDragLeaveTree:void 0},t.length?t.map(g):dn(this.$slots.empty,()=>[I(mn,{class:`${i}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]))}}),Sn=e=>{const t=j(),r={x:0,y:0},i=Qt({...r});let s;const n=b=>{s&&b.preventDefault()},d=b=>{s=b,r.x=i.x,r.y=i.y},h=b=>{if(!s||!t.value)return;const y=b.clientX-s.clientX,f=b.clientY-s.clientY;e(y)&&(i.x=r.x+y),i.y=r.y+f},u=()=>{s=void 0},v=()=>{if(!t.value||!s)return;u();const{top:b,bottom:y,left:f,right:m}=t.value.getBoundingClientRect();(m<0||f>window.innerWidth||y<0||b>window.innerHeight)&&(i.x=r.x,i.y=r.y)};return Rt(()=>{window.addEventListener("pointermove",h),window.addEventListener("pointerup",v),document.addEventListener("selectstart",n)}),Nt(()=>{window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",v),document.removeEventListener("selectstart",n),u()}),Te(t,(b,y)=>{b&&(b.addEventListener("pointerdown",d),b.addEventListener("pointerup",u)),y&&(y.removeEventListener("pointerdown",d),y.removeEventListener("pointerup",u))}),Nt(()=>{t.value&&(t.value.removeEventListener("pointerdown",d),t.value.removeEventListener("pointerup",u))}),{target:t,offset:i}};let dt=1e3;const gl=()=>{dt++;const e=j(dt);return{zIndex:e,setTop:()=>{e.value!==dt&&(dt++,e.value=dt)}}},Nn="transition-top,bottom,left,right-500",Pt=G({__name:"DraggableCard",props:{initialValue:{default:()=>({})},minWidth:{},sizeDraggable:{type:Boolean},show:{type:Boolean,default:!0},class:{}},setup(e){const t=e,r=t.initialValue.left!==void 0,i=t.initialValue.top!==void 0,s={x:(r?t.initialValue.left:t.initialValue.right)??0,y:(i?t.initialValue.top:t.initialValue.bottom)??0},n=Sn(l=>{const _=(t.initialValue.width||0)+d.offset.x+-n.offset.x-l;return(t.minWidth||0)<_}),d=Sn(l=>{const _=(t.initialValue.width||0)+d.offset.x+l-n.offset.x;return(t.minWidth||0)<_}),h=Qt({...s}),u=K(()=>{const l=(t.initialValue.width||0)+d.offset.x-n.offset.x,_=t.initialValue.width?`width:${l}px;`:"",C=i?`top:${h.y}px;`:`bottom:${h.y}px;`;return r?`left:${h.x-n.offset.x}px;`+C+_:`right:${h.x-d.offset.x}px;`+C+_});let v;const b=j(!1),y=l=>{v=l,s.x=h.x,s.y=h.y,b.value=!1},f=l=>{if(!k.value||!v)return;const _=l.clientX-v.clientX,C=l.clientY-v.clientY;h.x=s.x+(r?_:-_),h.y=s.y+(i?C:-C),b.value=!0},m=()=>{v=void 0},N=j(),k=j(),w=l=>{v&&l.preventDefault()},c=()=>{if(!k.value||!v)return;m();const{top:l,bottom:_,left:C,right:F}=k.value.getBoundingClientRect();if(F<0||C>window.innerWidth||_<0||l>window.innerHeight){h.x=s.x,h.y=s.y;const A=N.value;A&&(A.classList.add(Nn),setTimeout(()=>{A.classList.remove(Nn)},550))}};Rt(()=>{window.addEventListener("pointermove",f),window.addEventListener("pointerup",c),document.addEventListener("selectstart",w)}),Nt(()=>{window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",c),document.removeEventListener("selectstart",w),m()}),Te(k,(l,_)=>{l&&(l.addEventListener("pointerdown",y),l.addEventListener("pointerup",m)),_&&(_.removeEventListener("pointerdown",y),_.removeEventListener("pointerup",m))}),Nt(()=>{k.value&&(k.value.removeEventListener("pointerdown",y),k.value.removeEventListener("pointerup",m))});const g=l=>{l instanceof HTMLElement?k.value=l:k.value=void 0},{setTop:D,zIndex:p}=gl();return Te(()=>t.show,()=>{t.show&&D()}),(l,_)=>(z(),ee(Xt,{to:"body"},[e.show?(z(),te("div",{key:0,ref_key:"box",ref:N,fixed:"",class:_t(["DraggableCard",t.class]),style:De([a(u),{zIndex:a(p)}]),onMousedown:_[0]||(_[0]=(...C)=>a(D)&&a(D)(...C))},[Tn(l.$slots,"default",{onRef:g,moved:a(b)}),e.sizeDraggable?(z(),te(Ne,{key:0},[$("div",{ref:a(n).target,absolute:"","right-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512),$("div",{ref:a(d).target,absolute:"","left-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512)],64)):ae("",!0)],38)):ae("",!0)]))}}),pl=async e=>fetch("https://detect.gkd.li/api/getImportId?id="+e).then(t=>t.json()).catch(()=>0),Ae=Ho(()=>{const e=En(),t=Ln(),r=j();qt(()=>e.params.snapshotId,F=>{r.value=jo(F)});const i=K(()=>{if(r.value)return un[r.value]}),s=K(()=>{if(r.value)return Wo[r.value]}),n=j();Se(()=>{n.value&&(document.title="快照-"+(Re(n.value).name||n.value.appId))});const d=j(),h=K(()=>{if(d.value)return URL.createObjectURL(new Blob([d.value],{type:"image/png"}))}),u=j(!1),v=kr(async F=>{if(u.value=!1,!F){n.value=void 0,d.value=void 0;return}if(await Promise.all([vr.getItem(F).then(A=>{n.value=A||void 0}),gr.getItem(F).then(A=>{d.value=A||void 0})]),!n.value){const A=un[F]||await pl(F);if(A&&Number.isSafeInteger(A)){u.value=!0,t.replace({path:"/i/"+A,query:e.query});return}}}),b=K(()=>v.loading);qt(()=>r.value,v.invoke),Se(()=>{i.value&&!qo[i.value]&&r.value&&fetch("https://detect.gkd.li/api/detectSnapshot?importId="+i.value)});const y=K(()=>pr()&&yt.autoUploadImport);Se(()=>{y.value&&n.value&&!s.value&&cr(n.value),y.value&&n.value&&!i.value&&ur(n.value),y.value&&n.value&&i.value&&fr(n.value.id,i.value)});const f=K(()=>n.value?n.value.nodes.length<=yt.maxShowNodeSize?structuredClone(n.value.nodes):structuredClone(n.value.nodes.slice(0,yt.maxShowNodeSize)):[]),m=K(()=>{if(f.value.length)return ar(f.value)}),N=K(()=>n.value?n.value.nodes.length-yt.maxShowNodeSize:0),k=j(),w=j(0),c=j(),g=j(),D=async F=>{k.value=F,w.value=Date.now(),await tt(),g.value&&!g.value.includes(F)&&(c.value=void 0,g.value=void 0)};Se(()=>{m.value&&D(m.value)});const p=F=>{c.value=F;const A=ir(f.value,c.value);A.length&&D(A[0]),A.length>1?g.value=A:g.value=void 0},l=j(!1),_=j();return{snapshotId:r,snapshot:n,rootNode:m,screenshotUrl:h,loading:b,redirected:u,importId:i,imageId:s,focusNode:k,updateFocusNode:D,focusTime:w,overlapNodes:g,missNodeSize:N,focusPosition:c,updatePosition:p,trackData:_,trackShow:l,showTrack:(F,A)=>{l.value=!0,_.value={selector:F,nodes:f.value,queryResult:A}}}}),ml={absolute:"","top-0":"","right-0":"","pt-4px":"","pr-8px":""},bl={key:0,flex:"","justify-between":"","items-center":""},xl={flex:"","items-center":"","h-24px":"","px-2px":""},yl={"max-w-500px":""},kl=G({__name:"AttrCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:$t}},setup(e){const{focusNode:t}=Ae(),r=K(()=>{const d=t.value;return d?{_id:{desc:"虚拟属性(真机不可用):生成快照访问节点顺序",type:"info",show:!0},_pid:{desc:"虚拟属性(真机不可用):父节点的 _id",type:"info",show:!0},_selector:{desc:"自动生成的选择器, 点击“_selector”可直接复制内容, 用于定位",type:"info",show:!0},depth:{desc:"使用此属性在某些应用上可能造成无限节点错误",type:"info",show:!0},id:{desc:"可快速查找",type:"quickFind",show:!!((d.quickFind||d.idQf)&&d.attr.id)},vid:{desc:"可快速查找",type:"quickFind",show:!!((d.quickFind||d.idQf)&&d.attr.vid)},text:{desc:"可快速查找",type:"quickFind",show:!!((d.quickFind||d.textQf)&&d.attr.text)}}:{}}),i=["text","desc"],s=K(()=>t.value?Object.entries(t.value.attr).map(([d,h])=>{var v;const u={name:d,value:h,desc:JSON.stringify(h),tip:(v=r.value[d])!=null&&v.show?r.value[d]:void 0};return i.includes(d)?[u,{name:d+".length",value:(h==null?void 0:h.length)??null,desc:JSON.stringify((h==null?void 0:h.length)??null),tip:void 0}]:u}).flat():[]),n=K(()=>t.value?sr(t.value):"");return(d,h)=>{const u=Ue("SvgIcon"),v=rt,b=Fn,y=Jt,f=Zr,m=wr,N=el,k=Jr,w=Xr;return z(),ee(Pt,{initialValue:{top:40,right:10},class:"box-shadow-dim",show:e.show&&!!a(t)},{default:S(({onRef:c})=>[$("div",ml,[R(v,{text:"",title:"最小化",onClick:h[0]||(h[0]=g=>e.onUpdateShow(!e.show))},{icon:S(()=>[R(u,{name:"minus"})]),_:1})]),a(t)?(z(),ee(w,{key:0,size:"small",striped:"",singleLine:!1,class:"gkd_code",themeOverrides:{thPaddingSmall:"1px 3px",tdPaddingSmall:"0px 3px"}},{default:S(()=>[$("thead",null,[$("tr",{ref:c,"cursor-move":""},[...h[2]||(h[2]=[$("th",null,"Name",-1),$("th",null,"Value",-1)])],512)]),R(k,null,{default:S(()=>[(z(!0),te(Ne,null,Oe(a(s),g=>(z(),ee(N,{key:g.name},{default:S(()=>[R(f,{onClick:D=>a(Pe)(`${g.name}=${g.desc}`)},{default:S(()=>[g.tip?(z(),te("div",bl,[$("div",null,q(g.name),1),R(y,null,{trigger:S(()=>[R(b,{size:"16"},{default:S(()=>[g.tip.type=="info"?(z(),ee(u,{key:0,name:"info"})):g.tip.type=="quickFind"?(z(),ee(u,{key:1,name:"ok"})):ae("",!0)]),_:2},1024)]),default:S(()=>[J(" "+q(g.tip.desc),1)]),_:2},1024)])):(z(),te(Ne,{key:1},[J(q(g.name),1)],64))]),_:2},1032,["onClick"]),R(f,null,{default:S(()=>[R(m,{class:_t(["w-[calc(var(--gkd-w)*0.12)]",{"text-left direction-rtl":g.name=="id","opacity-50":g.value===null}])},{default:S(()=>[J(q(g.desc),1)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024))),128)),R(N,null,{default:S(()=>[R(f,{colspan:"2"},{default:S(()=>[$("div",xl,[R(y,null,{trigger:S(()=>[R(v,{text:"",onClick:h[1]||(h[1]=g=>a(Pe)(a(n)))},{icon:S(()=>[R(b,{size:"20"},{default:S(()=>[R(u,{name:"path"})]),_:1})]),_:1})]),default:S(()=>[$("div",yl,q(a(n)),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:2},1024)):ae("",!0)]),_:1},8,["show"])}}}),wl={bg:"#eee","px-2px":""},Cl=G({__name:"OverlapCard",setup(e){const{focusNode:t,overlapNodes:r,focusPosition:i,updateFocusNode:s}=Ae(),d=document.documentElement.scrollWidth/100*25.5;return(h,u)=>{const v=rt,b=Bn,y=Vo;return z(),ee(Pt,{initialValue:{top:215,left:d},class:"box-shadow-dim w-420px",show:!!(a(r)&&a(i))},{default:S(({onRef:f})=>[a(r)&&a(i)?(z(),ee(y,{key:0,size:"small",closable:"",onClose:u[0]||(u[0]=m=>r.value=void 0)},{header:S(()=>[$("div",{ref:f,"cursor-move":""},[u[1]||(u[1]=J(" 位置 ",-1)),$("span",wl,q(`${a(i).x.toFixed(0)},${a(i).y.toFixed(0)}`),1),J(" 存在 "+q(a(r).length)+" 个层叠节点 ",1)],512)]),default:S(()=>[R(b,{style:{"max-height":"400px","overflow-y":"scroll","padding-bottom":"10px"},class:"scrollbar-hidden"},{default:S(()=>[(z(!0),te(Ne,null,Oe(a(r),m=>(z(),ee(v,{key:m.id,size:"small",style:De(a(ut)(m,a(t))),onClick:N=>a(s)(m)},{default:S(()=>[J(q(a(ot)(m)),1)]),_:2},1032,["style","onClick"]))),128))]),_:1})]),_:2},1024)):ae("",!0)]),_:1},8,["initialValue","show"])}}}),Gn=Go(),Yn=K(()=>Gn.width.value/100),Qn=K(()=>Math.max(1200,Gn.width.value)),Sl={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Nl={flex:"","m-b-4px":"","pr-4px":""},_l={"min-h-24px":""},Rl={key:0,"color-red":"","whitespace-pre":""},$l=G({__name:"RuleCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:$t}},setup(e){const t=Ae(),{rootNode:r,focusNode:i}=t,s=t.snapshot,n=j(""),d=Yo(n,500),h=m=>{if(m==null)return[];if(typeof m=="string")return[m];if(Array.isArray(m)&&m.every(N=>typeof N=="string"))return m},u=m=>{const N=h(m.matches);if(!N)return"非法格式: matches";const k=h(m.anyMatches);if(!k)return"非法格式: anyMatches";const w=h(m.excludeMatches);if(!w)return"非法格式: excludeMatches";const c=[];for(let C=0;C<N.length;C++){const F=N[C];try{c.push(Ct(F))}catch(A){const B=A instanceof Error?A.message:String(A);return`非法选择器: matches[${C}]
263
- 错误: ${B}`}}const g=c.map(C=>C.querySelfOrSelectorAll(r.value));if(c.length){const C=g.findIndex(F=>F.length===0);if(C>=0)return`无法匹配: matches[${C}] 查找结果为空`}const D=[];for(let C=0;C<k.length;C++){const F=k[C];try{D.push(Ct(F))}catch(A){const B=A instanceof Error?A.message:String(A);return`非法选择器: anyMatches[${C}]
264
- 错误: ${B}`}}const p=D.map(C=>C.querySelfOrSelectorAll(r.value));if(D.length&&p.every(C=>C.length===0))return"无法匹配: anyMatches 查找结果为空";if(!N.length&&!k.length)return"非法规则: matches 和 anyMatches 至少存在一个";const l=[];for(let C=0;C<w.length;C++){const F=w[C];try{l.push(Ct(F))}catch(A){const B=A instanceof Error?A.message:String(A);return`非法选择器: excludeMatches[${C}]
265
- 错误: ${B}`}}const _=l.map(C=>C.querySelfOrSelectorAll(r.value));if(l.length){const C=_.findIndex(F=>F.length!==0);if(C>=0)return`无法匹配: excludeMatches[${C}] 查找结果不为空`}return g.length?g.at(-1)[0]:p[0][0]},v=m=>typeof m=="object"&&m!==null&&!Array.isArray(m),b=K(()=>{if(!d.value)return"";const m=(()=>{try{return On.parse(d.value)}catch(N){return N}})();if(m instanceof Error)return`非法格式: ${m.message}`;if(!v(m))return"非法格式: 请使用对象格式";if(typeof m.id=="string"){if(m.id!==s.value.appId)return"非法格式: id 不匹配 appId";if(!Array.isArray(m.groups))return"非法格式: groups 不是数组";if(m.groups.length!==1)return"非法格式: groups 长度不为 1";const N=m.groups[0];if(!(N!=null&&N.rules))return"非法格式: groups[0].rules 非法";const k=Array.isArray(N.rules)?N.rules:[N.rules];if(k.length!==1)return"非法格式: groups[0].rules 长度不为 1";const w=typeof k[0]=="string"?{matches:k[0]}:k[0];return v(w)?u(w):"非法格式: rules[0] 非法"}if(m.rules){const N=Array.isArray(m.rules)?m.rules:[m.rules];if(N.length!==1)return"非法格式: rules 长度不为 1";const k=typeof N[0]=="string"?{matches:N[0]}:N[0];return v(k)?u(k):"非法格式: rules[0] 非法"}return u(m)}),y=K(()=>n.value&&d.value&&typeof b.value=="string"?b.value:""),f=K(()=>typeof b.value=="string"?null:b.value);return(m,N)=>{const k=Ue("SvgIcon"),w=rt,c=Mn;return z(),ee(Pt,{initialValue:{top:40,right:Math.max(315,12*a(Yn)+135),width:Math.max(480,a(Qn)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:e.show},{default:S(({onRef:g})=>[$("div",Sl,[$("div",Nl,[N[3]||(N[3]=$("div",null,"测试规则",-1)),$("div",{ref:g,"flex-1":"","cursor-move":""},null,512),R(w,{text:"",title:"最小化",onClick:N[0]||(N[0]=D=>e.onUpdateShow(!e.show))},{icon:S(()=>[R(k,{name:"minus"})]),_:1})]),R(c,{value:a(n),"onUpdate:value":N[1]||(N[1]=D=>Me(n)?n.value=D:null),type:"textarea",placeholder:"请输入单个规则测试",size:"small",class:"gkd_code m-b-4px",autosize:{minRows:10,maxRows:20}},null,8,["value"]),$("div",_l,[a(y)?(z(),te("div",Rl,q(a(y)),1)):a(f)?(z(),ee(w,{key:1,size:"small",style:De(a(ut)(a(f),a(i))),onClick:N[2]||(N[2]=D=>a(t).updateFocusNode(a(f)))},{default:S(()=>[J(q(a(ot)(a(f))),1)]),_:1},8,["style"])):ae("",!0)])])]),_:1},8,["initialValue","show"])}}}),Pl=["src"],Dl={absolute:"","left-2px":"","top-2px":"","p-1px":"","z-1":"","text-13px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]"},Il={key:0,absolute:"","left-2px":"","bottom-2px":"","p-1px":"","z-1":"","text-12px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]",flex:"","flex-col":"","flex-items-center":""},Tl={key:1,absolute:"","right-2px":"","bottom-2px":"","p-1px":"","z-1":"","text-12px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]",flex:"","flex-col":"","flex-items-center":""},El=G({__name:"MiniHoverImg",props:{imgRef:{},imgHover:{type:Boolean},screenshotUrl:{},hoverPosition:{},hoverPositionStyle:{},boxHoverPosition:{},boxHoverPerPosition:{}},setup(e){const t=e,r=Qo(K(()=>t.imgRef));return(i,s)=>(z(),ee(Xt,{to:"body"},[$n($("div",{style:De({left:a(r).right.value+4+"px",top:a(r).top.value+"px"}),"pointer-events-none":"",fixed:"","overflow-hidden":"","z-2":"","bg-white":"","h-200px":"","w-200px":"","border-1px":"","border-indigo-600":"","border-dashed":""},[$("img",{src:e.screenshotUrl,"object-contain":"",absolute:"","left-0":"","top-0":"",style:De(e.hoverPositionStyle),"w-1000px":""},null,12,Pl),$("div",Dl,q(`${e.hoverPosition.ox.toFixed(0)}, ${e.hoverPosition.oy.toFixed(0)}`),1),e.boxHoverPosition?(z(),te("div",Il,[$("div",null,q(e.boxHoverPosition.top.toFixed(0)),1),$("div",null,q(e.boxHoverPosition.left.toFixed(0)+", "+e.boxHoverPosition.right.toFixed(0)),1),$("div",null,q(e.boxHoverPosition.bottom.toFixed(0)),1)])):ae("",!0),e.boxHoverPerPosition?(z(),te("div",Tl,[$("div",null,q(e.boxHoverPerPosition.top),1),$("div",null,q(e.boxHoverPerPosition.left+", "+e.boxHoverPerPosition.right),1),$("div",null,q(e.boxHoverPerPosition.bottom),1)])):ae("",!0),s[0]||(s[0]=$("div",{class:"top-[calc(50%-1px)] bg-[length:10px_1px]",absolute:"","left-0":"","right-0":"","h-1px":"","bg-repeat-x":"","mix-blend-difference":"",style:{"background-image":`linear-gradient(
262
+ `)]),X("empty","margin: auto;")]);var ul=function(e,t,r,i){function s(n){return n instanceof r?n:new r(function(d){d(n)})}return new(r||(r=Promise))(function(n,d){function h(b){try{v(i.next(b))}catch(y){d(y)}}function u(b){try{v(i.throw(b))}catch(y){d(y)}}function v(b){b.done?n(b.value):s(b.value).then(h,u)}v((i=i.apply(e,[])).next())})};function wn(e,t,r,i){return{getIsGroup(){return!1},getKey(n){return n[e]},getChildren:i||(n=>n[t]),getDisabled(n){return!!(n[r]||n.checkboxDisabled)}}}const fl={allowCheckingNotLoaded:Boolean,filter:Function,defaultExpandAll:Boolean,expandedKeys:Array,keyField:{type:String,default:"key"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},disabledField:{type:String,default:"disabled"},defaultExpandedKeys:{type:Array,default:()=>[]},indent:{type:Number,default:24},indeterminateKeys:Array,renderSwitcherIcon:Function,onUpdateIndeterminateKeys:[Function,Array],"onUpdate:indeterminateKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],"onUpdate:expandedKeys":[Function,Array],overrideDefaultNodeClickBehavior:Function},hl=Object.assign(Object.assign(Object.assign(Object.assign({},He.props),{accordion:Boolean,showIrrelevantNodes:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},expandOnDragenter:{type:Boolean,default:!0},expandOnClick:Boolean,checkOnClick:{type:[Boolean,Function],default:!1},cancelable:{type:Boolean,default:!0},checkable:Boolean,draggable:Boolean,blockNode:Boolean,blockLine:Boolean,showLine:Boolean,disabled:Boolean,checkedKeys:Array,defaultCheckedKeys:{type:Array,default:()=>[]},selectedKeys:Array,defaultSelectedKeys:{type:Array,default:()=>[]},multiple:Boolean,pattern:{type:String,default:""},onLoad:Function,cascade:Boolean,selectable:{type:Boolean,default:!0},scrollbarProps:Object,allowDrop:{type:Function,default:tl},animated:{type:Boolean,default:!0},ellipsis:Boolean,checkboxPlacement:{type:String,default:"left"},virtualScroll:Boolean,watchProps:Array,renderLabel:Function,renderPrefix:Function,renderSuffix:Function,nodeProps:Function,keyboard:{type:Boolean,default:!0},getChildren:Function,onDragenter:[Function,Array],onDragleave:[Function,Array],onDragend:[Function,Array],onDragstart:[Function,Array],onDragover:[Function,Array],onDrop:[Function,Array],onUpdateCheckedKeys:[Function,Array],"onUpdate:checkedKeys":[Function,Array],onUpdateSelectedKeys:[Function,Array],"onUpdate:selectedKeys":[Function,Array]}),fl),{internalTreeSelect:Boolean,internalScrollable:Boolean,internalScrollablePadding:String,internalRenderEmpty:Function,internalHighlightKeySet:Object,internalUnifySelectCheck:Boolean,internalCheckboxFocusable:{type:Boolean,default:!0},internalFocusable:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},leafOnly:Boolean}),vl=G({name:"Tree",props:hl,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:i}=ft(e),s=ht("Tree",i,t),n=He("Tree","-tree",cl,Vr,e,t),d=le(null),h=le(null),u=le(null);function v(){var o;return(o=u.value)===null||o===void 0?void 0:o.listElRef}function b(){var o;return(o=u.value)===null||o===void 0?void 0:o.itemsElRef}const y=A(()=>{const{filter:o}=e;if(o)return o;const{labelField:x}=e;return(P,L)=>{if(!P.length)return!0;const K=L[x];return typeof K=="string"?K.toLowerCase().includes(P.toLowerCase()):!1}}),f=A(()=>{const{pattern:o}=e;return o?!o.length||!y.value?{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}:sl(e.data,y.value,o,e.keyField,e.childrenField):{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}}),m=A(()=>mn(e.showIrrelevantNodes?e.data:f.value.filteredTree,wn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),N=je(qn,null),k=e.internalTreeSelect?N.dataTreeMate:A(()=>e.showIrrelevantNodes?m.value:mn(e.data,wn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),{watchProps:w}=e,c=le([]);w!=null&&w.includes("defaultCheckedKeys")?Se(()=>{c.value=e.defaultCheckedKeys}):c.value=e.defaultCheckedKeys;const g=V(e,"checkedKeys"),D=ct(g,c),p=A(()=>k.value.getCheckedKeys(D.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})),l=il(e),_=A(()=>p.value.checkedKeys),C=A(()=>{const{indeterminateKeys:o}=e;return o!==void 0?o:p.value.indeterminateKeys}),F=le([]);w!=null&&w.includes("defaultSelectedKeys")?Se(()=>{F.value=e.defaultSelectedKeys}):F.value=e.defaultSelectedKeys;const I=V(e,"selectedKeys"),U=ct(I,F),ke=le([]),we=o=>{ke.value=e.defaultExpandAll?k.value.getNonLeafKeys():o===void 0?e.defaultExpandedKeys:o};w!=null&&w.includes("defaultExpandedKeys")?Se(()=>{we(void 0)}):Se(()=>{we(e.defaultExpandedKeys)});const ie=V(e,"expandedKeys"),he=ct(ie,ke),be=A(()=>m.value.getFlattenedNodes(he.value)),{pendingNodeKeyRef:_e,handleKeydown:lt}=nl({props:e,mergedCheckedKeysRef:D,mergedSelectedKeysRef:U,fNodesRef:be,mergedExpandedKeysRef:he,handleCheck:Lt,handleSelect:Kt,handleSwitcherClick:tn});let ge=null,H=null;const Fe=le(new Set),ue=A(()=>e.internalHighlightKeySet||f.value.highlightKeySet),Be=ct(ue,Fe),E=le(new Set),W=A(()=>he.value.filter(o=>!E.value.has(o)));let Z=0;const re=le(null),fe=le(null),gt=le(null),pt=le(null),mt=le(0),Jn=A(()=>{const{value:o}=fe;return o?o.parent:null});let Dt=!1;Te(V(e,"data"),()=>{Dt=!0,tt(()=>{Dt=!1}),E.value.clear(),_e.value=null,at()},{deep:!1});let It=!1;const Tt=()=>{It=!0,tt(()=>{It=!1})};let it;Te(V(e,"pattern"),(o,x)=>{if(e.showIrrelevantNodes)if(it=void 0,o){const{expandedKeys:P,highlightKeySet:L}=al(e.data,e.pattern,e.keyField,e.childrenField,y.value);Fe.value=L,Tt(),We(P,pe(P),{node:null,action:"filter"})}else Fe.value=new Set;else if(!o.length)it!==void 0&&(Tt(),We(it,pe(it),{node:null,action:"filter"}));else{x.length||(it=he.value);const{expandedKeys:P}=f.value;P!==void 0&&(Tt(),We(P,pe(P),{node:null,action:"filter"}))}});function Zt(o){return ul(this,void 0,void 0,function*(){const{onLoad:x}=e;if(!x){yield Promise.resolve();return}const{value:P}=E;if(!P.has(o.key)){P.add(o.key);try{(yield x(o.rawNode))===!1&&Ve()}catch(L){console.error(L),Ve()}P.delete(o.key)}})}Se(()=>{var o;const{value:x}=m;if(!x)return;const{getNode:P}=x;(o=he.value)===null||o===void 0||o.forEach(L=>{const K=P(L);K&&!K.shallowLoaded&&Zt(K)})});const qe=le(!1),Ee=le([]);Te(W,(o,x)=>{if(!e.animated||It){tt(bt);return}if(Dt)return;const P=st(n.value.self.nodeHeight),L=new Set(x);let K=null,ne=null;for(const Q of o)if(!L.has(Q)){if(K!==null)return;K=Q}const ve=new Set(o);for(const Q of x)if(!ve.has(Q)){if(ne!==null)return;ne=Q}if(K===null&&ne===null)return;const{virtualScroll:me}=e,Ye=(me?u.value.listElRef:d.value).offsetHeight,Qe=Math.ceil(Ye/P)+1;let xe;if(K!==null&&(xe=x),ne!==null&&(xe===void 0?xe=o:xe=xe.filter(Q=>Q!==ne)),qe.value=!0,Ee.value=m.value.getFlattenedNodes(xe),K!==null){const Q=Ee.value.findIndex(ye=>ye.key===K);if(~Q){const ye=Ee.value[Q].children;if(ye){const Ce=gn(ye,o);Ee.value.splice(Q+1,0,{__motion:!0,mode:"expand",height:me?Ce.length*P:void 0,nodes:me?Ce.slice(0,Qe):Ce})}}}if(ne!==null){const Q=Ee.value.findIndex(ye=>ye.key===ne);if(~Q){const ye=Ee.value[Q].children;if(!ye)return;qe.value=!0;const Ce=gn(ye,o);Ee.value.splice(Q+1,0,{__motion:!0,mode:"collapse",height:me?Ce.length*P:void 0,nodes:me?Ce.slice(0,Qe):Ce})}}});const Zn=A(()=>yr(be.value)),eo=A(()=>qe.value?Ee.value:be.value);function bt(){const{value:o}=h;o&&o.sync()}function to(){qe.value=!1,e.virtualScroll&&tt(bt)}function pe(o){const{getNode:x}=k.value;return o.map(P=>{var L;return((L=x(P))===null||L===void 0?void 0:L.rawNode)||null})}function We(o,x,P){const{"onUpdate:expandedKeys":L,onUpdateExpandedKeys:K}=e;ke.value=o,L&&se(L,o,x,P),K&&se(K,o,x,P)}function en(o,x,P){const{"onUpdate:checkedKeys":L,onUpdateCheckedKeys:K}=e;c.value=o,K&&se(K,o,x,P),L&&se(L,o,x,P)}function no(o,x){const{"onUpdate:indeterminateKeys":P,onUpdateIndeterminateKeys:L}=e;P&&se(P,o,x),L&&se(L,o,x)}function Et(o,x,P){const{"onUpdate:selectedKeys":L,onUpdateSelectedKeys:K}=e;F.value=o,K&&se(K,o,x,P),L&&se(L,o,x,P)}function oo(o){const{onDragenter:x}=e;x&&se(x,o)}function ro(o){const{onDragleave:x}=e;x&&se(x,o)}function lo(o){const{onDragend:x}=e;x&&se(x,o)}function io(o){const{onDragstart:x}=e;x&&se(x,o)}function ao(o){const{onDragover:x}=e;x&&se(x,o)}function so(o){const{onDrop:x}=e;x&&se(x,o)}function at(){co(),ze()}function co(){re.value=null}function ze(){mt.value=0,fe.value=null,gt.value=null,pt.value=null,Ve()}function Ve(){ge&&(window.clearTimeout(ge),ge=null),H=null}function Lt(o,x){if(e.disabled||Le(o,e.disabledField))return;if(e.internalUnifySelectCheck&&!e.multiple){Kt(o);return}const P=x?"check":"uncheck",{checkedKeys:L,indeterminateKeys:K}=k.value[P](o.key,_.value,{cascade:e.cascade,checkStrategy:l.value,allowNotLoaded:e.allowCheckingNotLoaded});en(L,pe(L),{node:o.rawNode,action:P}),no(K,pe(K))}function uo(o){if(e.disabled)return;const{key:x}=o,{value:P}=he,L=P.findIndex(K=>K===x);if(~L){const K=Array.from(P);K.splice(L,1),We(K,pe(K),{node:o.rawNode,action:"collapse"})}else{const K=m.value.getNode(x);if(!K||K.isLeaf)return;let ne;if(e.accordion){const ve=new Set(o.siblings.map(({key:me})=>me));ne=P.filter(me=>!ve.has(me)),ne.push(x)}else ne=P.concat(x);We(ne,pe(ne),{node:o.rawNode,action:"expand"})}}function tn(o){e.disabled||qe.value||uo(o)}function Kt(o){if(!(e.disabled||!e.selectable)){if(_e.value=o.key,e.internalUnifySelectCheck){const{value:{checkedKeys:x,indeterminateKeys:P}}=p;e.multiple?Lt(o,!(x.includes(o.key)||P.includes(o.key))):en([o.key],pe([o.key]),{node:o.rawNode,action:"check"})}if(e.multiple){const x=Array.from(U.value),P=x.findIndex(L=>L===o.key);~P?e.cancelable&&x.splice(P,1):~P||x.push(o.key),Et(x,pe(x),{node:o.rawNode,action:~P?"unselect":"select"})}else U.value.includes(o.key)?e.cancelable&&Et([],[],{node:o.rawNode,action:"unselect"}):Et([o.key],pe([o.key]),{node:o.rawNode,action:"select"})}}function fo(o){if(ge&&(window.clearTimeout(ge),ge=null),o.isLeaf)return;H=o.key;const x=()=>{if(H!==o.key)return;const{value:P}=gt;if(P&&P.key===o.key&&!he.value.includes(o.key)){const L=he.value.concat(o.key);We(L,pe(L),{node:o.rawNode,action:"expand"})}ge=null,H=null};o.shallowLoaded?ge=window.setTimeout(()=>{x()},1e3):ge=window.setTimeout(()=>{Zt(o).then(()=>{x()})},1e3)}function ho({event:o,node:x}){!e.draggable||e.disabled||Le(x,e.disabledField)||(nn({event:o,node:x},!1),oo({event:o,node:x.rawNode}))}function vo({event:o,node:x}){!e.draggable||e.disabled||Le(x,e.disabledField)||ro({event:o,node:x.rawNode})}function go(o){o.target===o.currentTarget&&ze()}function po({event:o,node:x}){at(),!(!e.draggable||e.disabled||Le(x,e.disabledField))&&lo({event:o,node:x.rawNode})}function mo({event:o,node:x}){!e.draggable||e.disabled||Le(x,e.disabledField)||(Z=o.clientX,re.value=x,io({event:o,node:x.rawNode}))}function nn({event:o,node:x},P=!0){var L;if(!e.draggable||e.disabled||Le(x,e.disabledField))return;const{value:K}=re;if(!K)return;const{allowDrop:ne,indent:ve}=e;P&&ao({event:o,node:x.rawNode});const me=o.currentTarget,{height:Ye,top:Qe}=me.getBoundingClientRect(),xe=o.clientY-Qe;let Q;ne({node:x.rawNode,dropPosition:"inside",phase:"drag"})?xe<=8?Q="before":xe>=Ye-8?Q="after":Q="inside":xe<=Ye/2?Q="before":Q="after";const{value:Ce}=Zn;let Y,de;const Xe=Ce(x.key);if(Xe===null){ze();return}let xt=!1;Q==="inside"?(Y=x,de="inside"):Q==="before"?x.isFirstChild?(Y=x,de="before"):(Y=be.value[Xe-1],de="after"):(Y=x,de="after"),!Y.isLeaf&&he.value.includes(Y.key)&&(xt=!0,de==="after"&&(Y=be.value[Xe+1],Y?de="before":(Y=x,de="inside")));const rn=Y;if(gt.value=rn,!xt&&K.isLastChild&&K.key===Y.key&&(de="after"),de==="after"){let ln=Z-o.clientX,At=0;for(;ln>=ve/2&&Y.parent!==null&&Y.isLastChild&&At<1;)ln-=ve,At+=1,Y=Y.parent;mt.value=At}else mt.value=0;if((K.contains(Y)||de==="inside"&&((L=K.parent)===null||L===void 0?void 0:L.key)===Y.key)&&!(K.key===rn.key&&K.key===Y.key)){ze();return}if(!ne({node:Y.rawNode,dropPosition:de,phase:"drag"})){ze();return}if(K.key===Y.key)Ve();else if(H!==Y.key)if(de==="inside"){if(e.expandOnDragenter){if(fo(Y),!Y.shallowLoaded&&H!==Y.key){at();return}}else if(!Y.shallowLoaded){at();return}}else Ve();else de!=="inside"&&Ve();pt.value=de,fe.value=Y}function bo({event:o,node:x,dropPosition:P}){if(!e.draggable||e.disabled||Le(x,e.disabledField))return;const{value:L}=re,{value:K}=fe,{value:ne}=pt;if(!(!L||!K||!ne)&&e.allowDrop({node:K.rawNode,dropPosition:ne,phase:"drag"})&&L.key!==K.key){if(ne==="before"){const ve=L.getNext({includeDisabled:!0});if(ve&&ve.key===K.key){ze();return}}if(ne==="after"){const ve=L.getPrev({includeDisabled:!0});if(ve&&ve.key===K.key){ze();return}}so({event:o,node:K.rawNode,dragNode:L.rawNode,dropPosition:P}),at()}}function xo(){bt()}function yo(){bt()}function ko(o){var x;if(e.virtualScroll||e.internalScrollable){const{value:P}=h;if(!((x=P==null?void 0:P.containerRef)===null||x===void 0)&&x.contains(o.relatedTarget))return;_e.value=null}else{const{value:P}=d;if(P!=null&&P.contains(o.relatedTarget))return;_e.value=null}}Te(_e,o=>{var x,P;if(o!==null){if(e.virtualScroll)(x=u.value)===null||x===void 0||x.scrollTo({key:o});else if(e.internalScrollable){const{value:L}=h;if(L===null)return;const K=(P=L.contentRef)===null||P===void 0?void 0:P.querySelector(`[data-key="${Mn(o)}"]`);if(!K)return;L.scrollTo({el:K})}}}),Wt(vt,{loadingKeysRef:E,highlightKeySetRef:Be,displayedCheckedKeysRef:_,displayedIndeterminateKeysRef:C,mergedSelectedKeysRef:U,mergedExpandedKeysRef:he,mergedThemeRef:n,mergedCheckStrategyRef:l,nodePropsRef:V(e,"nodeProps"),disabledRef:V(e,"disabled"),checkableRef:V(e,"checkable"),selectableRef:V(e,"selectable"),expandOnClickRef:V(e,"expandOnClick"),onLoadRef:V(e,"onLoad"),draggableRef:V(e,"draggable"),blockLineRef:V(e,"blockLine"),indentRef:V(e,"indent"),cascadeRef:V(e,"cascade"),checkOnClickRef:V(e,"checkOnClick"),checkboxPlacementRef:e.checkboxPlacement,droppingMouseNodeRef:gt,droppingNodeParentRef:Jn,draggingNodeRef:re,droppingPositionRef:pt,droppingOffsetLevelRef:mt,fNodesRef:be,pendingNodeKeyRef:_e,showLineRef:V(e,"showLine"),disabledFieldRef:V(e,"disabledField"),internalScrollableRef:V(e,"internalScrollable"),internalCheckboxFocusableRef:V(e,"internalCheckboxFocusable"),internalTreeSelect:e.internalTreeSelect,renderLabelRef:V(e,"renderLabel"),renderPrefixRef:V(e,"renderPrefix"),renderSuffixRef:V(e,"renderSuffix"),renderSwitcherIconRef:V(e,"renderSwitcherIcon"),labelFieldRef:V(e,"labelField"),multipleRef:V(e,"multiple"),overrideDefaultNodeClickBehaviorRef:V(e,"overrideDefaultNodeClickBehavior"),handleSwitcherClick:tn,handleDragEnd:po,handleDragEnter:ho,handleDragLeave:vo,handleDragStart:mo,handleDrop:bo,handleDragOver:nn,handleSelect:Kt,handleCheck:Lt});function wo(o,x){var P,L;typeof o=="number"?(P=u.value)===null||P===void 0||P.scrollTo(o,x||0):(L=u.value)===null||L===void 0||L.scrollTo(o)}const Co={handleKeydown:lt,scrollTo:wo,getCheckedData:()=>{if(!e.checkable)return{keys:[],options:[]};const{checkedKeys:o}=p.value;return{keys:o,options:pe(o)}},getIndeterminateData:()=>{if(!e.checkable)return{keys:[],options:[]};const{indeterminateKeys:o}=p.value;return{keys:o,options:pe(o)}}},on=A(()=>{const{common:{cubicBezierEaseInOut:o},self:{fontSize:x,nodeBorderRadius:P,nodeColorHover:L,nodeColorPressed:K,nodeColorActive:ne,arrowColor:ve,loadingColor:me,nodeTextColor:Ye,nodeTextColorDisabled:Qe,dropMarkColor:xe,nodeWrapperPadding:Q,nodeHeight:ye,lineHeight:Ce,lineColor:Y}}=n.value,de=zt(Q,"top"),Xe=zt(Q,"bottom"),xt=Dn(st(ye)-st(de)-st(Xe));return{"--n-arrow-color":ve,"--n-loading-color":me,"--n-bezier":o,"--n-font-size":x,"--n-node-border-radius":P,"--n-node-color-active":ne,"--n-node-color-hover":L,"--n-node-color-pressed":K,"--n-node-text-color":Ye,"--n-node-text-color-disabled":Qe,"--n-drop-mark-color":xe,"--n-node-wrapper-padding":Q,"--n-line-offset-top":`-${de}`,"--n-line-offset-bottom":`-${Xe}`,"--n-node-content-height":xt,"--n-line-height":Ce,"--n-line-color":Y}}),Ge=r?Gt("tree",void 0,on,e):void 0;return Object.assign(Object.assign({},Co),{mergedClsPrefix:t,mergedTheme:n,rtlEnabled:s,fNodes:eo,aip:qe,selfElRef:d,virtualListInstRef:u,scrollbarInstRef:h,handleFocusout:ko,handleDragLeaveTree:go,handleScroll:xo,getScrollContainer:v,getScrollContent:b,handleAfterEnter:to,handleResize:yo,cssVars:r?void 0:on,themeClass:Ge==null?void 0:Ge.themeClass,onRender:Ge==null?void 0:Ge.onRender})},render(){var e;const{fNodes:t,internalRenderEmpty:r}=this;if(!t.length&&r)return r();const{mergedClsPrefix:i,blockNode:s,blockLine:n,draggable:d,disabled:h,ellipsis:u,internalFocusable:v,checkable:b,handleKeydown:y,rtlEnabled:f,handleFocusout:m,scrollbarProps:N}=this,k=v&&!h,w=k?"0":void 0,c=[`${i}-tree`,f&&`${i}-tree--rtl`,b&&`${i}-tree--checkable`,(n||s)&&`${i}-tree--block-node`,n&&`${i}-tree--block-line`,u&&`${i}-tree--ellipsis`],g=p=>"__motion"in p?T(dl,{height:p.height,nodes:p.nodes,clsPrefix:i,mode:p.mode,onAfterEnter:this.handleAfterEnter}):T(Vn,{key:p.key,tmNode:p,clsPrefix:i});if(this.virtualScroll){const{mergedTheme:p,internalScrollablePadding:l}=this,_=zt(l||"0");return T(dn,Object.assign({},N,{ref:"scrollbarInstRef",onDragleave:d?this.handleDragLeaveTree:void 0,container:this.getScrollContainer,content:this.getScrollContent,class:c,theme:p.peers.Scrollbar,themeOverrides:p.peerOverrides.Scrollbar,tabindex:w,onKeydown:k?y:void 0,onFocusout:k?m:void 0}),{default:()=>{var C;return(C=this.onRender)===null||C===void 0||C.call(this),t.length?T(xr,{ref:"virtualListInstRef",items:this.fNodes,itemSize:st(p.self.nodeHeight),ignoreItemResize:this.aip,paddingTop:_.top,paddingBottom:_.bottom,class:this.themeClass,style:[this.cssVars,{paddingLeft:_.left,paddingRight:_.right}],onScroll:this.handleScroll,onResize:this.handleResize,showScrollbar:!1,itemResizable:!0},{default:({item:F})=>g(F)}):sn(this.$slots.empty,()=>[T(pn,{class:`${i}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})])}})}const{internalScrollable:D}=this;return c.push(this.themeClass),(e=this.onRender)===null||e===void 0||e.call(this),D?T(dn,Object.assign({},N,{class:c,tabindex:w,onKeydown:k?y:void 0,onFocusout:k?m:void 0,style:this.cssVars,contentStyle:{padding:this.internalScrollablePadding}}),{default:()=>T("div",{onDragleave:d?this.handleDragLeaveTree:void 0,ref:"selfElRef"},this.fNodes.map(g))}):T("div",{class:c,tabindex:w,ref:"selfElRef",style:this.cssVars,onKeydown:k?y:void 0,onFocusout:k?m:void 0,onDragleave:d?this.handleDragLeaveTree:void 0},t.length?t.map(g):sn(this.$slots.empty,()=>[T(pn,{class:`${i}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]))}}),Cn=e=>{const t=j(),r={x:0,y:0},i=Qt({...r});let s;const n=b=>{s&&b.preventDefault()},d=b=>{s=b,r.x=i.x,r.y=i.y},h=b=>{if(!s||!t.value)return;const y=b.clientX-s.clientX,f=b.clientY-s.clientY;e(y)&&(i.x=r.x+y),i.y=r.y+f},u=()=>{s=void 0},v=()=>{if(!t.value||!s)return;u();const{top:b,bottom:y,left:f,right:m}=t.value.getBoundingClientRect();(m<0||f>window.innerWidth||y<0||b>window.innerHeight)&&(i.x=r.x,i.y=r.y)};return Rt(()=>{window.addEventListener("pointermove",h),window.addEventListener("pointerup",v),document.addEventListener("selectstart",n)}),Nt(()=>{window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",v),document.removeEventListener("selectstart",n),u()}),Te(t,(b,y)=>{b&&(b.addEventListener("pointerdown",d),b.addEventListener("pointerup",u)),y&&(y.removeEventListener("pointerdown",d),y.removeEventListener("pointerup",u))}),Nt(()=>{t.value&&(t.value.removeEventListener("pointerdown",d),t.value.removeEventListener("pointerup",u))}),{target:t,offset:i}};let dt=1e3;const gl=()=>{dt++;const e=j(dt);return{zIndex:e,setTop:()=>{e.value!==dt&&(dt++,e.value=dt)}}},Sn="transition-top,bottom,left,right-500",Pt=G({__name:"DraggableCard",props:{initialValue:{default:()=>({})},minWidth:{},sizeDraggable:{type:Boolean},show:{type:Boolean,default:!0},class:{}},setup(e){const t=e,r=t.initialValue.left!==void 0,i=t.initialValue.top!==void 0,s={x:(r?t.initialValue.left:t.initialValue.right)??0,y:(i?t.initialValue.top:t.initialValue.bottom)??0},n=Cn(l=>{const _=(t.initialValue.width||0)+d.offset.x+-n.offset.x-l;return(t.minWidth||0)<_}),d=Cn(l=>{const _=(t.initialValue.width||0)+d.offset.x+l-n.offset.x;return(t.minWidth||0)<_}),h=Qt({...s}),u=A(()=>{const l=(t.initialValue.width||0)+d.offset.x-n.offset.x,_=t.initialValue.width?`width:${l}px;`:"",C=i?`top:${h.y}px;`:`bottom:${h.y}px;`;return r?`left:${h.x-n.offset.x}px;`+C+_:`right:${h.x-d.offset.x}px;`+C+_});let v;const b=j(!1),y=l=>{v=l,s.x=h.x,s.y=h.y,b.value=!1},f=l=>{if(!k.value||!v)return;const _=l.clientX-v.clientX,C=l.clientY-v.clientY;h.x=s.x+(r?_:-_),h.y=s.y+(i?C:-C),b.value=!0},m=()=>{v=void 0},N=j(),k=j(),w=l=>{v&&l.preventDefault()},c=()=>{if(!k.value||!v)return;m();const{top:l,bottom:_,left:C,right:F}=k.value.getBoundingClientRect();if(F<0||C>window.innerWidth||_<0||l>window.innerHeight){h.x=s.x,h.y=s.y;const I=N.value;I&&(I.classList.add(Sn),setTimeout(()=>{I.classList.remove(Sn)},550))}};Rt(()=>{window.addEventListener("pointermove",f),window.addEventListener("pointerup",c),document.addEventListener("selectstart",w)}),Nt(()=>{window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",c),document.removeEventListener("selectstart",w),m()}),Te(k,(l,_)=>{l&&(l.addEventListener("pointerdown",y),l.addEventListener("pointerup",m)),_&&(_.removeEventListener("pointerdown",y),_.removeEventListener("pointerup",m))}),Nt(()=>{k.value&&(k.value.removeEventListener("pointerdown",y),k.value.removeEventListener("pointerup",m))});const g=l=>{l instanceof HTMLElement?k.value=l:k.value=void 0},{setTop:D,zIndex:p}=gl();return Te(()=>t.show,()=>{t.show&&D()}),(l,_)=>(B(),ee(Xt,{to:"body"},[e.show?(B(),te("div",{key:0,ref_key:"box",ref:N,fixed:"",class:_t(["DraggableCard",t.class]),style:De([a(u),{zIndex:a(p)}]),onMousedown:_[0]||(_[0]=(...C)=>a(D)&&a(D)(...C))},[In(l.$slots,"default",{onRef:g,moved:a(b)}),e.sizeDraggable?(B(),te(Ne,{key:0},[$("div",{ref:a(n).target,absolute:"","right-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512),$("div",{ref:a(d).target,absolute:"","left-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512)],64)):ae("",!0)],38)):ae("",!0)]))}}),pl=async e=>fetch("https://detect.gkd.li/api/getImportId?id="+e).then(t=>t.json()).catch(()=>0),Ae=Ho(()=>{const e=Tn(),t=En(),r=j();qt(()=>e.params.snapshotId,F=>{r.value=jo(F)});const i=A(()=>{if(r.value)return cn[r.value]}),s=A(()=>{if(r.value)return Wo[r.value]}),n=j();Se(()=>{n.value&&(document.title="快照-"+(Re(n.value).name||n.value.appId))});const d=j(),h=A(()=>{if(d.value)return URL.createObjectURL(new Blob([d.value],{type:"image/png"}))}),u=j(!1),v=kr(async F=>{if(u.value=!1,!F){n.value=void 0,d.value=void 0;return}if(await Promise.all([vr.getItem(F).then(I=>{n.value=I||void 0}),gr.getItem(F).then(I=>{d.value=I||void 0})]),!n.value){const I=cn[F]||await pl(F);if(I&&Number.isSafeInteger(I)){u.value=!0,t.replace({path:"/i/"+I,query:e.query});return}}}),b=A(()=>v.loading);qt(()=>r.value,v.invoke),Se(()=>{i.value&&!qo[i.value]&&r.value&&fetch("https://detect.gkd.li/api/detectSnapshot?importId="+i.value)});const y=A(()=>pr()&&yt.autoUploadImport);Se(()=>{y.value&&n.value&&!s.value&&cr(n.value),y.value&&n.value&&!i.value&&ur(n.value),y.value&&n.value&&i.value&&fr(n.value.id,i.value)});const f=A(()=>n.value?n.value.nodes.length<=yt.maxShowNodeSize?structuredClone(n.value.nodes):structuredClone(n.value.nodes.slice(0,yt.maxShowNodeSize)):[]),m=A(()=>{if(f.value.length)return ar(f.value)}),N=A(()=>n.value?n.value.nodes.length-yt.maxShowNodeSize:0),k=j(),w=j(0),c=j(),g=j(),D=async F=>{k.value=F,w.value=Date.now(),await tt(),g.value&&!g.value.includes(F)&&(c.value=void 0,g.value=void 0)};Se(()=>{m.value&&D(m.value)});const p=F=>{c.value=F;const I=ir(f.value,c.value);I.length&&D(I[0]),I.length>1?g.value=I:g.value=void 0},l=j(!1),_=j();return{snapshotId:r,snapshot:n,rootNode:m,screenshotUrl:h,loading:b,redirected:u,importId:i,imageId:s,focusNode:k,updateFocusNode:D,focusTime:w,overlapNodes:g,missNodeSize:N,focusPosition:c,updatePosition:p,trackData:_,trackShow:l,showTrack:(F,I)=>{l.value=!0,_.value={selector:F,nodes:f.value,queryResult:I}}}}),ml={absolute:"","top-0":"","right-0":"","pt-4px":"","pr-8px":""},bl={key:0,flex:"","justify-between":"","items-center":""},xl={flex:"","items-center":"","h-24px":"","px-2px":""},yl={"max-w-500px":""},kl=G({__name:"AttrCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:$t}},setup(e){const{focusNode:t}=Ae(),r=A(()=>{const d=t.value;return d?{_id:{desc:"虚拟属性(真机不可用):生成快照访问节点顺序",type:"info",show:!0},_pid:{desc:"虚拟属性(真机不可用):父节点的 _id",type:"info",show:!0},_selector:{desc:"自动生成的选择器, 点击“_selector”可直接复制内容, 用于定位",type:"info",show:!0},depth:{desc:"使用此属性在某些应用上可能造成无限节点错误",type:"info",show:!0},id:{desc:"可快速查找",type:"quickFind",show:!!((d.quickFind||d.idQf)&&d.attr.id)},vid:{desc:"可快速查找",type:"quickFind",show:!!((d.quickFind||d.idQf)&&d.attr.vid)},text:{desc:"可快速查找",type:"quickFind",show:!!((d.quickFind||d.textQf)&&d.attr.text)}}:{}}),i=["text","desc"],s=A(()=>t.value?Object.entries(t.value.attr).map(([d,h])=>{var v;const u={name:d,value:h,desc:JSON.stringify(h),tip:(v=r.value[d])!=null&&v.show?r.value[d]:void 0};return i.includes(d)?[u,{name:d+".length",value:(h==null?void 0:h.length)??null,desc:JSON.stringify((h==null?void 0:h.length)??null),tip:void 0}]:u}).flat():[]),n=A(()=>t.value?sr(t.value):"");return(d,h)=>{const u=Ue("SvgIcon"),v=rt,b=An,y=Jt,f=Zr,m=wr,N=el,k=Jr,w=Xr;return B(),ee(Pt,{initialValue:{top:40,right:10},class:"box-shadow-dim",show:e.show&&!!a(t)},{default:S(({onRef:c})=>[$("div",ml,[R(v,{text:"",title:"最小化",onClick:h[0]||(h[0]=g=>e.onUpdateShow(!e.show))},{icon:S(()=>[R(u,{name:"minus"})]),_:1})]),a(t)?(B(),ee(w,{key:0,size:"small",striped:"",singleLine:!1,class:"gkd_code",themeOverrides:{thPaddingSmall:"1px 3px",tdPaddingSmall:"0px 3px"}},{default:S(()=>[$("thead",null,[$("tr",{ref:c,"cursor-move":""},[...h[2]||(h[2]=[$("th",null,"Name",-1),$("th",null,"Value",-1)])],512)]),R(k,null,{default:S(()=>[(B(!0),te(Ne,null,Oe(a(s),g=>(B(),ee(N,{key:g.name},{default:S(()=>[R(f,{onClick:D=>a(Pe)(`${g.name}=${g.desc}`)},{default:S(()=>[g.tip?(B(),te("div",bl,[$("div",null,q(g.name),1),R(y,null,{trigger:S(()=>[R(b,{size:"16"},{default:S(()=>[g.tip.type=="info"?(B(),ee(u,{key:0,name:"info"})):g.tip.type=="quickFind"?(B(),ee(u,{key:1,name:"ok"})):ae("",!0)]),_:2},1024)]),default:S(()=>[J(" "+q(g.tip.desc),1)]),_:2},1024)])):(B(),te(Ne,{key:1},[J(q(g.name),1)],64))]),_:2},1032,["onClick"]),R(f,null,{default:S(()=>[R(m,{class:_t(["w-[calc(var(--gkd-w)*0.12)]",{"text-left direction-rtl":g.name=="id","opacity-50":g.value===null}])},{default:S(()=>[J(q(g.desc),1)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024))),128)),R(N,null,{default:S(()=>[R(f,{colspan:"2"},{default:S(()=>[$("div",xl,[R(y,null,{trigger:S(()=>[R(v,{text:"",onClick:h[1]||(h[1]=g=>a(Pe)(a(n)))},{icon:S(()=>[R(b,{size:"20"},{default:S(()=>[R(u,{name:"path"})]),_:1})]),_:1})]),default:S(()=>[$("div",yl,q(a(n)),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:2},1024)):ae("",!0)]),_:1},8,["show"])}}}),wl={bg:"#eee","px-2px":""},Cl=G({__name:"OverlapCard",setup(e){const{focusNode:t,overlapNodes:r,focusPosition:i,updateFocusNode:s}=Ae(),d=document.documentElement.scrollWidth/100*25.5;return(h,u)=>{const v=rt,b=Fn,y=Vo;return B(),ee(Pt,{initialValue:{top:215,left:d},class:"box-shadow-dim w-420px",show:!!(a(r)&&a(i))},{default:S(({onRef:f})=>[a(r)&&a(i)?(B(),ee(y,{key:0,size:"small",closable:"",onClose:u[0]||(u[0]=m=>r.value=void 0)},{header:S(()=>[$("div",{ref:f,"cursor-move":""},[u[1]||(u[1]=J(" 位置 ",-1)),$("span",wl,q(`${a(i).x.toFixed(0)},${a(i).y.toFixed(0)}`),1),J(" 存在 "+q(a(r).length)+" 个层叠节点 ",1)],512)]),default:S(()=>[R(b,{style:{"max-height":"400px","overflow-y":"scroll","padding-bottom":"10px"},class:"scrollbar-hidden"},{default:S(()=>[(B(!0),te(Ne,null,Oe(a(r),m=>(B(),ee(v,{key:m.id,size:"small",style:De(a(ut)(m,a(t))),onClick:N=>a(s)(m)},{default:S(()=>[J(q(a(ot)(m)),1)]),_:2},1032,["style","onClick"]))),128))]),_:1})]),_:2},1024)):ae("",!0)]),_:1},8,["initialValue","show"])}}}),Gn=Go(),Yn=A(()=>Gn.width.value/100),Qn=A(()=>Math.max(1200,Gn.width.value)),Sl={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Nl={flex:"","m-b-4px":"","pr-4px":""},_l={"min-h-24px":""},Rl={key:0,"color-red":"","whitespace-pre":""},$l=G({__name:"RuleCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:$t}},setup(e){const t=Ae(),{rootNode:r,focusNode:i}=t,s=t.snapshot,n=j(""),d=Yo(n,500),h=m=>{if(m==null)return[];if(typeof m=="string")return[m];if(Array.isArray(m)&&m.every(N=>typeof N=="string"))return m},u=m=>{const N=h(m.matches);if(!N)return"非法格式: matches";const k=h(m.anyMatches);if(!k)return"非法格式: anyMatches";const w=h(m.excludeMatches);if(!w)return"非法格式: excludeMatches";const c=[];for(let C=0;C<N.length;C++){const F=N[C];try{c.push(Ct(F))}catch(I){const U=I instanceof Error?I.message:String(I);return`非法选择器: matches[${C}]
263
+ 错误: ${U}`}}const g=c.map(C=>C.querySelfOrSelectorAll(r.value));if(c.length){const C=g.findIndex(F=>F.length===0);if(C>=0)return`无法匹配: matches[${C}] 查找结果为空`}const D=[];for(let C=0;C<k.length;C++){const F=k[C];try{D.push(Ct(F))}catch(I){const U=I instanceof Error?I.message:String(I);return`非法选择器: anyMatches[${C}]
264
+ 错误: ${U}`}}const p=D.map(C=>C.querySelfOrSelectorAll(r.value));if(D.length&&p.every(C=>C.length===0))return"无法匹配: anyMatches 查找结果为空";if(!N.length&&!k.length)return"非法规则: matches 和 anyMatches 至少存在一个";const l=[];for(let C=0;C<w.length;C++){const F=w[C];try{l.push(Ct(F))}catch(I){const U=I instanceof Error?I.message:String(I);return`非法选择器: excludeMatches[${C}]
265
+ 错误: ${U}`}}const _=l.map(C=>C.querySelfOrSelectorAll(r.value));if(l.length){const C=_.findIndex(F=>F.length!==0);if(C>=0)return`无法匹配: excludeMatches[${C}] 查找结果不为空`}return g.length?g.at(-1)[0]:p[0][0]},v=m=>typeof m=="object"&&m!==null&&!Array.isArray(m),b=A(()=>{if(!d.value)return"";const m=(()=>{try{return zn.parse(d.value)}catch(N){return N}})();if(m instanceof Error)return`非法格式: ${m.message}`;if(!v(m))return"非法格式: 请使用对象格式";if(typeof m.id=="string"){if(m.id!==s.value.appId)return"非法格式: id 不匹配 appId";if(!Array.isArray(m.groups))return"非法格式: groups 不是数组";if(m.groups.length!==1)return"非法格式: groups 长度不为 1";const N=m.groups[0];if(!(N!=null&&N.rules))return"非法格式: groups[0].rules 非法";const k=Array.isArray(N.rules)?N.rules:[N.rules];if(k.length!==1)return"非法格式: groups[0].rules 长度不为 1";const w=typeof k[0]=="string"?{matches:k[0]}:k[0];return v(w)?u(w):"非法格式: rules[0] 非法"}if(m.rules){const N=Array.isArray(m.rules)?m.rules:[m.rules];if(N.length!==1)return"非法格式: rules 长度不为 1";const k=typeof N[0]=="string"?{matches:N[0]}:N[0];return v(k)?u(k):"非法格式: rules[0] 非法"}return u(m)}),y=A(()=>n.value&&d.value&&typeof b.value=="string"?b.value:""),f=A(()=>typeof b.value=="string"?null:b.value);return(m,N)=>{const k=Ue("SvgIcon"),w=rt,c=On;return B(),ee(Pt,{initialValue:{top:40,right:Math.max(315,12*a(Yn)+135),width:Math.max(480,a(Qn)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:e.show},{default:S(({onRef:g})=>[$("div",Sl,[$("div",Nl,[N[3]||(N[3]=$("div",null,"测试规则",-1)),$("div",{ref:g,"flex-1":"","cursor-move":""},null,512),R(w,{text:"",title:"最小化",onClick:N[0]||(N[0]=D=>e.onUpdateShow(!e.show))},{icon:S(()=>[R(k,{name:"minus"})]),_:1})]),R(c,{value:a(n),"onUpdate:value":N[1]||(N[1]=D=>Me(n)?n.value=D:null),type:"textarea",placeholder:"请输入单个规则测试",size:"small",class:"gkd_code m-b-4px",autosize:{minRows:10,maxRows:20}},null,8,["value"]),$("div",_l,[a(y)?(B(),te("div",Rl,q(a(y)),1)):a(f)?(B(),ee(w,{key:1,size:"small",style:De(a(ut)(a(f),a(i))),onClick:N[2]||(N[2]=D=>a(t).updateFocusNode(a(f)))},{default:S(()=>[J(q(a(ot)(a(f))),1)]),_:1},8,["style"])):ae("",!0)])])]),_:1},8,["initialValue","show"])}}}),Pl=["src"],Dl={absolute:"","left-2px":"","top-2px":"","p-1px":"","z-1":"","text-13px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]"},Il={key:0,absolute:"","left-2px":"","bottom-2px":"","p-1px":"","z-1":"","text-12px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]",flex:"","flex-col":"","flex-items-center":""},Tl={key:1,absolute:"","right-2px":"","bottom-2px":"","p-1px":"","z-1":"","text-12px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]",flex:"","flex-col":"","flex-items-center":""},El=G({__name:"MiniHoverImg",props:{imgRef:{},imgHover:{type:Boolean},screenshotUrl:{},hoverPosition:{},hoverPositionStyle:{},boxHoverPosition:{},boxHoverPerPosition:{}},setup(e){const t=e,r=Qo(A(()=>t.imgRef));return(i,s)=>(B(),ee(Xt,{to:"body"},[Rn($("div",{style:De({left:a(r).right.value+4+"px",top:a(r).top.value+"px"}),"pointer-events-none":"",fixed:"","overflow-hidden":"","z-2":"","bg-white":"","h-200px":"","w-200px":"","border-1px":"","border-indigo-600":"","border-dashed":""},[$("img",{src:e.screenshotUrl,"object-contain":"",absolute:"","left-0":"","top-0":"",style:De(e.hoverPositionStyle),"w-1000px":""},null,12,Pl),$("div",Dl,q(`${e.hoverPosition.ox.toFixed(0)}, ${e.hoverPosition.oy.toFixed(0)}`),1),e.boxHoverPosition?(B(),te("div",Il,[$("div",null,q(e.boxHoverPosition.top.toFixed(0)),1),$("div",null,q(e.boxHoverPosition.left.toFixed(0)+", "+e.boxHoverPosition.right.toFixed(0)),1),$("div",null,q(e.boxHoverPosition.bottom.toFixed(0)),1)])):ae("",!0),e.boxHoverPerPosition?(B(),te("div",Tl,[$("div",null,q(e.boxHoverPerPosition.top),1),$("div",null,q(e.boxHoverPerPosition.left+", "+e.boxHoverPerPosition.right),1),$("div",null,q(e.boxHoverPerPosition.bottom),1)])):ae("",!0),s[0]||(s[0]=$("div",{class:"top-[calc(50%-1px)] bg-[length:10px_1px]",absolute:"","left-0":"","right-0":"","h-1px":"","bg-repeat-x":"","mix-blend-difference":"",style:{"background-image":`linear-gradient(
266
266
  to left,
267
267
  transparent 0%,
268
268
  transparent 50%,
@@ -274,5 +274,5 @@ import{h as G,k as I,a as M,g as $e,f as U,e as O,b as X,u as ft,a0 as So,a1 as
274
274
  transparent 50%,
275
275
  #fff 50%,
276
276
  #fff 100%
277
- )`,"background-position-y":"1.5px"}},null,-1))],4),[[Pn,e.imgHover]])]))}}),Ll={key:0,flex:"","flex-col":"",relative:"","h-full":"","p-2px":"","box-border":"","overflow-hidden":""},Kl=["src"],Al={"pointer-events-none":"",absolute:"","left-2px":"","top-2px":"",size:"[calc(100%-4px)]"},Fl={absolute:"","z-4":"","pointer-events-none":"","left-4px":"","top-4px":"","text-12px":"",leading:"100%",flex:"","gap-4px":""},Bl={"py-1px":"","px-2px":"",bg:"#ffffff90",title:"尺寸"},zl={"py-1px":"","px-2px":"",bg:"#ffffff90",title:"创建时间"},Ol=G({__name:"ScreenshotCard",setup(e){const{updatePosition:t,focusNode:r,screenshotUrl:i}=Ae(),s=Ae().snapshot,n=j(),d=j(!1),h=c=>{const g=n.value;if(!g)return;const D=g.getBoundingClientRect(),p=D.width/g.naturalWidth*g.naturalHeight,l=(D.height-p)/2,_=(c.clientX-D.left)/D.width*g.naturalWidth,C=(c.clientY-D.top-l)/p*g.naturalHeight;t({x:_,y:C})},u=c=>`${c*100}%`,v=Xo(n),b=K(()=>{var _;const c=n.value,g=(_=r.value)==null?void 0:_.attr;if(!r.value||!c||!g||!d.value)return"";const D=v.width.value,p=v.height.value,l=D/c.naturalWidth*c.naturalHeight;return{left:`calc(${u(g.left/c.naturalWidth)} - 2px)`,width:`calc(${u((g.right-g.left)/c.naturalWidth)} + 2px)`,top:`calc(${u((g.top/c.naturalHeight*l+(p-l)/2)/p)} - 2px)`,height:`calc(${u((g.bottom-g.top)/c.naturalHeight*l/p)} + 2px)`}}),y=j(!1),f=j({ox:0,oy:0}),m=K(()=>{var p;const c=(p=r.value)==null?void 0:p.attr;if(!c)return;const{ox:g,oy:D}=f.value;return{left:g-c.left,right:c.right-g,top:D-c.top,bottom:c.bottom-D}}),N=K(()=>{var _;const c=(_=r.value)==null?void 0:_.attr;if(!c||!m.value||c.width<=0||c.height<=0)return;const{bottom:g,left:D,right:p,top:l}=m.value;return{left:kt(D/(p+D),3),right:kt(p/(p+D),3),top:kt(l/(l+g),3),bottom:kt(g/(l+g),3)}}),k=j({left:"0",top:"0"}),w=c=>{const g=n.value;if(!g)return;const D=g.getBoundingClientRect(),p=D.width/g.naturalWidth*g.naturalHeight,l=(D.height-p)/2,_=(c.clientX-D.left)/D.width*g.naturalWidth,C=(c.clientY-D.top-l)/p*g.naturalHeight;f.value={ox:_,oy:C},k.value={left:-(_-.1*g.naturalWidth)/g.naturalWidth*1e3+"px",top:-(C-.1*g.naturalWidth)/g.naturalWidth*1e3+"px"}};return(c,g)=>a(i)?(z(),te("div",Ll,[$("img",{ref_key:"imgRef",ref:n,src:a(i),"cursor-crosshair":"","object-contain":"","h-full":"",class:"max-w-[calc(var(--gkd-w)*0.35)]",onClick:h,onMouseover:g[0]||(g[0]=D=>y.value=!0),onMouseleave:g[1]||(g[1]=D=>y.value=!1),onMousemove:w,onLoad:g[2]||(g[2]=D=>d.value=!0)},null,40,Kl),$("div",Al,[$("div",{style:De(a(b)),absolute:"","transition-all-300":"","b-1px":"","b-blue":"","b-solid":""},[...g[3]||(g[3]=[$("div",{absolute:"","left-0":"","top-0":"","bottom-0":"","right-0":"","b-solid":"","b-1px":"","b-red":""},null,-1)])],4)]),$("div",Fl,[$("div",Bl,q(`${a(s).screenWidth}x${a(s).screenHeight}`),1),$("div",zl,q(a(zn)(a(s).id).format("YYYY-MM-DD HH:mm:ss")),1)]),a(n)?(z(),ee(El,{key:0,imgHover:a(y),imgRef:a(n),boxHoverPerPosition:a(N),boxHoverPosition:a(m),hoverPositionStyle:a(k),hoverPosition:a(f),screenshotUrl:a(i)},null,8,["imgHover","imgRef","boxHoverPerPosition","boxHoverPosition","hoverPositionStyle","hoverPosition","screenshotUrl"])):ae("",!0)])):ae("",!0)}}),Ml={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Ul={flex:"","m-b-4px":"","pr-4px":""},Hl={key:0,underline:"","leading-20px":"","decoration-1":"","m-r-4px":"",gkd_code:"",title:"查询数量"},jl=["title"],ql={flex:"","gap-8px":"","flex-wrap":""},Wl=G({__name:"SearchCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:$t}},setup(e){const t=En(),{snapshotImportId:r,snapshotImageId:i}=Zo(),s=Ae(),n=s.snapshot,d=s.rootNode,{focusNode:h,updateFocusNode:u}=s,v=j(""),b=Qt([]),y=j([]),f=p=>{const l=$r(()=>Ct(p),C=>typeof C=="string"?C:C instanceof Rr?"非法选择器:"+C.outMessage:"非法选择器:"+(C instanceof Error?C.message:C));if(b.find(C=>typeof C.selector=="object"&&C.selector.toString()==l.toString())){Ke.warning("不可重复选择");return}const _=l.querySelfOrSelectorAllContext(d.value);if(_.length==0){Ke.success("没有选择到节点");return}return Ke.success(`选择到 ${_.length} 个节点`),b.unshift({selector:l,nodes:_.map(C=>C.target),results:_,key:Date.now(),gkd:!0}),_.length},m=p=>{if(b.find(C=>typeof C.selector=="string"&&C.selector.toString()==p)){Ke.warning("不可重复搜索");return}const l=[],_=[d.value];for(;_.length>0;){const C=_.pop();ot(C).includes(p)&&l.push(C),_.push(...[...C.children].reverse())}if(l.length==0){Ke.success("没有搜索到节点");return}return Ke.success(`搜索到 ${l.length} 个节点`),b.unshift({gkd:!1,selector:p,nodes:l,key:Date.now()}),l.length},N=()=>{const p=b[0],l=p.nodes[0];Array.isArray(l)?typeof p.selector=="object"&&u(l):u(l);const _=new Set(b.map(F=>F.key)),C=y.value.filter(F=>_.has(F));C.push(p.key),y.value=C},k=kn(()=>{const p=v.value.trim();if(p){if(c.value){if(!f(p))return}else if(!m(p))return;N()}});Rt(async()=>{await _r;let p=0;t.query.gkd&&(p+=f(xn.decode(t.query.gkd))||0),t.query.str&&(p+=m(t.query.str)||0),p>0&&N()});const w=kn(async p=>{const l=i[n.value.id],_=r[n.value.id],C=_?fn(_):void 0,F=l?er(l):void 0,A=p.selector,B=p.results.map(ie=>ie.context.toArray().at(-1))[0],ke=[(B.quickFind??B.idQf)&&B.attr.id&&A.fastQueryList.some(ie=>ie instanceof Ut.Id&&ie.acceptText(B.attr.id)),(B.quickFind??B.idQf)&&B.attr.vid&&A.fastQueryList.some(ie=>ie instanceof Ut.Vid&&ie.acceptText(B.attr.vid)),(B.quickFind??B.textQf)&&B.attr.text&&A.fastQueryList.some(ie=>ie instanceof Ut.Text&&ie.acceptText(B.attr.text))].some(Boolean),we={id:n.value.appId,name:Re(n.value).name,groups:[{key:1,name:`[ChangeMe]规则名称-${zn().format("YYYY-MM-DD HH:mm:ss")}`,desc:"[ChangeMe]本规则由GKD网页端审查工具生成",rules:[{fastQuery:ke||void 0,activityIds:n.value.activityId,matches:A.toString(),exampleUrls:F,snapshotUrls:C}]}]};Pe(On.stringify(we,void 0,2))}),c=j(!0),g=K(()=>r[n.value.id]),D=p=>{if(!g.value)return;const l=new URL(fn(r[n.value.id]));typeof p.selector=="object"?l.searchParams.set("gkd",xn.encode(p.selector.toString())):l.searchParams.set("str",p.selector.toString()),Pe(l.toString())};return(p,l)=>{const _=Sr,C=Bn,F=Cr,A=Ue("SvgIcon"),B=rt,ke=Mn,we=Nr,ie=Lr,he=Fn,be=Zt,_e=Ur,lt=zr;return z(),ee(Pt,{initialValue:{top:40,right:Math.max(315,12*a(Yn)+135),width:Math.max(480,a(Qn)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:e.show},{default:S(({onRef:ge})=>[$("div",Ml,[$("div",Ul,[R(F,{value:a(c),"onUpdate:value":l[0]||(l[0]=H=>Me(c)?c.value=H:null)},{default:S(()=>[R(C,null,{default:S(()=>[R(_,{value:!1},{default:S(()=>[...l[4]||(l[4]=[J(" 字符搜索 ",-1)])]),_:1}),R(_,{value:!0},{default:S(()=>[...l[5]||(l[5]=[J(" 选择器查询 ",-1)])]),_:1})]),_:1})]),_:1},8,["value"]),$("div",{ref:ge,"flex-1":"","cursor-move":""},null,512),R(B,{text:"",title:"最小化",onClick:l[1]||(l[1]=H=>e.onUpdateShow(!e.show))},{icon:S(()=>[R(A,{name:"minus"})]),_:1})]),R(we,null,{default:S(()=>[R(ke,{value:a(v),"onUpdate:value":l[2]||(l[2]=H=>Me(v)?v.value=H:null),placeholder:a(c)?"请输入选择器":"请输入字符",inputProps:{class:"gkd_code"},onKeyup:Jo(a(k),["enter"])},null,8,["value","placeholder","onKeyup"]),R(B,{onClick:a(k)},{icon:S(()=>[R(A,{name:"search"})]),_:1},8,["onClick"])]),_:1}),l[8]||(l[8]=$("div",{"p-5px":""},null,-1)),R(lt,{expandedNames:a(y),"onUpdate:expandedNames":l[3]||(l[3]=H=>Me(y)?y.value=H:null)},{default:S(()=>[(z(!0),te(Ne,null,Oe(a(b),(H,Fe)=>(z(),ee(_e,{key:H.key,name:H.key},{header:S(()=>[H.nodes.length>1?(z(),te("span",Hl,q(H.nodes.length),1)):ae("",!0),$("span",{"break-all":"","px-4px":"","leading-20px":"",bg:"#eee",gkd_code:"",title:H.gkd?"选择器":"搜索字符"},[H.gkd?(z(),ee(St,{key:0,node:H.selector.ast,source:H.selector.source},null,8,["node","source"])):(z(),te(Ne,{key:1},[J(q(H.selector),1)],64))],8,jl),l[6]||(l[6]=$("span",{"pl-4px":""},null,-1))]),"header-extra":S(()=>[R(ie,null,{default:S(()=>[H.gkd&&H.selector.canCopy?(z(),ee(B,{key:0,size:"small",title:"复制规则",onClick:Ot(ue=>a(w)(H),["stop"])},{icon:S(()=>[R(A,{name:"copy"})]),_:1},8,["onClick"])):ae("",!0),a(g)?(z(),ee(B,{key:1,size:"small",title:H.gkd?"复制查询链接":"复制搜索链接",onClick:Ot(ue=>D(H),["stop"])},{icon:S(()=>[R(A,{name:"share"})]),_:1},8,["title","onClick"])):ae("",!0),R(B,{size:"small",title:"删除记录",onClick:Ot(ue=>a(b).splice(Fe,1),["stop"])},{icon:S(()=>[R(A,{name:"delete"})]),_:1},8,["onClick"])]),_:2},1024)]),default:S(()=>[R(be,{xScrollable:"",style:{"max-height":"400px"}},{default:S(()=>[$("div",ql,[!H.gkd||H.selector.connectKeys.length===0?(z(!0),te(Ne,{key:0},Oe(H.nodes,ue=>(z(),ee(B,{key:ue.id,size:"small",style:De(a(ut)(ue,a(h))),onClick:Be=>a(u)(ue)},{default:S(()=>[J(q(a(ot)(ue)),1)]),_:2},1032,["style","onClick"]))),128)):(z(!0),te(Ne,{key:1},Oe(H.nodes,(ue,Be)=>(z(),ee(ie,{key:Be},{default:S(()=>[R(B,{size:"small",onClick:T=>a(s).showTrack(H.selector,H.results[Be])},{default:S(()=>[R(he,null,{default:S(()=>[R(A,{name:"path"})]),_:1})]),_:1},8,["onClick"]),R(B,{size:"small",style:De(a(ut)(ue,a(h))),onClick:T=>a(u)(ue)},{default:S(()=>[J(q(a(ot)(ue)),1)]),_:2},1032,["style","onClick"])]),_:2},1024))),128))]),l[7]||(l[7]=$("div",{un:"h-10px"},null,-1))]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["expandedNames"])])]),_:1},8,["initialValue","show"])}}}),_n=[],Vl=G((e,t)=>()=>{var s,n,d,h;const r=(((n=(s=t.slots).default)==null?void 0:n.call(s))||_n).filter(u=>typeof u.type!="symbol"),i=[];if(r.length>0&&i.push(r[0]),r.length>1)for(let u=1;u<r.length;u++){const v=((h=(d=t.slots).gap)==null?void 0:h.call(d,{index:u-1}))||_n;i.push(...v),i.push(r[u])}return I("div",e,i)}),Gl={flex:"","flex-col":"","overflow-hidden":""},Yl={flex:"","items-center":"","px-8px":""},Ql={flex:"","items-center":"","gap-2px":"","max-w-120px":""},Xl=G({__name:"WindowCard",setup(e){const t=Ln(),r=Ae(),{updateFocusNode:i,focusNode:s,focusTime:n}=r,d=r.snapshot,h=r.rootNode;let u=Number.NaN;const v=j([]),b=j([]);Te([()=>s.value,()=>n.value],async()=>{if(!s.value)return;const p=s.value.id;tt().then(async()=>{var C;if(await hn(300),p===((C=s.value)==null?void 0:C.id)){if(u===p){u=Number.NaN;return}const F=document.querySelector(`[data-node-id="${p}"]`);if(!F)return;b.value=[p],F.scrollIntoView({behavior:"smooth",block:"center"})}});let l=s.value.parent;if(!l)return;const _=new Set(v.value);for(;l;)_.add(l.id),l=l.parent;_.size==v.value.length&&v.value.every(C=>_.has(C))||(v.value=[..._])});const y=j(),f=(p,l)=>{var _;return l.id===((_=s.value)==null?void 0:_.id)},m=p=>{const l=ut(p.option,s.value);return{onClick:()=>{u=p.option.id,i(p.option)},style:{"--n-node-text-color":l.color,...l},class:"whitespace-nowrap","data-node-id":String(p.option.id)}},N=p=>ot(p.option),k=K(()=>`${gn(d.value).manufacturer} Android ${gn(d.value).release||""}`),w=K(()=>Re(d.value).isSystem),c=K(()=>{const p=d.value.activityId,l=d.value.appId;return!p||!l?"":p.startsWith(l)&&p[l.length]==="."?p.substring(l.length):p}),g=async()=>{Ke.success("删除成功,即将回到首页"),await hn(2e3),t.replace({path:"/"})},D=K(()=>{const p=dr(d.value).versionName;return p?`GKD@${p}`:void 0});return(p,l)=>{const _=Jt,C=Ue("SvgIcon"),F=vl,A=Zt;return z(),te("div",Gl,[$("div",Yl,[R(a(Vl),{class:"flex flex-wrap items-center gap-8px gkd_code"},{gap:S(()=>[...l[8]||(l[8]=[$("div",{"w-1px":"","bg-gray":"","h-12px":""},null,-1)])]),default:S(()=>[R(_,null,{trigger:S(()=>[$("div",{onClick:l[0]||(l[0]=B=>a(Pe)(a(k)))},q(a(k)),1)]),default:S(()=>[l[9]||(l[9]=J(" 设备名称 ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{class:_t({"opacity-50":!a(D)})},q(a(D)||"null"),3)]),default:S(()=>[l[10]||(l[10]=J(" GKD 版本 ",-1))]),_:1}),$("div",Ql,[a(w)?(z(),ee(_,{key:0},{trigger:S(()=>[R(C,{name:"system"})]),default:S(()=>[J(" "+q(`${a(Re)(a(d)).name} 是一个系统应用`),1)]),_:1})):ae("",!0),R(_,null,{trigger:S(()=>[$("div",{onClick:l[1]||(l[1]=B=>a(Pe)(a(Re)(a(d)).name))},q(a(Re)(a(d)).name),1)]),default:S(()=>[l[11]||(l[11]=J(" 应用名称 ",-1))]),_:1})]),R(_,null,{trigger:S(()=>[$("div",{onClick:l[2]||(l[2]=B=>a(Pe)(a(Re)(a(d)).versionName))},q(a(Re)(a(d)).versionName),1)]),default:S(()=>[l[12]||(l[12]=J(" 版本名称 ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{onClick:l[3]||(l[3]=B=>a(Pe)(a(Re)(a(d)).versionCode.toString()))},q(a(Re)(a(d)).versionCode),1)]),default:S(()=>[l[13]||(l[13]=J(" 版本代码 ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{onClick:l[4]||(l[4]=B=>a(Pe)(a(d).appId))},q(a(d).appId),1)]),default:S(()=>[l[14]||(l[14]=J(" 应用ID ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{class:_t({"opacity-50":!a(c)}),onClick:l[5]||(l[5]=B=>a(Pe)(a(c)))},q(a(c)||"null"),3)]),default:S(()=>[l[15]||(l[15]=J(" 界面ID ",-1))]),_:1})]),_:1}),l[16]||(l[16]=$("div",{"flex-1":""},null,-1)),R(hr,{class:"ml-8px",snapshot:a(d),showPreview:!1,onDelete:g},null,8,["snapshot"])]),l[17]||(l[17]=$("div",{"h-1px":"","mt-4px":"",bg:"#efeff5"},null,-1)),R(A,{xScrollable:"",class:"flex-1"},{default:S(()=>[R(F,{ref_key:"treeRef",ref:y,expandedKeys:a(v),"onUpdate:expandedKeys":l[6]||(l[6]=B=>Me(v)?v.value=B:null),selectedKeys:a(b),"onUpdate:selectedKeys":l[7]||(l[7]=B=>Me(b)?b.value=B:null),class:"mb-24px mr-24px",virtualScroll:"",showLine:"",blockLine:"",keyField:"id",data:[a(h)],filter:f,nodeProps:m,renderLabel:N},null,8,["expandedKeys","selectedKeys","data","filter","nodeProps","renderLabel"])]),_:1})])}}}),Jl={class:"TrackCard",flex:"","flex-col":"","h-full":"","p-12px":"","box-border":"","gap-8px":"","overflow-hidden":""},Zl={flex:"","justify-between":"","items-center":"",class:"[--svg-h:24px]"},ei={flex:"","items-center":"","gap-4px":""},ti={"flex-1":"",flex:"","gap-12px":"","overflow-hidden":""},ni={"self-stretch":"",flex:"[2]"},oi={"mb-24px":"","break-all":"","px-4px":"","py-2px":"",bg:"#eee"},ri={flex:"","flex-col":"","gap-12px":""},li={key:0,flex:"","gap-8px":""},ii=["onClick"],Xn=()=>nr(()=>import("./TrackGraph-DAhZ5MqZ.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),ai=tr({loader:Xn,delay:0});setTimeout(Xn,3e3);const si=G({__name:"TrackCard",props:{nodes:{},queryResult:{},selector:{},onClose:{type:Function,default:$t}},setup(e){const t=e,r=K(()=>t.queryResult?t.queryResult.unitResults.asJsReadonlyArrayView().concat():[]),i=K(()=>r.value.filter(u=>!u.context.prev)),s=K(()=>r.value.filter(u=>u.context.prev)),n=j([]);Se(()=>{n.value=s.value});const d=u=>{n.value.includes(u)?n.value=n.value.filter(v=>v!==u):n.value=n.value.concat(u)},h=u=>{const v=u.value;return v instanceof yn&&r.value.some(b=>b.expression===v)&&!u.outChildren.some(b=>b.value instanceof yn)?{outline:"1px solid #00F"}:""};return(u,v)=>{const b=Ue("SvgIcon"),y=rt,f=Zt;return z(),te("div",Jl,[$("div",Zl,[$("div",ei,[R(b,{name:"path"}),v[0]||(v[0]=$("div",{text:"20px/28px","font-bold":""},"选择器路径视图",-1))]),R(y,{text:"",onClick:e.onClose},{default:S(()=>[R(b,{name:"close"})]),_:1},8,["onClick"])]),$("div",ti,[$("div",ni,[e.nodes.length&&e.queryResult?(z(),ee(a(ai),{key:0,nodes:e.nodes,queryResult:e.queryResult,showUnitResults:a(s),filterUnitResults:a(n),class:"h-[calc(100%-2px)] b-1px b-solid"},null,8,["nodes","queryResult","showUnitResults","filterUnitResults"])):ae("",!0),v[1]||(v[1]=$("div",{relative:"","pointer-events-none":"","z-1":""},[$("div",{absolute:"","left-8px":"","bottom-8px":"",text:"14px/14px #6C6E71"}," *为简化视图已隐藏无关节点 ")],-1))]),R(f,{class:"self-stretch flex-1 text-20px leading-28px gkd_code"},{default:S(()=>[$("div",oi,[R(St,{source:e.selector.source,node:e.selector.ast,getNodeStyle:h},null,8,["source","node"])]),$("div",ri,[a(i).length?(z(),te("div",li,[(z(!0),te(Ne,null,Oe(a(i),(m,N)=>(z(),te("div",{key:N,"break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"",b:"#ccc"},[R(St,{source:e.selector.source,node:e.selector.findAst(m.expression)},null,8,["source","node"])]))),128))])):ae("",!0),(z(!0),te(Ne,null,Oe(a(s),(m,N)=>(z(),te("div",{key:N,"cursor-pointer":"","break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"","transition-colors":"",style:De({borderColor:a(wt)[N%a(wt).length],backgroundColor:a(n).includes(m)?"#eee":void 0}),onClick:k=>d(m)},[$("div",{"inline-block":"","align-middle":"","size-20px":"",style:De({backgroundColor:a(wt)[N%a(wt).length]})},null,4),v[2]||(v[2]=$("span",{"pl-4px":""},null,-1)),R(St,{source:e.selector.source,node:e.selector.findAst(m.expression)},null,8,["source","node"])],12,ii))),128))])]),_:1})])])}}}),et=j([]),di=e=>{const t=Date.now(),r=()=>{et.value=et.value.filter(n=>n!==t)};Kn(r),qt(e,n=>{r(),n&&(et.value=et.value.concat(t))});const i=K(()=>2e3+et.value.indexOf(t)),s=K(()=>et.value.at(-1)===t);return{zIndex:i,isTop:s}},ci=G({__name:"FullScreenDialog",props:{show:{type:Boolean,default:!1,required:!0},showModifiers:{}},emits:or(["closed"],["update:show"]),setup(e,{emit:t}){const r=rr(e,"show"),i=t,s=j(r.value),n=j(),d=300;let h=0;const u=()=>{h&&clearTimeout(h),h=0};Kn(u),Te(r,y=>{u(),y?(s.value=!0,n.value="enter"):(n.value="leave",h=window.setTimeout(()=>{s.value=!1,n.value=void 0,u(),i("closed")},d))});const{isTop:v,zIndex:b}=di(()=>s.value);return lr("keydown",y=>{y.key==="Escape"&&v.value&&(r.value=!1)}),(y,f)=>a(s)?(z(),ee(Xt,{key:0,to:"body"},[$("div",An({class:["FullScreenDialog",{"enter-active":a(n)==="enter","exit-active":a(n)==="leave"}],absolute:"","top-0":"","left-0":"","page-size":"",style:{"--duration":d+"ms","z-index":a(b)}},y.$attrs),[Tn(y.$slots,"default",{},void 0,!0)],16)])):ae("",!0)}}),ui=Pr(ci,[["__scopeId","data-v-abb3b230"]]),fi={"page-size":"",flex:"","gap-5px":""},hi={"w-40px":"","py-12px":"",flex:"","flex-col":"","items-center":"","gap-16px":"",class:"[--svg-h:24px]"},vi={flex:"","justify-center":"",href:"https://github.com/orgs/gkd-kit/discussions",target:"_blank",rel:"noopener noreferrer"},gi={flex:"","justify-center":"",href:"https://gkd.li/guide/snapshot#share-note",target:"_blank",rel:"noopener noreferrer"},pi={key:1,"page-size":"","pt-80px":"",flex:"","flex-col":"","items-center":"","justify-center":""},Ri=G({__name:"SnapshotPage",setup(e){const{snapshot:t,rootNode:r,loading:i,redirected:s,trackData:n,trackShow:d}=Ae();Se(()=>{i.value?vn.start():vn.finish()});const h=Mt("searchShow",!0,sessionStorage),u=Mt("ruleShow",!1,sessionStorage),v=Mt("attrShow",!0,sessionStorage),b=()=>{Ke.info("暂未实现")};return(y,f)=>{const m=Ue("SvgIcon"),N=Ue("RouterLink"),k=rt,w=Jt;return a(t)&&a(r)?(z(),te(Ne,{key:0},[$("div",fi,[$("div",hi,[R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:""},{default:S(()=>[R(N,{to:"/"},{default:S(()=>[R(m,{name:"home"})]),_:1})]),_:1})]),default:S(()=>[f[9]||(f[9]=J(" 回到首页 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:b},{default:S(()=>[R(m,{name:"settings"})]),_:1})]),default:S(()=>[f[10]||(f[10]=J(" 设置 ",-1))]),_:1}),f[16]||(f[16]=$("div",null,null,-1)),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:f[0]||(f[0]=c=>h.value=!a(h))},{default:S(()=>[R(m,{name:"search-list"})]),_:1})]),default:S(()=>[f[11]||(f[11]=J(" 搜索面板 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:f[1]||(f[1]=c=>v.value=!a(v))},{default:S(()=>[R(m,{name:"prop"})]),_:1})]),default:S(()=>[f[12]||(f[12]=J(" 属性面板 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:f[2]||(f[2]=c=>u.value=!a(u))},{default:S(()=>[R(m,{name:"test"})]),_:1})]),default:S(()=>[f[13]||(f[13]=J(" 测试规则 ",-1))]),_:1}),f[17]||(f[17]=$("div",null,null,-1)),R(w,{placement:"right"},{trigger:S(()=>[$("a",vi,[R(k,{text:""},{default:S(()=>[R(m,{name:"discussion"})]),_:1})])]),default:S(()=>[f[14]||(f[14]=J(" 讨论交流 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[$("a",gi,[R(k,{text:""},{default:S(()=>[R(m,{name:"warn"})]),_:1})])]),default:S(()=>[f[15]||(f[15]=J(" 分享须知 ",-1))]),_:1})]),R(Ol),R(Xl,{class:"flex-1"})]),R(Wl,{show:a(h),onUpdateShow:f[3]||(f[3]=c=>h.value=c)},null,8,["show"]),R($l,{show:a(u),onUpdateShow:f[4]||(f[4]=c=>u.value=c)},null,8,["show"]),R(kl,{show:a(v),onUpdateShow:f[5]||(f[5]=c=>v.value=c)},null,8,["show"]),R(Cl),R(ui,{show:a(d),"onUpdate:show":f[7]||(f[7]=c=>Me(d)?d.value=c:null),onClosed:f[8]||(f[8]=c=>n.value=void 0)},{default:S(()=>[a(n)?(z(),ee(si,An({key:0,class:"bg-white"},a(n),{onClose:f[6]||(f[6]=c=>d.value=!1)}),null,16)):ae("",!0)]),_:1},8,["show"])],64)):!a(i)&&!a(s)?(z(),te("div",pi,[...f[18]||(f[18]=[$("div",{"mb-8px":""},[$("span",null,"快照数据缺失,"),$("a",{href:"https://gkd.li/guide/snapshot#share-note",target:"_blank",referrerpolicy:"no-referrer"},"分享须知")],-1)])])):ae("",!0)}}});export{Ri as default};
278
- //# sourceMappingURL=SnapshotPage-BhCeehdr.js.map
277
+ )`,"background-position-y":"1.5px"}},null,-1))],4),[[$n,e.imgHover]])]))}}),Ll={key:0,flex:"","flex-col":"",relative:"","h-full":"","p-2px":"","box-border":"","overflow-hidden":""},Kl=["src"],Al={"pointer-events-none":"",absolute:"","left-2px":"","top-2px":"",size:"[calc(100%-4px)]"},Fl={absolute:"","z-4":"","pointer-events-none":"","left-4px":"","top-4px":"","text-12px":"",leading:"100%",flex:"","gap-4px":""},Bl={"py-1px":"","px-2px":"",bg:"#ffffff90",title:"尺寸"},zl={"py-1px":"","px-2px":"",bg:"#ffffff90",title:"创建时间"},Ol=G({__name:"ScreenshotCard",setup(e){const{updatePosition:t,focusNode:r,screenshotUrl:i}=Ae(),s=Ae().snapshot,n=j(),d=j(!1),h=c=>{const g=n.value;if(!g)return;const D=g.getBoundingClientRect(),p=D.width/g.naturalWidth*g.naturalHeight,l=(D.height-p)/2,_=(c.clientX-D.left)/D.width*g.naturalWidth,C=(c.clientY-D.top-l)/p*g.naturalHeight;t({x:_,y:C})},u=c=>`${c*100}%`,v=Xo(n),b=A(()=>{var _;const c=n.value,g=(_=r.value)==null?void 0:_.attr;if(!r.value||!c||!g||!d.value)return"";const D=v.width.value,p=v.height.value,l=D/c.naturalWidth*c.naturalHeight;return{left:`calc(${u(g.left/c.naturalWidth)} - 2px)`,width:`calc(${u((g.right-g.left)/c.naturalWidth)} + 2px)`,top:`calc(${u((g.top/c.naturalHeight*l+(p-l)/2)/p)} - 2px)`,height:`calc(${u((g.bottom-g.top)/c.naturalHeight*l/p)} + 2px)`}}),y=j(!1),f=j({ox:0,oy:0}),m=A(()=>{var p;const c=(p=r.value)==null?void 0:p.attr;if(!c)return;const{ox:g,oy:D}=f.value;return{left:g-c.left,right:c.right-g,top:D-c.top,bottom:c.bottom-D}}),N=A(()=>{var _;const c=(_=r.value)==null?void 0:_.attr;if(!c||!m.value||c.width<=0||c.height<=0)return;const{bottom:g,left:D,right:p,top:l}=m.value;return{left:kt(D/(p+D),3),right:kt(p/(p+D),3),top:kt(l/(l+g),3),bottom:kt(g/(l+g),3)}}),k=j({left:"0",top:"0"}),w=c=>{const g=n.value;if(!g)return;const D=g.getBoundingClientRect(),p=D.width/g.naturalWidth*g.naturalHeight,l=(D.height-p)/2,_=(c.clientX-D.left)/D.width*g.naturalWidth,C=(c.clientY-D.top-l)/p*g.naturalHeight;f.value={ox:_,oy:C},k.value={left:-(_-.1*g.naturalWidth)/g.naturalWidth*1e3+"px",top:-(C-.1*g.naturalWidth)/g.naturalWidth*1e3+"px"}};return(c,g)=>a(i)?(B(),te("div",Ll,[$("img",{ref_key:"imgRef",ref:n,src:a(i),"cursor-crosshair":"","object-contain":"","h-full":"",class:"max-w-[calc(var(--gkd-w)*0.35)]",onClick:h,onMouseover:g[0]||(g[0]=D=>y.value=!0),onMouseleave:g[1]||(g[1]=D=>y.value=!1),onMousemove:w,onLoad:g[2]||(g[2]=D=>d.value=!0)},null,40,Kl),$("div",Al,[$("div",{style:De(a(b)),absolute:"","transition-all-300":"","b-1px":"","b-blue":"","b-solid":""},[...g[3]||(g[3]=[$("div",{absolute:"","left-0":"","top-0":"","bottom-0":"","right-0":"","b-solid":"","b-1px":"","b-red":""},null,-1)])],4)]),$("div",Fl,[$("div",Bl,q(`${a(s).screenWidth}x${a(s).screenHeight}`),1),$("div",zl,q(a(Bn)(a(s).id).format("YYYY-MM-DD HH:mm:ss")),1)]),a(n)?(B(),ee(El,{key:0,imgHover:a(y),imgRef:a(n),boxHoverPerPosition:a(N),boxHoverPosition:a(m),hoverPositionStyle:a(k),hoverPosition:a(f),screenshotUrl:a(i)},null,8,["imgHover","imgRef","boxHoverPerPosition","boxHoverPosition","hoverPositionStyle","hoverPosition","screenshotUrl"])):ae("",!0)])):ae("",!0)}}),Ml={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Ul={flex:"","m-b-4px":"","pr-4px":""},Hl={key:0,underline:"","leading-20px":"","decoration-1":"","m-r-4px":"",gkd_code:"",title:"查询数量"},jl=["title"],ql={flex:"","gap-8px":"","flex-wrap":""},Wl=G({__name:"SearchCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:$t}},setup(e){const t=Tn(),{snapshotImportId:r,snapshotImageId:i}=Zo(),s=Ae(),n=s.snapshot,d=s.rootNode,{focusNode:h,updateFocusNode:u}=s,v=j(""),b=Qt([]),y=j([]),f=p=>{const l=$r(()=>Ct(p),C=>typeof C=="string"?C:C instanceof Rr?"非法选择器:"+C.outMessage:"非法选择器:"+(C instanceof Error?C.message:C));if(b.find(C=>typeof C.selector=="object"&&C.selector.toString()==l.toString())){Ke.warning("不可重复选择");return}const _=l.querySelfOrSelectorAllContext(d.value);if(_.length==0){Ke.success("没有选择到节点");return}return Ke.success(`选择到 ${_.length} 个节点`),b.unshift({selector:l,nodes:_.map(C=>C.target),results:_,key:Date.now(),gkd:!0}),_.length},m=p=>{if(b.find(C=>typeof C.selector=="string"&&C.selector.toString()==p)){Ke.warning("不可重复搜索");return}const l=[],_=[d.value];for(;_.length>0;){const C=_.pop();ot(C).includes(p)&&l.push(C),_.push(...[...C.children].reverse())}if(l.length==0){Ke.success("没有搜索到节点");return}return Ke.success(`搜索到 ${l.length} 个节点`),b.unshift({gkd:!1,selector:p,nodes:l,key:Date.now()}),l.length},N=()=>{const p=b[0],l=p.nodes[0];Array.isArray(l)?typeof p.selector=="object"&&u(l):u(l);const _=new Set(b.map(F=>F.key)),C=y.value.filter(F=>_.has(F));C.push(p.key),y.value=C},k=yn(()=>{const p=v.value.trim();if(p){if(c.value){if(!f(p))return}else if(!m(p))return;N()}});Rt(async()=>{await _r;let p=0;t.query.gkd&&(p+=f(bn.decode(t.query.gkd))||0),t.query.str&&(p+=m(t.query.str)||0),p>0&&N()});const w=yn(async p=>{const l=i[n.value.id],_=r[n.value.id],C=_?un(_):void 0,F=l?er(l):void 0,I=p.selector,U=p.results.map(ie=>ie.context.toArray().at(-1))[0],ke=[(U.quickFind??U.idQf)&&U.attr.id&&I.fastQueryList.some(ie=>ie instanceof Ut.Id&&ie.acceptText(U.attr.id)),(U.quickFind??U.idQf)&&U.attr.vid&&I.fastQueryList.some(ie=>ie instanceof Ut.Vid&&ie.acceptText(U.attr.vid)),(U.quickFind??U.textQf)&&U.attr.text&&I.fastQueryList.some(ie=>ie instanceof Ut.Text&&ie.acceptText(U.attr.text))].some(Boolean),we={id:n.value.appId,name:Re(n.value).name,groups:[{key:1,name:`[ChangeMe]规则名称-${Bn().format("YYYY-MM-DD HH:mm:ss")}`,desc:"[ChangeMe]本规则由GKD网页端审查工具生成",rules:[{fastQuery:ke||void 0,activityIds:n.value.activityId,matches:I.toString(),exampleUrls:F,snapshotUrls:C}]}]};Pe(zn.stringify(we,void 0,2))}),c=j(!0),g=A(()=>r[n.value.id]),D=p=>{if(!g.value)return;const l=new URL(un(r[n.value.id]));typeof p.selector=="object"?l.searchParams.set("gkd",bn.encode(p.selector.toString())):l.searchParams.set("str",p.selector.toString()),Pe(l.toString())};return(p,l)=>{const _=Sr,C=Fn,F=Cr,I=Ue("SvgIcon"),U=rt,ke=On,we=Nr,ie=Lr,he=An,be=jn,_e=Ur,lt=zr;return B(),ee(Pt,{initialValue:{top:40,right:Math.max(315,12*a(Yn)+135),width:Math.max(480,a(Qn)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:e.show},{default:S(({onRef:ge})=>[$("div",Ml,[$("div",Ul,[R(F,{value:a(c),"onUpdate:value":l[0]||(l[0]=H=>Me(c)?c.value=H:null)},{default:S(()=>[R(C,null,{default:S(()=>[R(_,{value:!1},{default:S(()=>[...l[4]||(l[4]=[J(" 字符搜索 ",-1)])]),_:1}),R(_,{value:!0},{default:S(()=>[...l[5]||(l[5]=[J(" 选择器查询 ",-1)])]),_:1})]),_:1})]),_:1},8,["value"]),$("div",{ref:ge,"flex-1":"","cursor-move":""},null,512),R(U,{text:"",title:"最小化",onClick:l[1]||(l[1]=H=>e.onUpdateShow(!e.show))},{icon:S(()=>[R(I,{name:"minus"})]),_:1})]),R(we,null,{default:S(()=>[R(ke,{value:a(v),"onUpdate:value":l[2]||(l[2]=H=>Me(v)?v.value=H:null),placeholder:a(c)?"请输入选择器":"请输入字符",inputProps:{class:"gkd_code"},onKeyup:Jo(a(k),["enter"])},null,8,["value","placeholder","onKeyup"]),R(U,{onClick:a(k)},{icon:S(()=>[R(I,{name:"search"})]),_:1},8,["onClick"])]),_:1}),l[8]||(l[8]=$("div",{"p-5px":""},null,-1)),R(lt,{expandedNames:a(y),"onUpdate:expandedNames":l[3]||(l[3]=H=>Me(y)?y.value=H:null)},{default:S(()=>[(B(!0),te(Ne,null,Oe(a(b),(H,Fe)=>(B(),ee(_e,{key:H.key,name:H.key},{header:S(()=>[H.nodes.length>1?(B(),te("span",Hl,q(H.nodes.length),1)):ae("",!0),$("span",{"break-all":"","px-4px":"","leading-20px":"",bg:"#eee",gkd_code:"",title:H.gkd?"选择器":"搜索字符"},[H.gkd?(B(),ee(St,{key:0,node:H.selector.ast,source:H.selector.source},null,8,["node","source"])):(B(),te(Ne,{key:1},[J(q(H.selector),1)],64))],8,jl),l[6]||(l[6]=$("span",{"pl-4px":""},null,-1))]),"header-extra":S(()=>[R(ie,null,{default:S(()=>[H.gkd&&H.selector.canCopy?(B(),ee(U,{key:0,size:"small",title:"复制规则",onClick:Ot(ue=>a(w)(H),["stop"])},{icon:S(()=>[R(I,{name:"copy"})]),_:1},8,["onClick"])):ae("",!0),a(g)?(B(),ee(U,{key:1,size:"small",title:H.gkd?"复制查询链接":"复制搜索链接",onClick:Ot(ue=>D(H),["stop"])},{icon:S(()=>[R(I,{name:"share"})]),_:1},8,["title","onClick"])):ae("",!0),R(U,{size:"small",title:"删除记录",onClick:Ot(ue=>a(b).splice(Fe,1),["stop"])},{icon:S(()=>[R(I,{name:"delete"})]),_:1},8,["onClick"])]),_:2},1024)]),default:S(()=>[R(be,{xScrollable:"",style:{"max-height":"400px"}},{default:S(()=>[$("div",ql,[!H.gkd||H.selector.connectKeys.length===0?(B(!0),te(Ne,{key:0},Oe(H.nodes,ue=>(B(),ee(U,{key:ue.id,size:"small",style:De(a(ut)(ue,a(h))),onClick:Be=>a(u)(ue)},{default:S(()=>[J(q(a(ot)(ue)),1)]),_:2},1032,["style","onClick"]))),128)):(B(!0),te(Ne,{key:1},Oe(H.nodes,(ue,Be)=>(B(),ee(ie,{key:Be},{default:S(()=>[R(U,{size:"small",onClick:E=>a(s).showTrack(H.selector,H.results[Be])},{default:S(()=>[R(he,null,{default:S(()=>[R(I,{name:"path"})]),_:1})]),_:1},8,["onClick"]),R(U,{size:"small",style:De(a(ut)(ue,a(h))),onClick:E=>a(u)(ue)},{default:S(()=>[J(q(a(ot)(ue)),1)]),_:2},1032,["style","onClick"])]),_:2},1024))),128))]),l[7]||(l[7]=$("div",{un:"h-10px"},null,-1))]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["expandedNames"])])]),_:1},8,["initialValue","show"])}}}),Nn=[],Vl=G((e,t)=>()=>{var s,n,d,h;const r=(((n=(s=t.slots).default)==null?void 0:n.call(s))||Nn).filter(u=>typeof u.type!="symbol"),i=[];if(r.length>0&&i.push(r[0]),r.length>1)for(let u=1;u<r.length;u++){const v=((h=(d=t.slots).gap)==null?void 0:h.call(d,{index:u-1}))||Nn;i.push(...v),i.push(r[u])}return T("div",e,i)}),Gl={flex:"","flex-col":"","overflow-hidden":""},Yl={flex:"","items-center":"","px-8px":""},Ql={flex:"","items-center":"","gap-2px":"","max-w-120px":""},Xl={"flex-1":"","min-h-0":""},Jl=G({__name:"WindowCard",setup(e){const t=En(),r=Ae(),{updateFocusNode:i,focusNode:s,focusTime:n}=r,d=r.snapshot,h=r.rootNode;let u=Number.NaN;const v=j([]),b=j([]);Te([()=>s.value,()=>n.value],async()=>{if(!s.value)return;const p=s.value.id;tt().then(async()=>{var C,F;if(await fn(300),p===((C=s.value)==null?void 0:C.id)){if(u===p){u=Number.NaN;return}b.value=[p],(F=y.value)==null||F.scrollTo({key:p,behavior:"smooth",debounce:!0})}});let l=s.value.parent;if(!l)return;const _=new Set(v.value);for(;l;)_.add(l.id),l=l.parent;_.size==v.value.length&&v.value.every(C=>_.has(C))||(v.value=[..._])});const y=j(),f=(p,l)=>{var _;return l.id===((_=s.value)==null?void 0:_.id)},m=p=>{const l=ut(p.option,s.value);return{onClick:()=>{u=p.option.id,i(p.option)},style:{"--n-node-text-color":l.color,...l},class:"whitespace-nowrap","data-node-id":String(p.option.id)}},N=p=>ot(p.option),k=A(()=>`${vn(d.value).manufacturer} Android ${vn(d.value).release||""}`),w=A(()=>Re(d.value).isSystem),c=A(()=>{const p=d.value.activityId,l=d.value.appId;return!p||!l?"":p.startsWith(l)&&p[l.length]==="."?p.substring(l.length):p}),g=async()=>{Ke.success("删除成功,即将回到首页"),await fn(2e3),t.replace({path:"/"})},D=A(()=>{const p=dr(d.value).versionName;return p?`GKD@${p}`:void 0});return(p,l)=>{const _=Jt,C=Ue("SvgIcon"),F=vl;return B(),te("div",Gl,[$("div",Yl,[R(a(Vl),{class:"flex flex-wrap items-center gap-8px gkd_code"},{gap:S(()=>[...l[8]||(l[8]=[$("div",{"w-1px":"","bg-gray":"","h-12px":""},null,-1)])]),default:S(()=>[R(_,null,{trigger:S(()=>[$("div",{onClick:l[0]||(l[0]=I=>a(Pe)(a(k)))},q(a(k)),1)]),default:S(()=>[l[9]||(l[9]=J(" 设备名称 ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{class:_t({"opacity-50":!a(D)})},q(a(D)||"null"),3)]),default:S(()=>[l[10]||(l[10]=J(" GKD 版本 ",-1))]),_:1}),$("div",Ql,[a(w)?(B(),ee(_,{key:0},{trigger:S(()=>[R(C,{name:"system"})]),default:S(()=>[J(" "+q(`${a(Re)(a(d)).name} 是一个系统应用`),1)]),_:1})):ae("",!0),R(_,null,{trigger:S(()=>[$("div",{onClick:l[1]||(l[1]=I=>a(Pe)(a(Re)(a(d)).name))},q(a(Re)(a(d)).name),1)]),default:S(()=>[l[11]||(l[11]=J(" 应用名称 ",-1))]),_:1})]),R(_,null,{trigger:S(()=>[$("div",{onClick:l[2]||(l[2]=I=>a(Pe)(a(Re)(a(d)).versionName))},q(a(Re)(a(d)).versionName),1)]),default:S(()=>[l[12]||(l[12]=J(" 版本名称 ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{onClick:l[3]||(l[3]=I=>a(Pe)(a(Re)(a(d)).versionCode.toString()))},q(a(Re)(a(d)).versionCode),1)]),default:S(()=>[l[13]||(l[13]=J(" 版本代码 ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{onClick:l[4]||(l[4]=I=>a(Pe)(a(d).appId))},q(a(d).appId),1)]),default:S(()=>[l[14]||(l[14]=J(" 应用ID ",-1))]),_:1}),R(_,null,{trigger:S(()=>[$("div",{class:_t({"opacity-50":!a(c)}),onClick:l[5]||(l[5]=I=>a(Pe)(a(c)))},q(a(c)||"null"),3)]),default:S(()=>[l[15]||(l[15]=J(" 界面ID ",-1))]),_:1})]),_:1}),l[16]||(l[16]=$("div",{"flex-1":""},null,-1)),R(hr,{class:"ml-8px",snapshot:a(d),showPreview:!1,onDelete:g},null,8,["snapshot"])]),l[17]||(l[17]=$("div",{"h-1px":"","mt-4px":"",bg:"#efeff5"},null,-1)),$("div",Xl,[R(F,{ref_key:"treeRef",ref:y,expandedKeys:a(v),"onUpdate:expandedKeys":l[6]||(l[6]=I=>Me(v)?v.value=I:null),selectedKeys:a(b),"onUpdate:selectedKeys":l[7]||(l[7]=I=>Me(b)?b.value=I:null),class:"h-full",virtualScroll:"",showLine:"",blockLine:"",keyField:"id",data:[a(h)],filter:f,nodeProps:m,renderLabel:N},null,8,["expandedKeys","selectedKeys","data","filter","nodeProps","renderLabel"])])])}}}),Zl={class:"TrackCard",flex:"","flex-col":"","h-full":"","p-12px":"","box-border":"","gap-8px":"","overflow-hidden":""},ei={flex:"","justify-between":"","items-center":"",class:"[--svg-h:24px]"},ti={flex:"","items-center":"","gap-4px":""},ni={"flex-1":"",flex:"","gap-12px":"","overflow-hidden":""},oi={"self-stretch":"",flex:"[2]"},ri={"mb-24px":"","break-all":"","px-4px":"","py-2px":"",bg:"#eee"},li={flex:"","flex-col":"","gap-12px":""},ii={key:0,flex:"","gap-8px":""},ai=["onClick"],Xn=()=>nr(()=>import("./TrackGraph-S8eceX9R.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),si=tr({loader:Xn,delay:0});setTimeout(Xn,3e3);const di=G({__name:"TrackCard",props:{nodes:{},queryResult:{},selector:{},onClose:{type:Function,default:$t}},setup(e){const t=e,r=A(()=>t.queryResult?t.queryResult.unitResults.asJsReadonlyArrayView().concat():[]),i=A(()=>r.value.filter(u=>!u.context.prev)),s=A(()=>r.value.filter(u=>u.context.prev)),n=j([]);Se(()=>{n.value=s.value});const d=u=>{n.value.includes(u)?n.value=n.value.filter(v=>v!==u):n.value=n.value.concat(u)},h=u=>{const v=u.value;return v instanceof xn&&r.value.some(b=>b.expression===v)&&!u.outChildren.some(b=>b.value instanceof xn)?{outline:"1px solid #00F"}:""};return(u,v)=>{const b=Ue("SvgIcon"),y=rt,f=jn;return B(),te("div",Zl,[$("div",ei,[$("div",ti,[R(b,{name:"path"}),v[0]||(v[0]=$("div",{text:"20px/28px","font-bold":""},"选择器路径视图",-1))]),R(y,{text:"",onClick:e.onClose},{default:S(()=>[R(b,{name:"close"})]),_:1},8,["onClick"])]),$("div",ni,[$("div",oi,[e.nodes.length&&e.queryResult?(B(),ee(a(si),{key:0,nodes:e.nodes,queryResult:e.queryResult,showUnitResults:a(s),filterUnitResults:a(n),class:"h-[calc(100%-2px)] b-1px b-solid"},null,8,["nodes","queryResult","showUnitResults","filterUnitResults"])):ae("",!0),v[1]||(v[1]=$("div",{relative:"","pointer-events-none":"","z-1":""},[$("div",{absolute:"","left-8px":"","bottom-8px":"",text:"14px/14px #6C6E71"}," *为简化视图已隐藏无关节点 ")],-1))]),R(f,{class:"self-stretch flex-1 text-20px leading-28px gkd_code"},{default:S(()=>[$("div",ri,[R(St,{source:e.selector.source,node:e.selector.ast,getNodeStyle:h},null,8,["source","node"])]),$("div",li,[a(i).length?(B(),te("div",ii,[(B(!0),te(Ne,null,Oe(a(i),(m,N)=>(B(),te("div",{key:N,"break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"",b:"#ccc"},[R(St,{source:e.selector.source,node:e.selector.findAst(m.expression)},null,8,["source","node"])]))),128))])):ae("",!0),(B(!0),te(Ne,null,Oe(a(s),(m,N)=>(B(),te("div",{key:N,"cursor-pointer":"","break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"","transition-colors":"",style:De({borderColor:a(wt)[N%a(wt).length],backgroundColor:a(n).includes(m)?"#eee":void 0}),onClick:k=>d(m)},[$("div",{"inline-block":"","align-middle":"","size-20px":"",style:De({backgroundColor:a(wt)[N%a(wt).length]})},null,4),v[2]||(v[2]=$("span",{"pl-4px":""},null,-1)),R(St,{source:e.selector.source,node:e.selector.findAst(m.expression)},null,8,["source","node"])],12,ai))),128))])]),_:1})])])}}}),et=j([]),ci=e=>{const t=Date.now(),r=()=>{et.value=et.value.filter(n=>n!==t)};Ln(r),qt(e,n=>{r(),n&&(et.value=et.value.concat(t))});const i=A(()=>2e3+et.value.indexOf(t)),s=A(()=>et.value.at(-1)===t);return{zIndex:i,isTop:s}},ui=G({__name:"FullScreenDialog",props:{show:{type:Boolean,default:!1,required:!0},showModifiers:{}},emits:or(["closed"],["update:show"]),setup(e,{emit:t}){const r=rr(e,"show"),i=t,s=j(r.value),n=j(),d=300;let h=0;const u=()=>{h&&clearTimeout(h),h=0};Ln(u),Te(r,y=>{u(),y?(s.value=!0,n.value="enter"):(n.value="leave",h=window.setTimeout(()=>{s.value=!1,n.value=void 0,u(),i("closed")},d))});const{isTop:v,zIndex:b}=ci(()=>s.value);return lr("keydown",y=>{y.key==="Escape"&&v.value&&(r.value=!1)}),(y,f)=>a(s)?(B(),ee(Xt,{key:0,to:"body"},[$("div",Kn({class:["FullScreenDialog",{"enter-active":a(n)==="enter","exit-active":a(n)==="leave"}],absolute:"","top-0":"","left-0":"","page-size":"",style:{"--duration":d+"ms","z-index":a(b)}},y.$attrs),[In(y.$slots,"default",{},void 0,!0)],16)])):ae("",!0)}}),fi=Pr(ui,[["__scopeId","data-v-abb3b230"]]),hi={"page-size":"",flex:"","gap-5px":""},vi={"w-40px":"","py-12px":"",flex:"","flex-col":"","items-center":"","gap-16px":"",class:"[--svg-h:24px]"},gi={flex:"","justify-center":"",href:"https://github.com/orgs/gkd-kit/discussions",target:"_blank",rel:"noopener noreferrer"},pi={flex:"","justify-center":"",href:"https://gkd.li/guide/snapshot#share-note",target:"_blank",rel:"noopener noreferrer"},mi={key:1,"page-size":"","pt-80px":"",flex:"","flex-col":"","items-center":"","justify-center":""},$i=G({__name:"SnapshotPage",setup(e){const{snapshot:t,rootNode:r,loading:i,redirected:s,trackData:n,trackShow:d}=Ae();Se(()=>{i.value?hn.start():hn.finish()});const h=Mt("searchShow",!0,sessionStorage),u=Mt("ruleShow",!1,sessionStorage),v=Mt("attrShow",!0,sessionStorage),b=()=>{Ke.info("暂未实现")};return(y,f)=>{const m=Ue("SvgIcon"),N=Ue("RouterLink"),k=rt,w=Jt;return a(t)&&a(r)?(B(),te(Ne,{key:0},[$("div",hi,[$("div",vi,[R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:""},{default:S(()=>[R(N,{to:"/"},{default:S(()=>[R(m,{name:"home"})]),_:1})]),_:1})]),default:S(()=>[f[9]||(f[9]=J(" 回到首页 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:b},{default:S(()=>[R(m,{name:"settings"})]),_:1})]),default:S(()=>[f[10]||(f[10]=J(" 设置 ",-1))]),_:1}),f[16]||(f[16]=$("div",null,null,-1)),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:f[0]||(f[0]=c=>h.value=!a(h))},{default:S(()=>[R(m,{name:"search-list"})]),_:1})]),default:S(()=>[f[11]||(f[11]=J(" 搜索面板 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:f[1]||(f[1]=c=>v.value=!a(v))},{default:S(()=>[R(m,{name:"prop"})]),_:1})]),default:S(()=>[f[12]||(f[12]=J(" 属性面板 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[R(k,{text:"",onClick:f[2]||(f[2]=c=>u.value=!a(u))},{default:S(()=>[R(m,{name:"test"})]),_:1})]),default:S(()=>[f[13]||(f[13]=J(" 测试规则 ",-1))]),_:1}),f[17]||(f[17]=$("div",null,null,-1)),R(w,{placement:"right"},{trigger:S(()=>[$("a",gi,[R(k,{text:""},{default:S(()=>[R(m,{name:"discussion"})]),_:1})])]),default:S(()=>[f[14]||(f[14]=J(" 讨论交流 ",-1))]),_:1}),R(w,{placement:"right"},{trigger:S(()=>[$("a",pi,[R(k,{text:""},{default:S(()=>[R(m,{name:"warn"})]),_:1})])]),default:S(()=>[f[15]||(f[15]=J(" 分享须知 ",-1))]),_:1})]),R(Ol),R(Jl,{class:"flex-1"})]),R(Wl,{show:a(h),onUpdateShow:f[3]||(f[3]=c=>h.value=c)},null,8,["show"]),R($l,{show:a(u),onUpdateShow:f[4]||(f[4]=c=>u.value=c)},null,8,["show"]),R(kl,{show:a(v),onUpdateShow:f[5]||(f[5]=c=>v.value=c)},null,8,["show"]),R(Cl),R(fi,{show:a(d),"onUpdate:show":f[7]||(f[7]=c=>Me(d)?d.value=c:null),onClosed:f[8]||(f[8]=c=>n.value=void 0)},{default:S(()=>[a(n)?(B(),ee(di,Kn({key:0,class:"bg-white"},a(n),{onClose:f[6]||(f[6]=c=>d.value=!1)}),null,16)):ae("",!0)]),_:1},8,["show"])],64)):!a(i)&&!a(s)?(B(),te("div",mi,[...f[18]||(f[18]=[$("div",{"mb-8px":""},[$("span",null,"快照数据缺失,"),$("a",{href:"https://gkd.li/guide/snapshot#share-note",target:"_blank",referrerpolicy:"no-referrer"},"分享须知")],-1)])])):ae("",!0)}}});export{$i as default};
278
+ //# sourceMappingURL=SnapshotPage-gqLV0Ajt.js.map