vue-devui 1.6.4-select.0 → 1.6.5

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.
@@ -161,17 +161,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
161
161
  onInvalidate(() => subscriptions.forEach((v) => v()));
162
162
  });
163
163
  };
164
- function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emit) {
165
- const calcPopDirection = (dropdownEl) => {
166
- const elementHeight = dropdownEl.offsetHeight;
167
- const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
168
- const isBottomEnough = bottomDistance >= elementHeight;
169
- if (!isBottomEnough) {
170
- popDirection.value = "top";
171
- } else {
172
- popDirection.value = "bottom";
173
- }
174
- };
164
+ function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
175
165
  watch(visible, (newVal, oldVal) => {
176
166
  if (oldVal === void 0) {
177
167
  return;
@@ -195,9 +185,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
195
185
  }
196
186
  }
197
187
  }
198
- if (dropdownEl) {
199
- calcPopDirection(dropdownEl);
200
- }
201
188
  });
202
189
  onMounted(() => {
203
190
  dropdownMap.set(id, { toggleEl: origin.value });
@@ -605,7 +592,7 @@ var Dropdown = defineComponent({
605
592
  props,
606
593
  emit
607
594
  });
608
- useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
595
+ useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
609
596
  const {
610
597
  overlayModelValue,
611
598
  overlayShowValue,
@@ -1 +1 @@
1
- var ie=Object.defineProperty,se=Object.defineProperties;var ue=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var ce=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var H=(d,e,w)=>e in d?ie(d,e,{enumerable:!0,configurable:!0,writable:!0,value:w}):d[e]=w,_=(d,e)=>{for(var w in e||(e={}))ce.call(e,w)&&H(d,w,e[w]);if(F)for(var w of F(e))de.call(e,w)&&H(d,w,e[w]);return d},q=(d,e)=>se(d,ue(e));(function(d,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@floating-ui/dom"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom","@vueuse/core"],e):(d=typeof globalThis!="undefined"?globalThis:d||self,e(d.index={},d.Vue,d.dom,d.core))})(this,function(d,e,w,z){"use strict";const U={visible:{type:Boolean,default:!1},trigger:{type:String,default:"click"},closeScope:{type:String,default:"all"},position:{type:Array,default:["bottom"]},align:{type:String,default:null},offset:{type:[Number,Object],default:4},shiftOffset:{type:Number},closeOnMouseLeaveMenu:{type:Boolean,default:!1},showAnimation:{type:Boolean,default:!0},overlayClass:{type:String,default:""},destroyOnHide:{type:Boolean,default:!0}},R=Symbol("popper-trigger");function Y(t){return t instanceof Element?t:t&&typeof t=="object"&&t.$el instanceof Element?t.$el:null}const O=new Map;function B(t,o,n){return t==null||t.addEventListener(o,n),()=>{t==null||t.removeEventListener(o,n)}}const I=({id:t,isOpen:o,origin:n,dropdownRef:r,props:l,emit:a})=>{let i=!1,s=!1;const{trigger:u,closeScope:c,closeOnMouseLeaveMenu:m}=e.toRefs(l),f=g=>{o.value=g,a("toggle",o.value)},v=async(g,E)=>{await new Promise(p=>setTimeout(p,50)),!(g==="origin"&&i||g==="dropdown"&&s)&&(E&&[...O.values()].reverse().forEach(p=>{setTimeout(()=>{var V;(V=p.toggle)==null||V.call(p)},0)}),f(!1))};e.watch([u,n,r],([g,E,p],V,y)=>{const b=Y(E),P=[];setTimeout(()=>{P.push(B(document,"click",h=>{h.stopPropagation();const x=[...O.values()];!o.value||c.value==="none"||(p==null?void 0:p.contains(h.target))&&c.value==="blank"||x.some(A=>{var T;return(T=A.toggleEl)==null?void 0:T.contains(h.target)})&&x.some(A=>{var T;return(T=A.menuEl)==null?void 0:T.contains(h.target)})||([...O.values()].reverse().forEach(A=>{setTimeout(()=>{var T,C;((T=A.toggleEl)==null?void 0:T.contains(h.target))||(C=A.toggle)==null||C.call(A)},0)}),i=!1)}))},0),g==="click"?P.push(B(b,"click",()=>f(!o.value)),B(p,"mouseleave",h=>{var x;m.value&&!((x=O.get(t).child)==null?void 0:x.contains(h.relatedTarget))&&v("dropdown",!0)})):g==="hover"&&P.push(B(b,"mouseenter",()=>{s=!0,f(!0)}),B(b,"mouseleave",()=>{s=!1,v("origin")}),B(p,"mouseenter",()=>{i=!0,o.value=!0}),B(p,"mouseleave",h=>{var x;i=!1,!(h.relatedTarget&&((b==null?void 0:b.contains(h.relatedTarget))||((x=O.get(t).child)==null?void 0:x.contains(h.relatedTarget))))&&v("dropdown",!0)})),y(()=>P.forEach(h=>h()))})};function X(t,o,n,r,l,a,i){const s=u=>{const c=u.offsetHeight;window.innerHeight-r.value.getBoundingClientRect().bottom>=c?a.value="bottom":a.value="top"};e.watch(o,(u,c)=>{c!==void 0&&(n.value=u,i("toggle",n.value))},{immediate:!0}),e.watch([n,l],([u,c])=>{var m;if(u){O.set(t,q(_({},O.get(t)),{menuEl:c,toggle:()=>{n.value=!1,i("toggle",n.value)}}));for(const f of O.values())((m=f.menuEl)==null?void 0:m.contains(r.value))&&(f.child=c)}c&&s(c)}),e.onMounted(()=>{O.set(t,{toggleEl:r.value})}),e.onUnmounted(()=>{O.delete(t)})}function G(t,o,n){const{showAnimation:r,overlayClass:l,destroyOnHide:a}=e.toRefs(t),i=e.ref(!1),s=e.ref(!1),u=e.computed(()=>({transformOrigin:o.value==="top"?"0% 100%":"0% 0%",zIndex:"var(--devui-z-index-dropdown, 1052)"})),c=e.computed(()=>({"fade-in-bottom":r.value&&n.value&&o.value==="bottom","fade-in-top":r.value&&n.value&&o.value==="top",[`${l.value}`]:!0})),m=f=>{o.value=f.includes("top")||f.includes("right-end")||f.includes("left-end")?"top":"bottom"};return e.watch(n,f=>{i.value=a.value?f:!0,s.value=f}),{overlayModelValue:i,overlayShowValue:s,styles:u,classes:c,handlePositionChange:m}}const K={modelValue:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}};function J(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const t=document.documentElement.scrollTop,o=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${t}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{o?document.documentElement.setAttribute("style",o):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=t}}}function Q(t,o){let n;const r=a=>{a.preventDefault(),o.emit("click",a),t.closeOnClickOverlay&&o.emit("update:modelValue",!1)},l=()=>{n==null||n()};return e.watch(()=>t.modelValue,a=>{a?t.lockScroll&&(n=J()):l()}),e.onUnmounted(l),{onClick:r}}function D(t,o,n){let r=t;return o&&(r+=`__${o}`),n&&(r+=`--${n}`),r}function N(t,o=!1){const n=o?`.devui-${t}`:`devui-${t}`;return{b:()=>D(n),e:s=>s?D(n,s):"",m:s=>s?D(n,"",s):"",em:(s,u)=>s&&u?D(n,s,u):""}}var fe="";e.defineComponent({name:"DFixedOverlay",inheritAttrs:!1,props:K,emits:["update:modelValue","click"],setup(t,o){const{modelValue:n}=e.toRefs(t),r=N("fixed-overlay"),{onClick:l}=Q(t,o);return()=>e.createVNode(e.Transition,{name:r.m("fade")},{default:()=>{var a,i;return[n.value&&e.createVNode("div",e.mergeProps({class:r.b()},o.attrs,{onClick:l}),[(i=(a=o.slots).default)==null?void 0:i.call(a)])]}})}});const W={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0},clickEventBubble:{type:Boolean,default:!1}};function Z(t){const o=/(auto|scroll|hidden)/;for(let n=t;n=n.parentElement;n.parentElement!==document.body){const r=window.getComputedStyle(n);if(o.test(r.overflow+r.overflowX+r.overflowY))return n}return window}function ee(t,o,n,r){let{x:l,y:a}=o;if(!t){const{width:i,height:s}=r;l&&n.includes("start")&&(l=12),l&&n.includes("end")&&(l=Math.round(i-24)),a&&n.includes("start")&&(a=10),a&&n.includes("end")&&(a=s-14)}return{x:l,y:a}}function te(t,o){const n=e.ref(),r=e.ref();let l=null;const a=(s,u,c,m)=>{const{x:f,y:v}=ee(t.isArrowCenter,c,u,m.getBoundingClientRect()),g={top:"bottom",right:"left",bottom:"top",left:"right"}[u.split("-")[0]];Object.assign(s.style,{left:f?`${f}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[g]:"-4px"})},i=async()=>{const s=t.origin,u=e.unref(n.value),c=e.unref(r.value),m=[w.offset(t.offset),w.autoPlacement({alignment:t.align,allowedPlacements:t.position})];if(t.showArrow&&m.push(w.arrow({element:c})),t.shiftOffset!==void 0&&m.push(w.shift()),!u)return;const{x:f,y:v,placement:g,middlewareData:E}=await w.computePosition(s,u,{strategy:"fixed",middleware:m});let p=f,V=v;if(t.shiftOffset!==void 0){const{x:y,y:b}=E.shift;y<0&&(p-=t.shiftOffset),y>0&&(p+=t.shiftOffset),b<0&&(V-=t.shiftOffset),b>0&&(V+=t.shiftOffset)}o("positionChange",g),Object.assign(u.style,{top:`${V}px`,left:`${p}px`}),t.showArrow&&a(c,g,E.arrow,u)};return e.watch(()=>t.modelValue,()=>{t.modelValue&&t.origin?(l=Z(t.origin),e.nextTick(i),l==null||l.addEventListener("scroll",i),l!==window&&window.addEventListener("scroll",i),window.addEventListener("resize",i)):(l==null||l.removeEventListener("scroll",i),l!==window&&window.removeEventListener("scroll",i),window.removeEventListener("resize",i))}),e.onUnmounted(()=>{l==null||l.removeEventListener("scroll",i),l!==window&&window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}),{arrowRef:r,overlayRef:n,updatePosition:i}}var me="";const k=e.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:W,emits:["update:modelValue","positionChange"],setup(t,{slots:o,attrs:n,emit:r,expose:l}){const a=N("flexible-overlay"),{clickEventBubble:i}=e.toRefs(t),{arrowRef:s,overlayRef:u,updatePosition:c}=te(t,r);return l({updatePosition:c}),()=>{var m;return t.modelValue&&e.createVNode("div",e.mergeProps({ref:u,class:a.b()},n,{onClick:e.withModifiers(()=>({}),[i.value?"":"stop"]),onPointerup:e.withModifiers(()=>({}),["stop"])}),[(m=o.default)==null?void 0:m.call(o),t.showArrow&&e.createVNode("div",{ref:s,class:a.e("arrow")},null)])}}}),oe=t=>t!==null&&typeof t=="object",ne=N("popper-trigger");function $(t){return e.h("span",{class:ne.b()},t)}function j(t){for(const o of t){if(oe(o)){if(o.type===e.Comment)continue;return o.type==="svg"||o.type===e.Text?$(o):o.type===e.Fragment?j(o.children):o}return $(o)}return null}var le=e.defineComponent({name:"DPopperTrigger",setup(t,o){const{slots:n,attrs:r}=o;return()=>{var s;const l=(s=n.default)==null?void 0:s.call(n,r),a=e.inject(R);if(!l)return null;const i=j(l);return i?e.withDirectives(e.cloneVNode(i,r),[[{mounted(u){a.value=u},updated(u){a.value=u},unmounted(){a.value=null}}]]):null}}}),pe="";let ae=1;var S=e.defineComponent({name:"DDropdown",inheritAttrs:!1,props:U,emits:["toggle"],setup(t,{slots:o,attrs:n,emit:r,expose:l}){const{visible:a,position:i,align:s,offset:u,destroyOnHide:c,shiftOffset:m,showAnimation:f}=e.toRefs(t),v=e.ref(),g=e.ref(),E=e.ref(),p=`dropdown_${ae++}`,V=e.ref(!1),y=e.ref("bottom"),b=N("dropdown");e.provide(R,v),I({id:p,isOpen:V,origin:v,dropdownRef:g,props:t,emit:r}),X(p,a,V,v,g,y,r);const{overlayModelValue:P,overlayShowValue:h,styles:x,classes:A,handlePositionChange:T}=G(t,y,V);return e.watch(h,C=>{e.nextTick(()=>{!c.value&&C&&E.value.updatePosition()})}),l({updatePosition:()=>E.value.updatePosition()}),()=>e.createVNode(e.Fragment,null,[e.createVNode(le,null,{default:()=>{var C;return[(C=o.default)==null?void 0:C.call(o)]}}),e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode(e.Transition,{name:f.value?b.m(`fade-${y.value}`):""},{default:()=>[e.withDirectives(e.createVNode(k,{modelValue:P.value,"onUpdate:modelValue":C=>P.value=C,ref:E,origin:v.value,position:i.value,align:s.value,offset:u.value,shiftOffset:m==null?void 0:m.value,onPositionChange:T,"click-event-bubble":!0,class:A.value,style:x.value},{default:()=>{var C;return[e.createVNode("div",e.mergeProps({ref:g,class:b.e("menu-wrap")},n),[(C=o.menu)==null?void 0:C.call(o)])]}}),[[e.vShow,h.value]])]})]})])}});const L={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},align:{type:String,default:null},offset:{type:[Number,Object],default:4},clickOutside:{type:Function,default:()=>!0},showAnimation:{type:Boolean,default:!0},overlayClass:{type:String,default:""}};var M=e.defineComponent({name:"DDropdownMenu",inheritAttrs:!1,props:L,emits:["update:modelValue"],setup(t,{slots:o,attrs:n,emit:r}){const{modelValue:l,origin:a,position:i,align:s,offset:u,clickOutside:c,showAnimation:m,overlayClass:f}=e.toRefs(t),v=e.ref(null),g=N("dropdown");z.onClickOutside(v,y=>{var b,P;((b=c.value)==null?void 0:b.call(c))&&!((P=a==null?void 0:a.value)==null?void 0:P.contains(y.target))&&r("update:modelValue",!1)});const E=e.ref("bottom"),p=y=>{E.value=y.split("-")[0]==="top"?"top":"bottom"},V=e.computed(()=>({transformOrigin:E.value==="top"?"0% 100%":"0% 0%"}));return()=>e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode(e.Transition,{name:m.value?g.m(`fade-${E.value}`):""},{default:()=>[e.createVNode(k,{modelValue:l.value,"onUpdate:modelValue":y=>l.value=y,origin:a==null?void 0:a.value,position:i.value,align:s.value,offset:u.value,onPositionChange:p,class:f.value,style:V.value},{default:()=>{var y;return[e.createVNode("div",e.mergeProps({ref:v,class:g.e("menu-wrap")},n),[(y=o.default)==null?void 0:y.call(o)])]}})]})]})}}),re={title:"Dropdown \u4E0B\u62C9\u83DC\u5355",category:"\u5BFC\u822A",status:"50%",install(t){t.component(S.name,S),t.component(M.name,M)}};d.Dropdown=S,d.DropdownMenu=M,d.default=re,d.dropdownMenuProps=L,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});
1
+ var ie=Object.defineProperty,se=Object.defineProperties;var ue=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var _=(d,e,g)=>e in d?ie(d,e,{enumerable:!0,configurable:!0,writable:!0,value:g}):d[e]=g,q=(d,e)=>{for(var g in e||(e={}))de.call(e,g)&&_(d,g,e[g]);if(F)for(var g of F(e))ce.call(e,g)&&_(d,g,e[g]);return d},z=(d,e)=>se(d,ue(e));(function(d,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@floating-ui/dom"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom","@vueuse/core"],e):(d=typeof globalThis!="undefined"?globalThis:d||self,e(d.index={},d.Vue,d.dom,d.core))})(this,function(d,e,g,H){"use strict";const U={visible:{type:Boolean,default:!1},trigger:{type:String,default:"click"},closeScope:{type:String,default:"all"},position:{type:Array,default:["bottom"]},align:{type:String,default:null},offset:{type:[Number,Object],default:4},shiftOffset:{type:Number},closeOnMouseLeaveMenu:{type:Boolean,default:!1},showAnimation:{type:Boolean,default:!0},overlayClass:{type:String,default:""},destroyOnHide:{type:Boolean,default:!0}},D=Symbol("popper-trigger");function Y(t){return t instanceof Element?t:t&&typeof t=="object"&&t.$el instanceof Element?t.$el:null}const O=new Map;function N(t,o,n){return t==null||t.addEventListener(o,n),()=>{t==null||t.removeEventListener(o,n)}}const I=({id:t,isOpen:o,origin:n,dropdownRef:i,props:l,emit:a})=>{let r=!1,s=!1;const{trigger:u,closeScope:f,closeOnMouseLeaveMenu:y}=e.toRefs(l),m=p=>{o.value=p,a("toggle",o.value)},w=async(p,E)=>{await new Promise(c=>setTimeout(c,50)),!(p==="origin"&&r||p==="dropdown"&&s)&&(E&&[...O.values()].reverse().forEach(c=>{setTimeout(()=>{var V;(V=c.toggle)==null||V.call(c)},0)}),m(!1))};e.watch([u,n,i],([p,E,c],V,v)=>{const b=Y(E),P=[];setTimeout(()=>{P.push(N(document,"click",h=>{h.stopPropagation();const x=[...O.values()];!o.value||f.value==="none"||(c==null?void 0:c.contains(h.target))&&f.value==="blank"||x.some(A=>{var T;return(T=A.toggleEl)==null?void 0:T.contains(h.target)})&&x.some(A=>{var T;return(T=A.menuEl)==null?void 0:T.contains(h.target)})||([...O.values()].reverse().forEach(A=>{setTimeout(()=>{var T,C;((T=A.toggleEl)==null?void 0:T.contains(h.target))||(C=A.toggle)==null||C.call(A)},0)}),r=!1)}))},0),p==="click"?P.push(N(b,"click",()=>m(!o.value)),N(c,"mouseleave",h=>{var x;y.value&&!((x=O.get(t).child)==null?void 0:x.contains(h.relatedTarget))&&w("dropdown",!0)})):p==="hover"&&P.push(N(b,"mouseenter",()=>{s=!0,m(!0)}),N(b,"mouseleave",()=>{s=!1,w("origin")}),N(c,"mouseenter",()=>{r=!0,o.value=!0}),N(c,"mouseleave",h=>{var x;r=!1,!(h.relatedTarget&&((b==null?void 0:b.contains(h.relatedTarget))||((x=O.get(t).child)==null?void 0:x.contains(h.relatedTarget))))&&w("dropdown",!0)})),v(()=>P.forEach(h=>h()))})};function X(t,o,n,i,l,a){e.watch(o,(r,s)=>{s!==void 0&&(n.value=r,a("toggle",n.value))},{immediate:!0}),e.watch([n,l],([r,s])=>{var u;if(r){O.set(t,z(q({},O.get(t)),{menuEl:s,toggle:()=>{n.value=!1,a("toggle",n.value)}}));for(const f of O.values())((u=f.menuEl)==null?void 0:u.contains(i.value))&&(f.child=s)}}),e.onMounted(()=>{O.set(t,{toggleEl:i.value})}),e.onUnmounted(()=>{O.delete(t)})}function G(t,o,n){const{showAnimation:i,overlayClass:l,destroyOnHide:a}=e.toRefs(t),r=e.ref(!1),s=e.ref(!1),u=e.computed(()=>({transformOrigin:o.value==="top"?"0% 100%":"0% 0%",zIndex:"var(--devui-z-index-dropdown, 1052)"})),f=e.computed(()=>({"fade-in-bottom":i.value&&n.value&&o.value==="bottom","fade-in-top":i.value&&n.value&&o.value==="top",[`${l.value}`]:!0})),y=m=>{o.value=m.includes("top")||m.includes("right-end")||m.includes("left-end")?"top":"bottom"};return e.watch(n,m=>{r.value=a.value?m:!0,s.value=m}),{overlayModelValue:r,overlayShowValue:s,styles:u,classes:f,handlePositionChange:y}}const K={modelValue:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}};function J(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const t=document.documentElement.scrollTop,o=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${t}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{o?document.documentElement.setAttribute("style",o):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=t}}}function Q(t,o){let n;const i=a=>{a.preventDefault(),o.emit("click",a),t.closeOnClickOverlay&&o.emit("update:modelValue",!1)},l=()=>{n==null||n()};return e.watch(()=>t.modelValue,a=>{a?t.lockScroll&&(n=J()):l()}),e.onUnmounted(l),{onClick:i}}function B(t,o,n){let i=t;return o&&(i+=`__${o}`),n&&(i+=`--${n}`),i}function S(t,o=!1){const n=o?`.devui-${t}`:`devui-${t}`;return{b:()=>B(n),e:s=>s?B(n,s):"",m:s=>s?B(n,"",s):"",em:(s,u)=>s&&u?B(n,s,u):""}}var fe="";e.defineComponent({name:"DFixedOverlay",inheritAttrs:!1,props:K,emits:["update:modelValue","click"],setup(t,o){const{modelValue:n}=e.toRefs(t),i=S("fixed-overlay"),{onClick:l}=Q(t,o);return()=>e.createVNode(e.Transition,{name:i.m("fade")},{default:()=>{var a,r;return[n.value&&e.createVNode("div",e.mergeProps({class:i.b()},o.attrs,{onClick:l}),[(r=(a=o.slots).default)==null?void 0:r.call(a)])]}})}});const W={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0},clickEventBubble:{type:Boolean,default:!1}};function Z(t){const o=/(auto|scroll|hidden)/;for(let n=t;n=n.parentElement;n.parentElement!==document.body){const i=window.getComputedStyle(n);if(o.test(i.overflow+i.overflowX+i.overflowY))return n}return window}function ee(t,o,n,i){let{x:l,y:a}=o;if(!t){const{width:r,height:s}=i;l&&n.includes("start")&&(l=12),l&&n.includes("end")&&(l=Math.round(r-24)),a&&n.includes("start")&&(a=10),a&&n.includes("end")&&(a=s-14)}return{x:l,y:a}}function te(t,o){const n=e.ref(),i=e.ref();let l=null;const a=(s,u,f,y)=>{const{x:m,y:w}=ee(t.isArrowCenter,f,u,y.getBoundingClientRect()),p={top:"bottom",right:"left",bottom:"top",left:"right"}[u.split("-")[0]];Object.assign(s.style,{left:m?`${m}px`:"",top:w?`${w}px`:"",right:"",bottom:"",[p]:"-4px"})},r=async()=>{const s=t.origin,u=e.unref(n.value),f=e.unref(i.value),y=[g.offset(t.offset),g.autoPlacement({alignment:t.align,allowedPlacements:t.position})];if(t.showArrow&&y.push(g.arrow({element:f})),t.shiftOffset!==void 0&&y.push(g.shift()),!u)return;const{x:m,y:w,placement:p,middlewareData:E}=await g.computePosition(s,u,{strategy:"fixed",middleware:y});let c=m,V=w;if(t.shiftOffset!==void 0){const{x:v,y:b}=E.shift;v<0&&(c-=t.shiftOffset),v>0&&(c+=t.shiftOffset),b<0&&(V-=t.shiftOffset),b>0&&(V+=t.shiftOffset)}o("positionChange",p),Object.assign(u.style,{top:`${V}px`,left:`${c}px`}),t.showArrow&&a(f,p,E.arrow,u)};return e.watch(()=>t.modelValue,()=>{t.modelValue&&t.origin?(l=Z(t.origin),e.nextTick(r),l==null||l.addEventListener("scroll",r),l!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),e.onUnmounted(()=>{l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:i,overlayRef:n,updatePosition:r}}var me="";const R=e.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:W,emits:["update:modelValue","positionChange"],setup(t,{slots:o,attrs:n,emit:i,expose:l}){const a=S("flexible-overlay"),{clickEventBubble:r}=e.toRefs(t),{arrowRef:s,overlayRef:u,updatePosition:f}=te(t,i);return l({updatePosition:f}),()=>{var y;return t.modelValue&&e.createVNode("div",e.mergeProps({ref:u,class:a.b()},n,{onClick:e.withModifiers(()=>({}),[r.value?"":"stop"]),onPointerup:e.withModifiers(()=>({}),["stop"])}),[(y=o.default)==null?void 0:y.call(o),t.showArrow&&e.createVNode("div",{ref:s,class:a.e("arrow")},null)])}}}),oe=t=>t!==null&&typeof t=="object",ne=S("popper-trigger");function $(t){return e.h("span",{class:ne.b()},t)}function j(t){for(const o of t){if(oe(o)){if(o.type===e.Comment)continue;return o.type==="svg"||o.type===e.Text?$(o):o.type===e.Fragment?j(o.children):o}return $(o)}return null}var le=e.defineComponent({name:"DPopperTrigger",setup(t,o){const{slots:n,attrs:i}=o;return()=>{var s;const l=(s=n.default)==null?void 0:s.call(n,i),a=e.inject(D);if(!l)return null;const r=j(l);return r?e.withDirectives(e.cloneVNode(r,i),[[{mounted(u){a.value=u},updated(u){a.value=u},unmounted(){a.value=null}}]]):null}}}),pe="";let ae=1;var M=e.defineComponent({name:"DDropdown",inheritAttrs:!1,props:U,emits:["toggle"],setup(t,{slots:o,attrs:n,emit:i,expose:l}){const{visible:a,position:r,align:s,offset:u,destroyOnHide:f,shiftOffset:y,showAnimation:m}=e.toRefs(t),w=e.ref(),p=e.ref(),E=e.ref(),c=`dropdown_${ae++}`,V=e.ref(!1),v=e.ref("bottom"),b=S("dropdown");e.provide(D,w),I({id:c,isOpen:V,origin:w,dropdownRef:p,props:t,emit:i}),X(c,a,V,w,p,i);const{overlayModelValue:P,overlayShowValue:h,styles:x,classes:A,handlePositionChange:T}=G(t,v,V);return e.watch(h,C=>{e.nextTick(()=>{!f.value&&C&&E.value.updatePosition()})}),l({updatePosition:()=>E.value.updatePosition()}),()=>e.createVNode(e.Fragment,null,[e.createVNode(le,null,{default:()=>{var C;return[(C=o.default)==null?void 0:C.call(o)]}}),e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode(e.Transition,{name:m.value?b.m(`fade-${v.value}`):""},{default:()=>[e.withDirectives(e.createVNode(R,{modelValue:P.value,"onUpdate:modelValue":C=>P.value=C,ref:E,origin:w.value,position:r.value,align:s.value,offset:u.value,shiftOffset:y==null?void 0:y.value,onPositionChange:T,"click-event-bubble":!0,class:A.value,style:x.value},{default:()=>{var C;return[e.createVNode("div",e.mergeProps({ref:p,class:b.e("menu-wrap")},n),[(C=o.menu)==null?void 0:C.call(o)])]}}),[[e.vShow,h.value]])]})]})])}});const L={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},align:{type:String,default:null},offset:{type:[Number,Object],default:4},clickOutside:{type:Function,default:()=>!0},showAnimation:{type:Boolean,default:!0},overlayClass:{type:String,default:""}};var k=e.defineComponent({name:"DDropdownMenu",inheritAttrs:!1,props:L,emits:["update:modelValue"],setup(t,{slots:o,attrs:n,emit:i}){const{modelValue:l,origin:a,position:r,align:s,offset:u,clickOutside:f,showAnimation:y,overlayClass:m}=e.toRefs(t),w=e.ref(null),p=S("dropdown");H.onClickOutside(w,v=>{var b,P;((b=f.value)==null?void 0:b.call(f))&&!((P=a==null?void 0:a.value)==null?void 0:P.contains(v.target))&&i("update:modelValue",!1)});const E=e.ref("bottom"),c=v=>{E.value=v.split("-")[0]==="top"?"top":"bottom"},V=e.computed(()=>({transformOrigin:E.value==="top"?"0% 100%":"0% 0%"}));return()=>e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode(e.Transition,{name:y.value?p.m(`fade-${E.value}`):""},{default:()=>[e.createVNode(R,{modelValue:l.value,"onUpdate:modelValue":v=>l.value=v,origin:a==null?void 0:a.value,position:r.value,align:s.value,offset:u.value,onPositionChange:c,class:m.value,style:V.value},{default:()=>{var v;return[e.createVNode("div",e.mergeProps({ref:w,class:p.e("menu-wrap")},n),[(v=o.default)==null?void 0:v.call(o)])]}})]})]})}}),re={title:"Dropdown \u4E0B\u62C9\u83DC\u5355",category:"\u5BFC\u822A",status:"50%",install(t){t.component(M.name,M),t.component(k.name,k)}};d.Dropdown=M,d.DropdownMenu=k,d.default=re,d.dropdownMenuProps=L,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});
@@ -6254,7 +6254,7 @@ var Dropdown = defineComponent({
6254
6254
  debounceLoadMore();
6255
6255
  };
6256
6256
  const renderOption = () => {
6257
- if (props.options.length === 0) {
6257
+ if (props.options.length === 0 && !select.loading.value) {
6258
6258
  return createVNode("li", {
6259
6259
  "class": ns.em("item", "no-data-tip")
6260
6260
  }, [slots.noResultItem ? slots.noResultItem() : emptyText.value]);
@@ -24,4 +24,4 @@ __p += '`),H&&(w+=`' +
24
24
  function print() { __p += __j.call(arguments, '') }
25
25
  `:`;
26
26
  `)+w+`return __p
27
- }`;var N=Ml(function(){return G(l,I+"return "+w).apply(u,f)});if(N.source=w,Wi(N))throw N;return N}function Ap(n){return K(n).toLowerCase()}function Ep(n){return K(n).toUpperCase()}function bp(n,e,t){if(n=K(n),n&&(t||e===u))return Gu(n);if(!n||!(e=Tn(e)))return n;var r=Kn(n),i=Kn(e),l=Ku(r,i),f=qu(r,i)+1;return Ae(r,l,f).join("")}function Sp(n,e,t){if(n=K(n),n&&(t||e===u))return n.slice(0,Zu(n)+1);if(!n||!(e=Tn(e)))return n;var r=Kn(n),i=qu(r,Kn(e))+1;return Ae(r,0,i).join("")}function Cp(n,e,t){if(n=K(n),n&&(t||e===u))return n.replace(Wr,"");if(!n||!(e=Tn(e)))return n;var r=Kn(n),i=Ku(r,Kn(e));return Ae(r,i).join("")}function Ip(n,e){var t=Er,r=br;if(en(e)){var i="separator"in e?e.separator:i;t="length"in e?P(e.length):t,r="omission"in e?Tn(e.omission):r}n=K(n);var l=n.length;if(Ne(n)){var f=Kn(n);l=f.length}if(t>=l)return n;var s=t-We(r);if(s<1)return r;var h=f?Ae(f,0,s).join(""):n.slice(0,s);if(i===u)return h+r;if(f&&(s+=h.length-s),Ui(i)){if(n.slice(s).search(i)){var v,m=h;for(i.global||(i=ei(i.source,K(hu.exec(i))+"g")),i.lastIndex=0;v=i.exec(m);)var w=v.index;h=h.slice(0,w===u?s:w)}}else if(n.indexOf(Tn(i),s)!=s){var b=h.lastIndexOf(i);b>-1&&(h=h.slice(0,b))}return h+r}function Fp(n){return n=K(n),n&&Uf.test(n)?n.replace(su,ra):n}var Tp=Ke(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Hi=No("toUpperCase");function Pl(n,e,t){return n=K(n),e=t?u:e,e===u?ks(n)?oa(n):zs(n):n.match(e)||[]}var Ml=W(function(n,e){try{return In(n,u,e)}catch(t){return Wi(t)?t:new B(t)}}),Rp=se(function(n,e){return Pn(e,function(t){t=ne(t),le(n,t,Mi(n[t],n))}),n});function Lp(n){var e=n==null?0:n.length,t=F();return n=e?k(n,function(r){if(typeof r[1]!="function")throw new Mn(A);return[t(r[0]),r[1]]}):[],W(function(r){for(var i=-1;++i<e;){var l=n[i];if(In(l[0],this,r))return In(l[1],this,r)}})}function Op(n){return rc(Wn(n,z))}function zi(n){return function(){return n}}function Bp(n,e){return n==null||n!==n?e:n}var Dp=Uo(),Pp=Uo(!0);function Cn(n){return n}function Gi(n){return po(typeof n=="function"?n:Wn(n,z))}function Mp(n){return vo(Wn(n,z))}function Np(n,e){return mo(n,Wn(e,z))}var Wp=W(function(n,e){return function(t){return gt(t,n,e)}}),Up=W(function(n,e){return function(t){return gt(n,t,e)}});function Ki(n,e,t){var r=cn(e),i=nr(e,r);t==null&&!(en(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=nr(e,cn(e)));var l=!(en(t)&&"chain"in t)||!!t.chain,f=ce(n);return Pn(i,function(s){var h=e[s];n[s]=h,f&&(n.prototype[s]=function(){var v=this.__chain__;if(l||v){var m=n(this.__wrapped__),w=m.__actions__=En(this.__actions__);return w.push({func:h,args:arguments,thisArg:n}),m.__chain__=v,m}return h.apply(n,_e([this.value()],arguments))})}),n}function Vp(){return dn._===this&&(dn._=ha),this}function qi(){}function $p(n){return n=P(n),W(function(e){return wo(e,n)})}var Hp=Ei(k),zp=Ei(Uu),Gp=Ei(Zr);function Nl(n){return Ri(n)?Xr(ne(n)):yc(n)}function Kp(n){return function(e){return n==null?u:Te(n,e)}}var qp=$o(),Yp=$o(!0);function Yi(){return[]}function Zi(){return!1}function Zp(){return{}}function Xp(){return""}function Jp(){return!0}function Qp(n,e){if(n=P(n),n<1||n>An)return[];var t=Qn,r=pn(n,Qn);e=F(e),n-=Qn;for(var i=kr(r,e);++t<n;)e(t);return i}function kp(n){return D(n)?k(n,ne):Rn(n)?[n]:En(rl(K(n)))}function jp(n){var e=++aa;return K(n)+e}var n0=or(function(n,e){return n+e},0),e0=bi("ceil"),t0=or(function(n,e){return n/e},1),r0=bi("floor");function i0(n){return n&&n.length?jt(n,Cn,si):u}function u0(n,e){return n&&n.length?jt(n,F(e,2),si):u}function o0(n){return Hu(n,Cn)}function l0(n,e){return Hu(n,F(e,2))}function f0(n){return n&&n.length?jt(n,Cn,di):u}function s0(n,e){return n&&n.length?jt(n,F(e,2),di):u}var a0=or(function(n,e){return n*e},1),c0=bi("round"),h0=or(function(n,e){return n-e},0);function d0(n){return n&&n.length?Qr(n,Cn):0}function g0(n,e){return n&&n.length?Qr(n,F(e,2)):0}return o.after=Md,o.ary=gl,o.assign=Eg,o.assignIn=Fl,o.assignInWith=wr,o.assignWith=bg,o.at=Sg,o.before=pl,o.bind=Mi,o.bindAll=Rp,o.bindKey=_l,o.castArray=Zd,o.chain=cl,o.chunk=rh,o.compact=ih,o.concat=uh,o.cond=Lp,o.conforms=Op,o.constant=zi,o.countBy=dd,o.create=Cg,o.curry=vl,o.curryRight=ml,o.debounce=wl,o.defaults=Ig,o.defaultsDeep=Fg,o.defer=Nd,o.delay=Wd,o.difference=oh,o.differenceBy=lh,o.differenceWith=fh,o.drop=sh,o.dropRight=ah,o.dropRightWhile=ch,o.dropWhile=hh,o.fill=dh,o.filter=pd,o.flatMap=md,o.flatMapDeep=wd,o.flatMapDepth=yd,o.flatten=ll,o.flattenDeep=gh,o.flattenDepth=ph,o.flip=Ud,o.flow=Dp,o.flowRight=Pp,o.fromPairs=_h,o.functions=Pg,o.functionsIn=Mg,o.groupBy=xd,o.initial=mh,o.intersection=wh,o.intersectionBy=yh,o.intersectionWith=xh,o.invert=Wg,o.invertBy=Ug,o.invokeMap=Ed,o.iteratee=Gi,o.keyBy=bd,o.keys=cn,o.keysIn=Sn,o.map=dr,o.mapKeys=$g,o.mapValues=Hg,o.matches=Mp,o.matchesProperty=Np,o.memoize=pr,o.merge=zg,o.mergeWith=Tl,o.method=Wp,o.methodOf=Up,o.mixin=Ki,o.negate=_r,o.nthArg=$p,o.omit=Gg,o.omitBy=Kg,o.once=Vd,o.orderBy=Sd,o.over=Hp,o.overArgs=$d,o.overEvery=zp,o.overSome=Gp,o.partial=Ni,o.partialRight=yl,o.partition=Cd,o.pick=qg,o.pickBy=Rl,o.property=Nl,o.propertyOf=Kp,o.pull=Sh,o.pullAll=sl,o.pullAllBy=Ch,o.pullAllWith=Ih,o.pullAt=Fh,o.range=qp,o.rangeRight=Yp,o.rearg=Hd,o.reject=Td,o.remove=Th,o.rest=zd,o.reverse=Di,o.sampleSize=Ld,o.set=Zg,o.setWith=Xg,o.shuffle=Od,o.slice=Rh,o.sortBy=Pd,o.sortedUniq=Nh,o.sortedUniqBy=Wh,o.split=mp,o.spread=Gd,o.tail=Uh,o.take=Vh,o.takeRight=$h,o.takeRightWhile=Hh,o.takeWhile=zh,o.tap=id,o.throttle=Kd,o.thru=hr,o.toArray=Sl,o.toPairs=Ll,o.toPairsIn=Ol,o.toPath=kp,o.toPlainObject=Il,o.transform=Jg,o.unary=qd,o.union=Gh,o.unionBy=Kh,o.unionWith=qh,o.uniq=Yh,o.uniqBy=Zh,o.uniqWith=Xh,o.unset=Qg,o.unzip=Pi,o.unzipWith=al,o.update=kg,o.updateWith=jg,o.values=Ze,o.valuesIn=np,o.without=Jh,o.words=Pl,o.wrap=Yd,o.xor=Qh,o.xorBy=kh,o.xorWith=jh,o.zip=nd,o.zipObject=ed,o.zipObjectDeep=td,o.zipWith=rd,o.entries=Ll,o.entriesIn=Ol,o.extend=Fl,o.extendWith=wr,Ki(o,o),o.add=n0,o.attempt=Ml,o.camelCase=ip,o.capitalize=Bl,o.ceil=e0,o.clamp=ep,o.clone=Xd,o.cloneDeep=Qd,o.cloneDeepWith=kd,o.cloneWith=Jd,o.conformsTo=jd,o.deburr=Dl,o.defaultTo=Bp,o.divide=t0,o.endsWith=up,o.eq=Yn,o.escape=op,o.escapeRegExp=lp,o.every=gd,o.find=_d,o.findIndex=ul,o.findKey=Tg,o.findLast=vd,o.findLastIndex=ol,o.findLastKey=Rg,o.floor=r0,o.forEach=hl,o.forEachRight=dl,o.forIn=Lg,o.forInRight=Og,o.forOwn=Bg,o.forOwnRight=Dg,o.get=Vi,o.gt=ng,o.gte=eg,o.has=Ng,o.hasIn=$i,o.head=fl,o.identity=Cn,o.includes=Ad,o.indexOf=vh,o.inRange=tp,o.invoke=Vg,o.isArguments=Oe,o.isArray=D,o.isArrayBuffer=tg,o.isArrayLike=bn,o.isArrayLikeObject=un,o.isBoolean=rg,o.isBuffer=Ee,o.isDate=ig,o.isElement=ug,o.isEmpty=og,o.isEqual=lg,o.isEqualWith=fg,o.isError=Wi,o.isFinite=sg,o.isFunction=ce,o.isInteger=xl,o.isLength=vr,o.isMap=Al,o.isMatch=ag,o.isMatchWith=cg,o.isNaN=hg,o.isNative=dg,o.isNil=pg,o.isNull=gg,o.isNumber=El,o.isObject=en,o.isObjectLike=tn,o.isPlainObject=yt,o.isRegExp=Ui,o.isSafeInteger=_g,o.isSet=bl,o.isString=mr,o.isSymbol=Rn,o.isTypedArray=Ye,o.isUndefined=vg,o.isWeakMap=mg,o.isWeakSet=wg,o.join=Ah,o.kebabCase=fp,o.last=Vn,o.lastIndexOf=Eh,o.lowerCase=sp,o.lowerFirst=ap,o.lt=yg,o.lte=xg,o.max=i0,o.maxBy=u0,o.mean=o0,o.meanBy=l0,o.min=f0,o.minBy=s0,o.stubArray=Yi,o.stubFalse=Zi,o.stubObject=Zp,o.stubString=Xp,o.stubTrue=Jp,o.multiply=a0,o.nth=bh,o.noConflict=Vp,o.noop=qi,o.now=gr,o.pad=cp,o.padEnd=hp,o.padStart=dp,o.parseInt=gp,o.random=rp,o.reduce=Id,o.reduceRight=Fd,o.repeat=pp,o.replace=_p,o.result=Yg,o.round=c0,o.runInContext=c,o.sample=Rd,o.size=Bd,o.snakeCase=vp,o.some=Dd,o.sortedIndex=Lh,o.sortedIndexBy=Oh,o.sortedIndexOf=Bh,o.sortedLastIndex=Dh,o.sortedLastIndexBy=Ph,o.sortedLastIndexOf=Mh,o.startCase=wp,o.startsWith=yp,o.subtract=h0,o.sum=d0,o.sumBy=g0,o.template=xp,o.times=Qp,o.toFinite=he,o.toInteger=P,o.toLength=Cl,o.toLower=Ap,o.toNumber=$n,o.toSafeInteger=Ag,o.toString=K,o.toUpper=Ep,o.trim=bp,o.trimEnd=Sp,o.trimStart=Cp,o.truncate=Ip,o.unescape=Fp,o.uniqueId=jp,o.upperCase=Tp,o.upperFirst=Hi,o.each=hl,o.eachRight=dl,o.first=fl,Ki(o,function(){var n={};return kn(o,function(e,t){Y.call(o.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),o.VERSION=x,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){o[n].placeholder=o}),Pn(["drop","take"],function(n,e){V.prototype[n]=function(t){t=t===u?1:an(P(t),0);var r=this.__filtered__&&!e?new V(this):this.clone();return r.__filtered__?r.__takeCount__=pn(t,r.__takeCount__):r.__views__.push({size:pn(t,Qn),type:n+(r.__dir__<0?"Right":"")}),r},V.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==St||t==Ct;V.prototype[n]=function(i){var l=this.clone();return l.__iteratees__.push({iteratee:F(i,3),type:t}),l.__filtered__=l.__filtered__||r,l}}),Pn(["head","last"],function(n,e){var t="take"+(e?"Right":"");V.prototype[n]=function(){return this[t](1).value()[0]}}),Pn(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");V.prototype[n]=function(){return this.__filtered__?new V(this):this[t](1)}}),V.prototype.compact=function(){return this.filter(Cn)},V.prototype.find=function(n){return this.filter(n).head()},V.prototype.findLast=function(n){return this.reverse().find(n)},V.prototype.invokeMap=W(function(n,e){return typeof n=="function"?new V(this):this.map(function(t){return gt(t,n,e)})}),V.prototype.reject=function(n){return this.filter(_r(F(n)))},V.prototype.slice=function(n,e){n=P(n);var t=this;return t.__filtered__&&(n>0||e<0)?new V(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==u&&(e=P(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},V.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},V.prototype.toArray=function(){return this.take(Qn)},kn(V.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=o[r?"take"+(e=="last"?"Right":""):e],l=r||/^find/.test(e);!i||(o.prototype[e]=function(){var f=this.__wrapped__,s=r?[1]:arguments,h=f instanceof V,v=s[0],m=h||D(f),w=function(U){var H=i.apply(o,_e([U],s));return r&&b?H[0]:H};m&&t&&typeof v=="function"&&v.length!=1&&(h=m=!1);var b=this.__chain__,I=!!this.__actions__.length,R=l&&!b,N=h&&!I;if(!l&&m){f=N?f:new V(this);var L=n.apply(f,s);return L.__actions__.push({func:hr,args:[w],thisArg:u}),new Nn(L,b)}return R&&N?n.apply(this,s):(L=this.thru(w),R?r?L.value()[0]:L.value():L)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Wt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);o.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var l=this.value();return e.apply(D(l)?l:[],i)}return this[t](function(f){return e.apply(D(f)?f:[],i)})}}),kn(V.prototype,function(n,e){var t=o[e];if(t){var r=t.name+"";Y.call(He,r)||(He[r]=[]),He[r].push({name:e,func:t})}}),He[ur(u,O).name]=[{name:"wrapper",func:u}],V.prototype.clone=Fa,V.prototype.reverse=Ta,V.prototype.value=Ra,o.prototype.at=ud,o.prototype.chain=od,o.prototype.commit=ld,o.prototype.next=fd,o.prototype.plant=ad,o.prototype.reverse=cd,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=hd,o.prototype.first=o.prototype.head,lt&&(o.prototype[lt]=sd),o},Ue=la();be?((be.exports=Ue)._=Ue,Gr._=Ue):dn._=Ue}).call(Qe)})(Jn,Jn.exports);var hf=d.defineComponent({name:"DEditableSelectDropdown",directives:{Loading:cf},props:jl,setup(a,{slots:p}){const u=Xn("editable-select"),{width:x,maxHeight:y}=d.toRefs(a),S=d.inject(At),{dropdownRef:A,hoveringIndex:E,handleOptionSelect:$,loadMore:Q,emptyText:M}=S,z=T=>E.value===T,q=T=>S.disabledKey?!!T[S.disabledKey]:!1,nn=Jn.exports.debounce(Q,300),rn=()=>{nn()},ln=()=>a.options.length===0?d.createVNode("li",{class:u.em("item","no-data-tip")},[p.noResultItem?p.noResultItem():M.value]):a.options.map((T,O)=>d.createVNode(tf,{label:T.label,value:T.value,hovering:z(O),disabled:q(T),onSelect:()=>{$(T,!0)}},p.item?{default:()=>d.renderSlot(d.useSlots(),"item",{option:T,index:O})}:{}));return()=>d.withDirectives(d.createVNode("div",{class:u.e("dropdown"),style:{width:`${x==null?void 0:x.value}px`}},[d.createVNode("div",{ref:A,class:u.e("inner"),style:{maxHeight:`${y==null?void 0:y.value}px`},onScroll:rn},[ln()])]),[[d.resolveDirective("loading"),S.loading.value]])}});function uu(...a){const p=u=>u&&typeof u=="object";return a.reduce((u,x)=>(Object.keys(x).forEach(y=>{const S=u[y],A=x[y];Array.isArray(S)&&Array.isArray(A)?u[y]=Array.from(new Set([...A,...S])):p(S)&&p(A)?u[y]=uu(S,A):u[y]=A}),u),{})}var df={pagination:{totalItemText:"\u6240\u6709\u6761\u76EE",goToText:"\u8DF3\u81F3",perPage:"\u6761/\u9875"},accordion:{loading:"\u52A0\u8F7D\u4E2D",noData:"\u6CA1\u6709\u6570\u636E"},autoCompleteDropdown:{latestInput:"\u6700\u8FD1\u8F93\u5165"},cascaderList:{noData:"\u6CA1\u6709\u6570\u636E"},colorPicker:{foundationPanel:"\u57FA\u7840\u9762\u677F",advancedPanel:"\u9AD8\u7EA7\u9762\u677F"},datePickerPro:{ok:"\u786E\u5B9A",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",month1:"1\u6708",month2:"2\u6708",month3:"3\u6708",month4:"4\u6708",month5:"5\u6708",month6:"6\u6708",month7:"7\u6708",month8:"8\u6708",month9:"9\u6708",month10:"10\u6708",month11:"11\u6708",month12:"12\u6708",year:"\u5E74",startPlaceholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",getWeekDays(){return["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},getTimeArr(){return["\u65F6","\u5206","\u79D2"]},getYearMonthStr(a,p){return`${a}\u5E74${p}\u6708`}},editableSelect:{noRelatedRecords:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",noData:"\u6CA1\u6709\u6570\u636E"},input:{placeholder:"\u8BF7\u8F93\u5165"},splitterBar:{collapse:"\u6536\u8D77",expand:"\u5C55\u5F00"},stepsGuide:{previous:"\u4E0A\u4E00\u6B65",continue:"\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",ok:"\u6211\u77E5\u9053\u5566"},table:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},dataGrid:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},timePopup:{ok:"\u786E\u5B9A"},transfer:{unit:"\u9879",panelUnit:"\u9879",headerUnit:"\u9879",noData:"\u6682\u65E0\u6570\u636E",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"},tree:{loading:"\u52A0\u8F7D\u4E2D",newNode:"\u65B0\u8282\u70B9",selectPlaceholder:"\u8BF7\u9009\u62E9"},upload:{placeholder:"\u9009\u62E9\u6587\u4EF6",getExistSameNameFilesMsg(a){return`\u60A8\u4E0A\u4F20\u7684 "${a}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`},getAllFilesBeyondMaximalFileSizeMsg(a){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${a}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getBeyondMaximalFileSizeMsg(a,p){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${p}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${a}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getNotAllowedFileTypeMsg(a,p){return`\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${p}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${a}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`}},search:{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57"},select:{placeholder:"\u8BF7\u9009\u62E9",noDataText:"\u65E0\u6570\u636E",noMatchText:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",loadingText:"\u52A0\u8F7D\u4E2D..."},tagInput:{maxTagsText:"\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"},timeSelect:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}};const bt=d.ref("zh-CN");let xr=d.reactive({[bt.value]:df});const gf={messages(){return xr[bt.value]},lang(){return bt.value},use(a,p){bt.value=a,this.add({[a]:p})},add(a={}){xr=uu(xr,a)}},pf=a=>a.substring(1).replace(/^\S/,p=>p.toLocaleLowerCase());function ou(a,p){const u=p.split(".");let x=a;return u.forEach(y=>{var S;x=(S=x[y])!=null?S:""}),x}function _f(a,p,u){const x=u||pf(a)+".";return y=>{var E;const S=((E=p==null?void 0:p.appContext.config.globalProperties.langMessages)==null?void 0:E.value)||gf.messages();return ou(S,x+y)||ou(S,y)}}function vf(){return d.reactive({hoveringIndex:-1,selectedIndex:-1,query:"",inputValue:"",selectedLabel:"",isFocus:!1,visible:!1,softFocus:!1,isSilentBlur:!1,inputHovering:!1})}function mf(a,p,u,x,y){const S=d.getCurrentInstance(),A=_f("DEditableSelect",S),E=d.ref(p.options),$=()=>p.remote&&Jn.exports.isFunction(p.remoteMethod)||Jn.exports.isFunction(p.filterMethod),Q=d.computed(()=>E.value.filter(O=>$()?!0:O.label.toLocaleLowerCase().includes(u.query.toLocaleLowerCase().trim()))),M=d.computed(()=>{let O="";return p.remote?O=A("noData"):O=A("noRelatedRecords"),O}),z=d.computed(()=>{const O=!Jn.exports.isNil(p.modelValue)&&p.modelValue!=="";return p.allowClear&&!p.disabled&&u.inputHovering&&O}),q=()=>{p.disabled||(u.visible=!u.visible)},nn=O=>{u.hoveringIndex=O,u.selectedIndex=O},rn=()=>{const O=E.value;if(Jn.exports.isNil(p.modelValue))u.inputValue="";else{const hn=O.findIndex(fn=>fn.value===p.modelValue);hn!==-1?(u.inputValue=O[hn].label,u.selectedLabel=O[hn].label,nn(hn)):(u.inputValue=`${p.modelValue}`,u.selectedLabel=`${p.modelValue}`)}},ln=(O,hn)=>{y.emit("update:modelValue",O.value),y.emit("change",O.value),u.isSilentBlur=hn,x(),u.visible=!1},T=O=>{const hn=a.value,fn=hn.children[O];d.nextTick(()=>{if(fn.scrollIntoViewIfNeeded)fn.scrollIntoViewIfNeeded(!1);else{const Bn=hn.getBoundingClientRect(),mn=fn.getBoundingClientRect();(mn.bottom>Bn.bottom||mn.top<Bn.top)&&fn.scrollIntoView(!1)}})};return d.watch(()=>u.visible,O=>{O?u.selectedIndex!==-1&&d.nextTick(()=>{T(u.selectedIndex)}):(u.query="",u.inputValue=u.selectedLabel),y.emit("visibleChange",O)}),d.watch(()=>p.modelValue,()=>{rn()}),d.watch(()=>p.options,O=>{O.length!==0&&(E.value=O)}),d.onMounted(()=>{rn()}),{cachedOptions:E,filteredOptions:Q,emptyText:M,showClearable:z,toggleMenu:q,handleOptionSelect:ln,scrollToItem:T}}const wf={tab:"Tab",enter:"Enter",up:"ArrowUp",down:"ArrowDown",esc:"Escape"};function yf(a,p,u,x,y){const S=M=>{p.hoveringIndex=M},A=(M,z=p.hoveringIndex)=>{if(!p.visible){p.visible=!0;return}if(u.value.length===0||a.loading)return;let q=0;if(M==="ArrowDown"?(q=z+1,q>u.value.length-1&&(q=0)):M==="ArrowUp"&&(q=z-1,q<0&&(q=u.value.length-1)),u.value[q][a.disabledKey])return A(M,q);S(q),x(q)},E=()=>{p.visible=!1},$=()=>{if(!p.visible)return p.visible=!0;const M=u.value[p.hoveringIndex];M&&y(M,!1)};return{onKeydown:M=>{const z=M.key||M.code,{tab:q,esc:nn,down:rn,up:ln,enter:T}=wf;switch((z===ln||z===rn)&&M.preventDefault(),z){case ln:A("ArrowUp");break;case rn:A("ArrowDown");break;case nn:case q:E();break;case T:$();break}}}}function xf(a,p){const u=Xn("editable-select-input"),x=d.computed(()=>({[u.b()]:!0,[u.m("sm")]:a.size==="sm",[u.m("lg")]:a.size==="lg",[u.m("open")]:p.visible})),y=d.computed(()=>({[u.e("wrapper")]:!0,[u.em("wrapper","focus")]:p.isFocus,[u.em("wrapper","disabled")]:a.disabled})),S=d.computed(()=>({[u.e("inner")]:!0})),A=d.computed(()=>({[u.e("placeholder")]:!0})),E=d.computed(()=>({[u.e("suffix")]:!0}));return{inputClasses:x,inputWrapperClasses:y,inputInnerClasses:S,inputPlaceholderClasses:A,inputSuffixClasses:E}}function Af(a,p,u,x){const y=d.computed(()=>p.remote?300:0),S=()=>{var O;const T=a.value;T&&((O=T.focus)==null||O.call(T))},A=T=>{u.softFocus?u.softFocus=!1:(x.emit("focus",T),u.isFocus=!0)},E=async T=>{u.isSilentBlur?u.isSilentBlur=!1:(x.emit("blur",T),u.isFocus=!0),u.softFocus=!1},$=T=>{u.inputValue=T},Q=T=>{p.remote&&Jn.exports.isFunction(p.remoteMethod)?p.remoteMethod(T):Jn.exports.isFunction(p.filterMethod)&&p.filterMethod(T)},M=()=>{u.query=u.inputValue,x.emit("inputChange",u.query),Q(u.query)},z=Jn.exports.debounce(M,y.value);return{blur,setSoftFocus:S,handleFocus:A,handleBlur:E,handleClear:()=>{x.emit("update:modelValue",""),x.emit("change",""),x.emit("clear"),u.hoveringIndex=-1,u.visible=!1},onInput:T=>{const O=T.target.value;$(O),u.inputValue.length>0&&!u.visible&&(u.visible=!0),p.remote?z():M()},onMouseenter:()=>{u.inputHovering=!0},onMouseleave:()=>{u.inputHovering=!1}}}function Ef(a,p,u){const{enableLazyLoad:x}=d.toRefs(p);return{loadMore:()=>{!a.value||!x.value||(a==null?void 0:a.value.clientHeight)+a.value.scrollTop>=a.value.scrollHeight-12&&u.emit("loadMore")}}}var E0="";function bf(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!d.isVNode(a)}var Ar=d.defineComponent({name:"DEditableSelect",props:Ji,emits:["update:modelValue","focus","blur","clear","change","visibleChange","loadMore","inputChange"],setup(a,p){const u=Xn("editable-select"),x=d.ref(),y=d.ref(),S=d.ref(),A=d.ref(),E=vf(),{appendToBody:$,disabled:Q,modelValue:M,position:z,placeholder:q}=d.toRefs(a),{onInput:nn,onMouseenter:rn,onMouseleave:ln,setSoftFocus:T,handleBlur:O,handleFocus:hn,handleClear:fn}=Af(x,a,E,p),{filteredOptions:Bn,emptyText:mn,showClearable:te,toggleMenu:Hn,handleOptionSelect:ge,scrollToItem:ke}=mf(S,a,E,T,p),{onKeydown:Er}=yf(a,E,Bn,ke,ge),{loadMore:br}=Ef(S,a,p);d.provide(At,{dropdownRef:S,disabledKey:a.disabledKey,modelValue:M,inputValue:d.toRef(E,"inputValue"),query:d.toRef(E,"query"),hoveringIndex:d.toRef(E,"hoveringIndex"),loading:d.toRef(a,"loading"),emptyText:mn,loadMore:br,handleOptionSelect:ge,setSoftFocus:T}),vn.onClickOutside(y,()=>{E.visible=!1,E.isFocus=!1},{ignore:[A]});const{inputClasses:Sr,inputWrapperClasses:Cr,inputInnerClasses:St,inputSuffixClasses:Ir}=xf(a,E),Ct=()=>d.createVNode(d.Transition,{name:"fade"},{default:()=>[d.createVNode(kl,{ref:A,modelValue:E.visible,"onUpdate:modelValue":An=>E.visible=An,origin:y.value,position:z.value,style:{zIndex:"var(--devui-z-index-dropdown, 1052)"}},{default:()=>[d.createVNode(hf,{options:Bn.value,width:a.width,maxHeight:a.maxHeight},p.slots)]})]}),re=()=>{if($.value){let An;return d.createVNode(d.Teleport,{to:"body"},bf(An=Ct())?An:{default:()=>[An]})}else return Ct()};return()=>d.createVNode("div",{ref:y,class:u.b(),style:{width:a.width+"px"},onClick:Hn},[d.createVNode("div",{class:Sr.value,onMouseenter:rn,onMouseleave:ln},[d.createVNode("div",{class:Cr.value},[d.createVNode("input",{ref:x,class:St.value,disabled:Q.value,placeholder:q.value,value:E.inputValue,type:"text",onInput:nn,onFocus:hn,onBlur:O,onKeydown:Er},null),d.createVNode("span",{class:Ir.value},[d.withDirectives(d.createVNode("span",{class:u.e("clear-icon"),onClick:d.withModifiers(fn,["stop"])},[d.createVNode(Qi,{name:"icon-remove"},null)]),[[d.vShow,te.value]]),d.withDirectives(d.createVNode("span",{class:u.e("arrow-icon")},[d.createVNode(Qi,{name:"select-arrow"},null)]),[[d.vShow,!te.value]])])])]),re()])}}),Sf={title:"EditableSelect \u53EF\u8F93\u5165\u4E0B\u62C9\u9009\u62E9\u6846",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(a){a.component(Ar.name,Ar)}};j.EditableSelect=Ar,j.SELECT_KEY=At,j.default=Sf,j.editableSelectProps=Ji,Object.defineProperty(j,"__esModule",{value:!0}),j[Symbol.toStringTag]="Module"});
27
+ }`;var N=Ml(function(){return G(l,I+"return "+w).apply(u,f)});if(N.source=w,Wi(N))throw N;return N}function Ap(n){return K(n).toLowerCase()}function Ep(n){return K(n).toUpperCase()}function bp(n,e,t){if(n=K(n),n&&(t||e===u))return Gu(n);if(!n||!(e=Tn(e)))return n;var r=Kn(n),i=Kn(e),l=Ku(r,i),f=qu(r,i)+1;return Ae(r,l,f).join("")}function Sp(n,e,t){if(n=K(n),n&&(t||e===u))return n.slice(0,Zu(n)+1);if(!n||!(e=Tn(e)))return n;var r=Kn(n),i=qu(r,Kn(e))+1;return Ae(r,0,i).join("")}function Cp(n,e,t){if(n=K(n),n&&(t||e===u))return n.replace(Wr,"");if(!n||!(e=Tn(e)))return n;var r=Kn(n),i=Ku(r,Kn(e));return Ae(r,i).join("")}function Ip(n,e){var t=Er,r=br;if(en(e)){var i="separator"in e?e.separator:i;t="length"in e?P(e.length):t,r="omission"in e?Tn(e.omission):r}n=K(n);var l=n.length;if(Ne(n)){var f=Kn(n);l=f.length}if(t>=l)return n;var s=t-We(r);if(s<1)return r;var h=f?Ae(f,0,s).join(""):n.slice(0,s);if(i===u)return h+r;if(f&&(s+=h.length-s),Ui(i)){if(n.slice(s).search(i)){var v,m=h;for(i.global||(i=ei(i.source,K(hu.exec(i))+"g")),i.lastIndex=0;v=i.exec(m);)var w=v.index;h=h.slice(0,w===u?s:w)}}else if(n.indexOf(Tn(i),s)!=s){var b=h.lastIndexOf(i);b>-1&&(h=h.slice(0,b))}return h+r}function Fp(n){return n=K(n),n&&Uf.test(n)?n.replace(su,ra):n}var Tp=Ke(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Hi=No("toUpperCase");function Pl(n,e,t){return n=K(n),e=t?u:e,e===u?ks(n)?oa(n):zs(n):n.match(e)||[]}var Ml=W(function(n,e){try{return In(n,u,e)}catch(t){return Wi(t)?t:new B(t)}}),Rp=se(function(n,e){return Pn(e,function(t){t=ne(t),le(n,t,Mi(n[t],n))}),n});function Lp(n){var e=n==null?0:n.length,t=F();return n=e?k(n,function(r){if(typeof r[1]!="function")throw new Mn(A);return[t(r[0]),r[1]]}):[],W(function(r){for(var i=-1;++i<e;){var l=n[i];if(In(l[0],this,r))return In(l[1],this,r)}})}function Op(n){return rc(Wn(n,z))}function zi(n){return function(){return n}}function Bp(n,e){return n==null||n!==n?e:n}var Dp=Uo(),Pp=Uo(!0);function Cn(n){return n}function Gi(n){return po(typeof n=="function"?n:Wn(n,z))}function Mp(n){return vo(Wn(n,z))}function Np(n,e){return mo(n,Wn(e,z))}var Wp=W(function(n,e){return function(t){return gt(t,n,e)}}),Up=W(function(n,e){return function(t){return gt(n,t,e)}});function Ki(n,e,t){var r=cn(e),i=nr(e,r);t==null&&!(en(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=nr(e,cn(e)));var l=!(en(t)&&"chain"in t)||!!t.chain,f=ce(n);return Pn(i,function(s){var h=e[s];n[s]=h,f&&(n.prototype[s]=function(){var v=this.__chain__;if(l||v){var m=n(this.__wrapped__),w=m.__actions__=En(this.__actions__);return w.push({func:h,args:arguments,thisArg:n}),m.__chain__=v,m}return h.apply(n,_e([this.value()],arguments))})}),n}function Vp(){return dn._===this&&(dn._=ha),this}function qi(){}function $p(n){return n=P(n),W(function(e){return wo(e,n)})}var Hp=Ei(k),zp=Ei(Uu),Gp=Ei(Zr);function Nl(n){return Ri(n)?Xr(ne(n)):yc(n)}function Kp(n){return function(e){return n==null?u:Te(n,e)}}var qp=$o(),Yp=$o(!0);function Yi(){return[]}function Zi(){return!1}function Zp(){return{}}function Xp(){return""}function Jp(){return!0}function Qp(n,e){if(n=P(n),n<1||n>An)return[];var t=Qn,r=pn(n,Qn);e=F(e),n-=Qn;for(var i=kr(r,e);++t<n;)e(t);return i}function kp(n){return D(n)?k(n,ne):Rn(n)?[n]:En(rl(K(n)))}function jp(n){var e=++aa;return K(n)+e}var n0=or(function(n,e){return n+e},0),e0=bi("ceil"),t0=or(function(n,e){return n/e},1),r0=bi("floor");function i0(n){return n&&n.length?jt(n,Cn,si):u}function u0(n,e){return n&&n.length?jt(n,F(e,2),si):u}function o0(n){return Hu(n,Cn)}function l0(n,e){return Hu(n,F(e,2))}function f0(n){return n&&n.length?jt(n,Cn,di):u}function s0(n,e){return n&&n.length?jt(n,F(e,2),di):u}var a0=or(function(n,e){return n*e},1),c0=bi("round"),h0=or(function(n,e){return n-e},0);function d0(n){return n&&n.length?Qr(n,Cn):0}function g0(n,e){return n&&n.length?Qr(n,F(e,2)):0}return o.after=Md,o.ary=gl,o.assign=Eg,o.assignIn=Fl,o.assignInWith=wr,o.assignWith=bg,o.at=Sg,o.before=pl,o.bind=Mi,o.bindAll=Rp,o.bindKey=_l,o.castArray=Zd,o.chain=cl,o.chunk=rh,o.compact=ih,o.concat=uh,o.cond=Lp,o.conforms=Op,o.constant=zi,o.countBy=dd,o.create=Cg,o.curry=vl,o.curryRight=ml,o.debounce=wl,o.defaults=Ig,o.defaultsDeep=Fg,o.defer=Nd,o.delay=Wd,o.difference=oh,o.differenceBy=lh,o.differenceWith=fh,o.drop=sh,o.dropRight=ah,o.dropRightWhile=ch,o.dropWhile=hh,o.fill=dh,o.filter=pd,o.flatMap=md,o.flatMapDeep=wd,o.flatMapDepth=yd,o.flatten=ll,o.flattenDeep=gh,o.flattenDepth=ph,o.flip=Ud,o.flow=Dp,o.flowRight=Pp,o.fromPairs=_h,o.functions=Pg,o.functionsIn=Mg,o.groupBy=xd,o.initial=mh,o.intersection=wh,o.intersectionBy=yh,o.intersectionWith=xh,o.invert=Wg,o.invertBy=Ug,o.invokeMap=Ed,o.iteratee=Gi,o.keyBy=bd,o.keys=cn,o.keysIn=Sn,o.map=dr,o.mapKeys=$g,o.mapValues=Hg,o.matches=Mp,o.matchesProperty=Np,o.memoize=pr,o.merge=zg,o.mergeWith=Tl,o.method=Wp,o.methodOf=Up,o.mixin=Ki,o.negate=_r,o.nthArg=$p,o.omit=Gg,o.omitBy=Kg,o.once=Vd,o.orderBy=Sd,o.over=Hp,o.overArgs=$d,o.overEvery=zp,o.overSome=Gp,o.partial=Ni,o.partialRight=yl,o.partition=Cd,o.pick=qg,o.pickBy=Rl,o.property=Nl,o.propertyOf=Kp,o.pull=Sh,o.pullAll=sl,o.pullAllBy=Ch,o.pullAllWith=Ih,o.pullAt=Fh,o.range=qp,o.rangeRight=Yp,o.rearg=Hd,o.reject=Td,o.remove=Th,o.rest=zd,o.reverse=Di,o.sampleSize=Ld,o.set=Zg,o.setWith=Xg,o.shuffle=Od,o.slice=Rh,o.sortBy=Pd,o.sortedUniq=Nh,o.sortedUniqBy=Wh,o.split=mp,o.spread=Gd,o.tail=Uh,o.take=Vh,o.takeRight=$h,o.takeRightWhile=Hh,o.takeWhile=zh,o.tap=id,o.throttle=Kd,o.thru=hr,o.toArray=Sl,o.toPairs=Ll,o.toPairsIn=Ol,o.toPath=kp,o.toPlainObject=Il,o.transform=Jg,o.unary=qd,o.union=Gh,o.unionBy=Kh,o.unionWith=qh,o.uniq=Yh,o.uniqBy=Zh,o.uniqWith=Xh,o.unset=Qg,o.unzip=Pi,o.unzipWith=al,o.update=kg,o.updateWith=jg,o.values=Ze,o.valuesIn=np,o.without=Jh,o.words=Pl,o.wrap=Yd,o.xor=Qh,o.xorBy=kh,o.xorWith=jh,o.zip=nd,o.zipObject=ed,o.zipObjectDeep=td,o.zipWith=rd,o.entries=Ll,o.entriesIn=Ol,o.extend=Fl,o.extendWith=wr,Ki(o,o),o.add=n0,o.attempt=Ml,o.camelCase=ip,o.capitalize=Bl,o.ceil=e0,o.clamp=ep,o.clone=Xd,o.cloneDeep=Qd,o.cloneDeepWith=kd,o.cloneWith=Jd,o.conformsTo=jd,o.deburr=Dl,o.defaultTo=Bp,o.divide=t0,o.endsWith=up,o.eq=Yn,o.escape=op,o.escapeRegExp=lp,o.every=gd,o.find=_d,o.findIndex=ul,o.findKey=Tg,o.findLast=vd,o.findLastIndex=ol,o.findLastKey=Rg,o.floor=r0,o.forEach=hl,o.forEachRight=dl,o.forIn=Lg,o.forInRight=Og,o.forOwn=Bg,o.forOwnRight=Dg,o.get=Vi,o.gt=ng,o.gte=eg,o.has=Ng,o.hasIn=$i,o.head=fl,o.identity=Cn,o.includes=Ad,o.indexOf=vh,o.inRange=tp,o.invoke=Vg,o.isArguments=Oe,o.isArray=D,o.isArrayBuffer=tg,o.isArrayLike=bn,o.isArrayLikeObject=un,o.isBoolean=rg,o.isBuffer=Ee,o.isDate=ig,o.isElement=ug,o.isEmpty=og,o.isEqual=lg,o.isEqualWith=fg,o.isError=Wi,o.isFinite=sg,o.isFunction=ce,o.isInteger=xl,o.isLength=vr,o.isMap=Al,o.isMatch=ag,o.isMatchWith=cg,o.isNaN=hg,o.isNative=dg,o.isNil=pg,o.isNull=gg,o.isNumber=El,o.isObject=en,o.isObjectLike=tn,o.isPlainObject=yt,o.isRegExp=Ui,o.isSafeInteger=_g,o.isSet=bl,o.isString=mr,o.isSymbol=Rn,o.isTypedArray=Ye,o.isUndefined=vg,o.isWeakMap=mg,o.isWeakSet=wg,o.join=Ah,o.kebabCase=fp,o.last=Vn,o.lastIndexOf=Eh,o.lowerCase=sp,o.lowerFirst=ap,o.lt=yg,o.lte=xg,o.max=i0,o.maxBy=u0,o.mean=o0,o.meanBy=l0,o.min=f0,o.minBy=s0,o.stubArray=Yi,o.stubFalse=Zi,o.stubObject=Zp,o.stubString=Xp,o.stubTrue=Jp,o.multiply=a0,o.nth=bh,o.noConflict=Vp,o.noop=qi,o.now=gr,o.pad=cp,o.padEnd=hp,o.padStart=dp,o.parseInt=gp,o.random=rp,o.reduce=Id,o.reduceRight=Fd,o.repeat=pp,o.replace=_p,o.result=Yg,o.round=c0,o.runInContext=c,o.sample=Rd,o.size=Bd,o.snakeCase=vp,o.some=Dd,o.sortedIndex=Lh,o.sortedIndexBy=Oh,o.sortedIndexOf=Bh,o.sortedLastIndex=Dh,o.sortedLastIndexBy=Ph,o.sortedLastIndexOf=Mh,o.startCase=wp,o.startsWith=yp,o.subtract=h0,o.sum=d0,o.sumBy=g0,o.template=xp,o.times=Qp,o.toFinite=he,o.toInteger=P,o.toLength=Cl,o.toLower=Ap,o.toNumber=$n,o.toSafeInteger=Ag,o.toString=K,o.toUpper=Ep,o.trim=bp,o.trimEnd=Sp,o.trimStart=Cp,o.truncate=Ip,o.unescape=Fp,o.uniqueId=jp,o.upperCase=Tp,o.upperFirst=Hi,o.each=hl,o.eachRight=dl,o.first=fl,Ki(o,function(){var n={};return kn(o,function(e,t){Y.call(o.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),o.VERSION=x,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){o[n].placeholder=o}),Pn(["drop","take"],function(n,e){V.prototype[n]=function(t){t=t===u?1:an(P(t),0);var r=this.__filtered__&&!e?new V(this):this.clone();return r.__filtered__?r.__takeCount__=pn(t,r.__takeCount__):r.__views__.push({size:pn(t,Qn),type:n+(r.__dir__<0?"Right":"")}),r},V.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==St||t==Ct;V.prototype[n]=function(i){var l=this.clone();return l.__iteratees__.push({iteratee:F(i,3),type:t}),l.__filtered__=l.__filtered__||r,l}}),Pn(["head","last"],function(n,e){var t="take"+(e?"Right":"");V.prototype[n]=function(){return this[t](1).value()[0]}}),Pn(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");V.prototype[n]=function(){return this.__filtered__?new V(this):this[t](1)}}),V.prototype.compact=function(){return this.filter(Cn)},V.prototype.find=function(n){return this.filter(n).head()},V.prototype.findLast=function(n){return this.reverse().find(n)},V.prototype.invokeMap=W(function(n,e){return typeof n=="function"?new V(this):this.map(function(t){return gt(t,n,e)})}),V.prototype.reject=function(n){return this.filter(_r(F(n)))},V.prototype.slice=function(n,e){n=P(n);var t=this;return t.__filtered__&&(n>0||e<0)?new V(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==u&&(e=P(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},V.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},V.prototype.toArray=function(){return this.take(Qn)},kn(V.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=o[r?"take"+(e=="last"?"Right":""):e],l=r||/^find/.test(e);!i||(o.prototype[e]=function(){var f=this.__wrapped__,s=r?[1]:arguments,h=f instanceof V,v=s[0],m=h||D(f),w=function(U){var H=i.apply(o,_e([U],s));return r&&b?H[0]:H};m&&t&&typeof v=="function"&&v.length!=1&&(h=m=!1);var b=this.__chain__,I=!!this.__actions__.length,R=l&&!b,N=h&&!I;if(!l&&m){f=N?f:new V(this);var L=n.apply(f,s);return L.__actions__.push({func:hr,args:[w],thisArg:u}),new Nn(L,b)}return R&&N?n.apply(this,s):(L=this.thru(w),R?r?L.value()[0]:L.value():L)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Wt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);o.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var l=this.value();return e.apply(D(l)?l:[],i)}return this[t](function(f){return e.apply(D(f)?f:[],i)})}}),kn(V.prototype,function(n,e){var t=o[e];if(t){var r=t.name+"";Y.call(He,r)||(He[r]=[]),He[r].push({name:e,func:t})}}),He[ur(u,O).name]=[{name:"wrapper",func:u}],V.prototype.clone=Fa,V.prototype.reverse=Ta,V.prototype.value=Ra,o.prototype.at=ud,o.prototype.chain=od,o.prototype.commit=ld,o.prototype.next=fd,o.prototype.plant=ad,o.prototype.reverse=cd,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=hd,o.prototype.first=o.prototype.head,lt&&(o.prototype[lt]=sd),o},Ue=la();be?((be.exports=Ue)._=Ue,Gr._=Ue):dn._=Ue}).call(Qe)})(Jn,Jn.exports);var hf=d.defineComponent({name:"DEditableSelectDropdown",directives:{Loading:cf},props:jl,setup(a,{slots:p}){const u=Xn("editable-select"),{width:x,maxHeight:y}=d.toRefs(a),S=d.inject(At),{dropdownRef:A,hoveringIndex:E,handleOptionSelect:$,loadMore:Q,emptyText:M}=S,z=T=>E.value===T,q=T=>S.disabledKey?!!T[S.disabledKey]:!1,nn=Jn.exports.debounce(Q,300),rn=()=>{nn()},ln=()=>a.options.length===0&&!S.loading.value?d.createVNode("li",{class:u.em("item","no-data-tip")},[p.noResultItem?p.noResultItem():M.value]):a.options.map((T,O)=>d.createVNode(tf,{label:T.label,value:T.value,hovering:z(O),disabled:q(T),onSelect:()=>{$(T,!0)}},p.item?{default:()=>d.renderSlot(d.useSlots(),"item",{option:T,index:O})}:{}));return()=>d.withDirectives(d.createVNode("div",{class:u.e("dropdown"),style:{width:`${x==null?void 0:x.value}px`}},[d.createVNode("div",{ref:A,class:u.e("inner"),style:{maxHeight:`${y==null?void 0:y.value}px`},onScroll:rn},[ln()])]),[[d.resolveDirective("loading"),S.loading.value]])}});function uu(...a){const p=u=>u&&typeof u=="object";return a.reduce((u,x)=>(Object.keys(x).forEach(y=>{const S=u[y],A=x[y];Array.isArray(S)&&Array.isArray(A)?u[y]=Array.from(new Set([...A,...S])):p(S)&&p(A)?u[y]=uu(S,A):u[y]=A}),u),{})}var df={pagination:{totalItemText:"\u6240\u6709\u6761\u76EE",goToText:"\u8DF3\u81F3",perPage:"\u6761/\u9875"},accordion:{loading:"\u52A0\u8F7D\u4E2D",noData:"\u6CA1\u6709\u6570\u636E"},autoCompleteDropdown:{latestInput:"\u6700\u8FD1\u8F93\u5165"},cascaderList:{noData:"\u6CA1\u6709\u6570\u636E"},colorPicker:{foundationPanel:"\u57FA\u7840\u9762\u677F",advancedPanel:"\u9AD8\u7EA7\u9762\u677F"},datePickerPro:{ok:"\u786E\u5B9A",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",month1:"1\u6708",month2:"2\u6708",month3:"3\u6708",month4:"4\u6708",month5:"5\u6708",month6:"6\u6708",month7:"7\u6708",month8:"8\u6708",month9:"9\u6708",month10:"10\u6708",month11:"11\u6708",month12:"12\u6708",year:"\u5E74",startPlaceholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",getWeekDays(){return["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},getTimeArr(){return["\u65F6","\u5206","\u79D2"]},getYearMonthStr(a,p){return`${a}\u5E74${p}\u6708`}},editableSelect:{noRelatedRecords:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",noData:"\u6CA1\u6709\u6570\u636E"},input:{placeholder:"\u8BF7\u8F93\u5165"},splitterBar:{collapse:"\u6536\u8D77",expand:"\u5C55\u5F00"},stepsGuide:{previous:"\u4E0A\u4E00\u6B65",continue:"\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",ok:"\u6211\u77E5\u9053\u5566"},table:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},dataGrid:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},timePopup:{ok:"\u786E\u5B9A"},transfer:{unit:"\u9879",panelUnit:"\u9879",headerUnit:"\u9879",noData:"\u6682\u65E0\u6570\u636E",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"},tree:{loading:"\u52A0\u8F7D\u4E2D",newNode:"\u65B0\u8282\u70B9",selectPlaceholder:"\u8BF7\u9009\u62E9"},upload:{placeholder:"\u9009\u62E9\u6587\u4EF6",getExistSameNameFilesMsg(a){return`\u60A8\u4E0A\u4F20\u7684 "${a}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`},getAllFilesBeyondMaximalFileSizeMsg(a){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${a}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getBeyondMaximalFileSizeMsg(a,p){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${p}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${a}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getNotAllowedFileTypeMsg(a,p){return`\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${p}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${a}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`}},search:{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57"},select:{placeholder:"\u8BF7\u9009\u62E9",noDataText:"\u65E0\u6570\u636E",noMatchText:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",loadingText:"\u52A0\u8F7D\u4E2D..."},tagInput:{maxTagsText:"\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"},timeSelect:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}};const bt=d.ref("zh-CN");let xr=d.reactive({[bt.value]:df});const gf={messages(){return xr[bt.value]},lang(){return bt.value},use(a,p){bt.value=a,this.add({[a]:p})},add(a={}){xr=uu(xr,a)}},pf=a=>a.substring(1).replace(/^\S/,p=>p.toLocaleLowerCase());function ou(a,p){const u=p.split(".");let x=a;return u.forEach(y=>{var S;x=(S=x[y])!=null?S:""}),x}function _f(a,p,u){const x=u||pf(a)+".";return y=>{var E;const S=((E=p==null?void 0:p.appContext.config.globalProperties.langMessages)==null?void 0:E.value)||gf.messages();return ou(S,x+y)||ou(S,y)}}function vf(){return d.reactive({hoveringIndex:-1,selectedIndex:-1,query:"",inputValue:"",selectedLabel:"",isFocus:!1,visible:!1,softFocus:!1,isSilentBlur:!1,inputHovering:!1})}function mf(a,p,u,x,y){const S=d.getCurrentInstance(),A=_f("DEditableSelect",S),E=d.ref(p.options),$=()=>p.remote&&Jn.exports.isFunction(p.remoteMethod)||Jn.exports.isFunction(p.filterMethod),Q=d.computed(()=>E.value.filter(O=>$()?!0:O.label.toLocaleLowerCase().includes(u.query.toLocaleLowerCase().trim()))),M=d.computed(()=>{let O="";return p.remote?O=A("noData"):O=A("noRelatedRecords"),O}),z=d.computed(()=>{const O=!Jn.exports.isNil(p.modelValue)&&p.modelValue!=="";return p.allowClear&&!p.disabled&&u.inputHovering&&O}),q=()=>{p.disabled||(u.visible=!u.visible)},nn=O=>{u.hoveringIndex=O,u.selectedIndex=O},rn=()=>{const O=E.value;if(Jn.exports.isNil(p.modelValue))u.inputValue="";else{const hn=O.findIndex(fn=>fn.value===p.modelValue);hn!==-1?(u.inputValue=O[hn].label,u.selectedLabel=O[hn].label,nn(hn)):(u.inputValue=`${p.modelValue}`,u.selectedLabel=`${p.modelValue}`)}},ln=(O,hn)=>{y.emit("update:modelValue",O.value),y.emit("change",O.value),u.isSilentBlur=hn,x(),u.visible=!1},T=O=>{const hn=a.value,fn=hn.children[O];d.nextTick(()=>{if(fn.scrollIntoViewIfNeeded)fn.scrollIntoViewIfNeeded(!1);else{const Bn=hn.getBoundingClientRect(),mn=fn.getBoundingClientRect();(mn.bottom>Bn.bottom||mn.top<Bn.top)&&fn.scrollIntoView(!1)}})};return d.watch(()=>u.visible,O=>{O?u.selectedIndex!==-1&&d.nextTick(()=>{T(u.selectedIndex)}):(u.query="",u.inputValue=u.selectedLabel),y.emit("visibleChange",O)}),d.watch(()=>p.modelValue,()=>{rn()}),d.watch(()=>p.options,O=>{O.length!==0&&(E.value=O)}),d.onMounted(()=>{rn()}),{cachedOptions:E,filteredOptions:Q,emptyText:M,showClearable:z,toggleMenu:q,handleOptionSelect:ln,scrollToItem:T}}const wf={tab:"Tab",enter:"Enter",up:"ArrowUp",down:"ArrowDown",esc:"Escape"};function yf(a,p,u,x,y){const S=M=>{p.hoveringIndex=M},A=(M,z=p.hoveringIndex)=>{if(!p.visible){p.visible=!0;return}if(u.value.length===0||a.loading)return;let q=0;if(M==="ArrowDown"?(q=z+1,q>u.value.length-1&&(q=0)):M==="ArrowUp"&&(q=z-1,q<0&&(q=u.value.length-1)),u.value[q][a.disabledKey])return A(M,q);S(q),x(q)},E=()=>{p.visible=!1},$=()=>{if(!p.visible)return p.visible=!0;const M=u.value[p.hoveringIndex];M&&y(M,!1)};return{onKeydown:M=>{const z=M.key||M.code,{tab:q,esc:nn,down:rn,up:ln,enter:T}=wf;switch((z===ln||z===rn)&&M.preventDefault(),z){case ln:A("ArrowUp");break;case rn:A("ArrowDown");break;case nn:case q:E();break;case T:$();break}}}}function xf(a,p){const u=Xn("editable-select-input"),x=d.computed(()=>({[u.b()]:!0,[u.m("sm")]:a.size==="sm",[u.m("lg")]:a.size==="lg",[u.m("open")]:p.visible})),y=d.computed(()=>({[u.e("wrapper")]:!0,[u.em("wrapper","focus")]:p.isFocus,[u.em("wrapper","disabled")]:a.disabled})),S=d.computed(()=>({[u.e("inner")]:!0})),A=d.computed(()=>({[u.e("placeholder")]:!0})),E=d.computed(()=>({[u.e("suffix")]:!0}));return{inputClasses:x,inputWrapperClasses:y,inputInnerClasses:S,inputPlaceholderClasses:A,inputSuffixClasses:E}}function Af(a,p,u,x){const y=d.computed(()=>p.remote?300:0),S=()=>{var O;const T=a.value;T&&((O=T.focus)==null||O.call(T))},A=T=>{u.softFocus?u.softFocus=!1:(x.emit("focus",T),u.isFocus=!0)},E=async T=>{u.isSilentBlur?u.isSilentBlur=!1:(x.emit("blur",T),u.isFocus=!0),u.softFocus=!1},$=T=>{u.inputValue=T},Q=T=>{p.remote&&Jn.exports.isFunction(p.remoteMethod)?p.remoteMethod(T):Jn.exports.isFunction(p.filterMethod)&&p.filterMethod(T)},M=()=>{u.query=u.inputValue,x.emit("inputChange",u.query),Q(u.query)},z=Jn.exports.debounce(M,y.value);return{blur,setSoftFocus:S,handleFocus:A,handleBlur:E,handleClear:()=>{x.emit("update:modelValue",""),x.emit("change",""),x.emit("clear"),u.hoveringIndex=-1,u.visible=!1},onInput:T=>{const O=T.target.value;$(O),u.inputValue.length>0&&!u.visible&&(u.visible=!0),p.remote?z():M()},onMouseenter:()=>{u.inputHovering=!0},onMouseleave:()=>{u.inputHovering=!1}}}function Ef(a,p,u){const{enableLazyLoad:x}=d.toRefs(p);return{loadMore:()=>{!a.value||!x.value||(a==null?void 0:a.value.clientHeight)+a.value.scrollTop>=a.value.scrollHeight-12&&u.emit("loadMore")}}}var E0="";function bf(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!d.isVNode(a)}var Ar=d.defineComponent({name:"DEditableSelect",props:Ji,emits:["update:modelValue","focus","blur","clear","change","visibleChange","loadMore","inputChange"],setup(a,p){const u=Xn("editable-select"),x=d.ref(),y=d.ref(),S=d.ref(),A=d.ref(),E=vf(),{appendToBody:$,disabled:Q,modelValue:M,position:z,placeholder:q}=d.toRefs(a),{onInput:nn,onMouseenter:rn,onMouseleave:ln,setSoftFocus:T,handleBlur:O,handleFocus:hn,handleClear:fn}=Af(x,a,E,p),{filteredOptions:Bn,emptyText:mn,showClearable:te,toggleMenu:Hn,handleOptionSelect:ge,scrollToItem:ke}=mf(S,a,E,T,p),{onKeydown:Er}=yf(a,E,Bn,ke,ge),{loadMore:br}=Ef(S,a,p);d.provide(At,{dropdownRef:S,disabledKey:a.disabledKey,modelValue:M,inputValue:d.toRef(E,"inputValue"),query:d.toRef(E,"query"),hoveringIndex:d.toRef(E,"hoveringIndex"),loading:d.toRef(a,"loading"),emptyText:mn,loadMore:br,handleOptionSelect:ge,setSoftFocus:T}),vn.onClickOutside(y,()=>{E.visible=!1,E.isFocus=!1},{ignore:[A]});const{inputClasses:Sr,inputWrapperClasses:Cr,inputInnerClasses:St,inputSuffixClasses:Ir}=xf(a,E),Ct=()=>d.createVNode(d.Transition,{name:"fade"},{default:()=>[d.createVNode(kl,{ref:A,modelValue:E.visible,"onUpdate:modelValue":An=>E.visible=An,origin:y.value,position:z.value,style:{zIndex:"var(--devui-z-index-dropdown, 1052)"}},{default:()=>[d.createVNode(hf,{options:Bn.value,width:a.width,maxHeight:a.maxHeight},p.slots)]})]}),re=()=>{if($.value){let An;return d.createVNode(d.Teleport,{to:"body"},bf(An=Ct())?An:{default:()=>[An]})}else return Ct()};return()=>d.createVNode("div",{ref:y,class:u.b(),style:{width:a.width+"px"},onClick:Hn},[d.createVNode("div",{class:Sr.value,onMouseenter:rn,onMouseleave:ln},[d.createVNode("div",{class:Cr.value},[d.createVNode("input",{ref:x,class:St.value,disabled:Q.value,placeholder:q.value,value:E.inputValue,type:"text",onInput:nn,onFocus:hn,onBlur:O,onKeydown:Er},null),d.createVNode("span",{class:Ir.value},[d.withDirectives(d.createVNode("span",{class:u.e("clear-icon"),onClick:d.withModifiers(fn,["stop"])},[d.createVNode(Qi,{name:"icon-remove"},null)]),[[d.vShow,te.value]]),d.withDirectives(d.createVNode("span",{class:u.e("arrow-icon")},[d.createVNode(Qi,{name:"select-arrow"},null)]),[[d.vShow,!te.value]])])])]),re()])}}),Sf={title:"EditableSelect \u53EF\u8F93\u5165\u4E0B\u62C9\u9009\u62E9\u6846",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(a){a.component(Ar.name,Ar)}};j.EditableSelect=Ar,j.SELECT_KEY=At,j.default=Sf,j.editableSelectProps=Ji,Object.defineProperty(j,"__esModule",{value:!0}),j[Symbol.toStringTag]="Module"});
@@ -7849,17 +7849,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
7849
7849
  onInvalidate(() => subscriptions.forEach((v) => v()));
7850
7850
  });
7851
7851
  };
7852
- function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emit) {
7853
- const calcPopDirection = (dropdownEl) => {
7854
- const elementHeight = dropdownEl.offsetHeight;
7855
- const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
7856
- const isBottomEnough = bottomDistance >= elementHeight;
7857
- if (!isBottomEnough) {
7858
- popDirection.value = "top";
7859
- } else {
7860
- popDirection.value = "bottom";
7861
- }
7862
- };
7852
+ function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
7863
7853
  watch(visible, (newVal, oldVal) => {
7864
7854
  if (oldVal === void 0) {
7865
7855
  return;
@@ -7883,9 +7873,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
7883
7873
  }
7884
7874
  }
7885
7875
  }
7886
- if (dropdownEl) {
7887
- calcPopDirection(dropdownEl);
7888
- }
7889
7876
  });
7890
7877
  onMounted(() => {
7891
7878
  dropdownMap.set(id, { toggleEl: origin.value });
@@ -8274,7 +8261,7 @@ var Dropdown = defineComponent({
8274
8261
  props,
8275
8262
  emit
8276
8263
  });
8277
- useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
8264
+ useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
8278
8265
  const {
8279
8266
  overlayModelValue,
8280
8267
  overlayShowValue,