@gkd-kit/inspect 0.0.1705395021849 → 0.0.1705399241392

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 (40) hide show
  1. package/dist/404.html +4 -4
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-MxVm1qJ6.js → ActionCard.vue_vue_type_script_setup_true_lang-onmf8SOt.js} +2 -2
  3. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-MxVm1qJ6.js.map → ActionCard.vue_vue_type_script_setup_true_lang-onmf8SOt.js.map} +1 -1
  4. package/dist/assets/{DevicePage-ANrTSpKB.js → DevicePage-qdHlVQAG.js} +2 -2
  5. package/dist/assets/{DevicePage-ANrTSpKB.js.map → DevicePage-qdHlVQAG.js.map} +1 -1
  6. package/dist/assets/{HomePage-shuFNDTs.js → HomePage-k4e2rjaX.js} +2 -2
  7. package/dist/assets/{HomePage-shuFNDTs.js.map → HomePage-k4e2rjaX.js.map} +1 -1
  8. package/dist/assets/{ImportPage-a0IXiiyI.js → ImportPage-2rZjHjTN.js} +2 -2
  9. package/dist/assets/{ImportPage-a0IXiiyI.js.map → ImportPage-2rZjHjTN.js.map} +1 -1
  10. package/dist/assets/SnapshotPage-frbpAJdb.js +939 -0
  11. package/dist/assets/SnapshotPage-frbpAJdb.js.map +1 -0
  12. package/dist/assets/{_404Page-adrF0wP9.js → _404Page-eCQEDLR6.js} +2 -2
  13. package/dist/assets/{_404Page-adrF0wP9.js.map → _404Page-eCQEDLR6.js.map} +1 -1
  14. package/dist/assets/{import-STuiqlWA.js → import-gpcsijcI.js} +2 -2
  15. package/dist/assets/{import-STuiqlWA.js.map → import-gpcsijcI.js.map} +1 -1
  16. package/dist/assets/{index-2lpaJ3oP.js → index-5ac1izEA.js} +2 -2
  17. package/dist/assets/index-5ac1izEA.js.map +1 -0
  18. package/dist/assets/index-nrjVGxwc.js +481 -0
  19. package/dist/assets/index-nrjVGxwc.js.map +1 -0
  20. package/dist/assets/{jszip.min-E6SJLk2G.js → jszip.min-NaLTaeHV.js} +2 -2
  21. package/dist/assets/{jszip.min-E6SJLk2G.js.map → jszip.min-NaLTaeHV.js.map} +1 -1
  22. package/dist/assets/node-0_kGEJr2.js +732 -0
  23. package/dist/assets/node-0_kGEJr2.js.map +1 -0
  24. package/dist/assets/{polyfills--x1z37Pa.js → polyfills-_CT_jwAS.js} +1 -1
  25. package/dist/assets/{storage-EDfg8aGG.js → storage-nZi3aq32.js} +12 -5
  26. package/dist/assets/storage-nZi3aq32.js.map +1 -0
  27. package/dist/assets/table-ZRIBl1NF.js +970 -0
  28. package/dist/assets/table-ZRIBl1NF.js.map +1 -0
  29. package/dist/index.html +4 -4
  30. package/package.json +11 -11
  31. package/dist/assets/SnapshotPage-naUSnZDW.js +0 -940
  32. package/dist/assets/SnapshotPage-naUSnZDW.js.map +0 -1
  33. package/dist/assets/index-2lpaJ3oP.js.map +0 -1
  34. package/dist/assets/index-bbwDlPDZ.js +0 -560
  35. package/dist/assets/index-bbwDlPDZ.js.map +0 -1
  36. package/dist/assets/node-q9ka8goX.js +0 -732
  37. package/dist/assets/node-q9ka8goX.js.map +0 -1
  38. package/dist/assets/storage-EDfg8aGG.js.map +0 -1
  39. package/dist/assets/table--d2SuAL4.js +0 -966
  40. package/dist/assets/table--d2SuAL4.js.map +0 -1
@@ -1,966 +0,0 @@
1
- import{H as j,e as Ge,r as Nn,av as Ln,aw as En,ax as Ot,ay as nt,az as Kn,aA as ct,d as he,aB as Hn,aa as Tt,ai as rt,p as i,al as Dn,aC as mo,a0 as dt,G as at,a1 as qo,V as Te,U as De,a8 as Ye,Y as Ve,aD as Bt,q as R,z as ae,y as W,x as ne,v as Ue,aE as $t,I as Ae,O as le,c as C,C as qe,J as lt,aF as kt,a7 as lo,aG as so,af as It,ag as Rt,a5 as ce,ae as Qt,a2 as ye,A as ot,E as Go,aH as jn,K as ft,L as ie,aI as xo,w as ut,aJ as Un,F as st,aK as Wn,aL as Xo,aM as Vn,aN as qn,P as Zo,Q as Gn,aO as yo,aP as Xn,aQ as Zn,aR as Jn,$ as $e,aS as Qn,B as Yn,aT as Pt,k as Co,aU as Jo,aV as ro,aW as er,aX as tr,ah as or,ac as Ct,a6 as nr,aj as rr,aY as ir,aZ as ar,ab as lr,ad as xt,a3 as sr,a4 as dr,T as cr,a as io,b as ur}from"./index-bbwDlPDZ.js";import{z as fr,A as hr,g as Qo,B as co,V as Yo,l as vr,i as tt,D as pr,m as en,E as At,F as gr,b as _t,j as Nt,G as Ft,e as it,H as uo,I as br,J as zt,K as tn,L as on,M as nn,O as mr,N as wo,f as xr,P as yr,Q as Cr,R as wr,S as Sr,o as fo,T as Rr,U as kr,W as Xe,X as Pr,h as ho,r as Fr,q as rn,d as zr,C as an,Y as Mr,Z as Or,_ as So,$ as Ro,t as Tr,v as ko}from"./node-q9ka8goX.js";import{y as ln}from"./storage-EDfg8aGG.js";function Po(e){switch(e){case"tiny":return"mini";case"small":return"tiny";case"medium":return"small";case"large":return"medium";case"huge":return"large"}throw Error(`${e} has no smaller size.`)}function Br(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function sn(e){return t=>{t?e.value=t.$el:e.value=null}}function wt(e){const t=e.filter(o=>o!==void 0);if(t.length!==0)return t.length===1?t[0]:o=>{e.forEach(n=>{n&&n(o)})}}function $r(e,t,o){if(!t)return e;const n=j(e.value);let r=null;return Ge(e,a=>{r!==null&&window.clearTimeout(r),a===!0?o&&!o.value?n.value=!0:r=window.setTimeout(()=>{n.value=!0},t):n.value=!1}),n}function Ir(e={},t){const o=Nn({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:n,keyup:r}=e,a=s=>{switch(s.key){case"Control":o.ctrl=!0;break;case"Meta":o.command=!0,o.win=!0;break;case"Shift":o.shift=!0;break;case"Tab":o.tab=!0;break}n!==void 0&&Object.keys(n).forEach(u=>{if(u!==s.key)return;const v=n[u];if(typeof v=="function")v(s);else{const{stop:p=!1,prevent:x=!1}=v;p&&s.stopPropagation(),x&&s.preventDefault(),v.handler(s)}})},d=s=>{switch(s.key){case"Control":o.ctrl=!1;break;case"Meta":o.command=!1,o.win=!1;break;case"Shift":o.shift=!1;break;case"Tab":o.tab=!1;break}r!==void 0&&Object.keys(r).forEach(u=>{if(u!==s.key)return;const v=r[u];if(typeof v=="function")v(s);else{const{stop:p=!1,prevent:x=!1}=v;p&&s.stopPropagation(),x&&s.preventDefault(),v.handler(s)}})},l=()=>{(t===void 0||t.value)&&(ct("keydown",document,a),ct("keyup",document,d)),t!==void 0&&Ge(t,s=>{s?(ct("keydown",document,a),ct("keyup",document,d)):(nt("keydown",document,a),nt("keyup",document,d))})};return Ln()?(En(l),Ot(()=>{(t===void 0||t.value)&&(nt("keydown",document,a),nt("keyup",document,d))})):l(),Kn(o)}const et="v-hidden",Ar=hr("[v-hidden]",{display:"none!important"}),Fo=he({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const o=j(null),n=j(null);function r(d){const{value:l}=o,{getCounter:s,getTail:u}=e;let v;if(s!==void 0?v=s():v=n.value,!l||!v)return;v.hasAttribute(et)&&v.removeAttribute(et);const{children:p}=l;if(d.showAllItemsBeforeCalculate)for(const O of p)O.hasAttribute(et)&&O.removeAttribute(et);const x=l.offsetWidth,h=[],c=t.tail?u==null?void 0:u():null;let g=c?c.offsetWidth:0,m=!1;const y=l.children.length-(t.tail?1:0);for(let O=0;O<y-1;++O){if(O<0)continue;const Z=p[O];if(m){Z.hasAttribute(et)||Z.setAttribute(et,"");continue}else Z.hasAttribute(et)&&Z.removeAttribute(et);const I=Z.offsetWidth;if(g+=I,h[O]=I,g>x){const{updateCounter:N}=e;for(let _=O;_>=0;--_){const $=y-1-_;N!==void 0?N($):v.textContent=`${$}`;const z=v.offsetWidth;if(g-=h[_],g+z<=x||_===0){m=!0,O=_-1,c&&(O===-1?(c.style.maxWidth=`${x-z}px`,c.style.boxSizing="border-box"):c.style.maxWidth="");const{onUpdateCount:M}=e;M&&M($);break}}}}const{onUpdateOverflow:S}=e;m?S!==void 0&&S(!0):(S!==void 0&&S(!1),v.setAttribute(et,""))}const a=Hn();return Ar.mount({id:"vueuc/overflow",head:!0,anchorMetaName:fr,ssr:a}),Tt(()=>r({showAllItemsBeforeCalculate:!1})),{selfRef:o,counterRef:n,sync:r}},render(){const{$slots:e}=this;return rt(()=>this.sync({showAllItemsBeforeCalculate:!1})),i("div",{class:"v-overflow",ref:"selfRef"},[Dn(e,"default"),e.counter?e.counter():i("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function dn(e,t){t&&(Tt(()=>{const{value:o}=e;o&&mo.registerHandler(o,t)}),Ot(()=>{const{value:o}=e;o&&mo.unregisterHandler(o)}))}const _r=he({name:"ArrowDown",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z"}))))}}),zo=he({name:"Backward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),Nr=he({name:"Checkmark",render(){return i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},i("g",{fill:"none"},i("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),Mo=he({name:"FastBackward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),Oo=he({name:"FastForward",render(){return i("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),Lr=he({name:"Filter",render(){return i("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},i("g",{"fill-rule":"nonzero"},i("path",{d:"M17,19 C17.5522847,19 18,19.4477153 18,20 C18,20.5522847 17.5522847,21 17,21 L11,21 C10.4477153,21 10,20.5522847 10,20 C10,19.4477153 10.4477153,19 11,19 L17,19 Z M21,13 C21.5522847,13 22,13.4477153 22,14 C22,14.5522847 21.5522847,15 21,15 L7,15 C6.44771525,15 6,14.5522847 6,14 C6,13.4477153 6.44771525,13 7,13 L21,13 Z M24,7 C24.5522847,7 25,7.44771525 25,8 C25,8.55228475 24.5522847,9 24,9 L4,9 C3.44771525,9 3,8.55228475 3,8 C3,7.44771525 3.44771525,7 4,7 L24,7 Z"}))))}}),To=he({name:"Forward",render(){return i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),Bo=he({name:"More",render(){return i("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},i("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},i("g",{fill:"currentColor","fill-rule":"nonzero"},i("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}}),Er=he({props:{onFocus:Function,onBlur:Function},setup(e){return()=>i("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),Kr={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"},Hr=e=>{const{borderRadius:t,popoverColor:o,textColor3:n,dividerColor:r,textColor2:a,primaryColorPressed:d,textColorDisabled:l,primaryColor:s,opacityDisabled:u,hoverColor:v,fontSizeSmall:p,fontSizeMedium:x,fontSizeLarge:h,fontSizeHuge:c,heightSmall:g,heightMedium:m,heightLarge:y,heightHuge:S}=e;return Object.assign(Object.assign({},Kr),{optionFontSizeSmall:p,optionFontSizeMedium:x,optionFontSizeLarge:h,optionFontSizeHuge:c,optionHeightSmall:g,optionHeightMedium:m,optionHeightLarge:y,optionHeightHuge:S,borderRadius:t,color:o,groupHeaderTextColor:n,actionDividerColor:r,optionTextColor:a,optionTextColorPressed:d,optionTextColorDisabled:l,optionTextColorActive:s,optionOpacityDisabled:u,optionCheckColor:s,optionColorPending:v,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:v,actionTextColor:a,loadingColor:s})},Dr=dt({name:"InternalSelectMenu",common:at,peers:{Scrollbar:qo,Empty:Qo},self:Hr}),vo=Dr;function jr(e,t){return i(Bt,{name:"fade-in-scale-up-transition"},{default:()=>e?i(Ve,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>i(Nr)}):null})}const $o=he({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:o,multipleRef:n,valueSetRef:r,renderLabelRef:a,renderOptionRef:d,labelFieldRef:l,valueFieldRef:s,showCheckmarkRef:u,nodePropsRef:v,handleOptionClick:p,handleOptionMouseEnter:x}=Te(co),h=De(()=>{const{value:y}=o;return y?e.tmNode.key===y.key:!1});function c(y){const{tmNode:S}=e;S.disabled||p(y,S)}function g(y){const{tmNode:S}=e;S.disabled||x(y,S)}function m(y){const{tmNode:S}=e,{value:O}=h;S.disabled||O||x(y,S)}return{multiple:n,isGrouped:De(()=>{const{tmNode:y}=e,{parent:S}=y;return S&&S.rawNode.type==="group"}),showCheckmark:u,nodeProps:v,isPending:h,isSelected:De(()=>{const{value:y}=t,{value:S}=n;if(y===null)return!1;const O=e.tmNode.rawNode[s.value];if(S){const{value:Z}=r;return Z.has(O)}else return y===O}),labelField:l,renderLabel:a,renderOption:d,handleMouseMove:m,handleMouseEnter:g,handleClick:c}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:o,isPending:n,isGrouped:r,showCheckmark:a,nodeProps:d,renderOption:l,renderLabel:s,handleClick:u,handleMouseEnter:v,handleMouseMove:p}=this,x=jr(o,e),h=s?[s(t,o),a&&x]:[Ye(t[this.labelField],t,o),a&&x],c=d==null?void 0:d(t),g=i("div",Object.assign({},c,{class:[`${e}-base-select-option`,t.class,c==null?void 0:c.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:o,[`${e}-base-select-option--grouped`]:r,[`${e}-base-select-option--pending`]:n,[`${e}-base-select-option--show-checkmark`]:a}],style:[(c==null?void 0:c.style)||"",t.style||""],onClick:wt([u,c==null?void 0:c.onClick]),onMouseenter:wt([v,c==null?void 0:c.onMouseenter]),onMousemove:wt([p,c==null?void 0:c.onMousemove])}),i("div",{class:`${e}-base-select-option__content`},h));return t.render?t.render({node:g,option:t,selected:o}):l?l({node:g,option:t,selected:o}):g}}),Io=he({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:o,nodePropsRef:n}=Te(co);return{labelField:o,nodeProps:n,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:o,nodeProps:n,tmNode:{rawNode:r}}=this,a=n==null?void 0:n(r),d=t?t(r,!1):Ye(r[this.labelField],r,!1),l=i("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),d);return r.render?r.render({node:l,option:r}):o?o({node:l,option:r,selected:!1}):l}}),Ur=R("base-select-menu",`
2
- line-height: 1.5;
3
- outline: none;
4
- z-index: 0;
5
- position: relative;
6
- border-radius: var(--n-border-radius);
7
- transition:
8
- background-color .3s var(--n-bezier),
9
- box-shadow .3s var(--n-bezier);
10
- background-color: var(--n-color);
11
- `,[R("scrollbar",`
12
- max-height: var(--n-height);
13
- `),R("virtual-list",`
14
- max-height: var(--n-height);
15
- `),R("base-select-option",`
16
- min-height: var(--n-option-height);
17
- font-size: var(--n-option-font-size);
18
- display: flex;
19
- align-items: center;
20
- `,[ae("content",`
21
- z-index: 1;
22
- white-space: nowrap;
23
- text-overflow: ellipsis;
24
- overflow: hidden;
25
- `)]),R("base-select-group-header",`
26
- min-height: var(--n-option-height);
27
- font-size: .93em;
28
- display: flex;
29
- align-items: center;
30
- `),R("base-select-menu-option-wrapper",`
31
- position: relative;
32
- width: 100%;
33
- `),ae("loading, empty",`
34
- display: flex;
35
- padding: 12px 32px;
36
- flex: 1;
37
- justify-content: center;
38
- `),ae("loading",`
39
- color: var(--n-loading-color);
40
- font-size: var(--n-loading-size);
41
- `),ae("header",`
42
- padding: 8px var(--n-option-padding-left);
43
- font-size: var(--n-option-font-size);
44
- transition:
45
- color .3s var(--n-bezier),
46
- border-color .3s var(--n-bezier);
47
- border-bottom: 1px solid var(--n-action-divider-color);
48
- color: var(--n-action-text-color);
49
- `),ae("action",`
50
- padding: 8px var(--n-option-padding-left);
51
- font-size: var(--n-option-font-size);
52
- transition:
53
- color .3s var(--n-bezier),
54
- border-color .3s var(--n-bezier);
55
- border-top: 1px solid var(--n-action-divider-color);
56
- color: var(--n-action-text-color);
57
- `),R("base-select-group-header",`
58
- position: relative;
59
- cursor: default;
60
- padding: var(--n-option-padding);
61
- color: var(--n-group-header-text-color);
62
- `),R("base-select-option",`
63
- cursor: pointer;
64
- position: relative;
65
- padding: var(--n-option-padding);
66
- transition:
67
- color .3s var(--n-bezier),
68
- opacity .3s var(--n-bezier);
69
- box-sizing: border-box;
70
- color: var(--n-option-text-color);
71
- opacity: 1;
72
- `,[W("show-checkmark",`
73
- padding-right: calc(var(--n-option-padding-right) + 20px);
74
- `),ne("&::before",`
75
- content: "";
76
- position: absolute;
77
- left: 4px;
78
- right: 4px;
79
- top: 0;
80
- bottom: 0;
81
- border-radius: var(--n-border-radius);
82
- transition: background-color .3s var(--n-bezier);
83
- `),ne("&:active",`
84
- color: var(--n-option-text-color-pressed);
85
- `),W("grouped",`
86
- padding-left: calc(var(--n-option-padding-left) * 1.5);
87
- `),W("pending",[ne("&::before",`
88
- background-color: var(--n-option-color-pending);
89
- `)]),W("selected",`
90
- color: var(--n-option-text-color-active);
91
- `,[ne("&::before",`
92
- background-color: var(--n-option-color-active);
93
- `),W("pending",[ne("&::before",`
94
- background-color: var(--n-option-color-active-pending);
95
- `)])]),W("disabled",`
96
- cursor: not-allowed;
97
- `,[Ue("selected",`
98
- color: var(--n-option-text-color-disabled);
99
- `),W("selected",`
100
- opacity: var(--n-option-opacity-disabled);
101
- `)]),ae("check",`
102
- font-size: 16px;
103
- position: absolute;
104
- right: calc(var(--n-option-padding-right) - 4px);
105
- top: calc(50% - 7px);
106
- color: var(--n-option-check-color);
107
- transition: color .3s var(--n-bezier);
108
- `,[$t({enterScale:"0.5"})])])]),cn=he({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ae.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const t=Ae("InternalSelectMenu","-internal-select-menu",Ur,vo,e,le(e,"clsPrefix")),o=j(null),n=j(null),r=j(null),a=C(()=>e.treeMate.getFlattenedNodes()),d=C(()=>vr(a.value)),l=j(null);function s(){const{treeMate:w}=e;let f=null;const{value:T}=e;T===null?f=w.getFirstAvailableNode():(e.multiple?f=w.getNode((T||[])[(T||[]).length-1]):f=w.getNode(T),(!f||f.disabled)&&(f=w.getFirstAvailableNode())),V(f||null)}function u(){const{value:w}=l;w&&!e.treeMate.getNode(w.key)&&(l.value=null)}let v;Ge(()=>e.show,w=>{w?v=Ge(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?s():u(),rt(k)):u()},{immediate:!0}):v==null||v()},{immediate:!0}),Ot(()=>{v==null||v()});const p=C(()=>Rt(t.value.self[ce("optionHeight",e.size)])),x=C(()=>Qt(t.value.self[ce("padding",e.size)])),h=C(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),c=C(()=>{const w=a.value;return w&&w.length===0});function g(w){const{onToggle:f}=e;f&&f(w)}function m(w){const{onScroll:f}=e;f&&f(w)}function y(w){var f;(f=r.value)===null||f===void 0||f.sync(),m(w)}function S(){var w;(w=r.value)===null||w===void 0||w.sync()}function O(){const{value:w}=l;return w||null}function Z(w,f){f.disabled||V(f,!1)}function I(w,f){f.disabled||g(f)}function N(w){var f;tt(w,"action")||(f=e.onKeyup)===null||f===void 0||f.call(e,w)}function _(w){var f;tt(w,"action")||(f=e.onKeydown)===null||f===void 0||f.call(e,w)}function $(w){var f;(f=e.onMousedown)===null||f===void 0||f.call(e,w),!e.focusable&&w.preventDefault()}function z(){const{value:w}=l;w&&V(w.getNext({loop:!0}),!0)}function M(){const{value:w}=l;w&&V(w.getPrev({loop:!0}),!0)}function V(w,f=!1){l.value=w,f&&k()}function k(){var w,f;const T=l.value;if(!T)return;const D=d.value(T.key);D!==null&&(e.virtualScroll?(w=n.value)===null||w===void 0||w.scrollTo({index:D}):(f=r.value)===null||f===void 0||f.scrollTo({index:D,elSize:p.value}))}function L(w){var f,T;!((f=o.value)===null||f===void 0)&&f.contains(w.target)&&((T=e.onFocus)===null||T===void 0||T.call(e,w))}function A(w){var f,T;!((f=o.value)===null||f===void 0)&&f.contains(w.relatedTarget)||(T=e.onBlur)===null||T===void 0||T.call(e,w)}qe(co,{handleOptionMouseEnter:Z,handleOptionClick:I,valueSetRef:h,pendingTmNodeRef:l,nodePropsRef:le(e,"nodeProps"),showCheckmarkRef:le(e,"showCheckmark"),multipleRef:le(e,"multiple"),valueRef:le(e,"value"),renderLabelRef:le(e,"renderLabel"),renderOptionRef:le(e,"renderOption"),labelFieldRef:le(e,"labelField"),valueFieldRef:le(e,"valueField")}),qe(pr,o),Tt(()=>{const{value:w}=r;w&&w.sync()});const E=C(()=>{const{size:w}=e,{common:{cubicBezierEaseInOut:f},self:{height:T,borderRadius:D,color:U,groupHeaderTextColor:re,actionDividerColor:ue,optionTextColorPressed:Se,optionTextColor:oe,optionTextColorDisabled:me,optionTextColorActive:se,optionOpacityDisabled:P,optionCheckColor:J,actionTextColor:Fe,optionColorPending:Q,optionColorActive:ge,loadingColor:Ie,loadingSize:ze,optionColorActivePending:Pe,[ce("optionFontSize",w)]:Le,[ce("optionHeight",w)]:Ee,[ce("optionPadding",w)]:ke}}=t.value;return{"--n-height":T,"--n-action-divider-color":ue,"--n-action-text-color":Fe,"--n-bezier":f,"--n-border-radius":D,"--n-color":U,"--n-option-font-size":Le,"--n-group-header-text-color":re,"--n-option-check-color":J,"--n-option-color-pending":Q,"--n-option-color-active":ge,"--n-option-color-active-pending":Pe,"--n-option-height":Ee,"--n-option-opacity-disabled":P,"--n-option-text-color":oe,"--n-option-text-color-active":se,"--n-option-text-color-disabled":me,"--n-option-text-color-pressed":Se,"--n-option-padding":ke,"--n-option-padding-left":Qt(ke,"left"),"--n-option-padding-right":Qt(ke,"right"),"--n-loading-color":Ie,"--n-loading-size":ze}}),{inlineThemeDisabled:X}=e,K=X?lt("internal-select-menu",C(()=>e.size[0]),E,e):void 0,ee={selfRef:o,next:z,prev:M,getPendingTmNode:O};return dn(o,e.onResize),Object.assign({mergedTheme:t,virtualListRef:n,scrollbarRef:r,itemSize:p,padding:x,flattenedNodes:a,empty:c,virtualListContainer(){const{value:w}=n;return w==null?void 0:w.listElRef},virtualListContent(){const{value:w}=n;return w==null?void 0:w.itemsElRef},doScroll:m,handleFocusin:L,handleFocusout:A,handleKeyUp:N,handleKeyDown:_,handleMouseDown:$,handleVirtualListResize:S,handleVirtualListScroll:y,cssVars:X?void 0:E,themeClass:K==null?void 0:K.themeClass,onRender:K==null?void 0:K.onRender},ee)},render(){const{$slots:e,virtualScroll:t,clsPrefix:o,mergedTheme:n,themeClass:r,onRender:a}=this;return a==null||a(),i("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${o}-base-select-menu`,r,this.multiple&&`${o}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},kt(e.header,d=>d&&i("div",{class:`${o}-base-select-menu__header`,"data-header":!0,key:"header"},d)),this.loading?i("div",{class:`${o}-base-select-menu__loading`},i(lo,{clsPrefix:o,strokeWidth:20})):this.empty?i("div",{class:`${o}-base-select-menu__empty`,"data-empty":!0,"data-action":!0},It(e.empty,()=>[i(en,{theme:n.peers.Empty,themeOverrides:n.peerOverrides.Empty})])):i(so,{ref:"scrollbarRef",theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?i(Yo,{ref:"virtualListRef",class:`${o}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:d})=>d.isGroup?i(Io,{key:d.key,clsPrefix:o,tmNode:d}):d.ignored?null:i($o,{clsPrefix:o,key:d.key,tmNode:d})}):i("div",{class:`${o}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(d=>d.isGroup?i(Io,{key:d.key,clsPrefix:o,tmNode:d}):i($o,{clsPrefix:o,key:d.key,tmNode:d})))}),kt(e.action,d=>d&&[i("div",{class:`${o}-base-select-menu__action`,"data-action":!0,key:"action"},d),i(Er,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),Wr={closeIconSizeTiny:"12px",closeIconSizeSmall:"12px",closeIconSizeMedium:"14px",closeIconSizeLarge:"14px",closeSizeTiny:"16px",closeSizeSmall:"16px",closeSizeMedium:"18px",closeSizeLarge:"18px",padding:"0 7px",closeMargin:"0 0 0 4px",closeMarginRtl:"0 4px 0 0"},Vr=e=>{const{textColor2:t,primaryColorHover:o,primaryColorPressed:n,primaryColor:r,infoColor:a,successColor:d,warningColor:l,errorColor:s,baseColor:u,borderColor:v,opacityDisabled:p,tagColor:x,closeIconColor:h,closeIconColorHover:c,closeIconColorPressed:g,borderRadiusSmall:m,fontSizeMini:y,fontSizeTiny:S,fontSizeSmall:O,fontSizeMedium:Z,heightMini:I,heightTiny:N,heightSmall:_,heightMedium:$,closeColorHover:z,closeColorPressed:M,buttonColor2Hover:V,buttonColor2Pressed:k,fontWeightStrong:L}=e;return Object.assign(Object.assign({},Wr),{closeBorderRadius:m,heightTiny:I,heightSmall:N,heightMedium:_,heightLarge:$,borderRadius:m,opacityDisabled:p,fontSizeTiny:y,fontSizeSmall:S,fontSizeMedium:O,fontSizeLarge:Z,fontWeightStrong:L,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:"#0000",colorHoverCheckable:V,colorPressedCheckable:k,colorChecked:r,colorCheckedHover:o,colorCheckedPressed:n,border:`1px solid ${v}`,textColor:t,color:x,colorBordered:"rgb(250, 250, 252)",closeIconColor:h,closeIconColorHover:c,closeIconColorPressed:g,closeColorHover:z,closeColorPressed:M,borderPrimary:`1px solid ${ye(r,{alpha:.3})}`,textColorPrimary:r,colorPrimary:ye(r,{alpha:.12}),colorBorderedPrimary:ye(r,{alpha:.1}),closeIconColorPrimary:r,closeIconColorHoverPrimary:r,closeIconColorPressedPrimary:r,closeColorHoverPrimary:ye(r,{alpha:.12}),closeColorPressedPrimary:ye(r,{alpha:.18}),borderInfo:`1px solid ${ye(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ye(a,{alpha:.12}),colorBorderedInfo:ye(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:ye(a,{alpha:.12}),closeColorPressedInfo:ye(a,{alpha:.18}),borderSuccess:`1px solid ${ye(d,{alpha:.3})}`,textColorSuccess:d,colorSuccess:ye(d,{alpha:.12}),colorBorderedSuccess:ye(d,{alpha:.1}),closeIconColorSuccess:d,closeIconColorHoverSuccess:d,closeIconColorPressedSuccess:d,closeColorHoverSuccess:ye(d,{alpha:.12}),closeColorPressedSuccess:ye(d,{alpha:.18}),borderWarning:`1px solid ${ye(l,{alpha:.35})}`,textColorWarning:l,colorWarning:ye(l,{alpha:.15}),colorBorderedWarning:ye(l,{alpha:.12}),closeIconColorWarning:l,closeIconColorHoverWarning:l,closeIconColorPressedWarning:l,closeColorHoverWarning:ye(l,{alpha:.12}),closeColorPressedWarning:ye(l,{alpha:.18}),borderError:`1px solid ${ye(s,{alpha:.23})}`,textColorError:s,colorError:ye(s,{alpha:.1}),colorBorderedError:ye(s,{alpha:.08}),closeIconColorError:s,closeIconColorHoverError:s,closeIconColorPressedError:s,closeColorHoverError:ye(s,{alpha:.12}),closeColorPressedError:ye(s,{alpha:.18})})},qr={name:"Tag",common:at,self:Vr},Gr=qr,Xr={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Zr=R("tag",`
109
- white-space: nowrap;
110
- position: relative;
111
- box-sizing: border-box;
112
- cursor: default;
113
- display: inline-flex;
114
- align-items: center;
115
- flex-wrap: nowrap;
116
- padding: var(--n-padding);
117
- border-radius: var(--n-border-radius);
118
- color: var(--n-text-color);
119
- background-color: var(--n-color);
120
- transition:
121
- border-color .3s var(--n-bezier),
122
- background-color .3s var(--n-bezier),
123
- color .3s var(--n-bezier),
124
- box-shadow .3s var(--n-bezier),
125
- opacity .3s var(--n-bezier);
126
- line-height: 1;
127
- height: var(--n-height);
128
- font-size: var(--n-font-size);
129
- `,[W("strong",`
130
- font-weight: var(--n-font-weight-strong);
131
- `),ae("border",`
132
- pointer-events: none;
133
- position: absolute;
134
- left: 0;
135
- right: 0;
136
- top: 0;
137
- bottom: 0;
138
- border-radius: inherit;
139
- border: var(--n-border);
140
- transition: border-color .3s var(--n-bezier);
141
- `),ae("icon",`
142
- display: flex;
143
- margin: 0 4px 0 0;
144
- color: var(--n-text-color);
145
- transition: color .3s var(--n-bezier);
146
- font-size: var(--n-avatar-size-override);
147
- `),ae("avatar",`
148
- display: flex;
149
- margin: 0 6px 0 0;
150
- `),ae("close",`
151
- margin: var(--n-close-margin);
152
- transition:
153
- background-color .3s var(--n-bezier),
154
- color .3s var(--n-bezier);
155
- `),W("round",`
156
- padding: 0 calc(var(--n-height) / 3);
157
- border-radius: calc(var(--n-height) / 2);
158
- `,[ae("icon",`
159
- margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
160
- `),ae("avatar",`
161
- margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
162
- `),W("closable",`
163
- padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
164
- `)]),W("icon, avatar",[W("round",`
165
- padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
166
- `)]),W("disabled",`
167
- cursor: not-allowed !important;
168
- opacity: var(--n-opacity-disabled);
169
- `),W("checkable",`
170
- cursor: pointer;
171
- box-shadow: none;
172
- color: var(--n-text-color-checkable);
173
- background-color: var(--n-color-checkable);
174
- `,[Ue("disabled",[ne("&:hover","background-color: var(--n-color-hover-checkable);",[Ue("checked","color: var(--n-text-color-hover-checkable);")]),ne("&:active","background-color: var(--n-color-pressed-checkable);",[Ue("checked","color: var(--n-text-color-pressed-checkable);")])]),W("checked",`
175
- color: var(--n-text-color-checked);
176
- background-color: var(--n-color-checked);
177
- `,[Ue("disabled",[ne("&:hover","background-color: var(--n-color-checked-hover);"),ne("&:active","background-color: var(--n-color-checked-pressed);")])])])]),Jr=Object.assign(Object.assign(Object.assign({},Ae.props),Xr),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),Qr=ft("n-tag"),Yt=he({name:"Tag",props:Jr,setup(e){const t=j(null),{mergedBorderedRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:a}=ot(e),d=Ae("Tag","-tag",Zr,Gr,e,n);qe(Qr,{roundRef:le(e,"round")});function l(h){if(!e.disabled&&e.checkable){const{checked:c,onCheckedChange:g,onUpdateChecked:m,"onUpdate:checked":y}=e;m&&m(!c),y&&y(!c),g&&g(!c)}}function s(h){if(e.triggerClickOnClose||h.stopPropagation(),!e.disabled){const{onClose:c}=e;c&&ie(c,h)}}const u={setTextContent(h){const{value:c}=t;c&&(c.textContent=h)}},v=Go("Tag",a,n),p=C(()=>{const{type:h,size:c,color:{color:g,textColor:m}={}}=e,{common:{cubicBezierEaseInOut:y},self:{padding:S,closeMargin:O,closeMarginRtl:Z,borderRadius:I,opacityDisabled:N,textColorCheckable:_,textColorHoverCheckable:$,textColorPressedCheckable:z,textColorChecked:M,colorCheckable:V,colorHoverCheckable:k,colorPressedCheckable:L,colorChecked:A,colorCheckedHover:E,colorCheckedPressed:X,closeBorderRadius:K,fontWeightStrong:ee,[ce("colorBordered",h)]:w,[ce("closeSize",c)]:f,[ce("closeIconSize",c)]:T,[ce("fontSize",c)]:D,[ce("height",c)]:U,[ce("color",h)]:re,[ce("textColor",h)]:ue,[ce("border",h)]:Se,[ce("closeIconColor",h)]:oe,[ce("closeIconColorHover",h)]:me,[ce("closeIconColorPressed",h)]:se,[ce("closeColorHover",h)]:P,[ce("closeColorPressed",h)]:J}}=d.value;return{"--n-font-weight-strong":ee,"--n-avatar-size-override":`calc(${U} - 8px)`,"--n-bezier":y,"--n-border-radius":I,"--n-border":Se,"--n-close-icon-size":T,"--n-close-color-pressed":J,"--n-close-color-hover":P,"--n-close-border-radius":K,"--n-close-icon-color":oe,"--n-close-icon-color-hover":me,"--n-close-icon-color-pressed":se,"--n-close-icon-color-disabled":oe,"--n-close-margin":O,"--n-close-margin-rtl":Z,"--n-close-size":f,"--n-color":g||(o.value?w:re),"--n-color-checkable":V,"--n-color-checked":A,"--n-color-checked-hover":E,"--n-color-checked-pressed":X,"--n-color-hover-checkable":k,"--n-color-pressed-checkable":L,"--n-font-size":D,"--n-height":U,"--n-opacity-disabled":N,"--n-padding":S,"--n-text-color":m||ue,"--n-text-color-checkable":_,"--n-text-color-checked":M,"--n-text-color-hover-checkable":$,"--n-text-color-pressed-checkable":z}}),x=r?lt("tag",C(()=>{let h="";const{type:c,size:g,color:{color:m,textColor:y}={}}=e;return h+=c[0],h+=g[0],m&&(h+=`a${xo(m)}`),y&&(h+=`b${xo(y)}`),o.value&&(h+="c"),h}),p,e):void 0;return Object.assign(Object.assign({},u),{rtlEnabled:v,mergedClsPrefix:n,contentRef:t,mergedBordered:o,handleClick:l,handleCloseClick:s,cssVars:r?void 0:p,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender})},render(){var e,t;const{mergedClsPrefix:o,rtlEnabled:n,closable:r,color:{borderColor:a}={},round:d,onRender:l,$slots:s}=this;l==null||l();const u=kt(s.avatar,p=>p&&i("div",{class:`${o}-tag__avatar`},p)),v=kt(s.icon,p=>p&&i("div",{class:`${o}-tag__icon`},p));return i("div",{class:[`${o}-tag`,this.themeClass,{[`${o}-tag--rtl`]:n,[`${o}-tag--strong`]:this.strong,[`${o}-tag--disabled`]:this.disabled,[`${o}-tag--checkable`]:this.checkable,[`${o}-tag--checked`]:this.checkable&&this.checked,[`${o}-tag--round`]:d,[`${o}-tag--avatar`]:u,[`${o}-tag--icon`]:v,[`${o}-tag--closable`]:r}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},v||u,i("span",{class:`${o}-tag__content`,ref:"contentRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)),!this.checkable&&r?i(jn,{clsPrefix:o,class:`${o}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:d,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?i("div",{class:`${o}-tag__border`,style:{borderColor:a}}):null)}}),Yr={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"},ei=e=>{const{borderRadius:t,textColor2:o,textColorDisabled:n,inputColor:r,inputColorDisabled:a,primaryColor:d,primaryColorHover:l,warningColor:s,warningColorHover:u,errorColor:v,errorColorHover:p,borderColor:x,iconColor:h,iconColorDisabled:c,clearColor:g,clearColorHover:m,clearColorPressed:y,placeholderColor:S,placeholderColorDisabled:O,fontSizeTiny:Z,fontSizeSmall:I,fontSizeMedium:N,fontSizeLarge:_,heightTiny:$,heightSmall:z,heightMedium:M,heightLarge:V}=e;return Object.assign(Object.assign({},Yr),{fontSizeTiny:Z,fontSizeSmall:I,fontSizeMedium:N,fontSizeLarge:_,heightTiny:$,heightSmall:z,heightMedium:M,heightLarge:V,borderRadius:t,textColor:o,textColorDisabled:n,placeholderColor:S,placeholderColorDisabled:O,color:r,colorDisabled:a,colorActive:r,border:`1px solid ${x}`,borderHover:`1px solid ${l}`,borderActive:`1px solid ${d}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${ye(d,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${ye(d,{alpha:.2})}`,caretColor:d,arrowColor:h,arrowColorDisabled:c,loadingColor:d,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${u}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${u}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${ye(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${ye(s,{alpha:.2})}`,colorActiveWarning:r,caretColorWarning:s,borderError:`1px solid ${v}`,borderHoverError:`1px solid ${p}`,borderActiveError:`1px solid ${v}`,borderFocusError:`1px solid ${p}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${ye(v,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${ye(v,{alpha:.2})}`,colorActiveError:r,caretColorError:v,clearColor:g,clearColorHover:m,clearColorPressed:y})},ti=dt({name:"InternalSelection",common:at,peers:{Popover:At},self:ei}),un=ti,oi=ne([R("base-selection",`
178
- position: relative;
179
- z-index: auto;
180
- box-shadow: none;
181
- width: 100%;
182
- max-width: 100%;
183
- display: inline-block;
184
- vertical-align: bottom;
185
- border-radius: var(--n-border-radius);
186
- min-height: var(--n-height);
187
- line-height: 1.5;
188
- font-size: var(--n-font-size);
189
- `,[R("base-loading",`
190
- color: var(--n-loading-color);
191
- `),R("base-selection-tags","min-height: var(--n-height);"),ae("border, state-border",`
192
- position: absolute;
193
- left: 0;
194
- right: 0;
195
- top: 0;
196
- bottom: 0;
197
- pointer-events: none;
198
- border: var(--n-border);
199
- border-radius: inherit;
200
- transition:
201
- box-shadow .3s var(--n-bezier),
202
- border-color .3s var(--n-bezier);
203
- `),ae("state-border",`
204
- z-index: 1;
205
- border-color: #0000;
206
- `),R("base-suffix",`
207
- cursor: pointer;
208
- position: absolute;
209
- top: 50%;
210
- transform: translateY(-50%);
211
- right: 10px;
212
- `,[ae("arrow",`
213
- font-size: var(--n-arrow-size);
214
- color: var(--n-arrow-color);
215
- transition: color .3s var(--n-bezier);
216
- `)]),R("base-selection-overlay",`
217
- display: flex;
218
- align-items: center;
219
- white-space: nowrap;
220
- pointer-events: none;
221
- position: absolute;
222
- top: 0;
223
- right: 0;
224
- bottom: 0;
225
- left: 0;
226
- padding: var(--n-padding-single);
227
- transition: color .3s var(--n-bezier);
228
- `,[ae("wrapper",`
229
- flex-basis: 0;
230
- flex-grow: 1;
231
- overflow: hidden;
232
- text-overflow: ellipsis;
233
- `)]),R("base-selection-placeholder",`
234
- color: var(--n-placeholder-color);
235
- `,[ae("inner",`
236
- max-width: 100%;
237
- overflow: hidden;
238
- `)]),R("base-selection-tags",`
239
- cursor: pointer;
240
- outline: none;
241
- box-sizing: border-box;
242
- position: relative;
243
- z-index: auto;
244
- display: flex;
245
- padding: var(--n-padding-multiple);
246
- flex-wrap: wrap;
247
- align-items: center;
248
- width: 100%;
249
- vertical-align: bottom;
250
- background-color: var(--n-color);
251
- border-radius: inherit;
252
- transition:
253
- color .3s var(--n-bezier),
254
- box-shadow .3s var(--n-bezier),
255
- background-color .3s var(--n-bezier);
256
- `),R("base-selection-label",`
257
- height: var(--n-height);
258
- display: inline-flex;
259
- width: 100%;
260
- vertical-align: bottom;
261
- cursor: pointer;
262
- outline: none;
263
- z-index: auto;
264
- box-sizing: border-box;
265
- position: relative;
266
- transition:
267
- color .3s var(--n-bezier),
268
- box-shadow .3s var(--n-bezier),
269
- background-color .3s var(--n-bezier);
270
- border-radius: inherit;
271
- background-color: var(--n-color);
272
- align-items: center;
273
- `,[R("base-selection-input",`
274
- font-size: inherit;
275
- line-height: inherit;
276
- outline: none;
277
- cursor: pointer;
278
- box-sizing: border-box;
279
- border:none;
280
- width: 100%;
281
- padding: var(--n-padding-single);
282
- background-color: #0000;
283
- color: var(--n-text-color);
284
- transition: color .3s var(--n-bezier);
285
- caret-color: var(--n-caret-color);
286
- `,[ae("content",`
287
- text-overflow: ellipsis;
288
- overflow: hidden;
289
- white-space: nowrap;
290
- `)]),ae("render-label",`
291
- color: var(--n-text-color);
292
- `)]),Ue("disabled",[ne("&:hover",[ae("state-border",`
293
- box-shadow: var(--n-box-shadow-hover);
294
- border: var(--n-border-hover);
295
- `)]),W("focus",[ae("state-border",`
296
- box-shadow: var(--n-box-shadow-focus);
297
- border: var(--n-border-focus);
298
- `)]),W("active",[ae("state-border",`
299
- box-shadow: var(--n-box-shadow-active);
300
- border: var(--n-border-active);
301
- `),R("base-selection-label","background-color: var(--n-color-active);"),R("base-selection-tags","background-color: var(--n-color-active);")])]),W("disabled","cursor: not-allowed;",[ae("arrow",`
302
- color: var(--n-arrow-color-disabled);
303
- `),R("base-selection-label",`
304
- cursor: not-allowed;
305
- background-color: var(--n-color-disabled);
306
- `,[R("base-selection-input",`
307
- cursor: not-allowed;
308
- color: var(--n-text-color-disabled);
309
- `),ae("render-label",`
310
- color: var(--n-text-color-disabled);
311
- `)]),R("base-selection-tags",`
312
- cursor: not-allowed;
313
- background-color: var(--n-color-disabled);
314
- `),R("base-selection-placeholder",`
315
- cursor: not-allowed;
316
- color: var(--n-placeholder-color-disabled);
317
- `)]),R("base-selection-input-tag",`
318
- height: calc(var(--n-height) - 6px);
319
- line-height: calc(var(--n-height) - 6px);
320
- outline: none;
321
- display: none;
322
- position: relative;
323
- margin-bottom: 3px;
324
- max-width: 100%;
325
- vertical-align: bottom;
326
- `,[ae("input",`
327
- font-size: inherit;
328
- font-family: inherit;
329
- min-width: 1px;
330
- padding: 0;
331
- background-color: #0000;
332
- outline: none;
333
- border: none;
334
- max-width: 100%;
335
- overflow: hidden;
336
- width: 1em;
337
- line-height: inherit;
338
- cursor: pointer;
339
- color: var(--n-text-color);
340
- caret-color: var(--n-caret-color);
341
- `),ae("mirror",`
342
- position: absolute;
343
- left: 0;
344
- top: 0;
345
- white-space: pre;
346
- visibility: hidden;
347
- user-select: none;
348
- -webkit-user-select: none;
349
- opacity: 0;
350
- `)]),["warning","error"].map(e=>W(`${e}-status`,[ae("state-border",`border: var(--n-border-${e});`),Ue("disabled",[ne("&:hover",[ae("state-border",`
351
- box-shadow: var(--n-box-shadow-hover-${e});
352
- border: var(--n-border-hover-${e});
353
- `)]),W("active",[ae("state-border",`
354
- box-shadow: var(--n-box-shadow-active-${e});
355
- border: var(--n-border-active-${e});
356
- `),R("base-selection-label",`background-color: var(--n-color-active-${e});`),R("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),W("focus",[ae("state-border",`
357
- box-shadow: var(--n-box-shadow-focus-${e});
358
- border: var(--n-border-focus-${e});
359
- `)])])]))]),R("base-selection-popover",`
360
- margin-bottom: -3px;
361
- display: flex;
362
- flex-wrap: wrap;
363
- margin-right: -8px;
364
- `),R("base-selection-tag-wrapper",`
365
- max-width: 100%;
366
- display: inline-flex;
367
- padding: 0 7px 3px 0;
368
- `,[ne("&:last-child","padding-right: 0;"),R("tag",`
369
- font-size: 14px;
370
- max-width: 100%;
371
- `,[ae("content",`
372
- line-height: 1.25;
373
- text-overflow: ellipsis;
374
- overflow: hidden;
375
- `)])])]),ni=he({name:"InternalSelection",props:Object.assign(Object.assign({},Ae.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const t=j(null),o=j(null),n=j(null),r=j(null),a=j(null),d=j(null),l=j(null),s=j(null),u=j(null),v=j(null),p=j(!1),x=j(!1),h=j(!1),c=Ae("InternalSelection","-internal-selection",oi,un,e,le(e,"clsPrefix")),g=C(()=>e.clearable&&!e.disabled&&(h.value||e.active)),m=C(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Ye(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),y=C(()=>{const F=e.selectedOption;if(F)return F[e.labelField]}),S=C(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function O(){var F;const{value:q}=t;if(q){const{value:xe}=o;xe&&(xe.style.width=`${q.offsetWidth}px`,e.maxTagCount!=="responsive"&&((F=u.value)===null||F===void 0||F.sync({showAllItemsBeforeCalculate:!1})))}}function Z(){const{value:F}=v;F&&(F.style.display="none")}function I(){const{value:F}=v;F&&(F.style.display="inline-block")}Ge(le(e,"active"),F=>{F||Z()}),Ge(le(e,"pattern"),()=>{e.multiple&&rt(O)});function N(F){const{onFocus:q}=e;q&&q(F)}function _(F){const{onBlur:q}=e;q&&q(F)}function $(F){const{onDeleteOption:q}=e;q&&q(F)}function z(F){const{onClear:q}=e;q&&q(F)}function M(F){const{onPatternInput:q}=e;q&&q(F)}function V(F){var q;(!F.relatedTarget||!(!((q=n.value)===null||q===void 0)&&q.contains(F.relatedTarget)))&&N(F)}function k(F){var q;!((q=n.value)===null||q===void 0)&&q.contains(F.relatedTarget)||_(F)}function L(F){z(F)}function A(){h.value=!0}function E(){h.value=!1}function X(F){!e.active||!e.filterable||F.target!==o.value&&F.preventDefault()}function K(F){$(F)}function ee(F){if(F.key==="Backspace"&&!w.value&&!e.pattern.length){const{selectedOptions:q}=e;q!=null&&q.length&&K(q[q.length-1])}}const w=j(!1);let f=null;function T(F){const{value:q}=t;if(q){const xe=F.target.value;q.textContent=xe,O()}e.ignoreComposition&&w.value?f=F:M(F)}function D(){w.value=!0}function U(){w.value=!1,e.ignoreComposition&&M(f),f=null}function re(F){var q;x.value=!0,(q=e.onPatternFocus)===null||q===void 0||q.call(e,F)}function ue(F){var q;x.value=!1,(q=e.onPatternBlur)===null||q===void 0||q.call(e,F)}function Se(){var F,q;if(e.filterable)x.value=!1,(F=d.value)===null||F===void 0||F.blur(),(q=o.value)===null||q===void 0||q.blur();else if(e.multiple){const{value:xe}=r;xe==null||xe.blur()}else{const{value:xe}=a;xe==null||xe.blur()}}function oe(){var F,q,xe;e.filterable?(x.value=!1,(F=d.value)===null||F===void 0||F.focus()):e.multiple?(q=r.value)===null||q===void 0||q.focus():(xe=a.value)===null||xe===void 0||xe.focus()}function me(){const{value:F}=o;F&&(I(),F.focus())}function se(){const{value:F}=o;F&&F.blur()}function P(F){const{value:q}=l;q&&q.setTextContent(`+${F}`)}function J(){const{value:F}=s;return F}function Fe(){return o.value}let Q=null;function ge(){Q!==null&&window.clearTimeout(Q)}function Ie(){e.active||(ge(),Q=window.setTimeout(()=>{S.value&&(p.value=!0)},100))}function ze(){ge()}function Pe(F){F||(ge(),p.value=!1)}Ge(S,F=>{F||(p.value=!1)}),Tt(()=>{ut(()=>{const F=d.value;F&&(e.disabled?F.removeAttribute("tabindex"):F.tabIndex=x.value?-1:0)})}),dn(n,e.onResize);const{inlineThemeDisabled:Le}=e,Ee=C(()=>{const{size:F}=e,{common:{cubicBezierEaseInOut:q},self:{borderRadius:xe,color:je,placeholderColor:Je,textColor:Ke,paddingSingle:Me,paddingMultiple:He,caretColor:Ne,colorDisabled:G,textColorDisabled:te,placeholderColorDisabled:Ce,colorActive:H,boxShadowFocus:be,boxShadowActive:we,boxShadowHover:b,border:B,borderFocus:Y,borderHover:fe,borderActive:pe,arrowColor:de,arrowColorDisabled:ve,loadingColor:Re,colorActiveWarning:Oe,boxShadowFocusWarning:Qe,boxShadowActiveWarning:Be,boxShadowHoverWarning:_e,borderWarning:ht,borderFocusWarning:vt,borderHoverWarning:pt,borderActiveWarning:gt,colorActiveError:bt,boxShadowFocusError:mt,boxShadowActiveError:Et,boxShadowHoverError:Kt,borderError:Ht,borderFocusError:Dt,borderHoverError:jt,borderActiveError:Ut,clearColor:Wt,clearColorHover:Vt,clearColorPressed:qt,clearSize:Gt,arrowSize:Xt,[ce("height",F)]:Zt,[ce("fontSize",F)]:Jt}}=c.value;return{"--n-bezier":q,"--n-border":B,"--n-border-active":pe,"--n-border-focus":Y,"--n-border-hover":fe,"--n-border-radius":xe,"--n-box-shadow-active":we,"--n-box-shadow-focus":be,"--n-box-shadow-hover":b,"--n-caret-color":Ne,"--n-color":je,"--n-color-active":H,"--n-color-disabled":G,"--n-font-size":Jt,"--n-height":Zt,"--n-padding-single":Me,"--n-padding-multiple":He,"--n-placeholder-color":Je,"--n-placeholder-color-disabled":Ce,"--n-text-color":Ke,"--n-text-color-disabled":te,"--n-arrow-color":de,"--n-arrow-color-disabled":ve,"--n-loading-color":Re,"--n-color-active-warning":Oe,"--n-box-shadow-focus-warning":Qe,"--n-box-shadow-active-warning":Be,"--n-box-shadow-hover-warning":_e,"--n-border-warning":ht,"--n-border-focus-warning":vt,"--n-border-hover-warning":pt,"--n-border-active-warning":gt,"--n-color-active-error":bt,"--n-box-shadow-focus-error":mt,"--n-box-shadow-active-error":Et,"--n-box-shadow-hover-error":Kt,"--n-border-error":Ht,"--n-border-focus-error":Dt,"--n-border-hover-error":jt,"--n-border-active-error":Ut,"--n-clear-size":Gt,"--n-clear-color":Wt,"--n-clear-color-hover":Vt,"--n-clear-color-pressed":qt,"--n-arrow-size":Xt}}),ke=Le?lt("internal-selection",C(()=>e.size[0]),Ee,e):void 0;return{mergedTheme:c,mergedClearable:g,patternInputFocused:x,filterablePlaceholder:m,label:y,selected:S,showTagsPanel:p,isComposing:w,counterRef:l,counterWrapperRef:s,patternInputMirrorRef:t,patternInputRef:o,selfRef:n,multipleElRef:r,singleElRef:a,patternInputWrapperRef:d,overflowRef:u,inputTagElRef:v,handleMouseDown:X,handleFocusin:V,handleClear:L,handleMouseEnter:A,handleMouseLeave:E,handleDeleteOption:K,handlePatternKeyDown:ee,handlePatternInputInput:T,handlePatternInputBlur:ue,handlePatternInputFocus:re,handleMouseEnterCounter:Ie,handleMouseLeaveCounter:ze,handleFocusout:k,handleCompositionEnd:U,handleCompositionStart:D,onPopoverUpdateShow:Pe,focus:oe,focusInput:me,blur:Se,blurInput:se,updateCounter:P,getCounter:J,getTail:Fe,renderLabel:e.renderLabel,cssVars:Le?void 0:Ee,themeClass:ke==null?void 0:ke.themeClass,onRender:ke==null?void 0:ke.onRender}},render(){const{status:e,multiple:t,size:o,disabled:n,filterable:r,maxTagCount:a,bordered:d,clsPrefix:l,onRender:s,renderTag:u,renderLabel:v}=this;s==null||s();const p=a==="responsive",x=typeof a=="number",h=p||x,c=i(Un,null,{default:()=>i(gr,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var m,y;return(y=(m=this.$slots).arrow)===null||y===void 0?void 0:y.call(m)}})});let g;if(t){const{labelField:m}=this,y=k=>i("div",{class:`${l}-base-selection-tag-wrapper`,key:k.value},u?u({option:k,handleClose:()=>{this.handleDeleteOption(k)}}):i(Yt,{size:o,closable:!k.disabled,disabled:n,onClose:()=>{this.handleDeleteOption(k)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>v?v(k,!0):Ye(k[m],k,!0)})),S=()=>(x?this.selectedOptions.slice(0,a):this.selectedOptions).map(y),O=r?i("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:n,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),i("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,Z=p?()=>i("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},i(Yt,{size:o,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:n})):void 0;let I;if(x){const k=this.selectedOptions.length-a;k>0&&(I=i("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},i(Yt,{size:o,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:n},{default:()=>`+${k}`})))}const N=p?r?i(Fo,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:S,counter:Z,tail:()=>O}):i(Fo,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:S,counter:Z}):x&&I?S().concat(I):S(),_=h?()=>i("div",{class:`${l}-base-selection-popover`},p?S():this.selectedOptions.map(y)):void 0,$=h?{show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover}:null,M=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?i("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},i("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,V=r?i("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},N,p?null:O,c):i("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:n?void 0:0},N,c);g=i(st,null,h?i(_t,Object.assign({},$,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>V,default:_}):V,M)}else if(r){const m=this.pattern||this.isComposing,y=this.active?!m:!this.selected,S=this.active?!1:this.selected;g=i("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`},i("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:n,disabled:n,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),S?i("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},i("div",{class:`${l}-base-selection-overlay__wrapper`},u?u({option:this.selectedOption,handleClose:()=>{}}):v?v(this.selectedOption,!0):Ye(this.label,this.selectedOption,!0))):null,y?i("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,c)}else g=i("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?i("div",{class:`${l}-base-selection-input`,title:Br(this.label),key:"input"},i("div",{class:`${l}-base-selection-input__content`},u?u({option:this.selectedOption,handleClose:()=>{}}):v?v(this.selectedOption,!0):Ye(this.label,this.selectedOption,!0))):i("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},i("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),c);return i("div",{ref:"selfRef",class:[`${l}-base-selection`,this.themeClass,e&&`${l}-base-selection--${e}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},g,d?i("div",{class:`${l}-base-selection__border`}):null,d?i("div",{class:`${l}-base-selection__state-border`}):null)}});function Mt(e){return e.type==="group"}function fn(e){return e.type==="ignored"}function eo(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function hn(e,t){return{getIsGroup:Mt,getIgnored:fn,getKey(n){return Mt(n)?n.name||n.key||"key-required":n[e]},getChildren(n){return n[t]}}}function ri(e,t,o,n){if(!t)return e;function r(a){if(!Array.isArray(a))return[];const d=[];for(const l of a)if(Mt(l)){const s=r(l[n]);s.length&&d.push(Object.assign({},l,{[n]:s}))}else{if(fn(l))continue;t(o,l)&&d.push(l)}return d}return r(e)}function ii(e,t,o){const n=new Map;return e.forEach(r=>{Mt(r)?r[o].forEach(a=>{n.set(a[t],a)}):n.set(r[t],r)}),n}function ai(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const li=dt({name:"Popselect",common:at,peers:{Popover:At,InternalSelectMenu:vo},self:ai}),po=li,vn=ft("n-popselect"),si=R("popselect-menu",`
376
- box-shadow: var(--n-menu-box-shadow);
377
- `),go={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:{type:String,default:"medium"},scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},Ao=Wn(go),di=he({name:"PopselectPanel",props:go,setup(e){const t=Te(vn),{mergedClsPrefixRef:o,inlineThemeDisabled:n}=ot(e),r=Ae("Popselect","-pop-select",si,po,t.props,o),a=C(()=>Nt(e.options,hn("value","children")));function d(x,h){const{onUpdateValue:c,"onUpdate:value":g,onChange:m}=e;c&&ie(c,x,h),g&&ie(g,x,h),m&&ie(m,x,h)}function l(x){u(x.key)}function s(x){tt(x,"action")||x.preventDefault()}function u(x){const{value:{getNode:h}}=a;if(e.multiple)if(Array.isArray(e.value)){const c=[],g=[];let m=!0;e.value.forEach(y=>{if(y===x){m=!1;return}const S=h(y);S&&(c.push(S.key),g.push(S.rawNode))}),m&&(c.push(x),g.push(h(x).rawNode)),d(c,g)}else{const c=h(x);c&&d([x],[c.rawNode])}else if(e.value===x&&e.cancelable)d(null,null);else{const c=h(x);c&&d(x,c.rawNode);const{"onUpdate:show":g,onUpdateShow:m}=t.props;g&&ie(g,!1),m&&ie(m,!1),t.setShow(!1)}rt(()=>{t.syncPosition()})}Ge(le(e,"options"),()=>{rt(()=>{t.syncPosition()})});const v=C(()=>{const{self:{menuBoxShadow:x}}=r.value;return{"--n-menu-box-shadow":x}}),p=n?lt("select",void 0,v,t.props):void 0;return{mergedTheme:t.mergedThemeRef,mergedClsPrefix:o,treeMate:a,handleToggle:l,handleMenuMousedown:s,cssVars:n?void 0:v,themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),i(cn,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.size,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var t,o;return((o=(t=this.$slots).header)===null||o===void 0?void 0:o.call(t))||[]},action:()=>{var t,o;return((o=(t=this.$slots).action)===null||o===void 0?void 0:o.call(t))||[]},empty:()=>{var t,o;return((o=(t=this.$slots).empty)===null||o===void 0?void 0:o.call(t))||[]}})}}),ci=Object.assign(Object.assign(Object.assign(Object.assign({},Ae.props),ln(Ft,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},Ft.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),go),ui=he({name:"Popselect",props:ci,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=ot(e),o=Ae("Popselect","-popselect",void 0,po,e,t),n=j(null);function r(){var l;(l=n.value)===null||l===void 0||l.syncPosition()}function a(l){var s;(s=n.value)===null||s===void 0||s.setShow(l)}return qe(vn,{props:e,mergedThemeRef:o,syncPosition:r,setShow:a}),Object.assign(Object.assign({},{syncPosition:r,setShow:a}),{popoverInstRef:n,mergedTheme:o})},render(){const{mergedTheme:e}=this,t={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(o,n,r,a,d)=>{const{$attrs:l}=this;return i(di,Object.assign({},l,{class:[l.class,o],style:[l.style,...r]},Xo(this.$props,Ao),{ref:sn(n),onMouseenter:wt([a,l.onMouseenter]),onMouseleave:wt([d,l.onMouseleave])}),{header:()=>{var s,u;return(u=(s=this.$slots).header)===null||u===void 0?void 0:u.call(s)},action:()=>{var s,u;return(u=(s=this.$slots).action)===null||u===void 0?void 0:u.call(s)},empty:()=>{var s,u;return(u=(s=this.$slots).empty)===null||u===void 0?void 0:u.call(s)}})}};return i(_t,Object.assign({},ln(this.$props,Ao),t,{internalDeactivateImmediately:!0}),{trigger:()=>{var o,n;return(n=(o=this.$slots).default)===null||n===void 0?void 0:n.call(o)}})}});function fi(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const hi=dt({name:"Select",common:at,peers:{InternalSelection:un,InternalSelectMenu:vo},self:fi}),pn=hi,vi=ne([R("select",`
378
- z-index: auto;
379
- outline: none;
380
- width: 100%;
381
- position: relative;
382
- `),R("select-menu",`
383
- margin: 4px 0;
384
- box-shadow: var(--n-menu-box-shadow);
385
- `,[$t({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),pi=Object.assign(Object.assign({},Ae.props),{to:zt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),gi=he({name:"Select",props:pi,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:o,namespaceRef:n,inlineThemeDisabled:r}=ot(e),a=Ae("Select","-select",vi,pn,e,t),d=j(e.defaultValue),l=le(e,"value"),s=it(l,d),u=j(!1),v=j(""),p=C(()=>{const{valueField:b,childrenField:B}=e,Y=hn(b,B);return Nt(k.value,Y)}),x=C(()=>ii(M.value,e.valueField,e.childrenField)),h=j(!1),c=it(le(e,"show"),h),g=j(null),m=j(null),y=j(null),{localeRef:S}=uo("Select"),O=C(()=>{var b;return(b=e.placeholder)!==null&&b!==void 0?b:S.value.placeholder}),Z=br(e,["items","options"]),I=[],N=j([]),_=j([]),$=j(new Map),z=C(()=>{const{fallbackOption:b}=e;if(b===void 0){const{labelField:B,valueField:Y}=e;return fe=>({[B]:String(fe),[Y]:fe})}return b===!1?!1:B=>Object.assign(b(B),{value:B})}),M=C(()=>_.value.concat(N.value).concat(Z.value)),V=C(()=>{const{filter:b}=e;if(b)return b;const{labelField:B,valueField:Y}=e;return(fe,pe)=>{if(!pe)return!1;const de=pe[B];if(typeof de=="string")return eo(fe,de);const ve=pe[Y];return typeof ve=="string"?eo(fe,ve):typeof ve=="number"?eo(fe,String(ve)):!1}}),k=C(()=>{if(e.remote)return Z.value;{const{value:b}=M,{value:B}=v;return!B.length||!e.filterable?b:ri(b,V.value,B,e.childrenField)}});function L(b){const B=e.remote,{value:Y}=$,{value:fe}=x,{value:pe}=z,de=[];return b.forEach(ve=>{if(fe.has(ve))de.push(fe.get(ve));else if(B&&Y.has(ve))de.push(Y.get(ve));else if(pe){const Re=pe(ve);Re&&de.push(Re)}}),de}const A=C(()=>{if(e.multiple){const{value:b}=s;return Array.isArray(b)?L(b):[]}return null}),E=C(()=>{const{value:b}=s;return!e.multiple&&!Array.isArray(b)?b===null?null:L([b])[0]||null:null}),X=Vn(e),{mergedSizeRef:K,mergedDisabledRef:ee,mergedStatusRef:w}=X;function f(b,B){const{onChange:Y,"onUpdate:value":fe,onUpdateValue:pe}=e,{nTriggerFormChange:de,nTriggerFormInput:ve}=X;Y&&ie(Y,b,B),pe&&ie(pe,b,B),fe&&ie(fe,b,B),d.value=b,de(),ve()}function T(b){const{onBlur:B}=e,{nTriggerFormBlur:Y}=X;B&&ie(B,b),Y()}function D(){const{onClear:b}=e;b&&ie(b)}function U(b){const{onFocus:B,showOnFocus:Y}=e,{nTriggerFormFocus:fe}=X;B&&ie(B,b),fe(),Y&&me()}function re(b){const{onSearch:B}=e;B&&ie(B,b)}function ue(b){const{onScroll:B}=e;B&&ie(B,b)}function Se(){var b;const{remote:B,multiple:Y}=e;if(B){const{value:fe}=$;if(Y){const{valueField:pe}=e;(b=A.value)===null||b===void 0||b.forEach(de=>{fe.set(de[pe],de)})}else{const pe=E.value;pe&&fe.set(pe[e.valueField],pe)}}}function oe(b){const{onUpdateShow:B,"onUpdate:show":Y}=e;B&&ie(B,b),Y&&ie(Y,b),h.value=b}function me(){ee.value||(oe(!0),h.value=!0,e.filterable&&te())}function se(){oe(!1)}function P(){v.value="",_.value=I}const J=j(!1);function Fe(){e.filterable&&(J.value=!0)}function Q(){e.filterable&&(J.value=!1,c.value||P())}function ge(){ee.value||(c.value?e.filterable?te():se():me())}function Ie(b){var B,Y;!((Y=(B=y.value)===null||B===void 0?void 0:B.selfRef)===null||Y===void 0)&&Y.contains(b.relatedTarget)||(u.value=!1,T(b),se())}function ze(b){U(b),u.value=!0}function Pe(b){u.value=!0}function Le(b){var B;!((B=g.value)===null||B===void 0)&&B.$el.contains(b.relatedTarget)||(u.value=!1,T(b),se())}function Ee(){var b;(b=g.value)===null||b===void 0||b.focus(),se()}function ke(b){var B;c.value&&(!((B=g.value)===null||B===void 0)&&B.$el.contains(Xn(b))||se())}function F(b){if(!Array.isArray(b))return[];if(z.value)return Array.from(b);{const{remote:B}=e,{value:Y}=x;if(B){const{value:fe}=$;return b.filter(pe=>Y.has(pe)||fe.has(pe))}else return b.filter(fe=>Y.has(fe))}}function q(b){xe(b.rawNode)}function xe(b){if(ee.value)return;const{tag:B,remote:Y,clearFilterAfterSelect:fe,valueField:pe}=e;if(B&&!Y){const{value:de}=_,ve=de[0]||null;if(ve){const Re=N.value;Re.length?Re.push(ve):N.value=[ve],_.value=I}}if(Y&&$.value.set(b[pe],b),e.multiple){const de=F(s.value),ve=de.findIndex(Re=>Re===b[pe]);if(~ve){if(de.splice(ve,1),B&&!Y){const Re=je(b[pe]);~Re&&(N.value.splice(Re,1),fe&&(v.value=""))}}else de.push(b[pe]),fe&&(v.value="");f(de,L(de))}else{if(B&&!Y){const de=je(b[pe]);~de?N.value=[N.value[de]]:N.value=I}G(),se(),f(b[pe],b)}}function je(b){return N.value.findIndex(Y=>Y[e.valueField]===b)}function Je(b){c.value||me();const{value:B}=b.target;v.value=B;const{tag:Y,remote:fe}=e;if(re(B),Y&&!fe){if(!B){_.value=I;return}const{onCreate:pe}=e,de=pe?pe(B):{[e.labelField]:B,[e.valueField]:B},{valueField:ve,labelField:Re}=e;Z.value.some(Oe=>Oe[ve]===de[ve]||Oe[Re]===de[Re])||N.value.some(Oe=>Oe[ve]===de[ve]||Oe[Re]===de[Re])?_.value=I:_.value=[de]}}function Ke(b){b.stopPropagation();const{multiple:B}=e;!B&&e.filterable&&se(),D(),B?f([],[]):f(null,null)}function Me(b){!tt(b,"action")&&!tt(b,"empty")&&b.preventDefault()}function He(b){ue(b)}function Ne(b){var B,Y,fe,pe,de;if(!e.keyboard){b.preventDefault();return}switch(b.key){case" ":if(e.filterable)break;b.preventDefault();case"Enter":if(!(!((B=g.value)===null||B===void 0)&&B.isComposing)){if(c.value){const ve=(Y=y.value)===null||Y===void 0?void 0:Y.getPendingTmNode();ve?q(ve):e.filterable||(se(),G())}else if(me(),e.tag&&J.value){const ve=_.value[0];if(ve){const Re=ve[e.valueField],{value:Oe}=s;e.multiple&&Array.isArray(Oe)&&Oe.some(Qe=>Qe===Re)||xe(ve)}}}b.preventDefault();break;case"ArrowUp":if(b.preventDefault(),e.loading)return;c.value&&((fe=y.value)===null||fe===void 0||fe.prev());break;case"ArrowDown":if(b.preventDefault(),e.loading)return;c.value?(pe=y.value)===null||pe===void 0||pe.next():me();break;case"Escape":c.value&&(Zn(b),se()),(de=g.value)===null||de===void 0||de.focus();break}}function G(){var b;(b=g.value)===null||b===void 0||b.focus()}function te(){var b;(b=g.value)===null||b===void 0||b.focusInput()}function Ce(){var b;c.value&&((b=m.value)===null||b===void 0||b.syncPosition())}Se(),Ge(le(e,"options"),Se);const H={focus:()=>{var b;(b=g.value)===null||b===void 0||b.focus()},focusInput:()=>{var b;(b=g.value)===null||b===void 0||b.focusInput()},blur:()=>{var b;(b=g.value)===null||b===void 0||b.blur()},blurInput:()=>{var b;(b=g.value)===null||b===void 0||b.blurInput()}},be=C(()=>{const{self:{menuBoxShadow:b}}=a.value;return{"--n-menu-box-shadow":b}}),we=r?lt("select",void 0,be,e):void 0;return Object.assign(Object.assign({},H),{mergedStatus:w,mergedClsPrefix:t,mergedBordered:o,namespace:n,treeMate:p,isMounted:qn(),triggerRef:g,menuRef:y,pattern:v,uncontrolledShow:h,mergedShow:c,adjustedTo:zt(e),uncontrolledValue:d,mergedValue:s,followerRef:m,localizedPlaceholder:O,selectedOption:E,selectedOptions:A,mergedSize:K,mergedDisabled:ee,focused:u,activeWithoutMenuOpen:J,inlineThemeDisabled:r,onTriggerInputFocus:Fe,onTriggerInputBlur:Q,handleTriggerOrMenuResize:Ce,handleMenuFocus:Pe,handleMenuBlur:Le,handleMenuTabOut:Ee,handleTriggerClick:ge,handleToggle:q,handleDeleteOption:xe,handlePatternInput:Je,handleClear:Ke,handleTriggerBlur:Ie,handleTriggerFocus:ze,handleKeydown:Ne,handleMenuAfterLeave:P,handleMenuClickOutside:ke,handleMenuScroll:He,handleMenuKeydown:Ne,handleMenuMousedown:Me,mergedTheme:a,cssVars:r?void 0:be,themeClass:we==null?void 0:we.themeClass,onRender:we==null?void 0:we.onRender})},render(){return i("div",{class:`${this.mergedClsPrefix}-select`},i(tn,null,{default:()=>[i(on,null,{default:()=>i(ni,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),i(nn,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===zt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>i(Bt,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,o;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),Zo(i(cn,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(o=this.menuProps)===null||o===void 0?void 0:o.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var n,r;return[(r=(n=this.$slots).empty)===null||r===void 0?void 0:r.call(n)]},action:()=>{var n,r;return[(r=(n=this.$slots).action)===null||r===void 0?void 0:r.call(n)]}}),this.displayDirective==="show"?[[Gn,this.mergedShow],[yo,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[yo,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),bi={itemPaddingSmall:"0 4px",itemMarginSmall:"0 0 0 8px",itemMarginSmallRtl:"0 8px 0 0",itemPaddingMedium:"0 4px",itemMarginMedium:"0 0 0 8px",itemMarginMediumRtl:"0 8px 0 0",itemPaddingLarge:"0 4px",itemMarginLarge:"0 0 0 8px",itemMarginLargeRtl:"0 8px 0 0",buttonIconSizeSmall:"14px",buttonIconSizeMedium:"16px",buttonIconSizeLarge:"18px",inputWidthSmall:"60px",selectWidthSmall:"unset",inputMarginSmall:"0 0 0 8px",inputMarginSmallRtl:"0 8px 0 0",selectMarginSmall:"0 0 0 8px",prefixMarginSmall:"0 8px 0 0",suffixMarginSmall:"0 0 0 8px",inputWidthMedium:"60px",selectWidthMedium:"unset",inputMarginMedium:"0 0 0 8px",inputMarginMediumRtl:"0 8px 0 0",selectMarginMedium:"0 0 0 8px",prefixMarginMedium:"0 8px 0 0",suffixMarginMedium:"0 0 0 8px",inputWidthLarge:"60px",selectWidthLarge:"unset",inputMarginLarge:"0 0 0 8px",inputMarginLargeRtl:"0 8px 0 0",selectMarginLarge:"0 0 0 8px",prefixMarginLarge:"0 8px 0 0",suffixMarginLarge:"0 0 0 8px"},mi=e=>{const{textColor2:t,primaryColor:o,primaryColorHover:n,primaryColorPressed:r,inputColorDisabled:a,textColorDisabled:d,borderColor:l,borderRadius:s,fontSizeTiny:u,fontSizeSmall:v,fontSizeMedium:p,heightTiny:x,heightSmall:h,heightMedium:c}=e;return Object.assign(Object.assign({},bi),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${l}`,buttonBorderHover:`1px solid ${l}`,buttonBorderPressed:`1px solid ${l}`,buttonIconColor:t,buttonIconColorHover:t,buttonIconColorPressed:t,itemTextColor:t,itemTextColorHover:n,itemTextColorPressed:r,itemTextColorActive:o,itemTextColorDisabled:d,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:a,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${o}`,itemBorderDisabled:`1px solid ${l}`,itemBorderRadius:s,itemSizeSmall:x,itemSizeMedium:h,itemSizeLarge:c,itemFontSizeSmall:u,itemFontSizeMedium:v,itemFontSizeLarge:p,jumperFontSizeSmall:u,jumperFontSizeMedium:v,jumperFontSizeLarge:p,jumperTextColor:t,jumperTextColorDisabled:d})},xi=dt({name:"Pagination",common:at,peers:{Select:pn,Input:mr,Popselect:po},self:mi}),gn=xi;function yi(e,t,o){let n=!1,r=!1,a=1,d=t;if(t===1)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:d,fastBackwardTo:a,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1}]};if(t===2)return{hasFastBackward:!1,hasFastForward:!1,fastForwardTo:d,fastBackwardTo:a,items:[{type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1},{type:"page",label:2,active:e===2,mayBeFastBackward:!0,mayBeFastForward:!1}]};const l=1,s=t;let u=e,v=e;const p=(o-5)/2;v+=Math.ceil(p),v=Math.min(Math.max(v,l+o-3),s-2),u-=Math.floor(p),u=Math.max(Math.min(u,s-o+3),l+2);let x=!1,h=!1;u>l+2&&(x=!0),v<s-2&&(h=!0);const c=[];c.push({type:"page",label:1,active:e===1,mayBeFastBackward:!1,mayBeFastForward:!1}),x?(n=!0,a=u-1,c.push({type:"fast-backward",active:!1,label:void 0,options:_o(l+1,u-1)})):s>=l+1&&c.push({type:"page",label:l+1,mayBeFastBackward:!0,mayBeFastForward:!1,active:e===l+1});for(let g=u;g<=v;++g)c.push({type:"page",label:g,mayBeFastBackward:!1,mayBeFastForward:!1,active:e===g});return h?(r=!0,d=v+1,c.push({type:"fast-forward",active:!1,label:void 0,options:_o(v+1,s-1)})):v===s-2&&c[c.length-1].label!==s-1&&c.push({type:"page",mayBeFastForward:!0,mayBeFastBackward:!1,label:s-1,active:e===s-1}),c[c.length-1].label!==s&&c.push({type:"page",mayBeFastForward:!1,mayBeFastBackward:!1,label:s,active:e===s}),{hasFastBackward:n,hasFastForward:r,fastBackwardTo:a,fastForwardTo:d,items:c}}function _o(e,t){const o=[];for(let n=e;n<=t;++n)o.push({label:`${n}`,value:n});return o}const No=`
386
- background: var(--n-item-color-hover);
387
- color: var(--n-item-text-color-hover);
388
- border: var(--n-item-border-hover);
389
- `,Lo=[W("button",`
390
- background: var(--n-button-color-hover);
391
- border: var(--n-button-border-hover);
392
- color: var(--n-button-icon-color-hover);
393
- `)],Ci=R("pagination",`
394
- display: flex;
395
- vertical-align: middle;
396
- font-size: var(--n-item-font-size);
397
- flex-wrap: nowrap;
398
- `,[R("pagination-prefix",`
399
- display: flex;
400
- align-items: center;
401
- margin: var(--n-prefix-margin);
402
- `),R("pagination-suffix",`
403
- display: flex;
404
- align-items: center;
405
- margin: var(--n-suffix-margin);
406
- `),ne("> *:not(:first-child)",`
407
- margin: var(--n-item-margin);
408
- `),R("select",`
409
- width: var(--n-select-width);
410
- `),ne("&.transition-disabled",[R("pagination-item","transition: none!important;")]),R("pagination-quick-jumper",`
411
- white-space: nowrap;
412
- display: flex;
413
- color: var(--n-jumper-text-color);
414
- transition: color .3s var(--n-bezier);
415
- align-items: center;
416
- font-size: var(--n-jumper-font-size);
417
- `,[R("input",`
418
- margin: var(--n-input-margin);
419
- width: var(--n-input-width);
420
- `)]),R("pagination-item",`
421
- position: relative;
422
- cursor: pointer;
423
- user-select: none;
424
- -webkit-user-select: none;
425
- display: flex;
426
- align-items: center;
427
- justify-content: center;
428
- box-sizing: border-box;
429
- min-width: var(--n-item-size);
430
- height: var(--n-item-size);
431
- padding: var(--n-item-padding);
432
- background-color: var(--n-item-color);
433
- color: var(--n-item-text-color);
434
- border-radius: var(--n-item-border-radius);
435
- border: var(--n-item-border);
436
- fill: var(--n-button-icon-color);
437
- transition:
438
- color .3s var(--n-bezier),
439
- border-color .3s var(--n-bezier),
440
- background-color .3s var(--n-bezier),
441
- fill .3s var(--n-bezier);
442
- `,[W("button",`
443
- background: var(--n-button-color);
444
- color: var(--n-button-icon-color);
445
- border: var(--n-button-border);
446
- padding: 0;
447
- `,[R("base-icon",`
448
- font-size: var(--n-button-icon-size);
449
- `)]),Ue("disabled",[W("hover",No,Lo),ne("&:hover",No,Lo),ne("&:active",`
450
- background: var(--n-item-color-pressed);
451
- color: var(--n-item-text-color-pressed);
452
- border: var(--n-item-border-pressed);
453
- `,[W("button",`
454
- background: var(--n-button-color-pressed);
455
- border: var(--n-button-border-pressed);
456
- color: var(--n-button-icon-color-pressed);
457
- `)]),W("active",`
458
- background: var(--n-item-color-active);
459
- color: var(--n-item-text-color-active);
460
- border: var(--n-item-border-active);
461
- `,[ne("&:hover",`
462
- background: var(--n-item-color-active-hover);
463
- `)])]),W("disabled",`
464
- cursor: not-allowed;
465
- color: var(--n-item-text-color-disabled);
466
- `,[W("active, button",`
467
- background-color: var(--n-item-color-disabled);
468
- border: var(--n-item-border-disabled);
469
- `)])]),W("disabled",`
470
- cursor: not-allowed;
471
- `,[R("pagination-quick-jumper",`
472
- color: var(--n-jumper-text-color-disabled);
473
- `)]),W("simple",`
474
- display: flex;
475
- align-items: center;
476
- flex-wrap: nowrap;
477
- `,[R("pagination-quick-jumper",[R("input",`
478
- margin: 0;
479
- `)])])]),wi=Object.assign(Object.assign({},Ae.props),{simple:Boolean,page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:Number,pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,size:{type:String,default:"medium"},disabled:Boolean,pageSlot:{type:Number,default:9},selectProps:Object,prev:Function,next:Function,goto:Function,prefix:Function,suffix:Function,label:Function,displayOrder:{type:Array,default:["pages","size-picker","quick-jumper"]},to:zt.propTo,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]}),Si=he({name:"Pagination",props:wi,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:o,inlineThemeDisabled:n,mergedRtlRef:r}=ot(e),a=Ae("Pagination","-pagination",Ci,gn,e,o),{localeRef:d}=uo("Pagination"),l=j(null),s=j(e.defaultPage),v=j((()=>{const{defaultPageSize:P}=e;if(P!==void 0)return P;const J=e.pageSizes[0];return typeof J=="number"?J:J.value||10})()),p=it(le(e,"page"),s),x=it(le(e,"pageSize"),v),h=C(()=>{const{itemCount:P}=e;if(P!==void 0)return Math.max(1,Math.ceil(P/x.value));const{pageCount:J}=e;return J!==void 0?Math.max(J,1):1}),c=j("");ut(()=>{e.simple,c.value=String(p.value)});const g=j(!1),m=j(!1),y=j(!1),S=j(!1),O=()=>{e.disabled||(g.value=!0,X())},Z=()=>{e.disabled||(g.value=!1,X())},I=()=>{m.value=!0,X()},N=()=>{m.value=!1,X()},_=P=>{K(P)},$=C(()=>yi(p.value,h.value,e.pageSlot));ut(()=>{$.value.hasFastBackward?$.value.hasFastForward||(g.value=!1,y.value=!1):(m.value=!1,S.value=!1)});const z=C(()=>{const P=d.value.selectionSuffix;return e.pageSizes.map(J=>typeof J=="number"?{label:`${J} / ${P}`,value:J}:J)}),M=C(()=>{var P,J;return((J=(P=t==null?void 0:t.value)===null||P===void 0?void 0:P.Pagination)===null||J===void 0?void 0:J.inputSize)||Po(e.size)}),V=C(()=>{var P,J;return((J=(P=t==null?void 0:t.value)===null||P===void 0?void 0:P.Pagination)===null||J===void 0?void 0:J.selectSize)||Po(e.size)}),k=C(()=>(p.value-1)*x.value),L=C(()=>{const P=p.value*x.value-1,{itemCount:J}=e;return J!==void 0&&P>J-1?J-1:P}),A=C(()=>{const{itemCount:P}=e;return P!==void 0?P:(e.pageCount||1)*x.value}),E=Go("Pagination",r,o),X=()=>{rt(()=>{var P;const{value:J}=l;J&&(J.classList.add("transition-disabled"),(P=l.value)===null||P===void 0||P.offsetWidth,J.classList.remove("transition-disabled"))})};function K(P){if(P===p.value)return;const{"onUpdate:page":J,onUpdatePage:Fe,onChange:Q,simple:ge}=e;J&&ie(J,P),Fe&&ie(Fe,P),Q&&ie(Q,P),s.value=P,ge&&(c.value=String(P))}function ee(P){if(P===x.value)return;const{"onUpdate:pageSize":J,onUpdatePageSize:Fe,onPageSizeChange:Q}=e;J&&ie(J,P),Fe&&ie(Fe,P),Q&&ie(Q,P),v.value=P,h.value<p.value&&K(h.value)}function w(){if(e.disabled)return;const P=Math.min(p.value+1,h.value);K(P)}function f(){if(e.disabled)return;const P=Math.max(p.value-1,1);K(P)}function T(){if(e.disabled)return;const P=Math.min($.value.fastForwardTo,h.value);K(P)}function D(){if(e.disabled)return;const P=Math.max($.value.fastBackwardTo,1);K(P)}function U(P){ee(P)}function re(){const P=parseInt(c.value);Number.isNaN(P)||(K(Math.max(1,Math.min(P,h.value))),e.simple||(c.value=""))}function ue(){re()}function Se(P){if(!e.disabled)switch(P.type){case"page":K(P.label);break;case"fast-backward":D();break;case"fast-forward":T();break}}function oe(P){c.value=P.replace(/\D+/g,"")}ut(()=>{p.value,x.value,X()});const me=C(()=>{const{size:P}=e,{self:{buttonBorder:J,buttonBorderHover:Fe,buttonBorderPressed:Q,buttonIconColor:ge,buttonIconColorHover:Ie,buttonIconColorPressed:ze,itemTextColor:Pe,itemTextColorHover:Le,itemTextColorPressed:Ee,itemTextColorActive:ke,itemTextColorDisabled:F,itemColor:q,itemColorHover:xe,itemColorPressed:je,itemColorActive:Je,itemColorActiveHover:Ke,itemColorDisabled:Me,itemBorder:He,itemBorderHover:Ne,itemBorderPressed:G,itemBorderActive:te,itemBorderDisabled:Ce,itemBorderRadius:H,jumperTextColor:be,jumperTextColorDisabled:we,buttonColor:b,buttonColorHover:B,buttonColorPressed:Y,[ce("itemPadding",P)]:fe,[ce("itemMargin",P)]:pe,[ce("inputWidth",P)]:de,[ce("selectWidth",P)]:ve,[ce("inputMargin",P)]:Re,[ce("selectMargin",P)]:Oe,[ce("jumperFontSize",P)]:Qe,[ce("prefixMargin",P)]:Be,[ce("suffixMargin",P)]:_e,[ce("itemSize",P)]:ht,[ce("buttonIconSize",P)]:vt,[ce("itemFontSize",P)]:pt,[`${ce("itemMargin",P)}Rtl`]:gt,[`${ce("inputMargin",P)}Rtl`]:bt},common:{cubicBezierEaseInOut:mt}}=a.value;return{"--n-prefix-margin":Be,"--n-suffix-margin":_e,"--n-item-font-size":pt,"--n-select-width":ve,"--n-select-margin":Oe,"--n-input-width":de,"--n-input-margin":Re,"--n-input-margin-rtl":bt,"--n-item-size":ht,"--n-item-text-color":Pe,"--n-item-text-color-disabled":F,"--n-item-text-color-hover":Le,"--n-item-text-color-active":ke,"--n-item-text-color-pressed":Ee,"--n-item-color":q,"--n-item-color-hover":xe,"--n-item-color-disabled":Me,"--n-item-color-active":Je,"--n-item-color-active-hover":Ke,"--n-item-color-pressed":je,"--n-item-border":He,"--n-item-border-hover":Ne,"--n-item-border-disabled":Ce,"--n-item-border-active":te,"--n-item-border-pressed":G,"--n-item-padding":fe,"--n-item-border-radius":H,"--n-bezier":mt,"--n-jumper-font-size":Qe,"--n-jumper-text-color":be,"--n-jumper-text-color-disabled":we,"--n-item-margin":pe,"--n-item-margin-rtl":gt,"--n-button-icon-size":vt,"--n-button-icon-color":ge,"--n-button-icon-color-hover":Ie,"--n-button-icon-color-pressed":ze,"--n-button-color-hover":B,"--n-button-color":b,"--n-button-color-pressed":Y,"--n-button-border":J,"--n-button-border-hover":Fe,"--n-button-border-pressed":Q}}),se=n?lt("pagination",C(()=>{let P="";const{size:J}=e;return P+=J[0],P}),me,e):void 0;return{rtlEnabled:E,mergedClsPrefix:o,locale:d,selfRef:l,mergedPage:p,pageItems:C(()=>$.value.items),mergedItemCount:A,jumperValue:c,pageSizeOptions:z,mergedPageSize:x,inputSize:M,selectSize:V,mergedTheme:a,mergedPageCount:h,startIndex:k,endIndex:L,showFastForwardMenu:y,showFastBackwardMenu:S,fastForwardActive:g,fastBackwardActive:m,handleMenuSelect:_,handleFastForwardMouseenter:O,handleFastForwardMouseleave:Z,handleFastBackwardMouseenter:I,handleFastBackwardMouseleave:N,handleJumperInput:oe,handleBackwardClick:f,handleForwardClick:w,handlePageItemClick:Se,handleSizePickerChange:U,handleQuickJumperChange:ue,cssVars:n?void 0:me,themeClass:se==null?void 0:se.themeClass,onRender:se==null?void 0:se.onRender}},render(){const{$slots:e,mergedClsPrefix:t,disabled:o,cssVars:n,mergedPage:r,mergedPageCount:a,pageItems:d,showSizePicker:l,showQuickJumper:s,mergedTheme:u,locale:v,inputSize:p,selectSize:x,mergedPageSize:h,pageSizeOptions:c,jumperValue:g,simple:m,prev:y,next:S,prefix:O,suffix:Z,label:I,goto:N,handleJumperInput:_,handleSizePickerChange:$,handleBackwardClick:z,handlePageItemClick:M,handleForwardClick:V,handleQuickJumperChange:k,onRender:L}=this;L==null||L();const A=e.prefix||O,E=e.suffix||Z,X=y||e.prev,K=S||e.next,ee=I||e.label;return i("div",{ref:"selfRef",class:[`${t}-pagination`,this.themeClass,this.rtlEnabled&&`${t}-pagination--rtl`,o&&`${t}-pagination--disabled`,m&&`${t}-pagination--simple`],style:n},A?i("div",{class:`${t}-pagination-prefix`},A({page:r,pageSize:h,pageCount:a,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null,this.displayOrder.map(w=>{switch(w){case"pages":return i(st,null,i("div",{class:[`${t}-pagination-item`,!X&&`${t}-pagination-item--button`,(r<=1||r>a||o)&&`${t}-pagination-item--disabled`],onClick:z},X?X({page:r,pageSize:h,pageCount:a,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount}):i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(To,null):i(zo,null)})),m?i(st,null,i("div",{class:`${t}-pagination-quick-jumper`},i(wo,{value:g,onUpdateValue:_,size:p,placeholder:"",disabled:o,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:k}))," / ",a):d.map((f,T)=>{let D,U,re;const{type:ue}=f;switch(ue){case"page":const oe=f.label;ee?D=ee({type:"page",node:oe,active:f.active}):D=oe;break;case"fast-forward":const me=this.fastForwardActive?i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(Mo,null):i(Oo,null)}):i(Ve,{clsPrefix:t},{default:()=>i(Bo,null)});ee?D=ee({type:"fast-forward",node:me,active:this.fastForwardActive||this.showFastForwardMenu}):D=me,U=this.handleFastForwardMouseenter,re=this.handleFastForwardMouseleave;break;case"fast-backward":const se=this.fastBackwardActive?i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(Oo,null):i(Mo,null)}):i(Ve,{clsPrefix:t},{default:()=>i(Bo,null)});ee?D=ee({type:"fast-backward",node:se,active:this.fastBackwardActive||this.showFastBackwardMenu}):D=se,U=this.handleFastBackwardMouseenter,re=this.handleFastBackwardMouseleave;break}const Se=i("div",{key:T,class:[`${t}-pagination-item`,f.active&&`${t}-pagination-item--active`,ue!=="page"&&(ue==="fast-backward"&&this.showFastBackwardMenu||ue==="fast-forward"&&this.showFastForwardMenu)&&`${t}-pagination-item--hover`,o&&`${t}-pagination-item--disabled`,ue==="page"&&`${t}-pagination-item--clickable`],onClick:()=>{M(f)},onMouseenter:U,onMouseleave:re},D);if(ue==="page"&&!f.mayBeFastBackward&&!f.mayBeFastForward)return Se;{const oe=f.type==="page"?f.mayBeFastBackward?"fast-backward":"fast-forward":f.type;return i(ui,{to:this.to,key:oe,disabled:o,trigger:"hover",virtualScroll:!0,style:{width:"60px"},theme:u.peers.Popselect,themeOverrides:u.peerOverrides.Popselect,builtinThemeOverrides:{peers:{InternalSelectMenu:{height:"calc(var(--n-option-height) * 4.6)"}}},nodeProps:()=>({style:{justifyContent:"center"}}),show:ue==="page"?!1:ue==="fast-backward"?this.showFastBackwardMenu:this.showFastForwardMenu,onUpdateShow:me=>{ue!=="page"&&(me?ue==="fast-backward"?this.showFastBackwardMenu=me:this.showFastForwardMenu=me:(this.showFastBackwardMenu=!1,this.showFastForwardMenu=!1))},options:f.type!=="page"?f.options:[],onUpdateValue:this.handleMenuSelect,scrollable:!0,showCheckmark:!1},{default:()=>Se})}}),i("div",{class:[`${t}-pagination-item`,!K&&`${t}-pagination-item--button`,{[`${t}-pagination-item--disabled`]:r<1||r>=a||o}],onClick:V},K?K({page:r,pageSize:h,pageCount:a,itemCount:this.mergedItemCount,startIndex:this.startIndex,endIndex:this.endIndex}):i(Ve,{clsPrefix:t},{default:()=>this.rtlEnabled?i(zo,null):i(To,null)})));case"size-picker":return!m&&l?i(gi,Object.assign({consistentMenuWidth:!1,placeholder:"",showCheckmark:!1,to:this.to},this.selectProps,{size:x,options:c,value:h,disabled:o,theme:u.peers.Select,themeOverrides:u.peerOverrides.Select,onUpdateValue:$})):null;case"quick-jumper":return!m&&s?i("div",{class:`${t}-pagination-quick-jumper`},N?N():It(this.$slots.goto,()=>[v.goto]),i(wo,{value:g,onUpdateValue:_,size:p,placeholder:"",disabled:o,theme:u.peers.Input,themeOverrides:u.peerOverrides.Input,onChange:k})):null;default:return null}}),E?i("div",{class:`${t}-pagination-suffix`},E({page:r,pageSize:h,pageCount:a,startIndex:this.startIndex,endIndex:this.endIndex,itemCount:this.mergedItemCount})):null)}}),Ri={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"},ki=e=>{const{primaryColor:t,textColor2:o,dividerColor:n,hoverColor:r,popoverColor:a,invertedColor:d,borderRadius:l,fontSizeSmall:s,fontSizeMedium:u,fontSizeLarge:v,fontSizeHuge:p,heightSmall:x,heightMedium:h,heightLarge:c,heightHuge:g,textColor3:m,opacityDisabled:y}=e;return Object.assign(Object.assign({},Ri),{optionHeightSmall:x,optionHeightMedium:h,optionHeightLarge:c,optionHeightHuge:g,borderRadius:l,fontSizeSmall:s,fontSizeMedium:u,fontSizeLarge:v,fontSizeHuge:p,optionTextColor:o,optionTextColorHover:o,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:n,suffixColor:o,prefixColor:o,optionColorHover:r,optionColorActive:ye(t,{alpha:.1}),groupHeaderTextColor:m,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:d,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:y})},Pi=dt({name:"Dropdown",common:at,peers:{Popover:At},self:ki}),bn=Pi,Fi={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",resizableContainerSize:"8px",resizableSize:"2px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"},zi=e=>{const{cardColor:t,modalColor:o,popoverColor:n,textColor2:r,textColor1:a,tableHeaderColor:d,tableColorHover:l,iconColor:s,primaryColor:u,fontWeightStrong:v,borderRadius:p,lineHeight:x,fontSizeSmall:h,fontSizeMedium:c,fontSizeLarge:g,dividerColor:m,heightSmall:y,opacityDisabled:S,tableColorStriped:O}=e;return Object.assign(Object.assign({},Fi),{actionDividerColor:m,lineHeight:x,borderRadius:p,fontSizeSmall:h,fontSizeMedium:c,fontSizeLarge:g,borderColor:$e(t,m),tdColorHover:$e(t,l),tdColorStriped:$e(t,O),thColor:$e(t,d),thColorHover:$e($e(t,d),l),tdColor:t,tdTextColor:r,thTextColor:a,thFontWeight:v,thButtonColorHover:l,thIconColor:s,thIconColorActive:u,borderColorModal:$e(o,m),tdColorHoverModal:$e(o,l),tdColorStripedModal:$e(o,O),thColorModal:$e(o,d),thColorHoverModal:$e($e(o,d),l),tdColorModal:o,borderColorPopover:$e(n,m),tdColorHoverPopover:$e(n,l),tdColorStripedPopover:$e(n,O),thColorPopover:$e(n,d),thColorHoverPopover:$e($e(n,d),l),tdColorPopover:n,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:u,loadingSize:y,opacityLoading:S})},Mi=dt({name:"DataTable",common:at,peers:{Button:Jn,Checkbox:xr,Radio:yr,Pagination:gn,Scrollbar:qo,Empty:Qo,Popover:At,Ellipsis:Cr,Dropdown:bn},self:zi}),Oi=Mi,Ti=he({name:"PerformantEllipsis",props:wr,inheritAttrs:!1,setup(e,{attrs:t,slots:o}){const n=j(!1),r=Qn();return Yn("-ellipsis",Sr,r),{mouseEntered:n,renderTrigger:()=>{const{lineClamp:d}=e,l=r.value;return i("span",Object.assign({},Pt(t,{class:[`${l}-ellipsis`,d!==void 0?Rr(l):void 0,e.expandTrigger==="click"?kr(l,"pointer"):void 0],style:d===void 0?{textOverflow:"ellipsis"}:{"-webkit-line-clamp":d}}),{onMouseenter:()=>{n.value=!0}}),d?o:i("span",null,o))}}},render(){return this.mouseEntered?i(fo,Pt({},this.$attrs,this.$props),this.$slots):this.renderTrigger()}}),Bi=he({name:"DataTableRenderSorter",props:{render:{type:Function,required:!0},order:{type:[String,Boolean],default:!1}},render(){const{render:e,order:t}=this;return e({order:t})}}),$i=Object.assign(Object.assign({},Ae.props),{onUnstableColumnResize:Function,pagination:{type:[Object,Boolean],default:!1},paginateSinglePage:{type:Boolean,default:!0},minHeight:[Number,String],maxHeight:[Number,String],columns:{type:Array,default:()=>[]},rowClassName:[String,Function],rowProps:Function,rowKey:Function,summary:[Function],data:{type:Array,default:()=>[]},loading:Boolean,bordered:{type:Boolean,default:void 0},bottomBordered:{type:Boolean,default:void 0},striped:Boolean,scrollX:[Number,String],defaultCheckedRowKeys:{type:Array,default:()=>[]},checkedRowKeys:Array,singleLine:{type:Boolean,default:!0},singleColumn:Boolean,size:{type:String,default:"medium"},remote:Boolean,defaultExpandedRowKeys:{type:Array,default:[]},defaultExpandAll:Boolean,expandedRowKeys:Array,stickyExpandedRows:Boolean,virtualScroll:Boolean,tableLayout:{type:String,default:"auto"},allowCheckingNotLoaded:Boolean,cascade:{type:Boolean,default:!0},childrenKey:{type:String,default:"children"},indent:{type:Number,default:16},flexHeight:Boolean,summaryPlacement:{type:String,default:"bottom"},paginationBehaviorOnFilter:{type:String,default:"current"},scrollbarProps:Object,renderCell:Function,renderExpandIcon:Function,spinProps:{type:Object,default:{}},onLoad:Function,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],"onUpdate:sorter":[Function,Array],onUpdateSorter:[Function,Array],"onUpdate:filters":[Function,Array],onUpdateFilters:[Function,Array],"onUpdate:checkedRowKeys":[Function,Array],onUpdateCheckedRowKeys:[Function,Array],"onUpdate:expandedRowKeys":[Function,Array],onUpdateExpandedRowKeys:[Function,Array],onScroll:Function,onPageChange:[Function,Array],onPageSizeChange:[Function,Array],onSorterChange:[Function,Array],onFiltersChange:[Function,Array],onCheckedRowKeysChange:[Function,Array]}),Ze=ft("n-data-table"),Ii=he({name:"SortIcon",props:{column:{type:Object,required:!0}},setup(e){const{mergedComponentPropsRef:t}=ot(),{mergedSortStateRef:o,mergedClsPrefixRef:n}=Te(Ze),r=C(()=>o.value.find(s=>s.columnKey===e.column.key)),a=C(()=>r.value!==void 0),d=C(()=>{const{value:s}=r;return s&&a.value?s.order:!1}),l=C(()=>{var s,u;return((u=(s=t==null?void 0:t.value)===null||s===void 0?void 0:s.DataTable)===null||u===void 0?void 0:u.renderSorter)||e.column.renderSorter});return{mergedClsPrefix:n,active:a,mergedSortOrder:d,mergedRenderSorter:l}},render(){const{mergedRenderSorter:e,mergedSortOrder:t,mergedClsPrefix:o}=this,{renderSorterIcon:n}=this.column;return e?i(Bi,{render:e,order:t}):i("span",{class:[`${o}-data-table-sorter`,t==="ascend"&&`${o}-data-table-sorter--asc`,t==="descend"&&`${o}-data-table-sorter--desc`]},n?n({order:t}):i(Ve,{clsPrefix:o},{default:()=>i(_r,null)}))}}),Ai=he({name:"DataTableRenderFilter",props:{render:{type:Function,required:!0},active:{type:Boolean,default:!1},show:{type:Boolean,default:!1}},render(){const{render:e,active:t,show:o}=this;return e({active:t,show:o})}}),mn=40,xn=40;function Eo(e){if(e.type==="selection")return e.width===void 0?mn:Rt(e.width);if(e.type==="expand")return e.width===void 0?xn:Rt(e.width);if(!("children"in e))return typeof e.width=="string"?Rt(e.width):e.width}function _i(e){var t,o;if(e.type==="selection")return Xe((t=e.width)!==null&&t!==void 0?t:mn);if(e.type==="expand")return Xe((o=e.width)!==null&&o!==void 0?o:xn);if(!("children"in e))return Xe(e.width)}function We(e){return e.type==="selection"?"__n_selection__":e.type==="expand"?"__n_expand__":e.key}function Ko(e){return e&&(typeof e=="object"?Object.assign({},e):e)}function Ni(e){return e==="ascend"?1:e==="descend"?-1:0}function Li(e,t,o){return o!==void 0&&(e=Math.min(e,typeof o=="number"?o:parseFloat(o))),t!==void 0&&(e=Math.max(e,typeof t=="number"?t:parseFloat(t))),e}function Ei(e,t){if(t!==void 0)return{width:t,minWidth:t,maxWidth:t};const o=_i(e),{minWidth:n,maxWidth:r}=e;return{width:o,minWidth:Xe(n)||o,maxWidth:Xe(r)}}function Ki(e,t,o){return typeof o=="function"?o(e,t):o||""}function to(e){return e.filterOptionValues!==void 0||e.filterOptionValue===void 0&&e.defaultFilterOptionValues!==void 0}function oo(e){return"children"in e?!1:!!e.sorter}function yn(e){return"children"in e&&e.children.length?!1:!!e.resizable}function Ho(e){return"children"in e?!1:!!e.filter&&(!!e.filterOptions||!!e.renderFilterMenu)}function Do(e){if(e){if(e==="descend")return"ascend"}else return"descend";return!1}function Hi(e,t){return e.sorter===void 0?null:t===null||t.columnKey!==e.key?{columnKey:e.key,sorter:e.sorter,order:Do(!1)}:Object.assign(Object.assign({},t),{order:Do(t.order)})}function Cn(e,t){return t.find(o=>o.columnKey===e.key&&o.order)!==void 0}const Di=he({name:"DataTableFilterMenu",props:{column:{type:Object,required:!0},radioGroupName:{type:String,required:!0},multiple:{type:Boolean,required:!0},value:{type:[Array,String,Number],default:null},options:{type:Array,required:!0},onConfirm:{type:Function,required:!0},onClear:{type:Function,required:!0},onChange:{type:Function,required:!0}},setup(e){const{mergedClsPrefixRef:t,mergedThemeRef:o,localeRef:n}=Te(Ze),r=j(e.value),a=C(()=>{const{value:p}=r;return Array.isArray(p)?p:null}),d=C(()=>{const{value:p}=r;return to(e.column)?Array.isArray(p)&&p.length&&p[0]||null:Array.isArray(p)?null:p});function l(p){e.onChange(p)}function s(p){e.multiple&&Array.isArray(p)?r.value=p:to(e.column)&&!Array.isArray(p)?r.value=[p]:r.value=p}function u(){l(r.value),e.onConfirm()}function v(){e.multiple||to(e.column)?l([]):l(null),e.onClear()}return{mergedClsPrefix:t,mergedTheme:o,locale:n,checkboxGroupValue:a,radioGroupValue:d,handleChange:s,handleConfirmClick:u,handleClearClick:v}},render(){const{mergedTheme:e,locale:t,mergedClsPrefix:o}=this;return i("div",{class:`${o}-data-table-filter-menu`},i(so,null,{default:()=>{const{checkboxGroupValue:n,handleChange:r}=this;return this.multiple?i(Pr,{value:n,class:`${o}-data-table-filter-menu__group`,onUpdateValue:r},{default:()=>this.options.map(a=>i(ho,{key:a.value,theme:e.peers.Checkbox,themeOverrides:e.peerOverrides.Checkbox,value:a.value},{default:()=>a.label}))}):i(Fr,{name:this.radioGroupName,class:`${o}-data-table-filter-menu__group`,value:this.radioGroupValue,onUpdateValue:this.handleChange},{default:()=>this.options.map(a=>i(rn,{key:a.value,value:a.value,theme:e.peers.Radio,themeOverrides:e.peerOverrides.Radio},{default:()=>a.label}))})}}),i("div",{class:`${o}-data-table-filter-menu__action`},i(Co,{size:"tiny",theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,onClick:this.handleClearClick},{default:()=>t.clear}),i(Co,{theme:e.peers.Button,themeOverrides:e.peerOverrides.Button,type:"primary",size:"tiny",onClick:this.handleConfirmClick},{default:()=>t.confirm})))}});function ji(e,t,o){const n=Object.assign({},e);return n[t]=o,n}const Ui=he({name:"DataTableFilterButton",props:{column:{type:Object,required:!0},options:{type:Array,default:()=>[]}},setup(e){const{mergedComponentPropsRef:t}=ot(),{mergedThemeRef:o,mergedClsPrefixRef:n,mergedFilterStateRef:r,filterMenuCssVarsRef:a,paginationBehaviorOnFilterRef:d,doUpdatePage:l,doUpdateFilters:s}=Te(Ze),u=j(!1),v=r,p=C(()=>e.column.filterMultiple!==!1),x=C(()=>{const S=v.value[e.column.key];if(S===void 0){const{value:O}=p;return O?[]:null}return S}),h=C(()=>{const{value:S}=x;return Array.isArray(S)?S.length>0:S!==null}),c=C(()=>{var S,O;return((O=(S=t==null?void 0:t.value)===null||S===void 0?void 0:S.DataTable)===null||O===void 0?void 0:O.renderFilter)||e.column.renderFilter});function g(S){const O=ji(v.value,e.column.key,S);s(O,e.column),d.value==="first"&&l(1)}function m(){u.value=!1}function y(){u.value=!1}return{mergedTheme:o,mergedClsPrefix:n,active:h,showPopover:u,mergedRenderFilter:c,filterMultiple:p,mergedFilterValue:x,filterMenuCssVars:a,handleFilterChange:g,handleFilterMenuConfirm:y,handleFilterMenuCancel:m}},render(){const{mergedTheme:e,mergedClsPrefix:t,handleFilterMenuCancel:o}=this;return i(_t,{show:this.showPopover,onUpdateShow:n=>this.showPopover=n,trigger:"click",theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,placement:"bottom",style:{padding:0}},{trigger:()=>{const{mergedRenderFilter:n}=this;if(n)return i(Ai,{"data-data-table-filter":!0,render:n,active:this.active,show:this.showPopover});const{renderFilterIcon:r}=this.column;return i("div",{"data-data-table-filter":!0,class:[`${t}-data-table-filter`,{[`${t}-data-table-filter--active`]:this.active,[`${t}-data-table-filter--show`]:this.showPopover}]},r?r({active:this.active,show:this.showPopover}):i(Ve,{clsPrefix:t},{default:()=>i(Lr,null)}))},default:()=>{const{renderFilterMenu:n}=this.column;return n?n({hide:o}):i(Di,{style:this.filterMenuCssVars,radioGroupName:String(this.column.key),multiple:this.filterMultiple,value:this.mergedFilterValue,options:this.options,column:this.column,onChange:this.handleFilterChange,onClear:this.handleFilterMenuCancel,onConfirm:this.handleFilterMenuConfirm})}})}}),Wi=he({name:"ColumnResizeButton",props:{onResizeStart:Function,onResize:Function,onResizeEnd:Function},setup(e){const{mergedClsPrefixRef:t}=Te(Ze),o=j(!1);let n=0;function r(s){return s.clientX}function a(s){var u;s.preventDefault();const v=o.value;n=r(s),o.value=!0,v||(ct("mousemove",window,d),ct("mouseup",window,l),(u=e.onResizeStart)===null||u===void 0||u.call(e))}function d(s){var u;(u=e.onResize)===null||u===void 0||u.call(e,r(s)-n)}function l(){var s;o.value=!1,(s=e.onResizeEnd)===null||s===void 0||s.call(e),nt("mousemove",window,d),nt("mouseup",window,l)}return Ot(()=>{nt("mousemove",window,d),nt("mouseup",window,l)}),{mergedClsPrefix:t,active:o,handleMousedown:a}},render(){const{mergedClsPrefix:e}=this;return i("span",{"data-data-table-resizable":!0,class:[`${e}-data-table-resize-button`,this.active&&`${e}-data-table-resize-button--active`],onMousedown:this.handleMousedown})}}),wn=he({name:"DropdownDivider",props:{clsPrefix:{type:String,required:!0}},render(){return i("div",{class:`${this.clsPrefix}-dropdown-divider`})}}),bo=ft("n-dropdown-menu"),Lt=ft("n-dropdown"),jo=ft("n-dropdown-option");function ao(e,t){return e.type==="submenu"||e.type===void 0&&e[t]!==void 0}function Vi(e){return e.type==="group"}function Sn(e){return e.type==="divider"}function qi(e){return e.type==="render"}const Rn=he({name:"DropdownOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:"right-start"},props:Object,scrollable:Boolean},setup(e){const t=Te(Lt),{hoverKeyRef:o,keyboardKeyRef:n,lastToggledSubmenuKeyRef:r,pendingKeyPathRef:a,activeKeyPathRef:d,animatedRef:l,mergedShowRef:s,renderLabelRef:u,renderIconRef:v,labelFieldRef:p,childrenFieldRef:x,renderOptionRef:h,nodePropsRef:c,menuPropsRef:g}=t,m=Te(jo,null),y=Te(bo),S=Te(Jo),O=C(()=>e.tmNode.rawNode),Z=C(()=>{const{value:K}=x;return ao(e.tmNode.rawNode,K)}),I=C(()=>{const{disabled:K}=e.tmNode;return K}),N=C(()=>{if(!Z.value)return!1;const{key:K,disabled:ee}=e.tmNode;if(ee)return!1;const{value:w}=o,{value:f}=n,{value:T}=r,{value:D}=a;return w!==null?D.includes(K):f!==null?D.includes(K)&&D[D.length-1]!==K:T!==null?D.includes(K):!1}),_=C(()=>n.value===null&&!l.value),$=$r(N,300,_),z=C(()=>!!(m!=null&&m.enteringSubmenuRef.value)),M=j(!1);qe(jo,{enteringSubmenuRef:M});function V(){M.value=!0}function k(){M.value=!1}function L(){const{parentKey:K,tmNode:ee}=e;ee.disabled||s.value&&(r.value=K,n.value=null,o.value=ee.key)}function A(){const{tmNode:K}=e;K.disabled||s.value&&o.value!==K.key&&L()}function E(K){if(e.tmNode.disabled||!s.value)return;const{relatedTarget:ee}=K;ee&&!tt({target:ee},"dropdownOption")&&!tt({target:ee},"scrollbarRail")&&(o.value=null)}function X(){const{value:K}=Z,{tmNode:ee}=e;s.value&&!K&&!ee.disabled&&(t.doSelect(ee.key,ee.rawNode),t.doUpdateShow(!1))}return{labelField:p,renderLabel:u,renderIcon:v,siblingHasIcon:y.showIconRef,siblingHasSubmenu:y.hasSubmenuRef,menuProps:g,popoverBody:S,animated:l,mergedShowSubmenu:C(()=>$.value&&!z.value),rawNode:O,hasSubmenu:Z,pending:De(()=>{const{value:K}=a,{key:ee}=e.tmNode;return K.includes(ee)}),childActive:De(()=>{const{value:K}=d,{key:ee}=e.tmNode,w=K.findIndex(f=>ee===f);return w===-1?!1:w<K.length-1}),active:De(()=>{const{value:K}=d,{key:ee}=e.tmNode,w=K.findIndex(f=>ee===f);return w===-1?!1:w===K.length-1}),mergedDisabled:I,renderOption:h,nodeProps:c,handleClick:X,handleMouseMove:A,handleMouseEnter:L,handleMouseLeave:E,handleSubmenuBeforeEnter:V,handleSubmenuAfterEnter:k}},render(){var e,t;const{animated:o,rawNode:n,mergedShowSubmenu:r,clsPrefix:a,siblingHasIcon:d,siblingHasSubmenu:l,renderLabel:s,renderIcon:u,renderOption:v,nodeProps:p,props:x,scrollable:h}=this;let c=null;if(r){const S=(e=this.menuProps)===null||e===void 0?void 0:e.call(this,n,n.children);c=i(kn,Object.assign({},S,{clsPrefix:a,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}const g={class:[`${a}-dropdown-option-body`,this.pending&&`${a}-dropdown-option-body--pending`,this.active&&`${a}-dropdown-option-body--active`,this.childActive&&`${a}-dropdown-option-body--child-active`,this.mergedDisabled&&`${a}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},m=p==null?void 0:p(n),y=i("div",Object.assign({class:[`${a}-dropdown-option`,m==null?void 0:m.class],"data-dropdown-option":!0},m),i("div",Pt(g,x),[i("div",{class:[`${a}-dropdown-option-body__prefix`,d&&`${a}-dropdown-option-body__prefix--show-icon`]},[u?u(n):Ye(n.icon)]),i("div",{"data-dropdown-option":!0,class:`${a}-dropdown-option-body__label`},s?s(n):Ye((t=n[this.labelField])!==null&&t!==void 0?t:n.title)),i("div",{"data-dropdown-option":!0,class:[`${a}-dropdown-option-body__suffix`,l&&`${a}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?i(zr,null,{default:()=>i(an,null)}):null)]),this.hasSubmenu?i(tn,null,{default:()=>[i(on,null,{default:()=>i("div",{class:`${a}-dropdown-offset-container`},i(nn,{show:this.mergedShowSubmenu,placement:this.placement,to:h&&this.popoverBody||void 0,teleportDisabled:!h},{default:()=>i("div",{class:`${a}-dropdown-menu-wrapper`},o?i(Bt,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:"fade-in-scale-up-transition",appear:!0},{default:()=>c}):c)}))})]}):null);return v?v({node:y,option:n}):y}}),Gi=he({name:"DropdownGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{showIconRef:e,hasSubmenuRef:t}=Te(bo),{renderLabelRef:o,labelFieldRef:n,nodePropsRef:r,renderOptionRef:a}=Te(Lt);return{labelField:n,showIcon:e,hasSubmenu:t,renderLabel:o,nodeProps:r,renderOption:a}},render(){var e;const{clsPrefix:t,hasSubmenu:o,showIcon:n,nodeProps:r,renderLabel:a,renderOption:d}=this,{rawNode:l}=this.tmNode,s=i("div",Object.assign({class:`${t}-dropdown-option`},r==null?void 0:r(l)),i("div",{class:`${t}-dropdown-option-body ${t}-dropdown-option-body--group`},i("div",{"data-dropdown-option":!0,class:[`${t}-dropdown-option-body__prefix`,n&&`${t}-dropdown-option-body__prefix--show-icon`]},Ye(l.icon)),i("div",{class:`${t}-dropdown-option-body__label`,"data-dropdown-option":!0},a?a(l):Ye((e=l.title)!==null&&e!==void 0?e:l[this.labelField])),i("div",{class:[`${t}-dropdown-option-body__suffix`,o&&`${t}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return d?d({node:s,option:l}):s}}),Xi=he({name:"NDropdownGroup",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){const{tmNode:e,parentKey:t,clsPrefix:o}=this,{children:n}=e;return i(st,null,i(Gi,{clsPrefix:o,tmNode:e,key:e.key}),n==null?void 0:n.map(r=>{const{rawNode:a}=r;return a.show===!1?null:Sn(a)?i(wn,{clsPrefix:o,key:r.key}):r.isGroup?(ro("dropdown","`group` node is not allowed to be put in `group` node."),null):i(Rn,{clsPrefix:o,tmNode:r,parentKey:t,key:r.key})}))}}),Zi=he({name:"DropdownRenderOption",props:{tmNode:{type:Object,required:!0}},render(){const{rawNode:{render:e,props:t}}=this.tmNode;return i("div",t,[e==null?void 0:e()])}}),kn=he({name:"DropdownMenu",props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){const{renderIconRef:t,childrenFieldRef:o}=Te(Lt);qe(bo,{showIconRef:C(()=>{const r=t.value;return e.tmNodes.some(a=>{var d;if(a.isGroup)return(d=a.children)===null||d===void 0?void 0:d.some(({rawNode:s})=>r?r(s):s.icon);const{rawNode:l}=a;return r?r(l):l.icon})}),hasSubmenuRef:C(()=>{const{value:r}=o;return e.tmNodes.some(a=>{var d;if(a.isGroup)return(d=a.children)===null||d===void 0?void 0:d.some(({rawNode:s})=>ao(s,r));const{rawNode:l}=a;return ao(l,r)})})});const n=j(null);return qe(er,null),qe(tr,null),qe(Jo,n),{bodyRef:n}},render(){const{parentKey:e,clsPrefix:t,scrollable:o}=this,n=this.tmNodes.map(r=>{const{rawNode:a}=r;return a.show===!1?null:qi(a)?i(Zi,{tmNode:r,key:r.key}):Sn(a)?i(wn,{clsPrefix:t,key:r.key}):Vi(a)?i(Xi,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key}):i(Rn,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key,props:a.props,scrollable:o})});return i("div",{class:[`${t}-dropdown-menu`,o&&`${t}-dropdown-menu--scrollable`],ref:"bodyRef"},o?i(or,{contentClass:`${t}-dropdown-menu__content`},{default:()=>n}):n,this.showArrow?Mr({clsPrefix:t,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),Ji=R("dropdown-menu",`
480
- transform-origin: var(--v-transform-origin);
481
- background-color: var(--n-color);
482
- border-radius: var(--n-border-radius);
483
- box-shadow: var(--n-box-shadow);
484
- position: relative;
485
- transition:
486
- background-color .3s var(--n-bezier),
487
- box-shadow .3s var(--n-bezier);
488
- `,[$t(),R("dropdown-option",`
489
- position: relative;
490
- `,[ne("a",`
491
- text-decoration: none;
492
- color: inherit;
493
- outline: none;
494
- `,[ne("&::before",`
495
- content: "";
496
- position: absolute;
497
- left: 0;
498
- right: 0;
499
- top: 0;
500
- bottom: 0;
501
- `)]),R("dropdown-option-body",`
502
- display: flex;
503
- cursor: pointer;
504
- position: relative;
505
- height: var(--n-option-height);
506
- line-height: var(--n-option-height);
507
- font-size: var(--n-font-size);
508
- color: var(--n-option-text-color);
509
- transition: color .3s var(--n-bezier);
510
- `,[ne("&::before",`
511
- content: "";
512
- position: absolute;
513
- top: 0;
514
- bottom: 0;
515
- left: 4px;
516
- right: 4px;
517
- transition: background-color .3s var(--n-bezier);
518
- border-radius: var(--n-border-radius);
519
- `),Ue("disabled",[W("pending",`
520
- color: var(--n-option-text-color-hover);
521
- `,[ae("prefix, suffix",`
522
- color: var(--n-option-text-color-hover);
523
- `),ne("&::before","background-color: var(--n-option-color-hover);")]),W("active",`
524
- color: var(--n-option-text-color-active);
525
- `,[ae("prefix, suffix",`
526
- color: var(--n-option-text-color-active);
527
- `),ne("&::before","background-color: var(--n-option-color-active);")]),W("child-active",`
528
- color: var(--n-option-text-color-child-active);
529
- `,[ae("prefix, suffix",`
530
- color: var(--n-option-text-color-child-active);
531
- `)])]),W("disabled",`
532
- cursor: not-allowed;
533
- opacity: var(--n-option-opacity-disabled);
534
- `),W("group",`
535
- font-size: calc(var(--n-font-size) - 1px);
536
- color: var(--n-group-header-text-color);
537
- `,[ae("prefix",`
538
- width: calc(var(--n-option-prefix-width) / 2);
539
- `,[W("show-icon",`
540
- width: calc(var(--n-option-icon-prefix-width) / 2);
541
- `)])]),ae("prefix",`
542
- width: var(--n-option-prefix-width);
543
- display: flex;
544
- justify-content: center;
545
- align-items: center;
546
- color: var(--n-prefix-color);
547
- transition: color .3s var(--n-bezier);
548
- z-index: 1;
549
- `,[W("show-icon",`
550
- width: var(--n-option-icon-prefix-width);
551
- `),R("icon",`
552
- font-size: var(--n-option-icon-size);
553
- `)]),ae("label",`
554
- white-space: nowrap;
555
- flex: 1;
556
- z-index: 1;
557
- `),ae("suffix",`
558
- box-sizing: border-box;
559
- flex-grow: 0;
560
- flex-shrink: 0;
561
- display: flex;
562
- justify-content: flex-end;
563
- align-items: center;
564
- min-width: var(--n-option-suffix-width);
565
- padding: 0 8px;
566
- transition: color .3s var(--n-bezier);
567
- color: var(--n-suffix-color);
568
- z-index: 1;
569
- `,[W("has-submenu",`
570
- width: var(--n-option-icon-suffix-width);
571
- `),R("icon",`
572
- font-size: var(--n-option-icon-size);
573
- `)]),R("dropdown-menu","pointer-events: all;")]),R("dropdown-offset-container",`
574
- pointer-events: none;
575
- position: absolute;
576
- left: 0;
577
- right: 0;
578
- top: -4px;
579
- bottom: -4px;
580
- `)]),R("dropdown-divider",`
581
- transition: background-color .3s var(--n-bezier);
582
- background-color: var(--n-divider-color);
583
- height: 1px;
584
- margin: 4px 0;
585
- `),R("dropdown-menu-wrapper",`
586
- transform-origin: var(--v-transform-origin);
587
- width: fit-content;
588
- `),ne(">",[R("scrollbar",`
589
- height: inherit;
590
- max-height: inherit;
591
- `)]),Ue("scrollable",`
592
- padding: var(--n-padding);
593
- `),W("scrollable",[ae("content",`
594
- padding: var(--n-padding);
595
- `)])]),Qi={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},Yi=Object.keys(Ft),ea=Object.assign(Object.assign(Object.assign({},Ft),Qi),Ae.props),ta=he({name:"Dropdown",inheritAttrs:!1,props:ea,setup(e){const t=j(!1),o=it(le(e,"show"),t),n=C(()=>{const{keyField:k,childrenField:L}=e;return Nt(e.options,{getKey(A){return A[k]},getDisabled(A){return A.disabled===!0},getIgnored(A){return A.type==="divider"||A.type==="render"},getChildren(A){return A[L]}})}),r=C(()=>n.value.treeNodes),a=j(null),d=j(null),l=j(null),s=C(()=>{var k,L,A;return(A=(L=(k=a.value)!==null&&k!==void 0?k:d.value)!==null&&L!==void 0?L:l.value)!==null&&A!==void 0?A:null}),u=C(()=>n.value.getPath(s.value).keyPath),v=C(()=>n.value.getPath(e.value).keyPath),p=De(()=>e.keyboard&&o.value);Ir({keydown:{ArrowUp:{prevent:!0,handler:I},ArrowRight:{prevent:!0,handler:Z},ArrowDown:{prevent:!0,handler:N},ArrowLeft:{prevent:!0,handler:O},Enter:{prevent:!0,handler:_},Escape:S}},p);const{mergedClsPrefixRef:x,inlineThemeDisabled:h}=ot(e),c=Ae("Dropdown","-dropdown",Ji,bn,e,x);qe(Lt,{labelFieldRef:le(e,"labelField"),childrenFieldRef:le(e,"childrenField"),renderLabelRef:le(e,"renderLabel"),renderIconRef:le(e,"renderIcon"),hoverKeyRef:a,keyboardKeyRef:d,lastToggledSubmenuKeyRef:l,pendingKeyPathRef:u,activeKeyPathRef:v,animatedRef:le(e,"animated"),mergedShowRef:o,nodePropsRef:le(e,"nodeProps"),renderOptionRef:le(e,"renderOption"),menuPropsRef:le(e,"menuProps"),doSelect:g,doUpdateShow:m}),Ge(o,k=>{!e.animated&&!k&&y()});function g(k,L){const{onSelect:A}=e;A&&ie(A,k,L)}function m(k){const{"onUpdate:show":L,onUpdateShow:A}=e;L&&ie(L,k),A&&ie(A,k),t.value=k}function y(){a.value=null,d.value=null,l.value=null}function S(){m(!1)}function O(){z("left")}function Z(){z("right")}function I(){z("up")}function N(){z("down")}function _(){const k=$();k!=null&&k.isLeaf&&o.value&&(g(k.key,k.rawNode),m(!1))}function $(){var k;const{value:L}=n,{value:A}=s;return!L||A===null?null:(k=L.getNode(A))!==null&&k!==void 0?k:null}function z(k){const{value:L}=s,{value:{getFirstAvailableNode:A}}=n;let E=null;if(L===null){const X=A();X!==null&&(E=X.key)}else{const X=$();if(X){let K;switch(k){case"down":K=X.getNext();break;case"up":K=X.getPrev();break;case"right":K=X.getChild();break;case"left":K=X.getParent();break}K&&(E=K.key)}}E!==null&&(a.value=null,d.value=E)}const M=C(()=>{const{size:k,inverted:L}=e,{common:{cubicBezierEaseInOut:A},self:E}=c.value,{padding:X,dividerColor:K,borderRadius:ee,optionOpacityDisabled:w,[ce("optionIconSuffixWidth",k)]:f,[ce("optionSuffixWidth",k)]:T,[ce("optionIconPrefixWidth",k)]:D,[ce("optionPrefixWidth",k)]:U,[ce("fontSize",k)]:re,[ce("optionHeight",k)]:ue,[ce("optionIconSize",k)]:Se}=E,oe={"--n-bezier":A,"--n-font-size":re,"--n-padding":X,"--n-border-radius":ee,"--n-option-height":ue,"--n-option-prefix-width":U,"--n-option-icon-prefix-width":D,"--n-option-suffix-width":T,"--n-option-icon-suffix-width":f,"--n-option-icon-size":Se,"--n-divider-color":K,"--n-option-opacity-disabled":w};return L?(oe["--n-color"]=E.colorInverted,oe["--n-option-color-hover"]=E.optionColorHoverInverted,oe["--n-option-color-active"]=E.optionColorActiveInverted,oe["--n-option-text-color"]=E.optionTextColorInverted,oe["--n-option-text-color-hover"]=E.optionTextColorHoverInverted,oe["--n-option-text-color-active"]=E.optionTextColorActiveInverted,oe["--n-option-text-color-child-active"]=E.optionTextColorChildActiveInverted,oe["--n-prefix-color"]=E.prefixColorInverted,oe["--n-suffix-color"]=E.suffixColorInverted,oe["--n-group-header-text-color"]=E.groupHeaderTextColorInverted):(oe["--n-color"]=E.color,oe["--n-option-color-hover"]=E.optionColorHover,oe["--n-option-color-active"]=E.optionColorActive,oe["--n-option-text-color"]=E.optionTextColor,oe["--n-option-text-color-hover"]=E.optionTextColorHover,oe["--n-option-text-color-active"]=E.optionTextColorActive,oe["--n-option-text-color-child-active"]=E.optionTextColorChildActive,oe["--n-prefix-color"]=E.prefixColor,oe["--n-suffix-color"]=E.suffixColor,oe["--n-group-header-text-color"]=E.groupHeaderTextColor),oe}),V=h?lt("dropdown",C(()=>`${e.size[0]}${e.inverted?"i":""}`),M,e):void 0;return{mergedClsPrefix:x,mergedTheme:c,tmNodes:r,mergedShow:o,handleAfterLeave:()=>{e.animated&&y()},doUpdateShow:m,cssVars:h?void 0:M,themeClass:V==null?void 0:V.themeClass,onRender:V==null?void 0:V.onRender}},render(){const e=(n,r,a,d,l)=>{var s;const{mergedClsPrefix:u,menuProps:v}=this;(s=this.onRender)===null||s===void 0||s.call(this);const p=(v==null?void 0:v(void 0,this.tmNodes.map(h=>h.rawNode)))||{},x={ref:sn(r),class:[n,`${u}-dropdown`,this.themeClass],clsPrefix:u,tmNodes:this.tmNodes,style:[...a,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:d,onMouseleave:l};return i(kn,Pt(this.$attrs,x,p))},{mergedTheme:t}=this,o={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return i(_t,Object.assign({},Xo(this.$props,Yi),o),{trigger:()=>{var n,r;return(r=(n=this.$slots).default)===null||r===void 0?void 0:r.call(n)}})}}),Pn="_n_all__",Fn="_n_none__";function oa(e,t,o,n){return e?r=>{for(const a of e)switch(r){case Pn:o(!0);return;case Fn:n(!0);return;default:if(typeof a=="object"&&a.key===r){a.onSelect(t.value);return}}}:()=>{}}function na(e,t){return e?e.map(o=>{switch(o){case"all":return{label:t.checkTableAll,key:Pn};case"none":return{label:t.uncheckTableAll,key:Fn};default:return o}}):[]}const ra=he({name:"DataTableSelectionMenu",props:{clsPrefix:{type:String,required:!0}},setup(e){const{props:t,localeRef:o,checkOptionsRef:n,rawPaginatedDataRef:r,doCheckAll:a,doUncheckAll:d}=Te(Ze),l=C(()=>oa(n.value,r,a,d)),s=C(()=>na(n.value,o.value));return()=>{var u,v,p,x;const{clsPrefix:h}=e;return i(ta,{theme:(v=(u=t.theme)===null||u===void 0?void 0:u.peers)===null||v===void 0?void 0:v.Dropdown,themeOverrides:(x=(p=t.themeOverrides)===null||p===void 0?void 0:p.peers)===null||x===void 0?void 0:x.Dropdown,options:s.value,onSelect:l.value},{default:()=>i(Ve,{clsPrefix:h,class:`${h}-data-table-check-extra`},{default:()=>i(Or,null)})})}}});function no(e){return typeof e.title=="function"?e.title(e):e.title}const zn=he({name:"DataTableHeader",props:{discrete:{type:Boolean,default:!0}},setup(){const{mergedClsPrefixRef:e,scrollXRef:t,fixedColumnLeftMapRef:o,fixedColumnRightMapRef:n,mergedCurrentPageRef:r,allRowsCheckedRef:a,someRowsCheckedRef:d,rowsRef:l,colsRef:s,mergedThemeRef:u,checkOptionsRef:v,mergedSortStateRef:p,componentId:x,mergedTableLayoutRef:h,headerCheckboxDisabledRef:c,onUnstableColumnResize:g,doUpdateResizableWidth:m,handleTableHeaderScroll:y,deriveNextSorter:S,doUncheckAll:O,doCheckAll:Z}=Te(Ze),I=j({});function N(k){const L=I.value[k];return L==null?void 0:L.getBoundingClientRect().width}function _(){a.value?O():Z()}function $(k,L){if(tt(k,"dataTableFilter")||tt(k,"dataTableResizable")||!oo(L))return;const A=p.value.find(X=>X.columnKey===L.key)||null,E=Hi(L,A);S(E)}const z=new Map;function M(k){z.set(k.key,N(k.key))}function V(k,L){const A=z.get(k.key);if(A===void 0)return;const E=A+L,X=Li(E,k.minWidth,k.maxWidth);g(E,X,k,N),m(k,X)}return{cellElsRef:I,componentId:x,mergedSortState:p,mergedClsPrefix:e,scrollX:t,fixedColumnLeftMap:o,fixedColumnRightMap:n,currentPage:r,allRowsChecked:a,someRowsChecked:d,rows:l,cols:s,mergedTheme:u,checkOptions:v,mergedTableLayout:h,headerCheckboxDisabled:c,handleCheckboxUpdateChecked:_,handleColHeaderClick:$,handleTableHeaderScroll:y,handleColumnResizeStart:M,handleColumnResize:V}},render(){const{cellElsRef:e,mergedClsPrefix:t,fixedColumnLeftMap:o,fixedColumnRightMap:n,currentPage:r,allRowsChecked:a,someRowsChecked:d,rows:l,cols:s,mergedTheme:u,checkOptions:v,componentId:p,discrete:x,mergedTableLayout:h,headerCheckboxDisabled:c,mergedSortState:g,handleColHeaderClick:m,handleCheckboxUpdateChecked:y,handleColumnResizeStart:S,handleColumnResize:O}=this,Z=i("thead",{class:`${t}-data-table-thead`,"data-n-id":p},l.map(_=>i("tr",{class:`${t}-data-table-tr`},_.map(({column:$,colSpan:z,rowSpan:M,isLast:V})=>{var k,L;const A=We($),{ellipsis:E}=$,X=()=>$.type==="selection"?$.multiple!==!1?i(st,null,i(ho,{key:r,privateInsideTable:!0,checked:a,indeterminate:d,disabled:c,onUpdateChecked:y}),v?i(ra,{clsPrefix:t}):null):null:i(st,null,i("div",{class:`${t}-data-table-th__title-wrapper`},i("div",{class:`${t}-data-table-th__title`},E===!0||E&&!E.tooltip?i("div",{class:`${t}-data-table-th__ellipsis`},no($)):E&&typeof E=="object"?i(fo,Object.assign({},E,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>no($)}):no($)),oo($)?i(Ii,{column:$}):null),Ho($)?i(Ui,{column:$,options:$.filterOptions}):null,yn($)?i(Wi,{onResizeStart:()=>{S($)},onResize:w=>{O($,w)}}):null),K=A in o,ee=A in n;return i("th",{ref:w=>e[A]=w,key:A,style:{textAlign:$.titleAlign||$.align,left:Ct((k=o[A])===null||k===void 0?void 0:k.start),right:Ct((L=n[A])===null||L===void 0?void 0:L.start)},colspan:z,rowspan:M,"data-col-key":A,class:[`${t}-data-table-th`,(K||ee)&&`${t}-data-table-th--fixed-${K?"left":"right"}`,{[`${t}-data-table-th--hover`]:Cn($,g),[`${t}-data-table-th--filterable`]:Ho($),[`${t}-data-table-th--sortable`]:oo($),[`${t}-data-table-th--selection`]:$.type==="selection",[`${t}-data-table-th--last`]:V},$.className],onClick:$.type!=="selection"&&$.type!=="expand"&&!("children"in $)?w=>{m(w,$)}:void 0},X())}))));if(!x)return Z;const{handleTableHeaderScroll:I,scrollX:N}=this;return i("div",{class:`${t}-data-table-base-table-header`,onScroll:I},i("table",{ref:"body",class:`${t}-data-table-table`,style:{minWidth:Xe(N),tableLayout:h}},i("colgroup",null,s.map(_=>i("col",{key:_.key,style:_.style}))),Z))}}),ia=he({name:"DataTableCell",props:{clsPrefix:{type:String,required:!0},row:{type:Object,required:!0},index:{type:Number,required:!0},column:{type:Object,required:!0},isSummary:Boolean,mergedTheme:{type:Object,required:!0},renderCell:Function},render(){const{isSummary:e,column:t,row:o,renderCell:n}=this;let r;const{render:a,key:d,ellipsis:l}=t;if(a&&!e?r=a(o,this.index):e?r=o[d].value:r=n?n(So(o,d),o,t):So(o,d),l)if(typeof l=="object"){const{mergedTheme:s}=this;return t.ellipsisComponent==="performant-ellipsis"?i(Ti,Object.assign({},l,{theme:s.peers.Ellipsis,themeOverrides:s.peerOverrides.Ellipsis}),{default:()=>r}):i(fo,Object.assign({},l,{theme:s.peers.Ellipsis,themeOverrides:s.peerOverrides.Ellipsis}),{default:()=>r})}else return i("span",{class:`${this.clsPrefix}-data-table-td__ellipsis`},r);return r}}),Uo=he({name:"DataTableExpandTrigger",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,loading:Boolean,onClick:{type:Function,required:!0},renderExpandIcon:{type:Function}},render(){const{clsPrefix:e}=this;return i("div",{class:[`${e}-data-table-expand-trigger`,this.expanded&&`${e}-data-table-expand-trigger--expanded`],onClick:this.onClick,onMousedown:t=>{t.preventDefault()}},i(nr,null,{default:()=>this.loading?i(lo,{key:"loading",clsPrefix:this.clsPrefix,radius:85,strokeWidth:15,scale:.88}):this.renderExpandIcon?this.renderExpandIcon({expanded:this.expanded}):i(Ve,{clsPrefix:e,key:"base-icon"},{default:()=>i(an,null)})}))}}),aa=he({name:"DataTableBodyCheckbox",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:t,mergedInderminateRowKeySetRef:o}=Te(Ze);return()=>{const{rowKey:n}=e;return i(ho,{privateInsideTable:!0,disabled:e.disabled,indeterminate:o.value.has(n),checked:t.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),la=he({name:"DataTableBodyRadio",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:t,componentId:o}=Te(Ze);return()=>{const{rowKey:n}=e;return i(rn,{name:o,disabled:e.disabled,checked:t.value.has(n),onUpdateChecked:e.onUpdateChecked})}}});function sa(e,t){const o=[];function n(r,a){r.forEach(d=>{d.children&&t.has(d.key)?(o.push({tmNode:d,striped:!1,key:d.key,index:a}),n(d.children,a)):o.push({key:d.key,tmNode:d,striped:!1,index:a})})}return e.forEach(r=>{o.push(r);const{children:a}=r.tmNode;a&&t.has(r.key)&&n(a,r.index)}),o}const da=he({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},onMouseenter:Function,onMouseleave:Function},render(){const{clsPrefix:e,id:t,cols:o,onMouseenter:n,onMouseleave:r}=this;return i("table",{style:{tableLayout:"fixed"},class:`${e}-data-table-table`,onMouseenter:n,onMouseleave:r},i("colgroup",null,o.map(a=>i("col",{key:a.key,style:a.style}))),i("tbody",{"data-n-id":t,class:`${e}-data-table-tbody`},this.$slots))}}),ca=he({name:"DataTableBody",props:{onResize:Function,showHeader:Boolean,flexHeight:Boolean,bodyStyle:Object},setup(e){const{slots:t,bodyWidthRef:o,mergedExpandedRowKeysRef:n,mergedClsPrefixRef:r,mergedThemeRef:a,scrollXRef:d,colsRef:l,paginatedDataRef:s,rawPaginatedDataRef:u,fixedColumnLeftMapRef:v,fixedColumnRightMapRef:p,mergedCurrentPageRef:x,rowClassNameRef:h,leftActiveFixedColKeyRef:c,leftActiveFixedChildrenColKeysRef:g,rightActiveFixedColKeyRef:m,rightActiveFixedChildrenColKeysRef:y,renderExpandRef:S,hoverKeyRef:O,summaryRef:Z,mergedSortStateRef:I,virtualScrollRef:N,componentId:_,mergedTableLayoutRef:$,childTriggerColIndexRef:z,indentRef:M,rowPropsRef:V,maxHeightRef:k,stripedRef:L,loadingRef:A,onLoadRef:E,loadingKeySetRef:X,expandableRef:K,stickyExpandedRowsRef:ee,renderExpandIconRef:w,summaryPlacementRef:f,treeMateRef:T,scrollbarPropsRef:D,setHeaderScrollLeft:U,doUpdateExpandedRowKeys:re,handleTableBodyScroll:ue,doCheck:Se,doUncheck:oe,renderCell:me}=Te(Ze),se=j(null),P=j(null),J=j(null),Fe=De(()=>s.value.length===0),Q=De(()=>e.showHeader||!Fe.value),ge=De(()=>e.showHeader||Fe.value);let Ie="";const ze=C(()=>new Set(n.value));function Pe(G){var te;return(te=T.value.getNode(G))===null||te===void 0?void 0:te.rawNode}function Le(G,te,Ce){const H=Pe(G.key);if(!H){ro("data-table",`fail to get row data with key ${G.key}`);return}if(Ce){const be=s.value.findIndex(we=>we.key===Ie);if(be!==-1){const we=s.value.findIndex(fe=>fe.key===G.key),b=Math.min(be,we),B=Math.max(be,we),Y=[];s.value.slice(b,B+1).forEach(fe=>{fe.disabled||Y.push(fe.key)}),te?Se(Y,!1,H):oe(Y,H),Ie=G.key;return}}te?Se(G.key,!1,H):oe(G.key,H),Ie=G.key}function Ee(G){const te=Pe(G.key);if(!te){ro("data-table",`fail to get row data with key ${G.key}`);return}Se(G.key,!0,te)}function ke(){if(!Q.value){const{value:te}=J;return te||null}if(N.value)return xe();const{value:G}=se;return G?G.containerRef:null}function F(G,te){var Ce;if(X.value.has(G))return;const{value:H}=n,be=H.indexOf(G),we=Array.from(H);~be?(we.splice(be,1),re(we)):te&&!te.isLeaf&&!te.shallowLoaded?(X.value.add(G),(Ce=E.value)===null||Ce===void 0||Ce.call(E,te.rawNode).then(()=>{const{value:b}=n,B=Array.from(b);~B.indexOf(G)||B.push(G),re(B)}).finally(()=>{X.value.delete(G)})):(we.push(G),re(we))}function q(){O.value=null}function xe(){const{value:G}=P;return(G==null?void 0:G.listElRef)||null}function je(){const{value:G}=P;return(G==null?void 0:G.itemsElRef)||null}function Je(G){var te;ue(G),(te=se.value)===null||te===void 0||te.sync()}function Ke(G){var te;const{onResize:Ce}=e;Ce&&Ce(G),(te=se.value)===null||te===void 0||te.sync()}const Me={getScrollContainer:ke,scrollTo(G,te){var Ce,H;N.value?(Ce=P.value)===null||Ce===void 0||Ce.scrollTo(G,te):(H=se.value)===null||H===void 0||H.scrollTo(G,te)}},He=ne([({props:G})=>{const te=H=>H===null?null:ne(`[data-n-id="${G.componentId}"] [data-col-key="${H}"]::after`,{boxShadow:"var(--n-box-shadow-after)"}),Ce=H=>H===null?null:ne(`[data-n-id="${G.componentId}"] [data-col-key="${H}"]::before`,{boxShadow:"var(--n-box-shadow-before)"});return ne([te(G.leftActiveFixedColKey),Ce(G.rightActiveFixedColKey),G.leftActiveFixedChildrenColKeys.map(H=>te(H)),G.rightActiveFixedChildrenColKeys.map(H=>Ce(H))])}]);let Ne=!1;return ut(()=>{const{value:G}=c,{value:te}=g,{value:Ce}=m,{value:H}=y;if(!Ne&&G===null&&Ce===null)return;const be={leftActiveFixedColKey:G,leftActiveFixedChildrenColKeys:te,rightActiveFixedColKey:Ce,rightActiveFixedChildrenColKeys:H,componentId:_};He.mount({id:`n-${_}`,force:!0,props:be,anchorMetaName:ar}),Ne=!0}),rr(()=>{He.unmount({id:`n-${_}`})}),Object.assign({bodyWidth:o,summaryPlacement:f,dataTableSlots:t,componentId:_,scrollbarInstRef:se,virtualListRef:P,emptyElRef:J,summary:Z,mergedClsPrefix:r,mergedTheme:a,scrollX:d,cols:l,loading:A,bodyShowHeaderOnly:ge,shouldDisplaySomeTablePart:Q,empty:Fe,paginatedDataAndInfo:C(()=>{const{value:G}=L;let te=!1;return{data:s.value.map(G?(H,be)=>(H.isLeaf||(te=!0),{tmNode:H,key:H.key,striped:be%2===1,index:be}):(H,be)=>(H.isLeaf||(te=!0),{tmNode:H,key:H.key,striped:!1,index:be})),hasChildren:te}}),rawPaginatedData:u,fixedColumnLeftMap:v,fixedColumnRightMap:p,currentPage:x,rowClassName:h,renderExpand:S,mergedExpandedRowKeySet:ze,hoverKey:O,mergedSortState:I,virtualScroll:N,mergedTableLayout:$,childTriggerColIndex:z,indent:M,rowProps:V,maxHeight:k,loadingKeySet:X,expandable:K,stickyExpandedRows:ee,renderExpandIcon:w,scrollbarProps:D,setHeaderScrollLeft:U,handleVirtualListScroll:Je,handleVirtualListResize:Ke,handleMouseleaveTable:q,virtualListContainer:xe,virtualListContent:je,handleTableBodyScroll:ue,handleCheckboxUpdateChecked:Le,handleRadioUpdateChecked:Ee,handleUpdateExpanded:F,renderCell:me},Me)},render(){const{mergedTheme:e,scrollX:t,mergedClsPrefix:o,virtualScroll:n,maxHeight:r,mergedTableLayout:a,flexHeight:d,loadingKeySet:l,onResize:s,setHeaderScrollLeft:u}=this,v=t!==void 0||r!==void 0||d,p=!v&&a==="auto",x=t!==void 0||p,h={minWidth:Xe(t)||"100%"};t&&(h.width="100%");const c=i(so,Object.assign({},this.scrollbarProps,{ref:"scrollbarInstRef",scrollable:v||p,class:`${o}-data-table-base-table-body`,style:this.bodyStyle,theme:e.peers.Scrollbar,themeOverrides:e.peerOverrides.Scrollbar,contentStyle:h,container:n?this.virtualListContainer:void 0,content:n?this.virtualListContent:void 0,horizontalRailStyle:{zIndex:3},verticalRailStyle:{zIndex:3},xScrollable:x,onScroll:n?void 0:this.handleTableBodyScroll,internalOnUpdateScrollLeft:u,onResize:s}),{default:()=>{const g={},m={},{cols:y,paginatedDataAndInfo:S,mergedTheme:O,fixedColumnLeftMap:Z,fixedColumnRightMap:I,currentPage:N,rowClassName:_,mergedSortState:$,mergedExpandedRowKeySet:z,stickyExpandedRows:M,componentId:V,childTriggerColIndex:k,expandable:L,rowProps:A,handleMouseleaveTable:E,renderExpand:X,summary:K,handleCheckboxUpdateChecked:ee,handleRadioUpdateChecked:w,handleUpdateExpanded:f}=this,{length:T}=y;let D;const{data:U,hasChildren:re}=S,ue=re?sa(U,z):U;if(K){const Q=K(this.rawPaginatedData);if(Array.isArray(Q)){const ge=Q.map((Ie,ze)=>({isSummaryRow:!0,key:`__n_summary__${ze}`,tmNode:{rawNode:Ie,disabled:!0},index:-1}));D=this.summaryPlacement==="top"?[...ge,...ue]:[...ue,...ge]}else{const ge={isSummaryRow:!0,key:"__n_summary__",tmNode:{rawNode:Q,disabled:!0},index:-1};D=this.summaryPlacement==="top"?[ge,...ue]:[...ue,ge]}}else D=ue;const Se=re?{width:Ct(this.indent)}:void 0,oe=[];D.forEach(Q=>{X&&z.has(Q.key)&&(!L||L(Q.tmNode.rawNode))?oe.push(Q,{isExpandedRow:!0,key:`${Q.key}-expand`,tmNode:Q.tmNode,index:Q.index}):oe.push(Q)});const{length:me}=oe,se={};U.forEach(({tmNode:Q},ge)=>{se[ge]=Q.key});const P=M?this.bodyWidth:null,J=P===null?void 0:`${P}px`,Fe=(Q,ge,Ie)=>{const{index:ze}=Q;if("isExpandedRow"in Q){const{tmNode:{key:Ke,rawNode:Me}}=Q;return i("tr",{class:`${o}-data-table-tr ${o}-data-table-tr--expanded`,key:`${Ke}__expand`},i("td",{class:[`${o}-data-table-td`,`${o}-data-table-td--last-col`,ge+1===me&&`${o}-data-table-td--last-row`],colspan:T},M?i("div",{class:`${o}-data-table-expand`,style:{width:J}},X(Me,ze)):X(Me,ze)))}const Pe="isSummaryRow"in Q,Le=!Pe&&Q.striped,{tmNode:Ee,key:ke}=Q,{rawNode:F}=Ee,q=z.has(ke),xe=A?A(F,ze):void 0,je=typeof _=="string"?_:Ki(F,ze,_);return i("tr",Object.assign({onMouseenter:()=>{this.hoverKey=ke},key:ke,class:[`${o}-data-table-tr`,Pe&&`${o}-data-table-tr--summary`,Le&&`${o}-data-table-tr--striped`,q&&`${o}-data-table-tr--expanded`,je]},xe),y.map((Ke,Me)=>{var He,Ne,G,te,Ce;if(ge in g){const Be=g[ge],_e=Be.indexOf(Me);if(~_e)return Be.splice(_e,1),null}const{column:H}=Ke,be=We(Ke),{rowSpan:we,colSpan:b}=H,B=Pe?((He=Q.tmNode.rawNode[be])===null||He===void 0?void 0:He.colSpan)||1:b?b(F,ze):1,Y=Pe?((Ne=Q.tmNode.rawNode[be])===null||Ne===void 0?void 0:Ne.rowSpan)||1:we?we(F,ze):1,fe=Me+B===T,pe=ge+Y===me,de=Y>1;if(de&&(m[ge]={[Me]:[]}),B>1||de)for(let Be=ge;Be<ge+Y;++Be){de&&m[ge][Me].push(se[Be]);for(let _e=Me;_e<Me+B;++_e)Be===ge&&_e===Me||(Be in g?g[Be].push(_e):g[Be]=[_e])}const ve=de?this.hoverKey:null,{cellProps:Re}=H,Oe=Re==null?void 0:Re(F,ze),Qe={"--indent-offset":""};return i("td",Object.assign({},Oe,{key:be,style:[{textAlign:H.align||void 0,left:Ct((G=Z[be])===null||G===void 0?void 0:G.start),right:Ct((te=I[be])===null||te===void 0?void 0:te.start)},Qe,(Oe==null?void 0:Oe.style)||""],colspan:B,rowspan:Ie?void 0:Y,"data-col-key":be,class:[`${o}-data-table-td`,H.className,Oe==null?void 0:Oe.class,Pe&&`${o}-data-table-td--summary`,(ve!==null&&m[ge][Me].includes(ve)||Cn(H,$))&&`${o}-data-table-td--hover`,H.fixed&&`${o}-data-table-td--fixed-${H.fixed}`,H.align&&`${o}-data-table-td--${H.align}-align`,H.type==="selection"&&`${o}-data-table-td--selection`,H.type==="expand"&&`${o}-data-table-td--expand`,fe&&`${o}-data-table-td--last-col`,pe&&`${o}-data-table-td--last-row`]}),re&&Me===k?[lr(Qe["--indent-offset"]=Pe?0:Q.tmNode.level,i("div",{class:`${o}-data-table-indent`,style:Se})),Pe||Q.tmNode.isLeaf?i("div",{class:`${o}-data-table-expand-placeholder`}):i(Uo,{class:`${o}-data-table-expand-trigger`,clsPrefix:o,expanded:q,renderExpandIcon:this.renderExpandIcon,loading:l.has(Q.key),onClick:()=>{f(ke,Q.tmNode)}})]:null,H.type==="selection"?Pe?null:H.multiple===!1?i(la,{key:N,rowKey:ke,disabled:Q.tmNode.disabled,onUpdateChecked:()=>{w(Q.tmNode)}}):i(aa,{key:N,rowKey:ke,disabled:Q.tmNode.disabled,onUpdateChecked:(Be,_e)=>{ee(Q.tmNode,Be,_e.shiftKey)}}):H.type==="expand"?Pe?null:!H.expandable||!((Ce=H.expandable)===null||Ce===void 0)&&Ce.call(H,F)?i(Uo,{clsPrefix:o,expanded:q,renderExpandIcon:this.renderExpandIcon,onClick:()=>{f(ke,null)}}):null:i(ia,{clsPrefix:o,index:ze,row:F,column:H,isSummary:Pe,mergedTheme:O,renderCell:this.renderCell}))}))};return n?i(Yo,{ref:"virtualListRef",items:oe,itemSize:28,visibleItemsTag:da,visibleItemsProps:{clsPrefix:o,id:V,cols:y,onMouseleave:E},showScrollbar:!1,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemsStyle:h,itemResizable:!0},{default:({item:Q,index:ge})=>Fe(Q,ge,!0)}):i("table",{class:`${o}-data-table-table`,onMouseleave:E,style:{tableLayout:this.mergedTableLayout}},i("colgroup",null,y.map(Q=>i("col",{key:Q.key,style:Q.style}))),this.showHeader?i(zn,{discrete:!1}):null,this.empty?null:i("tbody",{"data-n-id":V,class:`${o}-data-table-tbody`},oe.map((Q,ge)=>Fe(Q,ge,!1))))}});if(this.empty){const g=()=>i("div",{class:[`${o}-data-table-empty`,this.loading&&`${o}-data-table-empty--hide`],style:this.bodyStyle,ref:"emptyElRef"},It(this.dataTableSlots.empty,()=>[i(en,{theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]));return this.shouldDisplaySomeTablePart?i(st,null,c,g()):i(ir,{onResize:this.onResize},{default:g})}return c}}),ua=he({setup(){const{mergedClsPrefixRef:e,rightFixedColumnsRef:t,leftFixedColumnsRef:o,bodyWidthRef:n,maxHeightRef:r,minHeightRef:a,flexHeightRef:d,syncScrollState:l}=Te(Ze),s=j(null),u=j(null),v=j(null),p=j(!(o.value.length||t.value.length)),x=C(()=>({maxHeight:Xe(r.value),minHeight:Xe(a.value)}));function h(y){n.value=y.contentRect.width,l(),p.value||(p.value=!0)}function c(){const{value:y}=s;return y?y.$el:null}function g(){const{value:y}=u;return y?y.getScrollContainer():null}const m={getBodyElement:g,getHeaderElement:c,scrollTo(y,S){var O;(O=u.value)===null||O===void 0||O.scrollTo(y,S)}};return ut(()=>{const{value:y}=v;if(!y)return;const S=`${e.value}-data-table-base-table--transition-disabled`;p.value?setTimeout(()=>{y.classList.remove(S)},0):y.classList.add(S)}),Object.assign({maxHeight:r,mergedClsPrefix:e,selfElRef:v,headerInstRef:s,bodyInstRef:u,bodyStyle:x,flexHeight:d,handleBodyResize:h},m)},render(){const{mergedClsPrefix:e,maxHeight:t,flexHeight:o}=this,n=t===void 0&&!o;return i("div",{class:`${e}-data-table-base-table`,ref:"selfElRef"},n?null:i(zn,{ref:"headerInstRef"}),i(ca,{ref:"bodyInstRef",bodyStyle:this.bodyStyle,showHeader:n,flexHeight:o,onResize:this.handleBodyResize}))}});function fa(e,t){const{paginatedDataRef:o,treeMateRef:n,selectionColumnRef:r}=t,a=j(e.defaultCheckedRowKeys),d=C(()=>{var I;const{checkedRowKeys:N}=e,_=N===void 0?a.value:N;return((I=r.value)===null||I===void 0?void 0:I.multiple)===!1?{checkedKeys:_.slice(0,1),indeterminateKeys:[]}:n.value.getCheckedKeys(_,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})}),l=C(()=>d.value.checkedKeys),s=C(()=>d.value.indeterminateKeys),u=C(()=>new Set(l.value)),v=C(()=>new Set(s.value)),p=C(()=>{const{value:I}=u;return o.value.reduce((N,_)=>{const{key:$,disabled:z}=_;return N+(!z&&I.has($)?1:0)},0)}),x=C(()=>o.value.filter(I=>I.disabled).length),h=C(()=>{const{length:I}=o.value,{value:N}=v;return p.value>0&&p.value<I-x.value||o.value.some(_=>N.has(_.key))}),c=C(()=>{const{length:I}=o.value;return p.value!==0&&p.value===I-x.value}),g=C(()=>o.value.length===0);function m(I,N,_){const{"onUpdate:checkedRowKeys":$,onUpdateCheckedRowKeys:z,onCheckedRowKeysChange:M}=e,V=[],{value:{getNode:k}}=n;I.forEach(L=>{var A;const E=(A=k(L))===null||A===void 0?void 0:A.rawNode;V.push(E)}),$&&ie($,I,V,{row:N,action:_}),z&&ie(z,I,V,{row:N,action:_}),M&&ie(M,I,V,{row:N,action:_}),a.value=I}function y(I,N=!1,_){if(!e.loading){if(N){m(Array.isArray(I)?I.slice(0,1):[I],_,"check");return}m(n.value.check(I,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,_,"check")}}function S(I,N){e.loading||m(n.value.uncheck(I,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,N,"uncheck")}function O(I=!1){const{value:N}=r;if(!N||e.loading)return;const _=[];(I?n.value.treeNodes:o.value).forEach($=>{$.disabled||_.push($.key)}),m(n.value.check(_,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"checkAll")}function Z(I=!1){const{value:N}=r;if(!N||e.loading)return;const _=[];(I?n.value.treeNodes:o.value).forEach($=>{$.disabled||_.push($.key)}),m(n.value.uncheck(_,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"uncheckAll")}return{mergedCheckedRowKeySetRef:u,mergedCheckedRowKeysRef:l,mergedInderminateRowKeySetRef:v,someRowsCheckedRef:h,allRowsCheckedRef:c,headerCheckboxDisabledRef:g,doUpdateCheckedRowKeys:m,doCheckAll:O,doUncheckAll:Z,doCheck:y,doUncheck:S}}function St(e){return typeof e=="object"&&typeof e.multiple=="number"?e.multiple:!1}function ha(e,t){return t&&(e===void 0||e==="default"||typeof e=="object"&&e.compare==="default")?va(t):typeof e=="function"?e:e&&typeof e=="object"&&e.compare&&e.compare!=="default"?e.compare:!1}function va(e){return(t,o)=>{const n=t[e],r=o[e];return typeof n=="number"&&typeof r=="number"?n-r:typeof n=="string"&&typeof r=="string"?n.localeCompare(r):0}}function pa(e,{dataRelatedColsRef:t,filteredDataRef:o}){const n=[];t.value.forEach(h=>{var c;h.sorter!==void 0&&x(n,{columnKey:h.key,sorter:h.sorter,order:(c=h.defaultSortOrder)!==null&&c!==void 0?c:!1})});const r=j(n),a=C(()=>{const h=t.value.filter(m=>m.type!=="selection"&&m.sorter!==void 0&&(m.sortOrder==="ascend"||m.sortOrder==="descend"||m.sortOrder===!1)),c=h.filter(m=>m.sortOrder!==!1);if(c.length)return c.map(m=>({columnKey:m.key,order:m.sortOrder,sorter:m.sorter}));if(h.length)return[];const{value:g}=r;return Array.isArray(g)?g:g?[g]:[]}),d=C(()=>{const h=a.value.slice().sort((c,g)=>{const m=St(c.sorter)||0;return(St(g.sorter)||0)-m});return h.length?o.value.slice().sort((g,m)=>{let y=0;return h.some(S=>{const{columnKey:O,sorter:Z,order:I}=S,N=ha(Z,O);return N&&I&&(y=N(g.rawNode,m.rawNode),y!==0)?(y=y*Ni(I),!0):!1}),y}):o.value});function l(h){let c=a.value.slice();return h&&St(h.sorter)!==!1?(c=c.filter(g=>St(g.sorter)!==!1),x(c,h),c):h||null}function s(h){const c=l(h);u(c)}function u(h){const{"onUpdate:sorter":c,onUpdateSorter:g,onSorterChange:m}=e;c&&ie(c,h),g&&ie(g,h),m&&ie(m,h),r.value=h}function v(h,c="ascend"){if(!h)p();else{const g=t.value.find(y=>y.type!=="selection"&&y.type!=="expand"&&y.key===h);if(!(g!=null&&g.sorter))return;const m=g.sorter;s({columnKey:h,sorter:m,order:c})}}function p(){u(null)}function x(h,c){const g=h.findIndex(m=>(c==null?void 0:c.columnKey)&&m.columnKey===c.columnKey);g!==void 0&&g>=0?h[g]=c:h.push(c)}return{clearSorter:p,sort:v,sortedDataRef:d,mergedSortStateRef:a,deriveNextSorter:s}}function ga(e,{dataRelatedColsRef:t}){const o=C(()=>{const f=T=>{for(let D=0;D<T.length;++D){const U=T[D];if("children"in U)return f(U.children);if(U.type==="selection")return U}return null};return f(e.columns)}),n=C(()=>{const{childrenKey:f}=e;return Nt(e.data,{ignoreEmptyChildren:!0,getKey:e.rowKey,getChildren:T=>T[f],getDisabled:T=>{var D,U;return!!(!((U=(D=o.value)===null||D===void 0?void 0:D.disabled)===null||U===void 0)&&U.call(D,T))}})}),r=De(()=>{const{columns:f}=e,{length:T}=f;let D=null;for(let U=0;U<T;++U){const re=f[U];if(!re.type&&D===null&&(D=U),"tree"in re&&re.tree)return U}return D||0}),a=j({}),d=j(1),l=j(10),s=C(()=>{const f=t.value.filter(U=>U.filterOptionValues!==void 0||U.filterOptionValue!==void 0),T={};return f.forEach(U=>{var re;U.type==="selection"||U.type==="expand"||(U.filterOptionValues===void 0?T[U.key]=(re=U.filterOptionValue)!==null&&re!==void 0?re:null:T[U.key]=U.filterOptionValues)}),Object.assign(Ko(a.value),T)}),u=C(()=>{const f=s.value,{columns:T}=e;function D(ue){return(Se,oe)=>!!~String(oe[ue]).indexOf(String(Se))}const{value:{treeNodes:U}}=n,re=[];return T.forEach(ue=>{ue.type==="selection"||ue.type==="expand"||"children"in ue||re.push([ue.key,ue])}),U?U.filter(ue=>{const{rawNode:Se}=ue;for(const[oe,me]of re){let se=f[oe];if(se==null||(Array.isArray(se)||(se=[se]),!se.length))continue;const P=me.filter==="default"?D(oe):me.filter;if(me&&typeof P=="function")if(me.filterMode==="and"){if(se.some(J=>!P(J,Se)))return!1}else{if(se.some(J=>P(J,Se)))continue;return!1}}return!0}):[]}),{sortedDataRef:v,deriveNextSorter:p,mergedSortStateRef:x,sort:h,clearSorter:c}=pa(e,{dataRelatedColsRef:t,filteredDataRef:u});t.value.forEach(f=>{var T;if(f.filter){const D=f.defaultFilterOptionValues;f.filterMultiple?a.value[f.key]=D||[]:D!==void 0?a.value[f.key]=D===null?[]:D:a.value[f.key]=(T=f.defaultFilterOptionValue)!==null&&T!==void 0?T:null}});const g=C(()=>{const{pagination:f}=e;if(f!==!1)return f.page}),m=C(()=>{const{pagination:f}=e;if(f!==!1)return f.pageSize}),y=it(g,d),S=it(m,l),O=De(()=>{const f=y.value;return e.remote?f:Math.max(1,Math.min(Math.ceil(u.value.length/S.value),f))}),Z=C(()=>{const{pagination:f}=e;if(f){const{pageCount:T}=f;if(T!==void 0)return T}}),I=C(()=>{if(e.remote)return n.value.treeNodes;if(!e.pagination)return v.value;const f=S.value,T=(O.value-1)*f;return v.value.slice(T,T+f)}),N=C(()=>I.value.map(f=>f.rawNode));function _(f){const{pagination:T}=e;if(T){const{onChange:D,"onUpdate:page":U,onUpdatePage:re}=T;D&&ie(D,f),re&&ie(re,f),U&&ie(U,f),V(f)}}function $(f){const{pagination:T}=e;if(T){const{onPageSizeChange:D,"onUpdate:pageSize":U,onUpdatePageSize:re}=T;D&&ie(D,f),re&&ie(re,f),U&&ie(U,f),k(f)}}const z=C(()=>{if(e.remote){const{pagination:f}=e;if(f){const{itemCount:T}=f;if(T!==void 0)return T}return}return u.value.length}),M=C(()=>Object.assign(Object.assign({},e.pagination),{onChange:void 0,onUpdatePage:void 0,onUpdatePageSize:void 0,onPageSizeChange:void 0,"onUpdate:page":_,"onUpdate:pageSize":$,page:O.value,pageSize:S.value,pageCount:z.value===void 0?Z.value:void 0,itemCount:z.value}));function V(f){const{"onUpdate:page":T,onPageChange:D,onUpdatePage:U}=e;U&&ie(U,f),T&&ie(T,f),D&&ie(D,f),d.value=f}function k(f){const{"onUpdate:pageSize":T,onPageSizeChange:D,onUpdatePageSize:U}=e;D&&ie(D,f),U&&ie(U,f),T&&ie(T,f),l.value=f}function L(f,T){const{onUpdateFilters:D,"onUpdate:filters":U,onFiltersChange:re}=e;D&&ie(D,f,T),U&&ie(U,f,T),re&&ie(re,f,T),a.value=f}function A(f,T,D,U){var re;(re=e.onUnstableColumnResize)===null||re===void 0||re.call(e,f,T,D,U)}function E(f){V(f)}function X(){K()}function K(){ee({})}function ee(f){w(f)}function w(f){f?f&&(a.value=Ko(f)):a.value={}}return{treeMateRef:n,mergedCurrentPageRef:O,mergedPaginationRef:M,paginatedDataRef:I,rawPaginatedDataRef:N,mergedFilterStateRef:s,mergedSortStateRef:x,hoverKeyRef:j(null),selectionColumnRef:o,childTriggerColIndexRef:r,doUpdateFilters:L,deriveNextSorter:p,doUpdatePageSize:k,doUpdatePage:V,onUnstableColumnResize:A,filter:w,filters:ee,clearFilter:X,clearFilters:K,clearSorter:c,page:E,sort:h}}function ba(e,{mainTableInstRef:t,mergedCurrentPageRef:o,bodyWidthRef:n}){let r=0;const a=j(),d=j(null),l=j([]),s=j(null),u=j([]),v=C(()=>Xe(e.scrollX)),p=C(()=>e.columns.filter(z=>z.fixed==="left")),x=C(()=>e.columns.filter(z=>z.fixed==="right")),h=C(()=>{const z={};let M=0;function V(k){k.forEach(L=>{const A={start:M,end:0};z[We(L)]=A,"children"in L?(V(L.children),A.end=M):(M+=Eo(L)||0,A.end=M)})}return V(p.value),z}),c=C(()=>{const z={};let M=0;function V(k){for(let L=k.length-1;L>=0;--L){const A=k[L],E={start:M,end:0};z[We(A)]=E,"children"in A?(V(A.children),E.end=M):(M+=Eo(A)||0,E.end=M)}}return V(x.value),z});function g(){var z,M;const{value:V}=p;let k=0;const{value:L}=h;let A=null;for(let E=0;E<V.length;++E){const X=We(V[E]);if(r>(((z=L[X])===null||z===void 0?void 0:z.start)||0)-k)A=X,k=((M=L[X])===null||M===void 0?void 0:M.end)||0;else break}d.value=A}function m(){l.value=[];let z=e.columns.find(M=>We(M)===d.value);for(;z&&"children"in z;){const M=z.children.length;if(M===0)break;const V=z.children[M-1];l.value.push(We(V)),z=V}}function y(){var z,M;const{value:V}=x,k=Number(e.scrollX),{value:L}=n;if(L===null)return;let A=0,E=null;const{value:X}=c;for(let K=V.length-1;K>=0;--K){const ee=We(V[K]);if(Math.round(r+(((z=X[ee])===null||z===void 0?void 0:z.start)||0)+L-A)<k)E=ee,A=((M=X[ee])===null||M===void 0?void 0:M.end)||0;else break}s.value=E}function S(){u.value=[];let z=e.columns.find(M=>We(M)===s.value);for(;z&&"children"in z&&z.children.length;){const M=z.children[0];u.value.push(We(M)),z=M}}function O(){const z=t.value?t.value.getHeaderElement():null,M=t.value?t.value.getBodyElement():null;return{header:z,body:M}}function Z(){const{body:z}=O();z&&(z.scrollTop=0)}function I(){a.value!=="body"?Ro(_):a.value=void 0}function N(z){var M;(M=e.onScroll)===null||M===void 0||M.call(e,z),a.value!=="head"?Ro(_):a.value=void 0}function _(){const{header:z,body:M}=O();if(!M)return;const{value:V}=n;if(V!==null){if(e.maxHeight||e.flexHeight){if(!z)return;const k=r-z.scrollLeft;a.value=k!==0?"head":"body",a.value==="head"?(r=z.scrollLeft,M.scrollLeft=r):(r=M.scrollLeft,z.scrollLeft=r)}else r=M.scrollLeft;g(),m(),y(),S()}}function $(z){const{header:M}=O();M&&(M.scrollLeft=z,_())}return Ge(o,()=>{Z()}),{styleScrollXRef:v,fixedColumnLeftMapRef:h,fixedColumnRightMapRef:c,leftFixedColumnsRef:p,rightFixedColumnsRef:x,leftActiveFixedColKeyRef:d,leftActiveFixedChildrenColKeysRef:l,rightActiveFixedColKeyRef:s,rightActiveFixedChildrenColKeysRef:u,syncScrollState:_,handleTableBodyScroll:N,handleTableHeaderScroll:I,setHeaderScrollLeft:$}}function ma(){const e=j({});function t(r){return e.value[r]}function o(r,a){yn(r)&&"key"in r&&(e.value[r.key]=a)}function n(){e.value={}}return{getResizableWidth:t,doUpdateResizableWidth:o,clearResizableWidth:n}}function xa(e,t){const o=[],n=[],r=[],a=new WeakMap;let d=-1,l=0,s=!1;function u(x,h){h>d&&(o[h]=[],d=h);for(const c of x)if("children"in c)u(c.children,h+1);else{const g="key"in c?c.key:void 0;n.push({key:We(c),style:Ei(c,g!==void 0?Xe(t(g)):void 0),column:c}),l+=1,s||(s=!!c.ellipsis),r.push(c)}}u(e,0);let v=0;function p(x,h){let c=0;x.forEach((g,m)=>{var y;if("children"in g){const S=v,O={column:g,colSpan:0,rowSpan:1,isLast:!1};p(g.children,h+1),g.children.forEach(Z=>{var I,N;O.colSpan+=(N=(I=a.get(Z))===null||I===void 0?void 0:I.colSpan)!==null&&N!==void 0?N:0}),S+O.colSpan===l&&(O.isLast=!0),a.set(g,O),o[h].push(O)}else{if(v<c){v+=1;return}let S=1;"titleColSpan"in g&&(S=(y=g.titleColSpan)!==null&&y!==void 0?y:1),S>1&&(c=v+S);const O=v+S===l,Z={column:g,colSpan:S,rowSpan:d-h+1,isLast:O};a.set(g,Z),o[h].push(Z),v+=1}})}return p(e,0),{hasEllipsis:s,rows:o,cols:n,dataRelatedCols:r}}function ya(e,t){const o=C(()=>xa(e.columns,t));return{rowsRef:C(()=>o.value.rows),colsRef:C(()=>o.value.cols),hasEllipsisRef:C(()=>o.value.hasEllipsis),dataRelatedColsRef:C(()=>o.value.dataRelatedCols)}}function Ca(e,t){const o=De(()=>{for(const u of e.columns)if(u.type==="expand")return u.renderExpand}),n=De(()=>{let u;for(const v of e.columns)if(v.type==="expand"){u=v.expandable;break}return u}),r=j(e.defaultExpandAll?o!=null&&o.value?(()=>{const u=[];return t.value.treeNodes.forEach(v=>{var p;!((p=n.value)===null||p===void 0)&&p.call(n,v.rawNode)&&u.push(v.key)}),u})():t.value.getNonLeafKeys():e.defaultExpandedRowKeys),a=le(e,"expandedRowKeys"),d=le(e,"stickyExpandedRows"),l=it(a,r);function s(u){const{onUpdateExpandedRowKeys:v,"onUpdate:expandedRowKeys":p}=e;v&&ie(v,u),p&&ie(p,u),r.value=u}return{stickyExpandedRowsRef:d,mergedExpandedRowKeysRef:l,renderExpandRef:o,expandableRef:n,doUpdateExpandedRowKeys:s}}const Wo=Sa(),wa=ne([R("data-table",`
596
- width: 100%;
597
- font-size: var(--n-font-size);
598
- display: flex;
599
- flex-direction: column;
600
- position: relative;
601
- --n-merged-th-color: var(--n-th-color);
602
- --n-merged-td-color: var(--n-td-color);
603
- --n-merged-border-color: var(--n-border-color);
604
- --n-merged-th-color-hover: var(--n-th-color-hover);
605
- --n-merged-td-color-hover: var(--n-td-color-hover);
606
- --n-merged-td-color-striped: var(--n-td-color-striped);
607
- `,[R("data-table-wrapper",`
608
- flex-grow: 1;
609
- display: flex;
610
- flex-direction: column;
611
- `),W("flex-height",[ne(">",[R("data-table-wrapper",[ne(">",[R("data-table-base-table",`
612
- display: flex;
613
- flex-direction: column;
614
- flex-grow: 1;
615
- `,[ne(">",[R("data-table-base-table-body","flex-basis: 0;",[ne("&:last-child","flex-grow: 1;")])])])])])])]),ne(">",[R("data-table-loading-wrapper",`
616
- color: var(--n-loading-color);
617
- font-size: var(--n-loading-size);
618
- position: absolute;
619
- left: 50%;
620
- top: 50%;
621
- transform: translateX(-50%) translateY(-50%);
622
- transition: color .3s var(--n-bezier);
623
- display: flex;
624
- align-items: center;
625
- justify-content: center;
626
- `,[$t({originalTransform:"translateX(-50%) translateY(-50%)"})])]),R("data-table-expand-placeholder",`
627
- margin-right: 8px;
628
- display: inline-block;
629
- width: 16px;
630
- height: 1px;
631
- `),R("data-table-indent",`
632
- display: inline-block;
633
- height: 1px;
634
- `),R("data-table-expand-trigger",`
635
- display: inline-flex;
636
- margin-right: 8px;
637
- cursor: pointer;
638
- font-size: 16px;
639
- vertical-align: -0.2em;
640
- position: relative;
641
- width: 16px;
642
- height: 16px;
643
- color: var(--n-td-text-color);
644
- transition: color .3s var(--n-bezier);
645
- `,[W("expanded",[R("icon","transform: rotate(90deg);",[xt({originalTransform:"rotate(90deg)"})]),R("base-icon","transform: rotate(90deg);",[xt({originalTransform:"rotate(90deg)"})])]),R("base-loading",`
646
- color: var(--n-loading-color);
647
- transition: color .3s var(--n-bezier);
648
- position: absolute;
649
- left: 0;
650
- right: 0;
651
- top: 0;
652
- bottom: 0;
653
- `,[xt()]),R("icon",`
654
- position: absolute;
655
- left: 0;
656
- right: 0;
657
- top: 0;
658
- bottom: 0;
659
- `,[xt()]),R("base-icon",`
660
- position: absolute;
661
- left: 0;
662
- right: 0;
663
- top: 0;
664
- bottom: 0;
665
- `,[xt()])]),R("data-table-thead",`
666
- transition: background-color .3s var(--n-bezier);
667
- background-color: var(--n-merged-th-color);
668
- `),R("data-table-tr",`
669
- box-sizing: border-box;
670
- background-clip: padding-box;
671
- transition: background-color .3s var(--n-bezier);
672
- `,[R("data-table-expand",`
673
- position: sticky;
674
- left: 0;
675
- overflow: hidden;
676
- margin: calc(var(--n-th-padding) * -1);
677
- padding: var(--n-th-padding);
678
- box-sizing: border-box;
679
- `),W("striped","background-color: var(--n-merged-td-color-striped);",[R("data-table-td","background-color: var(--n-merged-td-color-striped);")]),Ue("summary",[ne("&:hover","background-color: var(--n-merged-td-color-hover);",[ne(">",[R("data-table-td","background-color: var(--n-merged-td-color-hover);")])])])]),R("data-table-th",`
680
- padding: var(--n-th-padding);
681
- position: relative;
682
- text-align: start;
683
- box-sizing: border-box;
684
- background-color: var(--n-merged-th-color);
685
- border-color: var(--n-merged-border-color);
686
- border-bottom: 1px solid var(--n-merged-border-color);
687
- color: var(--n-th-text-color);
688
- transition:
689
- border-color .3s var(--n-bezier),
690
- color .3s var(--n-bezier),
691
- background-color .3s var(--n-bezier);
692
- font-weight: var(--n-th-font-weight);
693
- `,[W("filterable",`
694
- padding-right: 36px;
695
- `,[W("sortable",`
696
- padding-right: calc(var(--n-th-padding) + 36px);
697
- `)]),Wo,W("selection",`
698
- padding: 0;
699
- text-align: center;
700
- line-height: 0;
701
- z-index: 3;
702
- `),ae("title-wrapper",`
703
- display: flex;
704
- align-items: center;
705
- flex-wrap: nowrap;
706
- max-width: 100%;
707
- `,[ae("title",`
708
- flex: 1;
709
- min-width: 0;
710
- `)]),ae("ellipsis",`
711
- display: inline-block;
712
- vertical-align: bottom;
713
- text-overflow: ellipsis;
714
- overflow: hidden;
715
- white-space: nowrap;
716
- max-width: 100%;
717
- `),W("hover",`
718
- background-color: var(--n-merged-th-color-hover);
719
- `),W("sortable",`
720
- cursor: pointer;
721
- `,[ae("ellipsis",`
722
- max-width: calc(100% - 18px);
723
- `),ne("&:hover",`
724
- background-color: var(--n-merged-th-color-hover);
725
- `)]),R("data-table-sorter",`
726
- height: var(--n-sorter-size);
727
- width: var(--n-sorter-size);
728
- margin-left: 4px;
729
- position: relative;
730
- display: inline-flex;
731
- align-items: center;
732
- justify-content: center;
733
- vertical-align: -0.2em;
734
- color: var(--n-th-icon-color);
735
- transition: color .3s var(--n-bezier);
736
- `,[R("base-icon","transition: transform .3s var(--n-bezier)"),W("desc",[R("base-icon",`
737
- transform: rotate(0deg);
738
- `)]),W("asc",[R("base-icon",`
739
- transform: rotate(-180deg);
740
- `)]),W("asc, desc",`
741
- color: var(--n-th-icon-color-active);
742
- `)]),R("data-table-resize-button",`
743
- width: var(--n-resizable-container-size);
744
- position: absolute;
745
- top: 0;
746
- right: calc(var(--n-resizable-container-size) / 2);
747
- bottom: 0;
748
- cursor: col-resize;
749
- user-select: none;
750
- `,[ne("&::after",`
751
- width: var(--n-resizable-size);
752
- height: 50%;
753
- position: absolute;
754
- top: 50%;
755
- left: calc(var(--n-resizable-container-size) / 2);
756
- bottom: 0;
757
- background-color: var(--n-merged-border-color);
758
- transform: translateY(-50%);
759
- transition: background-color .3s var(--n-bezier);
760
- z-index: 1;
761
- content: '';
762
- `),W("active",[ne("&::after",`
763
- background-color: var(--n-th-icon-color-active);
764
- `)]),ne("&:hover::after",`
765
- background-color: var(--n-th-icon-color-active);
766
- `)]),R("data-table-filter",`
767
- position: absolute;
768
- z-index: auto;
769
- right: 0;
770
- width: 36px;
771
- top: 0;
772
- bottom: 0;
773
- cursor: pointer;
774
- display: flex;
775
- justify-content: center;
776
- align-items: center;
777
- transition:
778
- background-color .3s var(--n-bezier),
779
- color .3s var(--n-bezier);
780
- font-size: var(--n-filter-size);
781
- color: var(--n-th-icon-color);
782
- `,[ne("&:hover",`
783
- background-color: var(--n-th-button-color-hover);
784
- `),W("show",`
785
- background-color: var(--n-th-button-color-hover);
786
- `),W("active",`
787
- background-color: var(--n-th-button-color-hover);
788
- color: var(--n-th-icon-color-active);
789
- `)])]),R("data-table-td",`
790
- padding: var(--n-td-padding);
791
- text-align: start;
792
- box-sizing: border-box;
793
- border: none;
794
- background-color: var(--n-merged-td-color);
795
- color: var(--n-td-text-color);
796
- border-bottom: 1px solid var(--n-merged-border-color);
797
- transition:
798
- box-shadow .3s var(--n-bezier),
799
- background-color .3s var(--n-bezier),
800
- border-color .3s var(--n-bezier),
801
- color .3s var(--n-bezier);
802
- `,[W("expand",[R("data-table-expand-trigger",`
803
- margin-right: 0;
804
- `)]),W("last-row",`
805
- border-bottom: 0 solid var(--n-merged-border-color);
806
- `,[ne("&::after",`
807
- bottom: 0 !important;
808
- `),ne("&::before",`
809
- bottom: 0 !important;
810
- `)]),W("summary",`
811
- background-color: var(--n-merged-th-color);
812
- `),W("hover",`
813
- background-color: var(--n-merged-td-color-hover);
814
- `),ae("ellipsis",`
815
- display: inline-block;
816
- text-overflow: ellipsis;
817
- overflow: hidden;
818
- white-space: nowrap;
819
- max-width: 100%;
820
- vertical-align: bottom;
821
- max-width: calc(100% - var(--indent-offset, -1.5) * 16px - 24px);
822
- `),W("selection, expand",`
823
- text-align: center;
824
- padding: 0;
825
- line-height: 0;
826
- `),Wo]),R("data-table-empty",`
827
- box-sizing: border-box;
828
- padding: var(--n-empty-padding);
829
- flex-grow: 1;
830
- flex-shrink: 0;
831
- opacity: 1;
832
- display: flex;
833
- align-items: center;
834
- justify-content: center;
835
- transition: opacity .3s var(--n-bezier);
836
- `,[W("hide",`
837
- opacity: 0;
838
- `)]),ae("pagination",`
839
- margin: var(--n-pagination-margin);
840
- display: flex;
841
- justify-content: flex-end;
842
- `),R("data-table-wrapper",`
843
- position: relative;
844
- opacity: 1;
845
- transition: opacity .3s var(--n-bezier), border-color .3s var(--n-bezier);
846
- border-top-left-radius: var(--n-border-radius);
847
- border-top-right-radius: var(--n-border-radius);
848
- line-height: var(--n-line-height);
849
- `),W("loading",[R("data-table-wrapper",`
850
- opacity: var(--n-opacity-loading);
851
- pointer-events: none;
852
- `)]),W("single-column",[R("data-table-td",`
853
- border-bottom: 0 solid var(--n-merged-border-color);
854
- `,[ne("&::after, &::before",`
855
- bottom: 0 !important;
856
- `)])]),Ue("single-line",[R("data-table-th",`
857
- border-right: 1px solid var(--n-merged-border-color);
858
- `,[W("last",`
859
- border-right: 0 solid var(--n-merged-border-color);
860
- `)]),R("data-table-td",`
861
- border-right: 1px solid var(--n-merged-border-color);
862
- `,[W("last-col",`
863
- border-right: 0 solid var(--n-merged-border-color);
864
- `)])]),W("bordered",[R("data-table-wrapper",`
865
- border: 1px solid var(--n-merged-border-color);
866
- border-bottom-left-radius: var(--n-border-radius);
867
- border-bottom-right-radius: var(--n-border-radius);
868
- overflow: hidden;
869
- `)]),R("data-table-base-table",[W("transition-disabled",[R("data-table-th",[ne("&::after, &::before","transition: none;")]),R("data-table-td",[ne("&::after, &::before","transition: none;")])])]),W("bottom-bordered",[R("data-table-td",[W("last-row",`
870
- border-bottom: 1px solid var(--n-merged-border-color);
871
- `)])]),R("data-table-table",`
872
- font-variant-numeric: tabular-nums;
873
- width: 100%;
874
- word-break: break-word;
875
- transition: background-color .3s var(--n-bezier);
876
- border-collapse: separate;
877
- border-spacing: 0;
878
- background-color: var(--n-merged-td-color);
879
- `),R("data-table-base-table-header",`
880
- border-top-left-radius: calc(var(--n-border-radius) - 1px);
881
- border-top-right-radius: calc(var(--n-border-radius) - 1px);
882
- z-index: 3;
883
- overflow: scroll;
884
- flex-shrink: 0;
885
- transition: border-color .3s var(--n-bezier);
886
- scrollbar-width: none;
887
- `,[ne("&::-webkit-scrollbar",`
888
- width: 0;
889
- height: 0;
890
- `)]),R("data-table-check-extra",`
891
- transition: color .3s var(--n-bezier);
892
- color: var(--n-th-icon-color);
893
- position: absolute;
894
- font-size: 14px;
895
- right: -4px;
896
- top: 50%;
897
- transform: translateY(-50%);
898
- z-index: 1;
899
- `)]),R("data-table-filter-menu",[R("scrollbar",`
900
- max-height: 240px;
901
- `),ae("group",`
902
- display: flex;
903
- flex-direction: column;
904
- padding: 12px 12px 0 12px;
905
- `,[R("checkbox",`
906
- margin-bottom: 12px;
907
- margin-right: 0;
908
- `),R("radio",`
909
- margin-bottom: 12px;
910
- margin-right: 0;
911
- `)]),ae("action",`
912
- padding: var(--n-action-padding);
913
- display: flex;
914
- flex-wrap: nowrap;
915
- justify-content: space-evenly;
916
- border-top: 1px solid var(--n-action-divider-color);
917
- `,[R("button",[ne("&:not(:last-child)",`
918
- margin: var(--n-action-button-margin);
919
- `),ne("&:last-child",`
920
- margin-right: 0;
921
- `)])]),R("divider",`
922
- margin: 0 !important;
923
- `)]),sr(R("data-table",`
924
- --n-merged-th-color: var(--n-th-color-modal);
925
- --n-merged-td-color: var(--n-td-color-modal);
926
- --n-merged-border-color: var(--n-border-color-modal);
927
- --n-merged-th-color-hover: var(--n-th-color-hover-modal);
928
- --n-merged-td-color-hover: var(--n-td-color-hover-modal);
929
- --n-merged-td-color-striped: var(--n-td-color-striped-modal);
930
- `)),dr(R("data-table",`
931
- --n-merged-th-color: var(--n-th-color-popover);
932
- --n-merged-td-color: var(--n-td-color-popover);
933
- --n-merged-border-color: var(--n-border-color-popover);
934
- --n-merged-th-color-hover: var(--n-th-color-hover-popover);
935
- --n-merged-td-color-hover: var(--n-td-color-hover-popover);
936
- --n-merged-td-color-striped: var(--n-td-color-striped-popover);
937
- `))]);function Sa(){return[W("fixed-left",`
938
- left: 0;
939
- position: sticky;
940
- z-index: 2;
941
- `,[ne("&::after",`
942
- pointer-events: none;
943
- content: "";
944
- width: 36px;
945
- display: inline-block;
946
- position: absolute;
947
- top: 0;
948
- bottom: -1px;
949
- transition: box-shadow .2s var(--n-bezier);
950
- right: -36px;
951
- `)]),W("fixed-right",`
952
- right: 0;
953
- position: sticky;
954
- z-index: 1;
955
- `,[ne("&::before",`
956
- pointer-events: none;
957
- content: "";
958
- width: 36px;
959
- display: inline-block;
960
- position: absolute;
961
- top: 0;
962
- bottom: -1px;
963
- transition: box-shadow .2s var(--n-bezier);
964
- left: -36px;
965
- `)])]}const za=he({name:"DataTable",alias:["AdvancedTable"],props:$i,setup(e,{slots:t}){const{mergedBorderedRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:r}=ot(e),a=C(()=>{const{bottomBordered:H}=e;return o.value?!1:H!==void 0?H:!0}),d=Ae("DataTable","-data-table",wa,Oi,e,n),l=j(null),s=j(null),{getResizableWidth:u,clearResizableWidth:v,doUpdateResizableWidth:p}=ma(),{rowsRef:x,colsRef:h,dataRelatedColsRef:c,hasEllipsisRef:g}=ya(e,u),{treeMateRef:m,mergedCurrentPageRef:y,paginatedDataRef:S,rawPaginatedDataRef:O,selectionColumnRef:Z,hoverKeyRef:I,mergedPaginationRef:N,mergedFilterStateRef:_,mergedSortStateRef:$,childTriggerColIndexRef:z,doUpdatePage:M,doUpdateFilters:V,onUnstableColumnResize:k,deriveNextSorter:L,filter:A,filters:E,clearFilter:X,clearFilters:K,clearSorter:ee,page:w,sort:f}=ga(e,{dataRelatedColsRef:c}),{doCheckAll:T,doUncheckAll:D,doCheck:U,doUncheck:re,headerCheckboxDisabledRef:ue,someRowsCheckedRef:Se,allRowsCheckedRef:oe,mergedCheckedRowKeySetRef:me,mergedInderminateRowKeySetRef:se}=fa(e,{selectionColumnRef:Z,treeMateRef:m,paginatedDataRef:S}),{stickyExpandedRowsRef:P,mergedExpandedRowKeysRef:J,renderExpandRef:Fe,expandableRef:Q,doUpdateExpandedRowKeys:ge}=Ca(e,m),{handleTableBodyScroll:Ie,handleTableHeaderScroll:ze,syncScrollState:Pe,setHeaderScrollLeft:Le,leftActiveFixedColKeyRef:Ee,leftActiveFixedChildrenColKeysRef:ke,rightActiveFixedColKeyRef:F,rightActiveFixedChildrenColKeysRef:q,leftFixedColumnsRef:xe,rightFixedColumnsRef:je,fixedColumnLeftMapRef:Je,fixedColumnRightMapRef:Ke}=ba(e,{bodyWidthRef:l,mainTableInstRef:s,mergedCurrentPageRef:y}),{localeRef:Me}=uo("DataTable"),He=C(()=>e.virtualScroll||e.flexHeight||e.maxHeight!==void 0||g.value?"fixed":e.tableLayout);qe(Ze,{props:e,treeMateRef:m,renderExpandIconRef:le(e,"renderExpandIcon"),loadingKeySetRef:j(new Set),slots:t,indentRef:le(e,"indent"),childTriggerColIndexRef:z,bodyWidthRef:l,componentId:cr(),hoverKeyRef:I,mergedClsPrefixRef:n,mergedThemeRef:d,scrollXRef:C(()=>e.scrollX),rowsRef:x,colsRef:h,paginatedDataRef:S,leftActiveFixedColKeyRef:Ee,leftActiveFixedChildrenColKeysRef:ke,rightActiveFixedColKeyRef:F,rightActiveFixedChildrenColKeysRef:q,leftFixedColumnsRef:xe,rightFixedColumnsRef:je,fixedColumnLeftMapRef:Je,fixedColumnRightMapRef:Ke,mergedCurrentPageRef:y,someRowsCheckedRef:Se,allRowsCheckedRef:oe,mergedSortStateRef:$,mergedFilterStateRef:_,loadingRef:le(e,"loading"),rowClassNameRef:le(e,"rowClassName"),mergedCheckedRowKeySetRef:me,mergedExpandedRowKeysRef:J,mergedInderminateRowKeySetRef:se,localeRef:Me,expandableRef:Q,stickyExpandedRowsRef:P,rowKeyRef:le(e,"rowKey"),renderExpandRef:Fe,summaryRef:le(e,"summary"),virtualScrollRef:le(e,"virtualScroll"),rowPropsRef:le(e,"rowProps"),stripedRef:le(e,"striped"),checkOptionsRef:C(()=>{const{value:H}=Z;return H==null?void 0:H.options}),rawPaginatedDataRef:O,filterMenuCssVarsRef:C(()=>{const{self:{actionDividerColor:H,actionPadding:be,actionButtonMargin:we}}=d.value;return{"--n-action-padding":be,"--n-action-button-margin":we,"--n-action-divider-color":H}}),onLoadRef:le(e,"onLoad"),mergedTableLayoutRef:He,maxHeightRef:le(e,"maxHeight"),minHeightRef:le(e,"minHeight"),flexHeightRef:le(e,"flexHeight"),headerCheckboxDisabledRef:ue,paginationBehaviorOnFilterRef:le(e,"paginationBehaviorOnFilter"),summaryPlacementRef:le(e,"summaryPlacement"),scrollbarPropsRef:le(e,"scrollbarProps"),syncScrollState:Pe,doUpdatePage:M,doUpdateFilters:V,getResizableWidth:u,onUnstableColumnResize:k,clearResizableWidth:v,doUpdateResizableWidth:p,deriveNextSorter:L,doCheck:U,doUncheck:re,doCheckAll:T,doUncheckAll:D,doUpdateExpandedRowKeys:ge,handleTableHeaderScroll:ze,handleTableBodyScroll:Ie,setHeaderScrollLeft:Le,renderCell:le(e,"renderCell")});const Ne={filter:A,filters:E,clearFilters:K,clearSorter:ee,page:w,sort:f,clearFilter:X,scrollTo:(H,be)=>{var we;(we=s.value)===null||we===void 0||we.scrollTo(H,be)}},G=C(()=>{const{size:H}=e,{common:{cubicBezierEaseInOut:be},self:{borderColor:we,tdColorHover:b,thColor:B,thColorHover:Y,tdColor:fe,tdTextColor:pe,thTextColor:de,thFontWeight:ve,thButtonColorHover:Re,thIconColor:Oe,thIconColorActive:Qe,filterSize:Be,borderRadius:_e,lineHeight:ht,tdColorModal:vt,thColorModal:pt,borderColorModal:gt,thColorHoverModal:bt,tdColorHoverModal:mt,borderColorPopover:Et,thColorPopover:Kt,tdColorPopover:Ht,tdColorHoverPopover:Dt,thColorHoverPopover:jt,paginationMargin:Ut,emptyPadding:Wt,boxShadowAfter:Vt,boxShadowBefore:qt,sorterSize:Gt,resizableContainerSize:Xt,resizableSize:Zt,loadingColor:Jt,loadingSize:Mn,opacityLoading:On,tdColorStriped:Tn,tdColorStripedModal:Bn,tdColorStripedPopover:$n,[ce("fontSize",H)]:In,[ce("thPadding",H)]:An,[ce("tdPadding",H)]:_n}}=d.value;return{"--n-font-size":In,"--n-th-padding":An,"--n-td-padding":_n,"--n-bezier":be,"--n-border-radius":_e,"--n-line-height":ht,"--n-border-color":we,"--n-border-color-modal":gt,"--n-border-color-popover":Et,"--n-th-color":B,"--n-th-color-hover":Y,"--n-th-color-modal":pt,"--n-th-color-hover-modal":bt,"--n-th-color-popover":Kt,"--n-th-color-hover-popover":jt,"--n-td-color":fe,"--n-td-color-hover":b,"--n-td-color-modal":vt,"--n-td-color-hover-modal":mt,"--n-td-color-popover":Ht,"--n-td-color-hover-popover":Dt,"--n-th-text-color":de,"--n-td-text-color":pe,"--n-th-font-weight":ve,"--n-th-button-color-hover":Re,"--n-th-icon-color":Oe,"--n-th-icon-color-active":Qe,"--n-filter-size":Be,"--n-pagination-margin":Ut,"--n-empty-padding":Wt,"--n-box-shadow-before":qt,"--n-box-shadow-after":Vt,"--n-sorter-size":Gt,"--n-resizable-container-size":Xt,"--n-resizable-size":Zt,"--n-loading-size":Mn,"--n-loading-color":Jt,"--n-opacity-loading":On,"--n-td-color-striped":Tn,"--n-td-color-striped-modal":Bn,"--n-td-color-striped-popover":$n}}),te=r?lt("data-table",C(()=>e.size[0]),G,e):void 0,Ce=C(()=>{if(!e.pagination)return!1;if(e.paginateSinglePage)return!0;const H=N.value,{pageCount:be}=H;return be!==void 0?be>1:H.itemCount&&H.pageSize&&H.itemCount>H.pageSize});return Object.assign({mainTableInstRef:s,mergedClsPrefix:n,mergedTheme:d,paginatedData:S,mergedBordered:o,mergedBottomBordered:a,mergedPagination:N,mergedShowPagination:Ce,cssVars:r?void 0:G,themeClass:te==null?void 0:te.themeClass,onRender:te==null?void 0:te.onRender},Ne)},render(){const{mergedClsPrefix:e,themeClass:t,onRender:o,$slots:n,spinProps:r}=this;return o==null||o(),i("div",{class:[`${e}-data-table`,t,{[`${e}-data-table--bordered`]:this.mergedBordered,[`${e}-data-table--bottom-bordered`]:this.mergedBottomBordered,[`${e}-data-table--single-line`]:this.singleLine,[`${e}-data-table--single-column`]:this.singleColumn,[`${e}-data-table--loading`]:this.loading,[`${e}-data-table--flex-height`]:this.flexHeight}],style:this.cssVars},i("div",{class:`${e}-data-table-wrapper`},i(ua,{ref:"mainTableInstRef"})),this.mergedShowPagination?i("div",{class:`${e}-data-table__pagination`},i(Si,Object.assign({theme:this.mergedTheme.peers.Pagination,themeOverrides:this.mergedTheme.peerOverrides.Pagination,disabled:this.loading},this.mergedPagination))):null,i(Bt,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?i("div",{class:`${e}-data-table-loading-wrapper`},It(n.loading,()=>[i(lo,Object.assign({clsPrefix:e,strokeWidth:20},r))])):null}))}}),Ra={async mounted(e,t){await rt(),t.value(e.getClientRects()[0])},async updated(e,t){await rt(),t.value(e.getClientRects()[0])}},yt=e=>{const t=io({...e,render(o,n){var r;return Zo(ur("span",{class:"whitespace-nowrap"},[(r=e.render)==null?void 0:r.call(e,o,n)]),[[Ra,a=>{t.width=Math.max(Math.ceil(a.width+16),t.width||0,Number(t.minWidth||0))}]])}});return t},Vo=e=>`${ko(e).manufacturer} Android${ko(e).release||"13"}`,Ma=()=>{const e=io({key:"id",title:"创建时间",fixed:"left",width:"130px",sortOrder:!1,sorter(s,u){return s.id-u.id},render(s){return Tr(s.id).format("MM-DD HH:mm:ss")}}),t=yt({key:"versionRelease",title:"设备",filterMultiple:!0,minWidth:100,filter(s,u){return Vo(u).includes(s.toString())},render(s){return Vo(s)}}),o=yt({key:"appName",minWidth:100,title:"APP名称",filterMultiple:!0,filter(s,u){return s.toString()==u.appName},render(s){return s.appName}}),n=yt({key:"appId",title:"ID",minWidth:100,render(s){return s.appId}}),r=yt({key:"appVersionCode",title:"版本代码",minWidth:150,render(s){return s.appVersionCode}}),a=yt({key:"appVersionName",title:"版本号",minWidth:150,render(s){return s.appVersionName}}),d=io({key:"activityId",title:"界面ID",filterMultiple:!0,filter(s,u){return s.toString()==u.activityId},render(s){return s.activityId}});return{ctimeCol:e,deviceCol:t,appNameCol:o,appIdCol:n,appVersionCodeCol:r,appVersionNameCol:a,activityIdCol:d,reseColWidth:()=>{t.width=void 0,o.width=void 0,n.width=void 0,r.width=void 0,a.width=void 0}}};export{za as N,gi as a,Vo as r,Ma as u};
966
- //# sourceMappingURL=table--d2SuAL4.js.map