@gkd-kit/inspect 0.0.1719370392593 → 0.0.1719771844368

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 (47) hide show
  1. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-DMBJIsA8.js → ActionCard.vue_vue_type_script_setup_true_lang-BQ_8fdAM.js} +2 -2
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-DMBJIsA8.js.map → ActionCard.vue_vue_type_script_setup_true_lang-BQ_8fdAM.js.map} +1 -1
  3. package/dist/assets/DevicePage-DVADu81G.js +49 -0
  4. package/dist/assets/DevicePage-DVADu81G.js.map +1 -0
  5. package/dist/assets/{HomePage-BB9T35__.js → HomePage-CaxY_1lw.js} +2 -2
  6. package/dist/assets/{HomePage-BB9T35__.js.map → HomePage-CaxY_1lw.js.map} +1 -1
  7. package/dist/assets/ImportPage-NLsJri71.js +2 -0
  8. package/dist/assets/ImportPage-NLsJri71.js.map +1 -0
  9. package/dist/assets/PreviewSharePage-CQKWL6mm.js +2 -0
  10. package/dist/assets/{PreviewSharePage-CWVZYeZt.js.map → PreviewSharePage-CQKWL6mm.js.map} +1 -1
  11. package/dist/assets/SnapshotPage-CaEVhDB3.js +276 -0
  12. package/dist/assets/SnapshotPage-CaEVhDB3.js.map +1 -0
  13. package/dist/assets/{TrackGraph-pZdJqTy1.js → TrackGraph-LNwgG7Zu.js} +2 -2
  14. package/dist/assets/{TrackGraph-pZdJqTy1.js.map → TrackGraph-LNwgG7Zu.js.map} +1 -1
  15. package/dist/assets/{_404Page-B2G_sFvb.js → _404Page-FYDSyMId.js} +2 -2
  16. package/dist/assets/{_404Page-B2G_sFvb.js.map → _404Page-FYDSyMId.js.map} +1 -1
  17. package/dist/assets/{dayjs.min-ndM_mXPg.js → dayjs.min-Dk3SwgwA.js} +2 -2
  18. package/dist/assets/{dayjs.min-ndM_mXPg.js.map → dayjs.min-Dk3SwgwA.js.map} +1 -1
  19. package/dist/assets/error-cRQAxhsF.js +2 -0
  20. package/dist/assets/error-cRQAxhsF.js.map +1 -0
  21. package/dist/assets/{export-BnCW8Yv5.js → export-BbCEpSmy.js} +2 -2
  22. package/dist/assets/{export-BnCW8Yv5.js.map → export-BbCEpSmy.js.map} +1 -1
  23. package/dist/assets/{fetch-D2lrkdVo.js → fetch-H6IWSOXO.js} +27 -27
  24. package/dist/assets/{fetch-D2lrkdVo.js.map → fetch-H6IWSOXO.js.map} +1 -1
  25. package/dist/assets/{import-B19IC5VT.js → import-CtVhDhqQ.js} +2 -2
  26. package/dist/assets/{import-B19IC5VT.js.map → import-CtVhDhqQ.js.map} +1 -1
  27. package/dist/assets/{index-BuszmkD7.js → index-B3yJ_cuJ.js} +2 -2
  28. package/dist/assets/{index-BuszmkD7.js.map → index-B3yJ_cuJ.js.map} +1 -1
  29. package/dist/assets/{index-C9bc-9Q5.js → index-DUNQCHBS.js} +5 -5
  30. package/dist/assets/index-DUNQCHBS.js.map +1 -0
  31. package/dist/assets/{index-BHcXUx24.js → index-DgVERJQU.js} +2 -2
  32. package/dist/assets/{index-BHcXUx24.js.map → index-DgVERJQU.js.map} +1 -1
  33. package/dist/assets/{polyfills-Bzj3sCUp.js → polyfills-C-WU4AZr.js} +1 -1
  34. package/dist/assets/{table-DFHCB3WR.js → table-Nqs-aN9a.js} +2 -2
  35. package/dist/assets/{table-DFHCB3WR.js.map → table-Nqs-aN9a.js.map} +1 -1
  36. package/dist/index.html +3 -3
  37. package/package.json +1 -1
  38. package/dist/assets/DevicePage-n32Lbp1h.js +0 -49
  39. package/dist/assets/DevicePage-n32Lbp1h.js.map +0 -1
  40. package/dist/assets/ImportPage-DJm2L1xp.js +0 -2
  41. package/dist/assets/ImportPage-DJm2L1xp.js.map +0 -1
  42. package/dist/assets/PreviewSharePage-CWVZYeZt.js +0 -2
  43. package/dist/assets/SnapshotPage-N3cUTU98.js +0 -272
  44. package/dist/assets/SnapshotPage-N3cUTU98.js.map +0 -1
  45. package/dist/assets/index-C9bc-9Q5.js.map +0 -1
  46. package/dist/assets/selector-IaQgboti.js +0 -6
  47. package/dist/assets/selector-IaQgboti.js.map +0 -1
@@ -1,26 +1,26 @@
1
- import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,J as we,a2 as L,ch as ke,ci as ce,cj as de,ck as Xe,cl as Qe,G as W,aa as G,S as X,ac as z,ad as q,ai as Je,c as fe,ak as Ye,a5 as R,b as m,cm as Ze,f as b,u as F,m as _,j as T,q as ue,a7 as eo,a8 as oo,a$ as Se,at as N,b7 as no,ay as he,d as I,i as to,a4 as Oe,n as E,N as io,an as B,b3 as $e,x as ro,af as Le,cn as Pe,co as je,cp as Ie,cq as Ae,Q as ve,a9 as so,cr as ao,B as lo,b1 as co,b5 as fo,aq as uo,cs as ho,ao as vo,F as pe,ct as go,bg as po,cu as me,au as mo,cv as bo,aQ as be}from"./index-C9bc-9Q5.js";function Q(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(l=>{e.includes(l)||(n[l]=o[l])}),Object.assign(n,t)}const{cubicBezierEaseInOut:A,cubicBezierEaseOut:yo,cubicBezierEaseIn:xo}=De;function Co({overflow:o="hidden",duration:e=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:i=!1,enterToProps:l=void 0,leaveToProps:c=void 0,reverse:d=!1}={}){const r=d?"leave":"enter",a=d?"enter":"leave";return[x(`&.fade-in-height-expand-transition-${a}-from,
1
+ import{e as x,ce as De,cf as Ue,h as O,r as k,v as h,cg as Ve,b7 as Ce,ch as Ge,J as we,a2 as L,ci as ke,cj as ce,ck as de,cl as Xe,cm as Qe,G as W,aa as G,S as X,ac as z,ad as q,ai as Je,c as fe,ak as Ye,a5 as R,b as m,cn as Ze,f as b,u as F,m as _,j as T,q as ue,a7 as eo,a8 as oo,b0 as Se,at as N,b8 as no,ay as he,d as A,i as to,a4 as Oe,n as E,N as io,an as B,b4 as $e,x as ro,af as Le,co as Pe,cp as je,cq as Ae,cr as Ie,Q as ve,a9 as so,cs as ao,B as lo,b2 as co,b6 as fo,aq as uo,ct as ho,ao as vo,F as pe,cu as go,bh as po,cv as me,au as mo,cw as bo,aA as be}from"./index-DUNQCHBS.js";function Q(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(l=>{e.includes(l)||(n[l]=o[l])}),Object.assign(n,t)}const{cubicBezierEaseInOut:I,cubicBezierEaseOut:yo,cubicBezierEaseIn:xo}=De;function Co({overflow:o="hidden",duration:e=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:i=!1,enterToProps:l=void 0,leaveToProps:c=void 0,reverse:d=!1}={}){const r=d?"leave":"enter",a=d?"enter":"leave";return[x(`&.fade-in-height-expand-transition-${a}-from,
2
2
  &.fade-in-height-expand-transition-${r}-to`,Object.assign(Object.assign({},l),{opacity:1})),x(`&.fade-in-height-expand-transition-${a}-to,
3
3
  &.fade-in-height-expand-transition-${r}-from`,Object.assign(Object.assign({},c),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),x(`&.fade-in-height-expand-transition-${a}-active`,`
4
4
  overflow: ${o};
5
5
  transition:
6
- max-height ${e} ${A} ${n},
6
+ max-height ${e} ${I} ${n},
7
7
  opacity ${e} ${yo} ${n},
8
- margin-top ${e} ${A} ${n},
9
- margin-bottom ${e} ${A} ${n},
10
- padding-top ${e} ${A} ${n},
11
- padding-bottom ${e} ${A} ${n}
8
+ margin-top ${e} ${I} ${n},
9
+ margin-bottom ${e} ${I} ${n},
10
+ padding-top ${e} ${I} ${n},
11
+ padding-bottom ${e} ${I} ${n}
12
12
  ${t?","+t:""}
13
13
  `),x(`&.fade-in-height-expand-transition-${r}-active`,`
14
14
  overflow: ${o};
15
15
  transition:
16
- max-height ${e} ${A},
16
+ max-height ${e} ${I},
17
17
  opacity ${e} ${xo},
18
- margin-top ${e} ${A},
19
- margin-bottom ${e} ${A},
20
- padding-top ${e} ${A},
21
- padding-bottom ${e} ${A}
18
+ margin-top ${e} ${I},
19
+ margin-bottom ${e} ${I},
20
+ padding-top ${e} ${I},
21
+ padding-bottom ${e} ${I}
22
22
  ${t?","+t:""}
23
- `)]}const wo=Object.assign(Object.assign({},Ue),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function}),ko=O({name:"DialogEnvironment",props:Object.assign(Object.assign({},wo),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(s){const{onPositiveClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function i(s){const{onNegativeClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handlePositiveClick:o,handleUpdateShow:e,handleNegativeClick:t,handleCloseClick:n,handleAfterLeave:i,handleMaskClick:l,handleEsc:c,to:d,maskClosable:r,show:a}=this;return h(we,{show:a,onUpdateShow:e,onMaskClick:l,onEsc:c,to:d,maskClosable:r,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,internalAppear:!0,internalDialog:!0},{default:()=>h(Ve,Object.assign({},Ce(this.$props,Ge),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),So={injectionKey:String,to:[String,Object]},Oo=O({name:"DialogProvider",props:So,setup(){const o=k([]),e={};function t(d={}){const r=G(),a=X(Object.assign(Object.assign({},d),{key:r,destroy:()=>{e[`n-dialog-${r}`].hide()}}));return o.value.push(a),a}const n=["info","success","warning","error"].map(d=>r=>t(Object.assign(Object.assign({},r),{type:d})));function i(d){const{value:r}=o;r.splice(r.findIndex(a=>a.key===d),1)}function l(){Object.values(e).forEach(d=>{d.hide()})}const c={create:t,destroyAll:l,info:n[0],success:n[1],warning:n[2],error:n[3]};return L(ke,c),L(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),L(Qe,o),Object.assign(Object.assign({},c),{dialogList:o,dialogInstRefs:e,handleAfterLeave:i})},render(){var o,e;return h(W,null,[this.dialogList.map(t=>h(ko,Q(t,["destroy","style"],{internalStyle:t.style,to:this.to,ref:n=>{n===null?delete this.dialogInstRefs[`n-dialog-${t.key}`]:this.dialogInstRefs[`n-dialog-${t.key}`]=n},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function $o(){const o=z(ke,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const Lo={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Po=o=>{const{textColor2:e,successColor:t,infoColor:n,warningColor:i,errorColor:l,popoverColor:c,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:u,textColor1:v,textColor3:g,borderRadius:f,fontWeightStrong:p,boxShadow2:y,lineHeight:w,fontSize:$}=o;return Object.assign(Object.assign({},Lo),{borderRadius:f,lineHeight:w,fontSize:$,headerFontWeight:p,iconColor:e,iconColorSuccess:t,iconColorInfo:n,iconColorWarning:i,iconColorError:l,color:c,textColor:e,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeBorderRadius:f,closeColorHover:s,closeColorPressed:u,headerTextColor:v,descriptionTextColor:g,actionTextColor:e,boxShadow:y})},jo=Je({name:"Notification",common:fe,peers:{Scrollbar:Ye},self:Po}),Io=jo,Ao={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"},zo=o=>{const{textColor2:e,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,infoColor:l,successColor:c,errorColor:d,warningColor:r,popoverColor:a,boxShadow2:s,primaryColor:u,lineHeight:v,borderRadius:g,closeColorHover:f,closeColorPressed:p}=o;return Object.assign(Object.assign({},Ao),{closeBorderRadius:g,textColor:e,textColorInfo:e,textColorSuccess:e,textColorError:e,textColorWarning:e,textColorLoading:e,color:a,colorInfo:a,colorSuccess:a,colorError:a,colorWarning:a,colorLoading:a,boxShadow:s,boxShadowInfo:s,boxShadowSuccess:s,boxShadowError:s,boxShadowWarning:s,boxShadowLoading:s,iconColor:e,iconColorInfo:l,iconColorSuccess:c,iconColorWarning:r,iconColorError:d,iconColorLoading:u,closeColorHover:f,closeColorPressed:p,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,closeColorHoverInfo:f,closeColorPressedInfo:p,closeIconColorInfo:t,closeIconColorHoverInfo:n,closeIconColorPressedInfo:i,closeColorHoverSuccess:f,closeColorPressedSuccess:p,closeIconColorSuccess:t,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:i,closeColorHoverError:f,closeColorPressedError:p,closeIconColorError:t,closeIconColorHoverError:n,closeIconColorPressedError:i,closeColorHoverWarning:f,closeColorPressedWarning:p,closeIconColorWarning:t,closeIconColorHoverWarning:n,closeIconColorPressedWarning:i,closeColorHoverLoading:f,closeColorPressedLoading:p,closeIconColorLoading:t,closeIconColorHoverLoading:n,closeIconColorPressedLoading:i,loadingColor:u,lineHeight:v,borderRadius:g})},Eo={name:"Message",common:fe,self:zo},Ro=Eo,Mo=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Ho={name:"LoadingBar",common:fe,self:Mo},Bo=Ho,ze=R("n-loading-bar"),Ee=R("n-loading-bar-api"),_o=m("loading-bar-container",`
23
+ `)]}const wo=Object.assign(Object.assign({},Ue),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function}),ko=O({name:"DialogEnvironment",props:Object.assign(Object.assign({},wo),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(s){const{onPositiveClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function i(s){const{onNegativeClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handlePositiveClick:o,handleUpdateShow:e,handleNegativeClick:t,handleCloseClick:n,handleAfterLeave:i,handleMaskClick:l,handleEsc:c,to:d,maskClosable:r,show:a}=this;return h(we,{show:a,onUpdateShow:e,onMaskClick:l,onEsc:c,to:d,maskClosable:r,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,internalAppear:!0,internalDialog:!0},{default:()=>h(Ve,Object.assign({},Ce(this.$props,Ge),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),So={injectionKey:String,to:[String,Object]},Oo=O({name:"DialogProvider",props:So,setup(){const o=k([]),e={};function t(d={}){const r=G(),a=X(Object.assign(Object.assign({},d),{key:r,destroy:()=>{e[`n-dialog-${r}`].hide()}}));return o.value.push(a),a}const n=["info","success","warning","error"].map(d=>r=>t(Object.assign(Object.assign({},r),{type:d})));function i(d){const{value:r}=o;r.splice(r.findIndex(a=>a.key===d),1)}function l(){Object.values(e).forEach(d=>{d.hide()})}const c={create:t,destroyAll:l,info:n[0],success:n[1],warning:n[2],error:n[3]};return L(ke,c),L(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),L(Qe,o),Object.assign(Object.assign({},c),{dialogList:o,dialogInstRefs:e,handleAfterLeave:i})},render(){var o,e;return h(W,null,[this.dialogList.map(t=>h(ko,Q(t,["destroy","style"],{internalStyle:t.style,to:this.to,ref:n=>{n===null?delete this.dialogInstRefs[`n-dialog-${t.key}`]:this.dialogInstRefs[`n-dialog-${t.key}`]=n},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function $o(){const o=z(ke,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const Lo={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Po=o=>{const{textColor2:e,successColor:t,infoColor:n,warningColor:i,errorColor:l,popoverColor:c,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:u,textColor1:v,textColor3:g,borderRadius:f,fontWeightStrong:p,boxShadow2:y,lineHeight:w,fontSize:$}=o;return Object.assign(Object.assign({},Lo),{borderRadius:f,lineHeight:w,fontSize:$,headerFontWeight:p,iconColor:e,iconColorSuccess:t,iconColorInfo:n,iconColorWarning:i,iconColorError:l,color:c,textColor:e,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeBorderRadius:f,closeColorHover:s,closeColorPressed:u,headerTextColor:v,descriptionTextColor:g,actionTextColor:e,boxShadow:y})},jo=Je({name:"Notification",common:fe,peers:{Scrollbar:Ye},self:Po}),Ao=jo,Io={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"},zo=o=>{const{textColor2:e,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,infoColor:l,successColor:c,errorColor:d,warningColor:r,popoverColor:a,boxShadow2:s,primaryColor:u,lineHeight:v,borderRadius:g,closeColorHover:f,closeColorPressed:p}=o;return Object.assign(Object.assign({},Io),{closeBorderRadius:g,textColor:e,textColorInfo:e,textColorSuccess:e,textColorError:e,textColorWarning:e,textColorLoading:e,color:a,colorInfo:a,colorSuccess:a,colorError:a,colorWarning:a,colorLoading:a,boxShadow:s,boxShadowInfo:s,boxShadowSuccess:s,boxShadowError:s,boxShadowWarning:s,boxShadowLoading:s,iconColor:e,iconColorInfo:l,iconColorSuccess:c,iconColorWarning:r,iconColorError:d,iconColorLoading:u,closeColorHover:f,closeColorPressed:p,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,closeColorHoverInfo:f,closeColorPressedInfo:p,closeIconColorInfo:t,closeIconColorHoverInfo:n,closeIconColorPressedInfo:i,closeColorHoverSuccess:f,closeColorPressedSuccess:p,closeIconColorSuccess:t,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:i,closeColorHoverError:f,closeColorPressedError:p,closeIconColorError:t,closeIconColorHoverError:n,closeIconColorPressedError:i,closeColorHoverWarning:f,closeColorPressedWarning:p,closeIconColorWarning:t,closeIconColorHoverWarning:n,closeIconColorPressedWarning:i,closeColorHoverLoading:f,closeColorPressedLoading:p,closeIconColorLoading:t,closeIconColorHoverLoading:n,closeIconColorPressedLoading:i,loadingColor:u,lineHeight:v,borderRadius:g})},Eo={name:"Message",common:fe,self:zo},Ro=Eo,Mo=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Ho={name:"LoadingBar",common:fe,self:Mo},Bo=Ho,ze=R("n-loading-bar"),Ee=R("n-loading-bar-api"),_o=m("loading-bar-container",`
24
24
  z-index: 5999;
25
25
  position: fixed;
26
26
  top: 0;
@@ -69,11 +69,11 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
69
69
  color: var(--n-text-color);
70
70
  background-color: var(--n-color);
71
71
  box-shadow: var(--n-box-shadow);
72
- `,[I("content",`
72
+ `,[A("content",`
73
73
  display: inline-block;
74
74
  line-height: var(--n-line-height);
75
75
  font-size: var(--n-font-size);
76
- `),I("icon",`
76
+ `),A("icon",`
77
77
  position: relative;
78
78
  margin: var(--n-icon-margin);
79
79
  height: var(--n-icon-size);
@@ -89,7 +89,7 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
89
89
  top: 0;
90
90
  right: 0;
91
91
  bottom: 0;
92
- `,[to()])]),I("close",`
92
+ `,[to()])]),A("close",`
93
93
  margin: var(--n-close-margin);
94
94
  transition:
95
95
  background-color .3s var(--n-bezier),
@@ -138,7 +138,7 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
138
138
  right: 12px;
139
139
  justify-content: flex-end;
140
140
  align-items: flex-end;
141
- `)])]),qo={info:()=>h(Pe,null),success:()=>h(je,null),warning:()=>h(Ie,null),error:()=>h(Ae,null),default:()=>null},Do=O({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=z(He),l=Oe("Message",t,i),c=T("Message","-message",Wo,Ro,n,i),d=_(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:v,maxWidth:g,iconMargin:f,closeMargin:p,closeSize:y,iconSize:w,fontSize:$,lineHeight:P,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:j,iconColorLoading:Y,closeIconSize:Z,closeBorderRadius:ee,[E("textColor",a)]:oe,[E("boxShadow",a)]:ne,[E("color",a)]:te,[E("closeColorHover",a)]:ie,[E("closeColorPressed",a)]:re,[E("closeIconColor",a)]:se,[E("closeIconColorPressed",a)]:ae,[E("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":v,"--n-padding":u,"--n-max-width":g,"--n-font-size":$,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Z,"--n-close-border-radius":ee,"--n-close-size":y,"--n-close-margin":p,"--n-text-color":oe,"--n-color":te,"--n-box-shadow":ne,"--n-icon-color-info":C,"--n-icon-color-success":M,"--n-icon-color-warning":H,"--n-icon-color-error":j,"--n-icon-color-loading":Y,"--n-close-color-hover":ie,"--n-close-color-pressed":re,"--n-close-icon-color":se,"--n-close-icon-color-pressed":ae,"--n-close-icon-color-hover":le,"--n-line-height":P,"--n-border-radius":S}}),r=e?ue("message",_(()=>o.type[0]),d,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:l,messageProviderProps:n,handleClose(){var a;(a=o.onClose)===null||a===void 0||a.call(o)},cssVars:e?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender,placement:n.placement}},render(){const{render:o,type:e,closable:t,content:n,mergedClsPrefix:i,cssVars:l,themeClass:c,onRender:d,icon:r,handleClose:a,showIcon:s}=this;d==null||d();let u;return h("div",{class:[`${i}-message-wrapper`,c],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},l]},o?o(this.$props):h("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(u=Uo(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(io,null,{default:()=>u})):null,h("div",{class:`${i}-message__content`},B(n)),t?h($e,{clsPrefix:i,class:`${i}-message__close`,onClick:a,absolute:!0}):null))}});function Uo(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(ro,{clsPrefix:t,strokeWidth:24,scale:.85}):qo[e]();return n?h(Le,{clsPrefix:t,key:e},{default:()=>n}):null}}const Vo=O({name:"MessageEnvironment",props:Object.assign(Object.assign({},Re),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(o){let e=null;const t=k(!0);ve(()=>{n()});function n(){const{duration:s}=o;s&&(e=window.setTimeout(c,s))}function i(s){s.currentTarget===s.target&&e!==null&&(window.clearTimeout(e),e=null)}function l(s){s.currentTarget===s.target&&n()}function c(){const{onHide:s}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),s&&s()}function d(){const{onClose:s}=o;s&&s(),c()}function r(){const{onAfterLeave:s,onInternalAfterLeave:u,onAfterHide:v,internalKey:g}=o;s&&s(),u&&u(g),v&&v()}function a(){c()}return{show:t,hide:c,handleClose:d,handleAfterLeave:r,handleMouseleave:l,handleMouseenter:i,deactivate:a}},render(){return h(so,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(Do,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Go=Object.assign(Object.assign({},T.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Xo=O({name:"MessageProvider",props:Go,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n=k({}),i={create(r,a){return l(r,Object.assign({type:"default"},a))},info(r,a){return l(r,Object.assign(Object.assign({},a),{type:"info"}))},success(r,a){return l(r,Object.assign(Object.assign({},a),{type:"success"}))},warning(r,a){return l(r,Object.assign(Object.assign({},a),{type:"warning"}))},error(r,a){return l(r,Object.assign(Object.assign({},a),{type:"error"}))},loading(r,a){return l(r,Object.assign(Object.assign({},a),{type:"loading"}))},destroyAll:d};L(He,{props:o,mergedClsPrefixRef:e}),L(Me,i);function l(r,a){const s=G(),u=X(Object.assign(Object.assign({},a),{content:r,key:s,destroy:()=>{var g;(g=n.value[s])===null||g===void 0||g.hide()}})),{max:v}=o;return v&&t.value.length>=v&&t.value.shift(),t.value.push(u),u}function c(r){t.value.splice(t.value.findIndex(a=>a.key===r),1),delete n.value[r]}function d(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:c},i)},render(){var o,e,t;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>h(Vo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Q(n,["destroy"],void 0),{duration:n.duration===void 0?this.duration:n.duration,keepAliveOnHover:n.keepAliveOnHover===void 0?this.keepAliveOnHover:n.keepAliveOnHover,closable:n.closable===void 0?this.closable:n.closable}))))):null)}});function Qo(){const o=z(Me,null);return o===null&&q("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),o}const Jo=O({name:"ModalEnvironment",props:Object.assign(Object.assign({},ao),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(){const{onPositiveClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function i(){const{onNegativeClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handleUpdateShow:o,handleAfterLeave:e,handleMaskClick:t,handleEsc:n,show:i}=this;return h(we,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),ye=R("n-modal-provider"),Be=R("n-modal-api"),Yo=R("n-modal-reactive-list"),Zo={to:[String,Object]},en=O({name:"ModalProvider",props:Zo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=G(),s=X(Object.assign(Object.assign({},r),{key:a,destroy:()=>{n[`n-modal-${a}`].hide()}}));return t.value.push(s),s}function l(r){const{value:a}=t;a.splice(a.findIndex(s=>s.key===r),1)}function c(){Object.values(n).forEach(r=>{r.hide()})}const d={create:i,destroyAll:c};return L(Be,d),L(ye,{clickedRef:ce(64),clickedPositionRef:de()}),L(Yo,t),L(ye,{clickedRef:o,clickedPositionRef:e}),Object.assign(Object.assign({},d),{modalList:t,modalInstRefs:n,handleAfterLeave:l})},render(){var o,e;return h(W,null,[this.modalList.map(t=>{var n;return h(Jo,Q(t,["destroy","style"],{internalStyle:t.style,to:(n=t.to)!==null&&n!==void 0?n:this.to,ref:i=>{i===null?delete this.modalInstRefs[`n-modal-${t.key}`]:this.modalInstRefs[`n-modal-${t.key}`]=i},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))}),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function on(){const o=z(Be,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const J=R("n-notification-provider"),nn=O({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=z(J),n=k(null);return lo(()=>{var i,l;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(l=n==null?void 0:n.value)===null||l===void 0||l.classList.remove("transitioning")}),{selfRef:n,mergedTheme:o,mergedClsPrefix:e,transitioning:t}},render(){const{$slots:o,scrollable:e,mergedClsPrefix:t,mergedTheme:n,placement:i}=this;return h("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?h(co,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),tn={info:()=>h(Pe,null),success:()=>h(je,null),warning:()=>h(Ie,null),error:()=>h(Ae,null),default:()=>null},ge={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},rn=fo(ge),sn=O({name:"Notification",props:ge,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=z(J),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Oe("Notification",l,e),d=_(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:v,closeIconColorHover:g,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:y,actionTextColor:w,borderRadius:$,headerFontWeight:P,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:j,width:Y,padding:Z,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[E("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:Ne,cubicBezierEaseInOut:Fe}}=t.value,{left:Te,right:Ke,top:We,bottom:qe}=uo(Z);return{"--n-color":s,"--n-font-size":M,"--n-text-color":u,"--n-description-text-color":y,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":P,"--n-bezier":Fe,"--n-bezier-ease-out":le,"--n-bezier-ease-in":Ne,"--n-border-radius":$,"--n-box-shadow":S,"--n-close-border-radius":oe,"--n-close-color-hover":ne,"--n-close-color-pressed":te,"--n-close-icon-color":v,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":f,"--n-line-height":C,"--n-icon-color":ae,"--n-close-margin":H,"--n-close-size":j,"--n-close-icon-size":ee,"--n-width":Y,"--n-padding-left":Te,"--n-padding-right":Ke,"--n-padding-top":We,"--n-padding-bottom":qe,"--n-title-font-size":ie,"--n-meta-font-size":re,"--n-description-font-size":se}}),r=i?ue("notification",_(()=>o.type[0]),d,n):void 0;return{mergedClsPrefix:e,showAvatar:_(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:c,cssVars:i?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender}},render(){var o;const{mergedClsPrefix:e}=this;return(o=this.onRender)===null||o===void 0||o.call(this),h("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},h("div",{class:[`${e}-notification`,this.rtlEnabled&&`${e}-notification--rtl`,this.themeClass,{[`${e}-notification--closable`]:this.closable,[`${e}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?h("div",{class:`${e}-notification__avatar`},this.avatar?B(this.avatar):this.type!=="default"?h(Le,{clsPrefix:e},{default:()=>tn[this.type]()}):null):null,this.closable?h($e,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,h("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?h("div",{class:`${e}-notification-main__header`},B(this.title)):null,this.description?h("div",{class:`${e}-notification-main__description`},B(this.description)):null,this.content?h("pre",{class:`${e}-notification-main__content`},B(this.content)):null,this.meta||this.action?h("div",{class:`${e}-notification-main-footer`},this.meta?h("div",{class:`${e}-notification-main-footer__meta`},B(this.meta)):null,this.action?h("div",{class:`${e}-notification-main-footer__action`},B(this.action)):null):null)))}}),an=Object.assign(Object.assign({},ge),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),ln=O({name:"NotificationEnvironment",props:Object.assign(Object.assign({},an),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=z(J),t=k(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function l(f){e.value++,N(()=>{f.style.height=`${f.offsetHeight}px`,f.style.maxHeight="0",f.style.transition="none",f.offsetHeight,f.style.transition="",f.style.maxHeight=f.style.height})}function c(f){e.value--,f.style.height="",f.style.maxHeight="";const{onAfterEnter:p,onAfterShow:y}=o;p&&p(),y&&y()}function d(f){e.value++,f.style.maxHeight=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,f.offsetHeight}function r(f){const{onHide:p}=o;p&&p(),f.style.maxHeight="0",f.offsetHeight}function a(){e.value--;const{onAfterLeave:f,onInternalAfterLeave:p,onAfterHide:y,internalKey:w}=o;f&&f(),p(w),y&&y()}function s(){const{duration:f}=o;f&&(n=window.setTimeout(i,f))}function u(f){f.currentTarget===f.target&&n!==null&&(window.clearTimeout(n),n=null)}function v(f){f.currentTarget===f.target&&s()}function g(){const{onClose:f}=o;f?Promise.resolve(f()).then(p=>{p!==!1&&i()}):i()}return ve(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:g,handleAfterLeave:a,handleLeave:r,handleBeforeLeave:d,handleAfterEnter:c,handleBeforeEnter:l,handleMouseenter:u,handleMouseleave:v}},render(){return h(Se,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(sn,Object.assign({},Ce(this.$props,rn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),cn=x([m("notification-container",`
141
+ `)])]),qo={info:()=>h(Pe,null),success:()=>h(je,null),warning:()=>h(Ae,null),error:()=>h(Ie,null),default:()=>null},Do=O({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=z(He),l=Oe("Message",t,i),c=T("Message","-message",Wo,Ro,n,i),d=_(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:v,maxWidth:g,iconMargin:f,closeMargin:p,closeSize:y,iconSize:w,fontSize:$,lineHeight:P,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:j,iconColorLoading:Y,closeIconSize:Z,closeBorderRadius:ee,[E("textColor",a)]:oe,[E("boxShadow",a)]:ne,[E("color",a)]:te,[E("closeColorHover",a)]:ie,[E("closeColorPressed",a)]:re,[E("closeIconColor",a)]:se,[E("closeIconColorPressed",a)]:ae,[E("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":v,"--n-padding":u,"--n-max-width":g,"--n-font-size":$,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Z,"--n-close-border-radius":ee,"--n-close-size":y,"--n-close-margin":p,"--n-text-color":oe,"--n-color":te,"--n-box-shadow":ne,"--n-icon-color-info":C,"--n-icon-color-success":M,"--n-icon-color-warning":H,"--n-icon-color-error":j,"--n-icon-color-loading":Y,"--n-close-color-hover":ie,"--n-close-color-pressed":re,"--n-close-icon-color":se,"--n-close-icon-color-pressed":ae,"--n-close-icon-color-hover":le,"--n-line-height":P,"--n-border-radius":S}}),r=e?ue("message",_(()=>o.type[0]),d,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:l,messageProviderProps:n,handleClose(){var a;(a=o.onClose)===null||a===void 0||a.call(o)},cssVars:e?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender,placement:n.placement}},render(){const{render:o,type:e,closable:t,content:n,mergedClsPrefix:i,cssVars:l,themeClass:c,onRender:d,icon:r,handleClose:a,showIcon:s}=this;d==null||d();let u;return h("div",{class:[`${i}-message-wrapper`,c],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},l]},o?o(this.$props):h("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(u=Uo(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(io,null,{default:()=>u})):null,h("div",{class:`${i}-message__content`},B(n)),t?h($e,{clsPrefix:i,class:`${i}-message__close`,onClick:a,absolute:!0}):null))}});function Uo(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(ro,{clsPrefix:t,strokeWidth:24,scale:.85}):qo[e]();return n?h(Le,{clsPrefix:t,key:e},{default:()=>n}):null}}const Vo=O({name:"MessageEnvironment",props:Object.assign(Object.assign({},Re),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(o){let e=null;const t=k(!0);ve(()=>{n()});function n(){const{duration:s}=o;s&&(e=window.setTimeout(c,s))}function i(s){s.currentTarget===s.target&&e!==null&&(window.clearTimeout(e),e=null)}function l(s){s.currentTarget===s.target&&n()}function c(){const{onHide:s}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),s&&s()}function d(){const{onClose:s}=o;s&&s(),c()}function r(){const{onAfterLeave:s,onInternalAfterLeave:u,onAfterHide:v,internalKey:g}=o;s&&s(),u&&u(g),v&&v()}function a(){c()}return{show:t,hide:c,handleClose:d,handleAfterLeave:r,handleMouseleave:l,handleMouseenter:i,deactivate:a}},render(){return h(so,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(Do,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),Go=Object.assign(Object.assign({},T.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Xo=O({name:"MessageProvider",props:Go,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n=k({}),i={create(r,a){return l(r,Object.assign({type:"default"},a))},info(r,a){return l(r,Object.assign(Object.assign({},a),{type:"info"}))},success(r,a){return l(r,Object.assign(Object.assign({},a),{type:"success"}))},warning(r,a){return l(r,Object.assign(Object.assign({},a),{type:"warning"}))},error(r,a){return l(r,Object.assign(Object.assign({},a),{type:"error"}))},loading(r,a){return l(r,Object.assign(Object.assign({},a),{type:"loading"}))},destroyAll:d};L(He,{props:o,mergedClsPrefixRef:e}),L(Me,i);function l(r,a){const s=G(),u=X(Object.assign(Object.assign({},a),{content:r,key:s,destroy:()=>{var g;(g=n.value[s])===null||g===void 0||g.hide()}})),{max:v}=o;return v&&t.value.length>=v&&t.value.shift(),t.value.push(u),u}function c(r){t.value.splice(t.value.findIndex(a=>a.key===r),1),delete n.value[r]}function d(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:c},i)},render(){var o,e,t;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>h(Vo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Q(n,["destroy"],void 0),{duration:n.duration===void 0?this.duration:n.duration,keepAliveOnHover:n.keepAliveOnHover===void 0?this.keepAliveOnHover:n.keepAliveOnHover,closable:n.closable===void 0?this.closable:n.closable}))))):null)}});function Qo(){const o=z(Me,null);return o===null&&q("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),o}const Jo=O({name:"ModalEnvironment",props:Object.assign(Object.assign({},ao),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(){const{onPositiveClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function i(){const{onNegativeClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handleUpdateShow:o,handleAfterLeave:e,handleMaskClick:t,handleEsc:n,show:i}=this;return h(we,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),ye=R("n-modal-provider"),Be=R("n-modal-api"),Yo=R("n-modal-reactive-list"),Zo={to:[String,Object]},en=O({name:"ModalProvider",props:Zo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=G(),s=X(Object.assign(Object.assign({},r),{key:a,destroy:()=>{n[`n-modal-${a}`].hide()}}));return t.value.push(s),s}function l(r){const{value:a}=t;a.splice(a.findIndex(s=>s.key===r),1)}function c(){Object.values(n).forEach(r=>{r.hide()})}const d={create:i,destroyAll:c};return L(Be,d),L(ye,{clickedRef:ce(64),clickedPositionRef:de()}),L(Yo,t),L(ye,{clickedRef:o,clickedPositionRef:e}),Object.assign(Object.assign({},d),{modalList:t,modalInstRefs:n,handleAfterLeave:l})},render(){var o,e;return h(W,null,[this.modalList.map(t=>{var n;return h(Jo,Q(t,["destroy","style"],{internalStyle:t.style,to:(n=t.to)!==null&&n!==void 0?n:this.to,ref:i=>{i===null?delete this.modalInstRefs[`n-modal-${t.key}`]:this.modalInstRefs[`n-modal-${t.key}`]=i},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))}),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function on(){const o=z(Be,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const J=R("n-notification-provider"),nn=O({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=z(J),n=k(null);return lo(()=>{var i,l;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(l=n==null?void 0:n.value)===null||l===void 0||l.classList.remove("transitioning")}),{selfRef:n,mergedTheme:o,mergedClsPrefix:e,transitioning:t}},render(){const{$slots:o,scrollable:e,mergedClsPrefix:t,mergedTheme:n,placement:i}=this;return h("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?h(co,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),tn={info:()=>h(Pe,null),success:()=>h(je,null),warning:()=>h(Ae,null),error:()=>h(Ie,null),default:()=>null},ge={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},rn=fo(ge),sn=O({name:"Notification",props:ge,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=z(J),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Oe("Notification",l,e),d=_(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:v,closeIconColorHover:g,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:y,actionTextColor:w,borderRadius:$,headerFontWeight:P,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:j,width:Y,padding:Z,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[E("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:Ne,cubicBezierEaseInOut:Fe}}=t.value,{left:Te,right:Ke,top:We,bottom:qe}=uo(Z);return{"--n-color":s,"--n-font-size":M,"--n-text-color":u,"--n-description-text-color":y,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":P,"--n-bezier":Fe,"--n-bezier-ease-out":le,"--n-bezier-ease-in":Ne,"--n-border-radius":$,"--n-box-shadow":S,"--n-close-border-radius":oe,"--n-close-color-hover":ne,"--n-close-color-pressed":te,"--n-close-icon-color":v,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":f,"--n-line-height":C,"--n-icon-color":ae,"--n-close-margin":H,"--n-close-size":j,"--n-close-icon-size":ee,"--n-width":Y,"--n-padding-left":Te,"--n-padding-right":Ke,"--n-padding-top":We,"--n-padding-bottom":qe,"--n-title-font-size":ie,"--n-meta-font-size":re,"--n-description-font-size":se}}),r=i?ue("notification",_(()=>o.type[0]),d,n):void 0;return{mergedClsPrefix:e,showAvatar:_(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:c,cssVars:i?void 0:d,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender}},render(){var o;const{mergedClsPrefix:e}=this;return(o=this.onRender)===null||o===void 0||o.call(this),h("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},h("div",{class:[`${e}-notification`,this.rtlEnabled&&`${e}-notification--rtl`,this.themeClass,{[`${e}-notification--closable`]:this.closable,[`${e}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?h("div",{class:`${e}-notification__avatar`},this.avatar?B(this.avatar):this.type!=="default"?h(Le,{clsPrefix:e},{default:()=>tn[this.type]()}):null):null,this.closable?h($e,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,h("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?h("div",{class:`${e}-notification-main__header`},B(this.title)):null,this.description?h("div",{class:`${e}-notification-main__description`},B(this.description)):null,this.content?h("pre",{class:`${e}-notification-main__content`},B(this.content)):null,this.meta||this.action?h("div",{class:`${e}-notification-main-footer`},this.meta?h("div",{class:`${e}-notification-main-footer__meta`},B(this.meta)):null,this.action?h("div",{class:`${e}-notification-main-footer__action`},B(this.action)):null):null)))}}),an=Object.assign(Object.assign({},ge),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),ln=O({name:"NotificationEnvironment",props:Object.assign(Object.assign({},an),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=z(J),t=k(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function l(f){e.value++,N(()=>{f.style.height=`${f.offsetHeight}px`,f.style.maxHeight="0",f.style.transition="none",f.offsetHeight,f.style.transition="",f.style.maxHeight=f.style.height})}function c(f){e.value--,f.style.height="",f.style.maxHeight="";const{onAfterEnter:p,onAfterShow:y}=o;p&&p(),y&&y()}function d(f){e.value++,f.style.maxHeight=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,f.offsetHeight}function r(f){const{onHide:p}=o;p&&p(),f.style.maxHeight="0",f.offsetHeight}function a(){e.value--;const{onAfterLeave:f,onInternalAfterLeave:p,onAfterHide:y,internalKey:w}=o;f&&f(),p(w),y&&y()}function s(){const{duration:f}=o;f&&(n=window.setTimeout(i,f))}function u(f){f.currentTarget===f.target&&n!==null&&(window.clearTimeout(n),n=null)}function v(f){f.currentTarget===f.target&&s()}function g(){const{onClose:f}=o;f?Promise.resolve(f()).then(p=>{p!==!1&&i()}):i()}return ve(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:g,handleAfterLeave:a,handleLeave:r,handleBeforeLeave:d,handleAfterEnter:c,handleBeforeEnter:l,handleMouseenter:u,handleMouseleave:v}},render(){return h(Se,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(sn,Object.assign({},Ce(this.$props,rn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),cn=x([m("notification-container",`
142
142
  z-index: 4000;
143
143
  position: fixed;
144
144
  overflow: visible;
@@ -255,7 +255,7 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
255
255
  box-shadow: var(--n-box-shadow);
256
256
  box-sizing: border-box;
257
257
  opacity: 1;
258
- `,[I("avatar",[m("icon",`
258
+ `,[A("avatar",[m("icon",`
259
259
  color: var(--n-icon-color);
260
260
  `),m("base-icon",`
261
261
  color: var(--n-icon-color);
@@ -264,7 +264,7 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
264
264
  width: calc(100% - 40px);
265
265
  `)]),b("closable",[m("notification-main",[x("> *:first-child",`
266
266
  padding-right: 20px;
267
- `)]),I("close",`
267
+ `)]),A("close",`
268
268
  position: absolute;
269
269
  top: 0;
270
270
  right: 0;
@@ -272,7 +272,7 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
272
272
  transition:
273
273
  background-color .3s var(--n-bezier),
274
274
  color .3s var(--n-bezier);
275
- `)]),I("avatar",`
275
+ `)]),A("avatar",`
276
276
  position: absolute;
277
277
  top: var(--n-padding-top);
278
278
  left: var(--n-padding-left);
@@ -295,27 +295,27 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
295
295
  align-items: center;
296
296
  justify-content: space-between;
297
297
  margin-top: 12px;
298
- `,[I("meta",`
298
+ `,[A("meta",`
299
299
  font-size: var(--n-meta-font-size);
300
300
  transition: color .3s var(--n-bezier-ease-out);
301
301
  color: var(--n-description-text-color);
302
- `),I("action",`
302
+ `),A("action",`
303
303
  cursor: pointer;
304
304
  transition: color .3s var(--n-bezier-ease-out);
305
305
  color: var(--n-action-text-color);
306
- `)]),I("header",`
306
+ `)]),A("header",`
307
307
  font-weight: var(--n-title-font-weight);
308
308
  font-size: var(--n-title-font-size);
309
309
  transition: color .3s var(--n-bezier-ease-out);
310
310
  color: var(--n-title-text-color);
311
- `),I("description",`
311
+ `),A("description",`
312
312
  margin-top: 8px;
313
313
  font-size: var(--n-description-font-size);
314
314
  white-space: pre-wrap;
315
315
  word-wrap: break-word;
316
316
  transition: color .3s var(--n-bezier-ease-out);
317
317
  color: var(--n-description-text-color);
318
- `),I("content",`
318
+ `),A("content",`
319
319
  line-height: var(--n-line-height);
320
320
  margin: 12px 0 0 0;
321
321
  font-family: inherit;
@@ -327,6 +327,6 @@ import{e as x,cd as De,ce as Ue,h as O,r as k,v as h,cf as Ve,b6 as Ce,cg as Ge,
327
327
  transform: translate(${t}, 0);
328
328
  `),x("&.notification-transition-leave-from, &.notification-transition-enter-to",`
329
329
  transform: translate(0, 0);
330
- `)])}const _e=R("n-notification-api"),dn=Object.assign(Object.assign({},T.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:"top-right"},keepAliveOnHover:Boolean}),fn=O({name:"NotificationProvider",props:dn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(g){const f=G(),p=()=>{i.add(f),n[f]&&n[f].hide()},y=X(Object.assign(Object.assign({},g),{key:f,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let $=!1,P=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),$=!0);break}P++}$||t.value.splice(P,1)}return t.value.push(y),y}const c=["info","success","warning","error"].map(g=>f=>l(Object.assign(Object.assign({},f),{type:g})));function d(g){i.delete(g),t.value.splice(t.value.findIndex(f=>f.key===g),1)}const r=T("Notification","-notification",cn,Io,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:v},s=k(0);L(_e,a),L(J,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:s});function u(g){return l(g)}function v(){Object.values(t.value).forEach(g=>{g.hide()})}return Object.assign({mergedClsPrefix:e,notificationList:t,notificationRefs:n,handleAfterLeave:d},a)},render(){var o,e,t;const{placement:n}=this;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.notificationList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h(nn,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(ln,Object.assign({ref:l=>{const c=i.key;l===null?delete this.notificationRefs[c]:this.notificationRefs[c]=l}},Q(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function un(){const o=z(_e,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const hn=O({name:"InjectionExtractor",props:{onSetup:Function},setup(o,{slots:e}){var t;return(t=o.onSetup)===null||t===void 0||t.call(o),()=>{var n;return(n=e.default)===null||n===void 0?void 0:n.call(e)}}}),vn={message:Qo,notification:un,loadingBar:Ko,dialog:$o,modal:on};function gn({providersAndProps:o,configProviderProps:e}){let n=ho(()=>h(go,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(hn,{onSetup:()=>i[d]=vn[d]()})}))}));const i={app:n};let l;return vo&&(l=document.createElement("div"),document.body.appendChild(l),n.mount(l)),Object.assign({unmount:()=>{var d;if(n===null||l===null){po("discrete","unmount call no need because discrete app has been unmounted");return}n.unmount(),(d=l.parentNode)===null||d===void 0||d.removeChild(l),l=null,n=null}},i)}function pn(o,{configProviderProps:e,messageProviderProps:t,dialogProviderProps:n,notificationProviderProps:i,loadingBarProviderProps:l,modalProviderProps:c}={}){const d=[];return o.forEach(a=>{switch(a){case"message":d.push({type:a,Provider:Xo,props:t});break;case"notification":d.push({type:a,Provider:fn,props:i});break;case"dialog":d.push({type:a,Provider:Oo,props:n});break;case"loadingBar":d.push({type:a,Provider:To,props:l});break;case"modal":d.push({type:a,Provider:en,props:c})}}),gn({providersAndProps:d,configProviderProps:e})}const{message:xe,dialog:$n,loadingBar:Ln}=pn(["message","dialog","loadingBar"]),mn=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},K=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),Pn=(()=>{let o;return async e=>{if(e&&o!==e){o=e,K(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),xe.success("复制成功")}catch{xe.error("复制失败")}}}})(),jn=()=>{const o=window.innerHeight>window.innerWidth;ve(()=>{o&&me.classList.add("mobile")}),mo(()=>{me.classList.remove("mobile")})},In=o=>{const e=Math.floor((Date.now()-o)/1e3),t=Math.floor(e/31536e3);if(t>=1)return`${t} 年前`;const n=Math.floor(e/2592e3);if(n>=1)return`${n} 月前`;const i=Math.floor(e/86400);if(i>=1)return`${i} 天前`;const l=Math.floor(e/3600);if(l>=1)return`${l} 小时前`;const c=Math.floor(e/60);return c>=1?`${c} 分钟前`:"刚刚"},bn=()=>{},An=()=>bn,zn=(o,e)=>{const t={};return e.forEach(n=>{const i=o[n];i!==void 0&&(t[n]=i)}),t},yn=o=>(...e)=>o()(...e),xn=yn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),Cn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},wn=(o="")=>{const e=new Headers;return o.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(n){return n.startsWith(`
331
- `)?n.substring(1):n}).forEach(function(n){var c;let i=n.split(":"),l=(c=i.shift())==null?void 0:c.trim();if(l){let d=i.join(":").trim();try{e.append(l,d)}catch{}}}),e},kn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},Sn=async(o,e={},t={})=>{var a;const n=new Request(o,e).clone();if((a=n.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");const i=n.method.toUpperCase(),l=kn(n.url),c=new Headers(n.headers);new Headers(e.headers).forEach((s,u)=>{c.set(u,s)});let d=!1,r;return i!="GET"&&e.body&&(typeof e.body=="string"||e.body instanceof URLSearchParams?r=e.body:e.body instanceof FormData?(r=e.body,c.delete("content-type")):(d=!0,r=await n.blob())),new Promise((s,u)=>{var p;let v={method:i,url:l,headers:mn(c),data:r,binary:d,responseType:"blob",async onload(y){var P;let w;y.response instanceof Blob&&y.response.size==0||(w=(P=y.response)!=null?P:y.responseText),await K();const $=new Response(w,{status:y.status,statusText:y.statusText,headers:wn(y.responseHeaders)});Object.defineProperty($,"url",{value:y.finalUrl}),s($)},async onerror(){await K(),u(new TypeError("Network request onerror failed"))},async ontimeout(){await K(),u(new TypeError("Network request ontimeout failed"))},async onabort(){await K(),u(new DOMException("Aborted","AbortError"))},async onreadystatechange(y){var w;y.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",f))}};typeof t=="function"?v=t(v):v={...v,...t};const g=xn(v);function f(){g.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},En=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(bo(i))return fetch(o,{...e,mode:"cors"});if(Cn())return Sn(o,e);if(t!=null&&t.proxy){if(!i.href.startsWith("https://github.com/"))throw be.networkErrorDlgVisible=!0,new Error("proxy is not supported");const l=new URL("https://proxy.gkd.li");l.searchParams.set("proxyUrl",i.href);const c=new Request(o,e);return fetch(l,{method:c.method,headers:c.headers,body:c.body})}else throw be.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,An as b,Pn as c,$n as d,zn as e,Co as f,Cn as g,En as h,Ln as l,xe as m,Q as o,In as t,jn as u};
332
- //# sourceMappingURL=fetch-D2lrkdVo.js.map
330
+ `)])}const _e=R("n-notification-api"),dn=Object.assign(Object.assign({},T.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:"top-right"},keepAliveOnHover:Boolean}),fn=O({name:"NotificationProvider",props:dn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(g){const f=G(),p=()=>{i.add(f),n[f]&&n[f].hide()},y=X(Object.assign(Object.assign({},g),{key:f,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let $=!1,P=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),$=!0);break}P++}$||t.value.splice(P,1)}return t.value.push(y),y}const c=["info","success","warning","error"].map(g=>f=>l(Object.assign(Object.assign({},f),{type:g})));function d(g){i.delete(g),t.value.splice(t.value.findIndex(f=>f.key===g),1)}const r=T("Notification","-notification",cn,Ao,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:v},s=k(0);L(_e,a),L(J,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:s});function u(g){return l(g)}function v(){Object.values(t.value).forEach(g=>{g.hide()})}return Object.assign({mergedClsPrefix:e,notificationList:t,notificationRefs:n,handleAfterLeave:d},a)},render(){var o,e,t;const{placement:n}=this;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.notificationList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h(nn,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(ln,Object.assign({ref:l=>{const c=i.key;l===null?delete this.notificationRefs[c]:this.notificationRefs[c]=l}},Q(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function un(){const o=z(_e,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const hn=O({name:"InjectionExtractor",props:{onSetup:Function},setup(o,{slots:e}){var t;return(t=o.onSetup)===null||t===void 0||t.call(o),()=>{var n;return(n=e.default)===null||n===void 0?void 0:n.call(e)}}}),vn={message:Qo,notification:un,loadingBar:Ko,dialog:$o,modal:on};function gn({providersAndProps:o,configProviderProps:e}){let n=ho(()=>h(go,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(hn,{onSetup:()=>i[d]=vn[d]()})}))}));const i={app:n};let l;return vo&&(l=document.createElement("div"),document.body.appendChild(l),n.mount(l)),Object.assign({unmount:()=>{var d;if(n===null||l===null){po("discrete","unmount call no need because discrete app has been unmounted");return}n.unmount(),(d=l.parentNode)===null||d===void 0||d.removeChild(l),l=null,n=null}},i)}function pn(o,{configProviderProps:e,messageProviderProps:t,dialogProviderProps:n,notificationProviderProps:i,loadingBarProviderProps:l,modalProviderProps:c}={}){const d=[];return o.forEach(a=>{switch(a){case"message":d.push({type:a,Provider:Xo,props:t});break;case"notification":d.push({type:a,Provider:fn,props:i});break;case"dialog":d.push({type:a,Provider:Oo,props:n});break;case"loadingBar":d.push({type:a,Provider:To,props:l});break;case"modal":d.push({type:a,Provider:en,props:c})}}),gn({providersAndProps:d,configProviderProps:e})}const{message:xe,dialog:$n,loadingBar:Ln}=pn(["message","dialog","loadingBar"]),mn=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},K=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),Pn=(()=>{let o;return async e=>{if(e&&o!==e){o=e,K(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),xe.success("复制成功")}catch{xe.error("复制失败")}}}})(),jn=()=>{const o=window.innerHeight>window.innerWidth;ve(()=>{o&&me.classList.add("mobile")}),mo(()=>{me.classList.remove("mobile")})},An=o=>{const e=Math.floor((Date.now()-o)/1e3),t=Math.floor(e/31536e3);if(t>=1)return`${t} 年前`;const n=Math.floor(e/2592e3);if(n>=1)return`${n} 月前`;const i=Math.floor(e/86400);if(i>=1)return`${i} 天前`;const l=Math.floor(e/3600);if(l>=1)return`${l} 小时前`;const c=Math.floor(e/60);return c>=1?`${c} 分钟前`:"刚刚"},bn=()=>{},In=()=>bn,zn=(o,e)=>{const t={};return e.forEach(n=>{const i=o[n];i!==void 0&&(t[n]=i)}),t},yn=o=>(...e)=>o()(...e),xn=yn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),Cn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},wn=(o="")=>{const e=new Headers;return o.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(n){return n.startsWith(`
331
+ `)?n.substring(1):n}).forEach(function(n){var c;let i=n.split(":"),l=(c=i.shift())==null?void 0:c.trim();if(l){let d=i.join(":").trim();try{e.append(l,d)}catch{}}}),e},kn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},Sn=async(o,e={},t={})=>{var a;const n=new Request(o,e).clone();if((a=n.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");const i=n.method.toUpperCase(),l=kn(n.url),c=new Headers(n.headers);new Headers(e.headers).forEach((s,u)=>{c.set(u,s)});let d=!1,r;return i!="GET"&&e.body&&(typeof e.body=="string"||e.body instanceof URLSearchParams?r=e.body:e.body instanceof FormData?(r=e.body,c.delete("content-type")):(d=!0,r=await n.blob())),new Promise((s,u)=>{var p;let v={method:i,url:l,headers:mn(c),data:r,binary:d,responseType:"blob",async onload(y){var P;let w;y.response instanceof Blob&&y.response.size==0||(w=(P=y.response)!=null?P:y.responseText),await K();const $=new Response(w,{status:y.status,statusText:y.statusText,headers:wn(y.responseHeaders)});Object.defineProperty($,"url",{value:y.finalUrl}),s($)},async onerror(){await K(),u(new TypeError("Network request onerror failed"))},async ontimeout(){await K(),u(new TypeError("Network request ontimeout failed"))},async onabort(){await K(),u(new DOMException("Aborted","AbortError"))},async onreadystatechange(y){var w;y.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",f))}};typeof t=="function"?v=t(v):v={...v,...t};const g=xn(v);function f(){g.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},En=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(bo(i))return fetch(o,{...e,mode:"cors"});if(Cn())return Sn(o,e);if(t!=null&&t.proxy){if(!i.href.startsWith("https://github.com/"))throw be.networkErrorDlgVisible=!0,new Error("proxy is not supported");const l=new URL("https://proxy.gkd.li");l.searchParams.set("proxyUrl",i.href);const c=new Request(o,e);return fetch(l,{method:c.method,headers:c.headers,body:c.body})}else throw be.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,In as b,Pn as c,$n as d,zn as e,Co as f,Cn as g,En as h,Ln as l,xe as m,Q as o,An as t,jn as u};
332
+ //# sourceMappingURL=fetch-H6IWSOXO.js.map