@gkd-kit/inspect 0.0.1710253144890 → 0.0.1710850697824

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 (49) hide show
  1. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-DxrxVgmx.js +10 -0
  2. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-DxrxVgmx.js.map +1 -0
  3. package/dist/assets/DevicePage-30tvoqrB.js +49 -0
  4. package/dist/assets/{DevicePage-8y6PwxG_.js.map → DevicePage-30tvoqrB.js.map} +1 -1
  5. package/dist/assets/HomePage-eJtLYcmv.js +118 -0
  6. package/dist/assets/HomePage-eJtLYcmv.js.map +1 -0
  7. package/dist/assets/ImportPage-cSEpTPCi.js +2 -0
  8. package/dist/assets/{ImportPage-jUyDAJc-.js.map → ImportPage-cSEpTPCi.js.map} +1 -1
  9. package/dist/assets/PreviewSharePage-d6srwfbk.js +2 -0
  10. package/dist/assets/{PreviewSharePage-JMc9Z5jF.js.map → PreviewSharePage-d6srwfbk.js.map} +1 -1
  11. package/dist/assets/{SnapshotPage-NpyEVOg4.js → SnapshotPage-PSoYYF_e.js} +45 -45
  12. package/dist/assets/{SnapshotPage-NpyEVOg4.js.map → SnapshotPage-PSoYYF_e.js.map} +1 -1
  13. package/dist/assets/_404Page-goVLWaKu.js +2 -0
  14. package/dist/assets/{_404Page-1snJAWr3.js.map → _404Page-goVLWaKu.js.map} +1 -1
  15. package/dist/assets/{fetch-1ZnojkAa.js → fetch-f1EMEIPS.js} +51 -51
  16. package/dist/assets/{fetch-1ZnojkAa.js.map → fetch-f1EMEIPS.js.map} +1 -1
  17. package/dist/assets/import-JflgC1_9.js +2 -0
  18. package/dist/assets/{import-LfM7mOdo.js.map → import-JflgC1_9.js.map} +1 -1
  19. package/dist/assets/{index-TSXaa6pI.js → index-1cbtSmNg.js} +5 -5
  20. package/dist/assets/{index-TSXaa6pI.js.map → index-1cbtSmNg.js.map} +1 -1
  21. package/dist/assets/{index-_oiTH-3L.js → index-BdRAkoig.js} +2 -2
  22. package/dist/assets/{index-_oiTH-3L.js.map → index-BdRAkoig.js.map} +1 -1
  23. package/dist/assets/index-BgncsB-x.css +1 -0
  24. package/dist/assets/{index-6IG8gzJp.js → index-ECZlQVCf.js} +15 -15
  25. package/dist/assets/{index-6IG8gzJp.js.map → index-ECZlQVCf.js.map} +1 -1
  26. package/dist/assets/{storage-22y_emVV.js → index-oyQ3hIGc.js} +3 -3
  27. package/dist/assets/index-oyQ3hIGc.js.map +1 -0
  28. package/dist/assets/{jszip.min-IOLLVs65.js → jszip.min-Mj2Y-n2i.js} +2 -2
  29. package/dist/assets/{jszip.min-IOLLVs65.js.map → jszip.min-Mj2Y-n2i.js.map} +1 -1
  30. package/dist/assets/{node-HCHoNevK.js → node-p4c40F9Y.js} +8 -8
  31. package/dist/assets/{node-HCHoNevK.js.map → node-p4c40F9Y.js.map} +1 -1
  32. package/dist/assets/{polyfills-bJIXf7Td.js → polyfills-IaKwk_pZ.js} +1 -1
  33. package/dist/assets/{selector-iaRWDhco.js → selector-4702a7_7.js} +2 -2
  34. package/dist/assets/{selector-iaRWDhco.js.map → selector-4702a7_7.js.map} +1 -1
  35. package/dist/assets/{table-n9k-CoMZ.js → table-aIViuQEr.js} +77 -77
  36. package/dist/assets/{table-n9k-CoMZ.js.map → table-aIViuQEr.js.map} +1 -1
  37. package/dist/index.html +4 -4
  38. package/package.json +1 -1
  39. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-ZtZm3CdA.js +0 -10
  40. package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-ZtZm3CdA.js.map +0 -1
  41. package/dist/assets/DevicePage-8y6PwxG_.js +0 -49
  42. package/dist/assets/HomePage-vMBFuE2R.js +0 -17
  43. package/dist/assets/HomePage-vMBFuE2R.js.map +0 -1
  44. package/dist/assets/ImportPage-jUyDAJc-.js +0 -2
  45. package/dist/assets/PreviewSharePage-JMc9Z5jF.js +0 -2
  46. package/dist/assets/_404Page-1snJAWr3.js +0 -2
  47. package/dist/assets/import-LfM7mOdo.js +0 -2
  48. package/dist/assets/index-9_sTAR8f.css +0 -1
  49. package/dist/assets/storage-22y_emVV.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{h as p,B as e,E as r,M as c,J as l,au as d,av as _,H as t}from"./index-1cbtSmNg.js";const f={flex:"","flex-col":"","flex-items-center":"","w-100vw":"","pt-50px":"","gap-20px":""},u={key:0},m={key:1},k=p({__name:"_404Page",setup(h){var s;const n=_(),{fullPath:o}=(s=n.redirectedFrom)!=null?s:{};return(i,a)=>(t(),e("div",f,[r(o)?(t(),e("div",u,c("访问的地址 "+r(o)+" 不存在"),1)):(t(),e("div",m,"欢迎来到404页面")),l("a",{href:"/",onClick:a[0]||(a[0]=d(v=>i.$router.replace({path:"/"}),["prevent"]))}," 回到首页 ")]))}});export{k as default};
2
+ //# sourceMappingURL=_404Page-goVLWaKu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_404Page-1snJAWr3.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\n\nconst { fullPath } = route.redirectedFrom ?? {};\n</script>\n<template>\n <div flex flex-col flex-items-center w-100vw pt-50px gap-20px>\n <div v-if=\"fullPath\">{{ `访问的地址 ` + fullPath + ` 不存在` }}</div>\n <div v-else>欢迎来到404页面</div>\n <a href=\"/\" @click.prevent=\"$router.replace({ path: `/` })\"> 回到首页 </a>\n </div>\n</template>\n"],"names":["route","useRoute","fullPath","_a"],"mappings":"oPAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,GAAAC,EAAAH,EAAM,iBAAN,KAAAG,EAAwB,CAAA"}
1
+ {"version":3,"file":"_404Page-goVLWaKu.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\n\nconst { fullPath } = route.redirectedFrom ?? {};\n</script>\n<template>\n <div flex flex-col flex-items-center w-100vw pt-50px gap-20px>\n <div v-if=\"fullPath\">{{ `访问的地址 ` + fullPath + ` 不存在` }}</div>\n <div v-else>欢迎来到404页面</div>\n <a href=\"/\" @click.prevent=\"$router.replace({ path: `/` })\"> 回到首页 </a>\n </div>\n</template>\n"],"names":["route","useRoute","fullPath","_a"],"mappings":"oPAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,GAAAC,EAAAH,EAAM,iBAAN,KAAAG,EAAwB,CAAA"}
@@ -1,33 +1,33 @@
1
- import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,N as Ce,E as I,bX as we,bY as ce,bZ as de,b_ as Xe,b$ as Ge,F as W,V as X,r as G,X as z,Y as q,a2 as Ye,I as fe,a3 as Ze,M as E,x as m,c0 as Je,A as b,C as F,m as _,K as T,L as ue,S as Qe,T as eo,aE as ke,aj as N,aO as oo,ap as he,B as A,ae as no,H as Se,a8 as to,aa as B,aI as $e,a7 as R,a9 as io,$ as Oe,c1 as Ie,c2 as Le,c3 as je,c4 as Ae,k as ve,U as ro,c5 as so,w as ao,aH as lo,aL as co,af as fo,c6 as uo,ab as ho,e as pe,c7 as vo,aW as go,c8 as me,ak as po,at as mo}from"./index-TSXaa6pI.js";function Y(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(l=>{e.includes(l)||(n[l]=o[l])}),Object.assign(n,t)}const{cubicBezierEaseInOut:P,cubicBezierEaseOut:bo,cubicBezierEaseIn:xo}=qe;function yo({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[y(`&.fade-in-height-expand-transition-${a}-from,
2
- &.fade-in-height-expand-transition-${r}-to`,Object.assign(Object.assign({},l),{opacity:1})),y(`&.fade-in-height-expand-transition-${a}-to,
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})),y(`&.fade-in-height-expand-transition-${a}-active`,`
1
+ import{e as x,bT as qe,bU as De,h as $,r as k,o as h,bV as Ue,aO as xe,bW as Ve,I as Ce,X as I,bX as we,bY as ce,bZ as de,b_ as Xe,b$ as Ge,F as W,a4 as X,R as G,a6 as z,a7 as q,ac as Ze,c as fe,ad as Je,$ as E,b as m,c0 as Qe,f as b,u as F,l as B,j as T,m as ue,a1 as Ye,a2 as eo,aH as ke,am as N,aP as oo,as as he,d as j,i as no,Z as Se,N as to,ag as _,aK as $e,q as R,w as io,a9 as Oe,c1 as Ie,c2 as Le,c3 as Pe,c4 as je,P as ge,a3 as ro,c5 as so,A as ao,aJ as lo,aN as co,aj as fo,c6 as uo,ah as ho,E as pe,c7 as go,aX as vo,c8 as me,an as po,aw as mo}from"./index-1cbtSmNg.js";function Z(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:bo,cubicBezierEaseIn:yo}=qe;function xo({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
+ &.fade-in-height-expand-transition-${r}-to`,Object.assign(Object.assign({},l),{opacity:1})),x(`&.fade-in-height-expand-transition-${a}-to,
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} ${P} ${n},
6
+ max-height ${e} ${A} ${n},
7
7
  opacity ${e} ${bo} ${n},
8
- margin-top ${e} ${P} ${n},
9
- margin-bottom ${e} ${P} ${n},
10
- padding-top ${e} ${P} ${n},
11
- padding-bottom ${e} ${P} ${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}
12
12
  ${t?","+t:""}
13
- `),y(`&.fade-in-height-expand-transition-${r}-active`,`
13
+ `),x(`&.fade-in-height-expand-transition-${r}-active`,`
14
14
  overflow: ${o};
15
15
  transition:
16
- max-height ${e} ${P},
17
- opacity ${e} ${xo},
18
- margin-top ${e} ${P},
19
- margin-bottom ${e} ${P},
20
- padding-top ${e} ${P},
21
- padding-bottom ${e} ${P}
16
+ max-height ${e} ${A},
17
+ opacity ${e} ${yo},
18
+ margin-top ${e} ${A},
19
+ margin-bottom ${e} ${A},
20
+ padding-top ${e} ${A},
21
+ padding-bottom ${e} ${A}
22
22
  ${t?","+t:""}
23
- `)]}const Co=Object.assign(Object.assign({},De),{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}),wo=$({name:"DialogEnvironment",props:Object.assign(Object.assign({},Co),{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(Ce,{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(Ue,Object.assign({},ye(this.$props,Ve),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),ko={injectionKey:String,to:[String,Object]},So=$({name:"DialogProvider",props:ko,setup(){const o=k([]),e={};function t(d={}){const r=X(),a=G(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 I(we,c),I(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),I(Ge,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(wo,Y(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(we,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const Oo={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Io=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:x,lineHeight:w,fontSize:O}=o;return Object.assign(Object.assign({},Oo),{borderRadius:f,lineHeight:w,fontSize:O,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:x})},Lo=Ye({name:"Notification",common:fe,peers:{Scrollbar:Ze},self:Io}),jo=Lo,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"},Po=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})},zo={name:"Message",common:fe,self:Po},Ro=zo,Eo=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Mo={name:"LoadingBar",common:fe,self:Eo},Ho=Mo,Pe=E("n-loading-bar"),ze=E("n-loading-bar-api"),Bo=m("loading-bar-container",`
23
+ `)]}const Co=Object.assign(Object.assign({},De),{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}),wo=$({name:"DialogEnvironment",props:Object.assign(Object.assign({},Co),{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:g}=o;s&&s(u),g&&g()}function n(s){const{onPositiveClick:u}=o;u?Promise.resolve(u(s)).then(g=>{g!==!1&&r()}):r()}function i(s){const{onNegativeClick:u}=o;u?Promise.resolve(u(s)).then(g=>{g!==!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:g}=o;u&&(u(s),g&&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(Ce,{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(Ue,Object.assign({},xe(this.$props,Ve),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),ko={injectionKey:String,to:[String,Object]},So=$({name:"DialogProvider",props:ko,setup(){const o=k([]),e={};function t(d={}){const r=X(),a=G(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 I(we,c),I(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),I(Ge,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(wo,Z(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(we,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const Oo={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Io=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:g,textColor3:v,borderRadius:f,fontWeightStrong:p,boxShadow2:y,lineHeight:w,fontSize:O}=o;return Object.assign(Object.assign({},Oo),{borderRadius:f,lineHeight:w,fontSize:O,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:g,descriptionTextColor:v,actionTextColor:e,boxShadow:y})},Lo=Ze({name:"Notification",common:fe,peers:{Scrollbar:Je},self:Io}),Po=Lo,jo={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"},Ao=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:g,borderRadius:v,closeColorHover:f,closeColorPressed:p}=o;return Object.assign(Object.assign({},jo),{closeBorderRadius:v,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:g,borderRadius:v})},zo={name:"Message",common:fe,self:Ao},Ro=zo,Eo=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Mo={name:"LoadingBar",common:fe,self:Eo},Ho=Mo,Ae=E("n-loading-bar"),ze=E("n-loading-bar-api"),_o=m("loading-bar-container",`
24
24
  z-index: 5999;
25
25
  position: fixed;
26
26
  top: 0;
27
27
  left: 0;
28
28
  right: 0;
29
29
  height: 2px;
30
- `,[Je({enterDuration:"0.3s",leaveDuration:"0.8s"}),m("loading-bar",`
30
+ `,[Qe({enterDuration:"0.3s",leaveDuration:"0.8s"}),m("loading-bar",`
31
31
  width: 100%;
32
32
  transition:
33
33
  max-width 4s linear,
@@ -45,12 +45,12 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
45
45
  transition:
46
46
  max-width .2s linear,
47
47
  background .2s linear;
48
- `)])]);var D=function(o,e,t,n){function i(l){return l instanceof t?l:new t(function(c){c(l)})}return new(t||(t=Promise))(function(l,c){function d(s){try{a(n.next(s))}catch(u){c(u)}}function r(s){try{a(n.throw(s))}catch(u){c(u)}}function a(s){s.done?l(s.value):i(s.value).then(d,r)}a((n=n.apply(o,e||[])).next())})};function U(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const _o=$({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=z(Pe),n=k(null),i=k(!1),l=k(!1),c=k(!1),d=k(!1);let r=!1;const a=k(!1),s=_(()=>{const{loadingBarStyle:C}=e;return C?C[a.value?"error":"loading"]:""});function u(){return D(this,void 0,void 0,function*(){i.value=!1,c.value=!1,r=!1,a.value=!1,d.value=!0,yield N(),d.value=!1})}function v(C=0,M=80,H="starting"){return D(this,void 0,void 0,function*(){if(l.value=!0,yield u(),r)return;c.value=!0,yield N();const j=n.value;j&&(j.style.maxWidth=`${C}%`,j.style.transition="none",j.offsetWidth,j.className=U(H,t.value),j.style.transition="",j.style.maxWidth=`${M}%`)})}function g(){return D(this,void 0,void 0,function*(){if(r||a.value)return;l.value&&(yield N()),r=!0;const C=n.value;C&&(C.className=U("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1)})}function f(){if(!(r||a.value))if(!c.value)v(100,100,"error").then(()=>{a.value=!0;const C=n.value;C&&(C.className=U("error",t.value),C.offsetWidth,c.value=!1)});else{a.value=!0;const C=n.value;if(!C)return;C.className=U("error",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1}}function p(){i.value=!0}function x(){i.value=!1}function w(){return D(this,void 0,void 0,function*(){yield u()})}const O=T("LoadingBar","-loading-bar",Bo,Ho,e,t),L=_(()=>{const{self:{height:C,colorError:M,colorLoading:H}}=O.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":M}}),S=o?ue("loading-bar",void 0,L,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:l,loading:c,entering:i,transitionDisabled:d,start:v,error:f,finish:g,handleEnter:p,handleAfterEnter:x,handleAfterLeave:w,mergedLoadingBarStyle:s,cssVars:o?void 0:L,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return h(ke,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var e;return(e=this.onRender)===null||e===void 0||e.call(this),Qe(h("div",{class:[`${o}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},h("div",{ref:"loadingBarRef",class:[`${o}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[eo,this.loading||!this.loading&&this.entering]])}})}}),No=Object.assign(Object.assign({},T.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),Fo=$({name:"LoadingBarProvider",props:No,setup(o){const e=oo(),t=k(null),n={start(){var l;e.value?(l=t.value)===null||l===void 0||l.start():N(()=>{var c;(c=t.value)===null||c===void 0||c.start()})},error(){var l;e.value?(l=t.value)===null||l===void 0||l.error():N(()=>{var c;(c=t.value)===null||c===void 0||c.error()})},finish(){var l;e.value?(l=t.value)===null||l===void 0||l.finish():N(()=>{var c;(c=t.value)===null||c===void 0||c.finish()})}},{mergedClsPrefixRef:i}=F(o);return I(ze,n),I(Pe,{props:o,mergedClsPrefixRef:i}),Object.assign(n,{loadingBarRef:t})},render(){var o,e;return h(W,null,h(he,{disabled:this.to===!1,to:this.to||"body"},h(_o,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o))}});function To(){const o=z(ze,null);return o===null&&q("use-loading-bar","No outer <n-loading-bar-provider /> founded."),o}const Re={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},Ee=E("n-message-api"),Me=E("n-message-provider"),Ko=y([m("message-wrapper",`
48
+ `)])]);var D=function(o,e,t,n){function i(l){return l instanceof t?l:new t(function(c){c(l)})}return new(t||(t=Promise))(function(l,c){function d(s){try{a(n.next(s))}catch(u){c(u)}}function r(s){try{a(n.throw(s))}catch(u){c(u)}}function a(s){s.done?l(s.value):i(s.value).then(d,r)}a((n=n.apply(o,e||[])).next())})};function U(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const Bo=$({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=z(Ae),n=k(null),i=k(!1),l=k(!1),c=k(!1),d=k(!1);let r=!1;const a=k(!1),s=B(()=>{const{loadingBarStyle:C}=e;return C?C[a.value?"error":"loading"]:""});function u(){return D(this,void 0,void 0,function*(){i.value=!1,c.value=!1,r=!1,a.value=!1,d.value=!0,yield N(),d.value=!1})}function g(C=0,M=80,H="starting"){return D(this,void 0,void 0,function*(){if(l.value=!0,yield u(),r)return;c.value=!0,yield N();const P=n.value;P&&(P.style.maxWidth=`${C}%`,P.style.transition="none",P.offsetWidth,P.className=U(H,t.value),P.style.transition="",P.style.maxWidth=`${M}%`)})}function v(){return D(this,void 0,void 0,function*(){if(r||a.value)return;l.value&&(yield N()),r=!0;const C=n.value;C&&(C.className=U("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1)})}function f(){if(!(r||a.value))if(!c.value)g(100,100,"error").then(()=>{a.value=!0;const C=n.value;C&&(C.className=U("error",t.value),C.offsetWidth,c.value=!1)});else{a.value=!0;const C=n.value;if(!C)return;C.className=U("error",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1}}function p(){i.value=!0}function y(){i.value=!1}function w(){return D(this,void 0,void 0,function*(){yield u()})}const O=T("LoadingBar","-loading-bar",_o,Ho,e,t),L=B(()=>{const{self:{height:C,colorError:M,colorLoading:H}}=O.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":M}}),S=o?ue("loading-bar",void 0,L,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:l,loading:c,entering:i,transitionDisabled:d,start:g,error:f,finish:v,handleEnter:p,handleAfterEnter:y,handleAfterLeave:w,mergedLoadingBarStyle:s,cssVars:o?void 0:L,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return h(ke,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var e;return(e=this.onRender)===null||e===void 0||e.call(this),Ye(h("div",{class:[`${o}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},h("div",{ref:"loadingBarRef",class:[`${o}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[eo,this.loading||!this.loading&&this.entering]])}})}}),No=Object.assign(Object.assign({},T.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),Fo=$({name:"LoadingBarProvider",props:No,setup(o){const e=oo(),t=k(null),n={start(){var l;e.value?(l=t.value)===null||l===void 0||l.start():N(()=>{var c;(c=t.value)===null||c===void 0||c.start()})},error(){var l;e.value?(l=t.value)===null||l===void 0||l.error():N(()=>{var c;(c=t.value)===null||c===void 0||c.error()})},finish(){var l;e.value?(l=t.value)===null||l===void 0||l.finish():N(()=>{var c;(c=t.value)===null||c===void 0||c.finish()})}},{mergedClsPrefixRef:i}=F(o);return I(ze,n),I(Ae,{props:o,mergedClsPrefixRef:i}),Object.assign(n,{loadingBarRef:t})},render(){var o,e;return h(W,null,h(he,{disabled:this.to===!1,to:this.to||"body"},h(Bo,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o))}});function To(){const o=z(ze,null);return o===null&&q("use-loading-bar","No outer <n-loading-bar-provider /> founded."),o}const Re={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},Ee=E("n-message-api"),Me=E("n-message-provider"),Ko=x([m("message-wrapper",`
49
49
  margin: var(--n-margin);
50
50
  z-index: 0;
51
51
  transform-origin: top center;
52
52
  display: flex;
53
- `,[yo({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),m("message",`
53
+ `,[xo({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),m("message",`
54
54
  box-sizing: border-box;
55
55
  display: flex;
56
56
  align-items: center;
@@ -69,35 +69,35 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
69
69
  color: var(--n-text-color);
70
70
  background-color: var(--n-color);
71
71
  box-shadow: var(--n-box-shadow);
72
- `,[A("content",`
72
+ `,[j("content",`
73
73
  display: inline-block;
74
74
  line-height: var(--n-line-height);
75
75
  font-size: var(--n-font-size);
76
- `),A("icon",`
76
+ `),j("icon",`
77
77
  position: relative;
78
78
  margin: var(--n-icon-margin);
79
79
  height: var(--n-icon-size);
80
80
  width: var(--n-icon-size);
81
81
  font-size: var(--n-icon-size);
82
82
  flex-shrink: 0;
83
- `,[["default","info","success","warning","error","loading"].map(o=>b(`${o}-type`,[y("> *",`
83
+ `,[["default","info","success","warning","error","loading"].map(o=>b(`${o}-type`,[x("> *",`
84
84
  color: var(--n-icon-color-${o});
85
85
  transition: color .3s var(--n-bezier);
86
- `)])),y("> *",`
86
+ `)])),x("> *",`
87
87
  position: absolute;
88
88
  left: 0;
89
89
  top: 0;
90
90
  right: 0;
91
91
  bottom: 0;
92
- `,[no()])]),A("close",`
92
+ `,[no()])]),j("close",`
93
93
  margin: var(--n-close-margin);
94
94
  transition:
95
95
  background-color .3s var(--n-bezier),
96
96
  color .3s var(--n-bezier);
97
97
  flex-shrink: 0;
98
- `,[y("&:hover",`
98
+ `,[x("&:hover",`
99
99
  color: var(--n-close-icon-color-hover);
100
- `),y("&:active",`
100
+ `),x("&:active",`
101
101
  color: var(--n-close-icon-color-pressed);
102
102
  `)])]),m("message-container",`
103
103
  z-index: 6000;
@@ -138,20 +138,20 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
138
138
  right: 12px;
139
139
  justify-content: flex-end;
140
140
  align-items: flex-end;
141
- `)])]),Wo={info:()=>h(Ie,null),success:()=>h(Le,null),warning:()=>h(je,null),error:()=>h(Ae,null),default:()=>null},qo=$({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=z(Me),l=Se("Message",t,i),c=T("Message","-message",Ko,Ro,n,i),d=_(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:v,maxWidth:g,iconMargin:f,closeMargin:p,closeSize:x,iconSize:w,fontSize:O,lineHeight:L,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:j,iconColorLoading:J,closeIconSize:Q,closeBorderRadius:ee,[R("textColor",a)]:oe,[R("boxShadow",a)]:ne,[R("color",a)]:te,[R("closeColorHover",a)]:ie,[R("closeColorPressed",a)]:re,[R("closeIconColor",a)]:se,[R("closeIconColorPressed",a)]:ae,[R("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":v,"--n-padding":u,"--n-max-width":g,"--n-font-size":O,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Q,"--n-close-border-radius":ee,"--n-close-size":x,"--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":J,"--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":L,"--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=Do(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(to,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 Do(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(io,{clsPrefix:t,strokeWidth:24,scale:.85}):Wo[e]();return n?h(Oe,{clsPrefix:t,key:e},{default:()=>n}):null}}const Uo=$({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(ro,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(qo,{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]})}}),Vo=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=$({name:"MessageProvider",props:Vo,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};I(Me,{props:o,mergedClsPrefixRef:e}),I(Ee,i);function l(r,a){const s=X(),u=G(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(Uo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Y(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 Go(){const o=z(Ee,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 Yo=$({name:"ModalEnvironment",props:Object.assign(Object.assign({},so),{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(Ce,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),be=E("n-modal-provider"),He=E("n-modal-api"),Zo=E("n-modal-reactive-list"),Jo={to:[String,Object]},Qo=$({name:"ModalProvider",props:Jo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=X(),s=G(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 I(He,d),I(be,{clickedRef:ce(64),clickedPositionRef:de()}),I(Zo,t),I(be,{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(Yo,Y(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 en(){const o=z(He,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const Z=E("n-notification-provider"),on=$({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=z(Z),n=k(null);return ao(()=>{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(lo,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),nn={info:()=>h(Ie,null),success:()=>h(Le,null),warning:()=>h(je,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},tn=co(ge),rn=$({name:"Notification",props:ge,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=z(Z),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Se("Notification",l,e),d=_(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:v,closeIconColorHover:g,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:x,actionTextColor:w,borderRadius:O,headerFontWeight:L,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:j,width:J,padding:Q,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[R("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:_e,cubicBezierEaseInOut:Ne}}=t.value,{left:Fe,right:Te,top:Ke,bottom:We}=fo(Q);return{"--n-color":s,"--n-font-size":M,"--n-text-color":u,"--n-description-text-color":x,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":L,"--n-bezier":Ne,"--n-bezier-ease-out":le,"--n-bezier-ease-in":_e,"--n-border-radius":O,"--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":J,"--n-padding-left":Fe,"--n-padding-right":Te,"--n-padding-top":Ke,"--n-padding-bottom":We,"--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(Oe,{clsPrefix:e},{default:()=>nn[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)))}}),sn=Object.assign(Object.assign({},ge),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),an=$({name:"NotificationEnvironment",props:Object.assign(Object.assign({},sn),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=z(Z),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:x}=o;p&&p(),x&&x()}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:x,internalKey:w}=o;f&&f(),p(w),x&&x()}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(ke,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(rn,Object.assign({},ye(this.$props,tn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),ln=y([m("notification-container",`
141
+ `)])]),Wo={info:()=>h(Ie,null),success:()=>h(Le,null),warning:()=>h(Pe,null),error:()=>h(je,null),default:()=>null},qo=$({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=z(Me),l=Se("Message",t,i),c=T("Message","-message",Ko,Ro,n,i),d=B(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:g,maxWidth:v,iconMargin:f,closeMargin:p,closeSize:y,iconSize:w,fontSize:O,lineHeight:L,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:P,iconColorLoading:Q,closeIconSize:Y,closeBorderRadius:ee,[R("textColor",a)]:oe,[R("boxShadow",a)]:ne,[R("color",a)]:te,[R("closeColorHover",a)]:ie,[R("closeColorPressed",a)]:re,[R("closeIconColor",a)]:se,[R("closeIconColorPressed",a)]:ae,[R("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":g,"--n-padding":u,"--n-max-width":v,"--n-font-size":O,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Y,"--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":P,"--n-icon-color-loading":Q,"--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":L,"--n-border-radius":S}}),r=e?ue("message",B(()=>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=Do(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(to,null,{default:()=>u})):null,h("div",{class:`${i}-message__content`},_(n)),t?h($e,{clsPrefix:i,class:`${i}-message__close`,onClick:a,absolute:!0}):null))}});function Do(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(io,{clsPrefix:t,strokeWidth:24,scale:.85}):Wo[e]();return n?h(Oe,{clsPrefix:t,key:e},{default:()=>n}):null}}const Uo=$({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);ge(()=>{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:g,internalKey:v}=o;s&&s(),u&&u(v),g&&g()}function a(){c()}return{show:t,hide:c,handleClose:d,handleAfterLeave:r,handleMouseleave:l,handleMouseenter:i,deactivate:a}},render(){return h(ro,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(qo,{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]})}}),Vo=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=$({name:"MessageProvider",props:Vo,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};I(Me,{props:o,mergedClsPrefixRef:e}),I(Ee,i);function l(r,a){const s=X(),u=G(Object.assign(Object.assign({},a),{content:r,key:s,destroy:()=>{var v;(v=n.value[s])===null||v===void 0||v.hide()}})),{max:g}=o;return g&&t.value.length>=g&&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(Uo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Z(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 Go(){const o=z(Ee,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 Zo=$({name:"ModalEnvironment",props:Object.assign(Object.assign({},so),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:g}=o;s&&s(u),g&&g()}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:g}=o;u&&(u(s),g&&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(Ce,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),be=E("n-modal-provider"),He=E("n-modal-api"),Jo=E("n-modal-reactive-list"),Qo={to:[String,Object]},Yo=$({name:"ModalProvider",props:Qo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=X(),s=G(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 I(He,d),I(be,{clickedRef:ce(64),clickedPositionRef:de()}),I(Jo,t),I(be,{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(Zo,Z(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 en(){const o=z(He,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const J=E("n-notification-provider"),on=$({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 ao(()=>{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(lo,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),nn={info:()=>h(Ie,null),success:()=>h(Le,null),warning:()=>h(Pe,null),error:()=>h(je,null),default:()=>null},ve={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},tn=co(ve),rn=$({name:"Notification",props:ve,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=z(J),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Se("Notification",l,e),d=B(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:g,closeIconColorHover:v,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:y,actionTextColor:w,borderRadius:O,headerFontWeight:L,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:P,width:Q,padding:Y,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[R("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:Be,cubicBezierEaseInOut:Ne}}=t.value,{left:Fe,right:Te,top:Ke,bottom:We}=fo(Y);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":L,"--n-bezier":Ne,"--n-bezier-ease-out":le,"--n-bezier-ease-in":Be,"--n-border-radius":O,"--n-box-shadow":S,"--n-close-border-radius":oe,"--n-close-color-hover":ne,"--n-close-color-pressed":te,"--n-close-icon-color":g,"--n-close-icon-color-hover":v,"--n-close-icon-color-pressed":f,"--n-line-height":C,"--n-icon-color":ae,"--n-close-margin":H,"--n-close-size":P,"--n-close-icon-size":ee,"--n-width":Q,"--n-padding-left":Fe,"--n-padding-right":Te,"--n-padding-top":Ke,"--n-padding-bottom":We,"--n-title-font-size":ie,"--n-meta-font-size":re,"--n-description-font-size":se}}),r=i?ue("notification",B(()=>o.type[0]),d,n):void 0;return{mergedClsPrefix:e,showAvatar:B(()=>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?_(this.avatar):this.type!=="default"?h(Oe,{clsPrefix:e},{default:()=>nn[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`},_(this.title)):null,this.description?h("div",{class:`${e}-notification-main__description`},_(this.description)):null,this.content?h("pre",{class:`${e}-notification-main__content`},_(this.content)):null,this.meta||this.action?h("div",{class:`${e}-notification-main-footer`},this.meta?h("div",{class:`${e}-notification-main-footer__meta`},_(this.meta)):null,this.action?h("div",{class:`${e}-notification-main-footer__action`},_(this.action)):null):null)))}}),sn=Object.assign(Object.assign({},ve),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),an=$({name:"NotificationEnvironment",props:Object.assign(Object.assign({},sn),{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 g(f){f.currentTarget===f.target&&s()}function v(){const{onClose:f}=o;f?Promise.resolve(f()).then(p=>{p!==!1&&i()}):i()}return ge(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:v,handleAfterLeave:a,handleLeave:r,handleBeforeLeave:d,handleAfterEnter:c,handleBeforeEnter:l,handleMouseenter:u,handleMouseleave:g}},render(){return h(ke,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(rn,Object.assign({},xe(this.$props,tn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),ln=x([m("notification-container",`
142
142
  z-index: 4000;
143
143
  position: fixed;
144
144
  overflow: visible;
145
145
  display: flex;
146
146
  flex-direction: column;
147
147
  align-items: flex-end;
148
- `,[y(">",[m("scrollbar",`
148
+ `,[x(">",[m("scrollbar",`
149
149
  width: initial;
150
150
  overflow: visible;
151
151
  height: -moz-fit-content !important;
152
152
  height: fit-content !important;
153
153
  max-height: 100vh !important;
154
- `,[y(">",[m("scrollbar-container",`
154
+ `,[x(">",[m("scrollbar-container",`
155
155
  height: -moz-fit-content !important;
156
156
  height: fit-content !important;
157
157
  max-height: 100vh !important;
@@ -160,11 +160,11 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
160
160
  padding-bottom: 33px;
161
161
  `)])])])]),b("top, top-right, top-left",`
162
162
  top: 12px;
163
- `,[y("&.transitioning >",[m("scrollbar",[y(">",[m("scrollbar-container",`
163
+ `,[x("&.transitioning >",[m("scrollbar",[x(">",[m("scrollbar-container",`
164
164
  min-height: 100vh !important;
165
165
  `)])])])]),b("bottom, bottom-right, bottom-left",`
166
166
  bottom: 12px;
167
- `,[y(">",[m("scrollbar",[y(">",[m("scrollbar-container",[m("scrollbar-content",`
167
+ `,[x(">",[m("scrollbar",[x(">",[m("scrollbar-container",[m("scrollbar-content",`
168
168
  padding-bottom: 12px;
169
169
  `)])])])]),m("notification-wrapper",`
170
170
  display: flex;
@@ -174,9 +174,9 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
174
174
  `)]),b("top, bottom",`
175
175
  left: 50%;
176
176
  transform: translateX(-50%);
177
- `,[m("notification-wrapper",[y("&.notification-transition-enter-from, &.notification-transition-leave-to",`
177
+ `,[m("notification-wrapper",[x("&.notification-transition-enter-from, &.notification-transition-leave-to",`
178
178
  transform: scale(0.85);
179
- `),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
179
+ `),x("&.notification-transition-leave-from, &.notification-transition-enter-to",`
180
180
  transform: scale(1);
181
181
  `)])]),b("top",[m("notification-wrapper",`
182
182
  transform-origin: top center;
@@ -206,13 +206,13 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
206
206
  bottom: 0;
207
207
  `)]),m("notification-wrapper",`
208
208
  margin-bottom: 12px;
209
- `,[y("&.notification-transition-enter-from, &.notification-transition-leave-to",`
209
+ `,[x("&.notification-transition-enter-from, &.notification-transition-leave-to",`
210
210
  opacity: 0;
211
211
  margin-top: 0 !important;
212
212
  margin-bottom: 0 !important;
213
- `),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
213
+ `),x("&.notification-transition-leave-from, &.notification-transition-enter-to",`
214
214
  opacity: 1;
215
- `),y("&.notification-transition-leave-active",`
215
+ `),x("&.notification-transition-leave-active",`
216
216
  transition:
217
217
  background-color .3s var(--n-bezier),
218
218
  color .3s var(--n-bezier),
@@ -222,7 +222,7 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
222
222
  margin-top .3s linear,
223
223
  margin-bottom .3s linear,
224
224
  box-shadow .3s var(--n-bezier);
225
- `),y("&.notification-transition-enter-active",`
225
+ `),x("&.notification-transition-enter-active",`
226
226
  transition:
227
227
  background-color .3s var(--n-bezier),
228
228
  color .3s var(--n-bezier),
@@ -255,16 +255,16 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
255
255
  box-shadow: var(--n-box-shadow);
256
256
  box-sizing: border-box;
257
257
  opacity: 1;
258
- `,[A("avatar",[m("icon",`
258
+ `,[j("avatar",[m("icon",`
259
259
  color: var(--n-icon-color);
260
260
  `),m("base-icon",`
261
261
  color: var(--n-icon-color);
262
262
  `)]),b("show-avatar",[m("notification-main",`
263
263
  margin-left: 40px;
264
264
  width: calc(100% - 40px);
265
- `)]),b("closable",[m("notification-main",[y("> *:first-child",`
265
+ `)]),b("closable",[m("notification-main",[x("> *:first-child",`
266
266
  padding-right: 20px;
267
- `)]),A("close",`
267
+ `)]),j("close",`
268
268
  position: absolute;
269
269
  top: 0;
270
270
  right: 0;
@@ -272,7 +272,7 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
272
272
  transition:
273
273
  background-color .3s var(--n-bezier),
274
274
  color .3s var(--n-bezier);
275
- `)]),A("avatar",`
275
+ `)]),j("avatar",`
276
276
  position: absolute;
277
277
  top: var(--n-padding-top);
278
278
  left: var(--n-padding-left);
@@ -295,27 +295,27 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
295
295
  align-items: center;
296
296
  justify-content: space-between;
297
297
  margin-top: 12px;
298
- `,[A("meta",`
298
+ `,[j("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
- `),A("action",`
302
+ `),j("action",`
303
303
  cursor: pointer;
304
304
  transition: color .3s var(--n-bezier-ease-out);
305
305
  color: var(--n-action-text-color);
306
- `)]),A("header",`
306
+ `)]),j("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
- `),A("description",`
311
+ `),j("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
- `),A("content",`
318
+ `),j("content",`
319
319
  line-height: var(--n-line-height);
320
320
  margin: 12px 0 0 0;
321
321
  font-family: inherit;
@@ -323,10 +323,10 @@ import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,
323
323
  word-wrap: break-word;
324
324
  transition: color .3s var(--n-bezier-ease-out);
325
325
  color: var(--n-text-color);
326
- `,[y("&:first-child","margin: 0;")])])])])]);function V(o){const t=o.split("-")[1]==="left"?"calc(-100%)":"calc(100%)";return m("notification-wrapper",[y("&.notification-transition-enter-from, &.notification-transition-leave-to",`
326
+ `,[x("&:first-child","margin: 0;")])])])])]);function V(o){const t=o.split("-")[1]==="left"?"calc(-100%)":"calc(100%)";return m("notification-wrapper",[x("&.notification-transition-enter-from, &.notification-transition-leave-to",`
327
327
  transform: translate(${t}, 0);
328
- `),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
328
+ `),x("&.notification-transition-leave-from, &.notification-transition-enter-to",`
329
329
  transform: translate(0, 0);
330
- `)])}const Be=E("n-notification-api"),cn=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}),dn=$({name:"NotificationProvider",props:cn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(g){const f=X(),p=()=>{i.add(f),n[f]&&n[f].hide()},x=G(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 O=!1,L=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),O=!0);break}L++}O||t.value.splice(L,1)}return t.value.push(x),x}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",ln,jo,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:v},s=k(0);I(Be,a),I(Z,{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(on,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(an,Object.assign({ref:l=>{const c=i.key;l===null?delete this.notificationRefs[c]:this.notificationRefs[c]=l}},Y(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function fn(){const o=z(Be,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const un=$({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)}}}),hn={message:Go,notification:fn,loadingBar:To,dialog:$o,modal:en};function vn({providersAndProps:o,configProviderProps:e}){let n=uo(()=>h(vo,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(un,{onSetup:()=>i[d]=hn[d]()})}))}));const i={app:n};let l;return ho&&(l=document.createElement("div"),document.body.appendChild(l),n.mount(l)),Object.assign({unmount:()=>{var d;if(n===null||l===null){go("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 gn(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:dn,props:i});break;case"dialog":d.push({type:a,Provider:So,props:n});break;case"loadingBar":d.push({type:a,Provider:Fo,props:l});break;case"modal":d.push({type:a,Provider:Qo,props:c})}}),vn({providersAndProps:d,configProviderProps:e})}const{message:xe,dialog:Ln,loadingBar:jn}=gn(["message","dialog","loadingBar"]),An=(...o)=>{const e=new FormData;return o.forEach(t=>{for(const n in t){const i=t[n];i!==void 0&&(i instanceof File?e.append(n,i,i.name):i instanceof Blob?e.append(n,i):e.append(n,String(i)))}}),e},pn=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(o!==e){o=e,K(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),xe.success("复制成功")}catch{xe.error("复制失败")}}}})(),zn=()=>{const o=window.innerHeight>window.innerWidth;ve(()=>{o&&me.classList.add("mobile")}),po(()=>{me.classList.remove("mobile")})},Rn=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} 分钟前`:"刚刚"},mn=o=>(...e)=>o()(...e),bn=mn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),xn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},yn=(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},Cn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},wn=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=Cn(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:pn(c),data:r,binary:d,responseType:"blob",async onload(x){var L;let w;x.response instanceof Blob&&x.response.size==0||(w=(L=x.response)!=null?L:x.responseText),await K();const O=new Response(w,{status:x.status,statusText:x.statusText,headers:yn(x.responseHeaders)});Object.defineProperty(O,"url",{value:x.finalUrl}),s(O)},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(x){var w;x.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",f))}};typeof t=="function"?v=t(v):v={...v,...t};const g=bn(v);function f(){g.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},kn=new Set([location.origin,"https://cdn.jsdelivr.net","https://fastly.jsdelivr.net","https://raw.githubusercontent.com","https://gist.githubusercontent.com","https://raw.githubusercontents.com","https://raw.gitmirror.com","https://registry.npmmirror.com"]),Sn=o=>(o=new URL(o),o.hostname=="127.0.0.1"||o.hostname=="localhost"||location.protocol=="http:"&&o.protocol=="http:"&&o.hostname.split(".").every(e=>Number.isSafeInteger(parseInt(e)))?!0:kn.has(o.origin)),$n=/^https:\/\/github\.com\/gkd-kit\/inspect\/files\/([0-9]+)\/file\.zip$/,On=/^https:\/\/github\.com\/gkd-kit\/inspect\/assets\/([0-9]+)\/([0-9a-z-]+)$/,En=(o,e)=>{e=e.toString();const{1:t}=e.match($n)||[],{1:n,2:i}=e.match(On)||[];if(t)return location.origin+o.resolve({path:`/i/${t}`}).href;if(n&&i)return`https://m.gkd.li/${n}/${i}`;throw new Error(`github url ${e} should come from gkd-kit/inspect files/assets`)},Mn=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(Sn(i))return fetch(o,{...e,mode:"cors"});if(xn())return wn(o,e);if(t!=null&&t.proxy){const l=new URL("https://proxy-workers.lisonge.workers.dev/");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 mo.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,xn as b,Pn as c,Ln as d,Mn as e,yo as f,En as g,$n as h,On as i,Y as j,jn as l,xe as m,An as o,Rn as t,zn as u};
332
- //# sourceMappingURL=fetch-1ZnojkAa.js.map
330
+ `)])}const _e=E("n-notification-api"),cn=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}),dn=$({name:"NotificationProvider",props:cn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(v){const f=X(),p=()=>{i.add(f),n[f]&&n[f].hide()},y=G(Object.assign(Object.assign({},v),{key:f,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let O=!1,L=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),O=!0);break}L++}O||t.value.splice(L,1)}return t.value.push(y),y}const c=["info","success","warning","error"].map(v=>f=>l(Object.assign(Object.assign({},f),{type:v})));function d(v){i.delete(v),t.value.splice(t.value.findIndex(f=>f.key===v),1)}const r=T("Notification","-notification",ln,Po,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:g},s=k(0);I(_e,a),I(J,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:s});function u(v){return l(v)}function g(){Object.values(t.value).forEach(v=>{v.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(on,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(an,Object.assign({ref:l=>{const c=i.key;l===null?delete this.notificationRefs[c]:this.notificationRefs[c]=l}},Z(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function fn(){const o=z(_e,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const un=$({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)}}}),hn={message:Go,notification:fn,loadingBar:To,dialog:$o,modal:en};function gn({providersAndProps:o,configProviderProps:e}){let n=uo(()=>h(go,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(un,{onSetup:()=>i[d]=hn[d]()})}))}));const i={app:n};let l;return ho&&(l=document.createElement("div"),document.body.appendChild(l),n.mount(l)),Object.assign({unmount:()=>{var d;if(n===null||l===null){vo("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 vn(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:dn,props:i});break;case"dialog":d.push({type:a,Provider:So,props:n});break;case"loadingBar":d.push({type:a,Provider:Fo,props:l});break;case"modal":d.push({type:a,Provider:Yo,props:c})}}),gn({providersAndProps:d,configProviderProps:e})}const{message:ye,dialog:Ln,loadingBar:Pn}=vn(["message","dialog","loadingBar"]),jn=(...o)=>{const e=new FormData;return o.forEach(t=>{for(const n in t){const i=t[n];i!==void 0&&(i instanceof File?e.append(n,i,i.name):i instanceof Blob?e.append(n,i):e.append(n,String(i)))}}),e},pn=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},K=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),An=(()=>{let o;return async e=>{if(o!==e){o=e,K(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),ye.success("复制成功")}catch{ye.error("复制失败")}}}})(),zn=()=>{const o=window.innerHeight>window.innerWidth;ge(()=>{o&&me.classList.add("mobile")}),po(()=>{me.classList.remove("mobile")})},Rn=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} 分钟前`:"刚刚"},mn=o=>(...e)=>o()(...e),bn=mn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),yn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},xn=(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},Cn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},wn=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=Cn(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 g={method:i,url:l,headers:pn(c),data:r,binary:d,responseType:"blob",async onload(y){var L;let w;y.response instanceof Blob&&y.response.size==0||(w=(L=y.response)!=null?L:y.responseText),await K();const O=new Response(w,{status:y.status,statusText:y.statusText,headers:xn(y.responseHeaders)});Object.defineProperty(O,"url",{value:y.finalUrl}),s(O)},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"?g=t(g):g={...g,...t};const v=bn(g);function f(){v.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},kn=new Set([location.origin,"https://cdn.jsdelivr.net","https://fastly.jsdelivr.net","https://raw.githubusercontent.com","https://gist.githubusercontent.com","https://raw.githubusercontents.com","https://raw.gitmirror.com","https://registry.npmmirror.com"]),Sn=o=>(o=new URL(o),o.hostname=="127.0.0.1"||o.hostname=="localhost"||location.protocol=="http:"&&o.protocol=="http:"&&o.hostname.split(".").every(e=>Number.isSafeInteger(parseInt(e)))?!0:kn.has(o.origin)),$n=/^https:\/\/github\.com\/gkd-kit\/inspect\/files\/([0-9]+)\/file\.zip$/,On=/^https:\/\/github\.com\/gkd-kit\/inspect\/assets\/([0-9]+)\/([0-9a-z-]+)$/,En=(o,e)=>{e=e.toString();const{1:t}=e.match($n)||[],{1:n,2:i}=e.match(On)||[];if(t)return location.origin+o.resolve({path:`/i/${t}`}).href;if(n&&i)return`https://m.gkd.li/${n}/${i}`;throw new Error(`github url ${e} should come from gkd-kit/inspect files/assets`)},Mn=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(Sn(i))return fetch(o,{...e,mode:"cors"});if(yn())return wn(o,e);if(t!=null&&t.proxy){const l=new URL("https://proxy-workers.lisonge.workers.dev/");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 mo.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,yn as b,An as c,Ln as d,Mn as e,xo as f,En as g,$n as h,On as i,Z as j,Pn as l,ye as m,jn as o,Rn as t,zn as u};
332
+ //# sourceMappingURL=fetch-f1EMEIPS.js.map