eEventListener("touchmove", onDragging); window.removeEventListener("mouseup", onDragEnd); window.removeEventListener("touchend", onDragEnd); window.removeEventListener("contextmenu", onDragEnd); } }; const setPosition = async (newPosition) => { if (newPosition === null || Number.isNaN(+newPosition)) return; if (newPosition < 0) { newPosition = 0; } else if (newPosition > 100) { newPosition = 100; } const lengthPerStep = 100 / ((max5.value - min5.value) / step.value); const steps = Math.round(newPosition / lengthPerStep); let value = steps * lengthPerStep * (max5.value - min5.value) * 0.01 + min5.value; value = Number.parseFloat(value.toFixed(precision.value)); if (value !== props.modelValue) { emit(UPDATE_MODEL_EVENT, value); } if (!initData.dragging && props.modelValue !== initData.oldValue) { initData.oldValue = props.modelValue; } await nextTick(); initData.dragging && displayTooltip(); tooltip.value.updatePopper(); }; watch(() => initData.dragging, (val) => { updateDragging(val); }); return { disabled, button, tooltip, tooltipVisible, showTooltip, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs var useStops = (props, initData, minValue, maxValue) => { const stops = computed2(() => { if (!props.showStops || props.min > props.max) return []; if (props.step === 0) { debugWarn("ElSlider", "step should not be 0."); return []; } const stopCount = (props.max - props.min) / props.step; const stepWidth = 100 * props.step / (props.max - props.min); const result2 = Array.from({ length: stopCount - 1 }).map((_2, index) => (index + 1) * stepWidth); if (props.range) { return result2.filter((step) => { return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min); }); } else { return result2.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min)); } }); const getStopStyle = (position) => { return props.vertical ? { bottom: `${position}%` } : { left: `${position}%` }; }; return { stops, getStopStyle }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs var useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => { const _emit = (val) => { emit(UPDATE_MODEL_EVENT, val); emit(INPUT_EVENT, val); }; const valueChanged = () => { if (props.range) { return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]); } else { return props.modelValue !== initData.oldValue; } }; const setValues = () => { var _a2, _b; if (props.min > props.max) { throwError("Slider", "min should not be greater than max."); } const val = props.modelValue; if (props.range && Array.isArray(val)) { if (val[1] < props.min) { _emit([props.min, props.min]); } else if (val[0] > props.max) { _emit([props.max, props.max]); } else if (val[0] < props.min) { _emit([props.min, val[1]]); } else if (val[1] > props.max) { _emit([val[0], props.max]); } else { initData.firstValue = val[0]; initData.secondValue = val[1]; if (valueChanged()) { if (props.validateEvent) { (_a2 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a2.call(elFormItem, "change").catch((err) => debugWarn(err)); } initData.oldValue = val.slice(); } } } else if (!props.range && typeof val === "number" && !Number.isNaN(val)) { if (val < props.min) { _emit(props.min); } else if (val > props.max) { _emit(props.max); } else { initData.firstValue = val; if (valueChanged()) { if (props.validateEvent) { (_b = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _b.call(elFormItem, "change").catch((err) => debugWarn(err)); } initData.oldValue = val; } } } }; setValues(); watch(() => initData.dragging, (val) => { if (!val) { setValues(); } }); watch(() => props.modelValue, (val, oldVal) => { if (initData.dragging || Array.isArray(val) && Array.isArray(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) { return; } setValues(); }, { deep: true }); watch(() => [props.min, props.max], () => { setValues(); }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/src/button.mjs var sliderButtonProps = buildProps({ modelValue: { type: Number, default: 0 }, vertical: Boolean, tooltipClass: String, placement: { type: String, values: Ee, default: "top" } }); var sliderButtonEmits = { [UPDATE_MODEL_EVENT]: (value) => isNumber(value) }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/src/button2.mjs var _hoisted_156 = ["tabindex"]; var __default__76 = defineComponent({ name: "ElSliderButton" }); var _sfc_main113 = defineComponent({ ...__default__76, props: sliderButtonProps, emits: sliderButtonEmits, setup(__props, { expose, emit }) { const props = __props; const ns = useNamespace("slider"); const initData = reactive({ hovering: false, dragging: false, isClick: false, startX: 0, currentX: 0, startY: 0, currentY: 0, startPosition: 0, newPosition: 0, oldValue: props.modelValue }); const { disabled, button, tooltip, showTooltip, tooltipVisible, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition } = useSliderButton(props, initData, emit); const { hovering, dragging } = toRefs(initData); expose({ onButtonDown, onKeyDown, setPosition, hovering, dragging }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { ref_key: "button", ref: button, class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]), style: normalizeStyle(unref(wrapperStyle)), tabindex: unref(disabled) ? -1 : 0, onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)), onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)), onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)), onTouchstart: _cache[3] || (_cache[3] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)), onFocus: _cache[4] || (_cache[4] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)), onBlur: _cache[5] || (_cache[5] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)), onKeydown: _cache[6] || (_cache[6] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args)) }, [ createVNode(unref(ElTooltip), { ref_key: "tooltip", ref: tooltip, visible: unref(tooltipVisible), placement: _ctx.placement, "fallback-placements": ["top", "bottom", "right", "left"], "stop-popper-mouse-event": false, "popper-class": _ctx.tooltipClass, disabled: !unref(showTooltip), persistent: "" }, { content: withCtx(() => [ createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1) ]), default: withCtx(() => [ createBaseVNode("div", { class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }]) }, null, 2) ]), _: 1 }, 8, ["visible", "placement", "popper-class", "disabled"]) ], 46, _hoisted_156); }; } }); var SliderButton = _export_sfc(_sfc_main113, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/src/marker.mjs var sliderMarkerProps = buildProps({ mark: { type: definePropType([String, Object]), default: void 0 } }); var SliderMarker = defineComponent({ name: "ElSliderMarker", props: sliderMarkerProps, setup(props) { const ns = useNamespace("slider"); const label = computed2(() => { return isString(props.mark) ? props.mark : props.mark.label; }); const style = computed2(() => isString(props.mark) ? void 0 : props.mark.style); return () => h("div", { class: ns.e("marks-text"), style: style.value }, label.value); } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/src/slider2.mjs var _hoisted_157 = ["id", "role", "aria-label", "aria-labelledby"]; var _hoisted_235 = { key: 1 }; var __default__77 = defineComponent({ name: "ElSlider" }); var _sfc_main114 = defineComponent({ ...__default__77, props: sliderProps, emits: sliderEmits, setup(__props, { expose, emit }) { const props = __props; const ns = useNamespace("slider"); const { t } = useLocale(); const initData = reactive({ firstValue: 0, secondValue: 0, oldValue: 0, dragging: false, sliderSize: 1 }); const { elFormItem, slider, firstButton, secondButton, sliderDisabled, minValue, maxValue, runwayStyle, barStyle, resetSize, emitChange, onSliderWrapperPrevent, onSliderClick, onSliderDown, setFirstValue, setSecondValue } = useSlide(props, initData, emit); const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue); const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: elFormItem }); const sliderWrapperSize = useFormSize(); const sliderInputSize = computed2(() => props.inputSize || sliderWrapperSize.value); const groupLabel = computed2(() => { return props.label || t("el.slider.defaultLabel", { min: props.min, max: props.max }); }); const firstButtonLabel = computed2(() => { if (props.range) { return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel"); } else { return groupLabel.value; } }); const firstValueText = computed2(() => { return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`; }); const secondButtonLabel = computed2(() => { return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel"); }); const secondValueText = computed2(() => { return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`; }); const sliderKls = computed2(() => [ ns.b(), ns.m(sliderWrapperSize.value), ns.is("vertical", props.vertical), { [ns.m("with-input")]: props.showInput } ]); const markList = useMarks(props); useWatch(props, initData, minValue, maxValue, emit, elFormItem); const precision = computed2(() => { const precisions = [props.min, props.max, props.step].map((item) => { const decimal = `${item}`.split(".")[1]; return decimal ? decimal.length : 0; }); return Math.max.apply(null, precisions); }); const { sliderWrapper } = useLifecycle(props, initData, resetSize); const { firstValue, secondValue, sliderSize } = toRefs(initData); const updateDragging = (val) => { initData.dragging = val; }; provide(sliderContextKey, { ...toRefs(props), sliderSize, disabled: sliderDisabled, precision, emitChange, resetSize, updateDragging }); expose({ onSliderClick }); return (_ctx, _cache) => { var _a2, _b; return openBlock(), createElementBlock("div", { id: _ctx.range ? unref(inputId) : void 0, ref_key: "sliderWrapper", ref: sliderWrapper, class: normalizeClass(unref(sliderKls)), role: _ctx.range ? "group" : void 0, "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? unref(groupLabel) : void 0, "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? (_a2 = unref(elFormItem)) == null ? void 0 : _a2.labelId : void 0, onTouchstart: _cache[2] || (_cache[2] = (...args) => unref(onSliderWrapperPrevent) && unref(onSliderWrapperPrevent)(...args)), onTouchmove: _cache[3] || (_cache[3] = (...args) => unref(onSliderWrapperPrevent) && unref(onSliderWrapperPrevent)(...args)) }, [ createBaseVNode("div", { ref_key: "slider", ref: slider, class: normalizeClass([ unref(ns).e("runway"), { "show-input": _ctx.showInput && !_ctx.range }, unref(ns).is("disabled", unref(sliderDisabled)) ]), style: normalizeStyle(unref(runwayStyle)), onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)), onTouchstart: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns).e("bar")), style: normalizeStyle(unref(barStyle)) }, null, 6), createVNode(SliderButton, { id: !_ctx.range ? unref(inputId) : void 0, ref_key: "firstButton", ref: firstButton, "model-value": unref(firstValue), vertical: _ctx.vertical, "tooltip-class": _ctx.tooltipClass, placement: _ctx.placement, role: "slider", "aria-label": _ctx.range || !unref(isLabeledByFormItem) ? unref(firstButtonLabel) : void 0, "aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? (_b = unref(elFormItem)) == null ? void 0 : _b.labelId : void 0, "aria-valuemin": _ctx.min, "aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max, "aria-valuenow": unref(firstValue), "aria-valuetext": unref(firstValueText), "aria-orientation": _ctx.vertical ? "vertical" : "horizontal", "aria-disabled": unref(sliderDisabled), "onUpdate:modelValue": unref(setFirstValue) }, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]), _ctx.range ? (openBlock(), createBlock(SliderButton, { key: 0, ref_key: "secondButton", ref: secondButton, "model-value": unref(secondValue), vertical: _ctx.vertical, "tooltip-class": _ctx.tooltipClass, placement: _ctx.placement, role: "slider", "aria-label": unref(secondButtonLabel), "aria-valuemin": unref(firstValue), "aria-valuemax": _ctx.max, "aria-valuenow": unref(secondValue), "aria-valuetext": unref(secondValueText), "aria-orientation": _ctx.vertical ? "vertical" : "horizontal", "aria-disabled": unref(sliderDisabled), "onUpdate:modelValue": unref(setSecondValue) }, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : createCommentVNode("v-if", true), _ctx.showStops ? (openBlock(), createElementBlock("div", _hoisted_235, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => { return openBlock(), createElementBlock("div", { key, class: normalizeClass(unref(ns).e("stop")), style: normalizeStyle(unref(getStopStyle)(item)) }, null, 6); }), 128)) ])) : createCommentVNode("v-if", true), unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [ createBaseVNode("div", null, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => { return openBlock(), createElementBlock("div", { key, style: normalizeStyle(unref(getStopStyle)(item.position)), class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")]) }, null, 6); }), 128)) ]), createBaseVNode("div", { class: normalizeClass(unref(ns).e("marks")) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => { return openBlock(), createBlock(unref(SliderMarker), { key, mark: item.mark, style: normalizeStyle(unref(getStopStyle)(item.position)) }, null, 8, ["mark", "style"]); }), 128)) ], 2) ], 64)) : createCommentVNode("v-if", true) ], 38), _ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), { key: 0, ref: "input", "model-value": unref(firstValue), class: normalizeClass(unref(ns).e("input")), step: _ctx.step, disabled: unref(sliderDisabled), controls: _ctx.showInputControls, min: _ctx.min, max: _ctx.max, debounce: _ctx.debounce, size: unref(sliderInputSize), "onUpdate:modelValue": unref(setFirstValue), onChange: unref(emitChange) }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true) ], 42, _hoisted_157); }; } }); var Slider = _export_sfc(_sfc_main114, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/slider/index.mjs var ElSlider = withInstall(Slider); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/space/src/item.mjs var spaceItemProps = buildProps({ prefixCls: { type: String } }); var SpaceItem = defineComponent({ name: "ElSpaceItem", props: spaceItemProps, setup(props, { slots }) { const ns = useNamespace("space"); const classes = computed2(() => `${props.prefixCls || ns.b()}__item`); return () => h("div", { class: classes.value }, renderSlot(slots, "default")); } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/space/src/use-space.mjs var SIZE_MAP = { small: 8, default: 12, large: 16 }; function useSpace(props) { const ns = useNamespace("space"); const classes = computed2(() => [ns.b(), ns.m(props.direction), props.class]); const horizontalSize = ref(0); const verticalSize = ref(0); const containerStyle = computed2(() => { const wrapKls = props.wrap || props.fill ? { flexWrap: "wrap", marginBottom: `-${verticalSize.value}px` } : {}; const alignment = { alignItems: props.alignment }; return [wrapKls, alignment, props.style]; }); const itemStyle = computed2(() => { const itemBaseStyle = { paddingBottom: `${verticalSize.value}px`, marginRight: `${horizontalSize.value}px` }; const fillStyle = props.fill ? { flexGrow: 1, minWidth: `${props.fillRatio}%` } : {}; return [itemBaseStyle, fillStyle]; }); watchEffect(() => { const { size: size3 = "small", wrap: wrap2, direction: dir, fill: fill2 } = props; if (isArray(size3)) { const [h3 = 0, v2 = 0] = size3; horizontalSize.value = h3; verticalSize.value = v2; } else { let val; if (isNumber(size3)) { val = size3; } else { val = SIZE_MAP[size3 || "small"] || SIZE_MAP.small; } if ((wrap2 || fill2) && dir === "horizontal") { horizontalSize.value = verticalSize.value = val; } else { if (dir === "horizontal") { horizontalSize.value = val; verticalSize.value = 0; } else { verticalSize.value = val; horizontalSize.value = 0; } } } }); return { classes, containerStyle, itemStyle }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/space/src/space.mjs var spaceProps = buildProps({ direction: { type: String, values: ["horizontal", "vertical"], default: "horizontal" }, class: { type: definePropType([ String, Object, Array ]), default: "" }, style: { type: definePropType([String, Array, Object]), default: "" }, alignment: { type: definePropType(String), default: "center" }, prefixCls: { type: String }, spacer: { type: definePropType([Object, String, Number, Array]), default: null, validator: (val) => isVNode(val) || isNumber(val) || isString(val) }, wrap: Boolean, fill: Boolean, fillRatio: { type: Number, default: 100 }, size: { type: [String, Array, Number], values: componentSizes, validator: (val) => { return isNumber(val) || isArray(val) && val.length === 2 && val.every(isNumber); } } }); var Space = defineComponent({ name: "ElSpace", props: spaceProps, setup(props, { slots }) { const { classes, containerStyle, itemStyle } = useSpace(props); function extractChildren(children, parentKey = "", extractedChildren = []) { const { prefixCls } = props; children.forEach((child, loopKey) => { if (isFragment(child)) { if (isArray(child.children)) { child.children.forEach((nested, key) => { if (isFragment(nested) && isArray(nested.children)) { extractChildren(nested.children, `${parentKey + key}-`, extractedChildren); } else { extractedChildren.push(createVNode(SpaceItem, { style: itemStyle.value, prefixCls, key: `nested-${parentKey + key}` }, { default: () => [nested] }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"])); } }); } } else if (isValidElementNode(child)) { extractedChildren.push(createVNode(SpaceItem, { style: itemStyle.value, prefixCls, key: `LoopKey${parentKey + loopKey}` }, { default: () => [child] }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"])); } }); return extractedChildren; } return () => { var _a2; const { spacer, direction: direction2 } = props; const children = renderSlot(slots, "default", { key: 0 }, () => []); if (((_a2 = children.children) != null ? _a2 : []).length === 0) return null; if (isArray(children.children)) { let extractedChildren = extractChildren(children.children); if (spacer) { const len = extractedChildren.length - 1; extractedChildren = extractedChildren.reduce((acc, child, idx) => { const children2 = [...acc, child]; if (idx !== len) { children2.push(createVNode("span", { style: [ itemStyle.value, direction2 === "vertical" ? "width: 100%" : null ], key: idx }, [ isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT) ], PatchFlags.STYLE)); } return children2; }, []); } return createVNode("div", { class: classes.value, style: containerStyle.value }, extractedChildren, PatchFlags.STYLE | PatchFlags.CLASS); } return children.children; }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/space/index.mjs var ElSpace = withInstall(Space); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/statistic/src/statistic.mjs var statisticProps = buildProps({ decimalSeparator: { type: String, default: "." }, groupSeparator: { type: String, default: "," }, precision: { type: Number, default: 0 }, formatter: Function, value: { type: definePropType([Number, Object]), default: 0 }, prefix: String, suffix: String, title: String, valueStyle: { type: definePropType([String, Object, Array]) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/statistic/src/statistic2.mjs var __default__78 = defineComponent({ name: "ElStatistic" }); var _sfc_main115 = defineComponent({ ...__default__78, props: statisticProps, setup(__props, { expose }) { const props = __props; const ns = useNamespace("statistic"); const displayValue = computed2(() => { const { value, formatter: formatter2, precision, decimalSeparator, groupSeparator } = props; if (isFunction(formatter2)) return formatter2(value); if (!isNumber(value)) return value; let [integer4, decimal = ""] = String(value).split("."); decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0); integer4 = integer4.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); return [integer4, decimal].join(decimal ? decimalSeparator : ""); }); expose({ displayValue }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns).e("head")) }, [ renderSlot(_ctx.$slots, "title", {}, () => [ createTextVNode(toDisplayString(_ctx.title), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [ _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns).e("prefix")) }, [ renderSlot(_ctx.$slots, "prefix", {}, () => [ createBaseVNode("span", null, toDisplayString(_ctx.prefix), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("span", { class: normalizeClass(unref(ns).e("number")), style: normalizeStyle(_ctx.valueStyle) }, toDisplayString(unref(displayValue)), 7), _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(ns).e("suffix")) }, [ renderSlot(_ctx.$slots, "suffix", {}, () => [ createBaseVNode("span", null, toDisplayString(_ctx.suffix), 1) ]) ], 2)) : createCommentVNode("v-if", true) ], 2) ], 2); }; } }); var Statistic = _export_sfc(_sfc_main115, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/statistic/index.mjs var ElStatistic = withInstall(Statistic); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/countdown/src/countdown.mjs var countdownProps = buildProps({ format: { type: String, default: "HH:mm:ss" }, prefix: String, suffix: String, title: String, value: { type: definePropType([Number, Object]), default: 0 }, valueStyle: { type: definePropType([String, Object, Array]) } }); var countdownEmits = { finish: () => true, [CHANGE_EVENT]: (value) => isNumber(value) }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/countdown/src/utils.mjs var timeUnits2 = [ ["Y", 1e3 * 60 * 60 * 24 * 365], ["M", 1e3 * 60 * 60 * 24 * 30], ["D", 1e3 * 60 * 60 * 24], ["H", 1e3 * 60 * 60], ["m", 1e3 * 60], ["s", 1e3], ["S", 1] ]; var getTime = (value) => { return isNumber(value) ? new Date(value).getTime() : value.valueOf(); }; var formatTime = (timestamp2, format2) => { let timeLeft = timestamp2; const escapeRegex = /\[([^\]]*)]/g; const replacedText = timeUnits2.reduce((current, [name, unit3]) => { const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g"); if (replaceRegex.test(current)) { const value = Math.floor(timeLeft / unit3); timeLeft -= value * unit3; return current.replace(replaceRegex, (match) => String(value).padStart(match.length, "0")); } return current; }, format2); return replacedText.replace(escapeRegex, "$1"); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/countdown/src/countdown2.mjs var __default__79 = defineComponent({ name: "ElCountdown" }); var _sfc_main116 = defineComponent({ ...__default__79, props: countdownProps, emits: countdownEmits, setup(__props, { expose, emit }) { const props = __props; let timer; const rawValue = ref(getTime(props.value) - Date.now()); const displayValue = computed2(() => formatTime(rawValue.value, props.format)); const formatter2 = (val) => formatTime(val, props.format); const stopTimer = () => { if (timer) { cAF(timer); timer = void 0; } }; const startTimer = () => { const timestamp2 = getTime(props.value); const frameFunc = () => { let diff = timestamp2 - Date.now(); emit("change", diff); if (diff <= 0) { diff = 0; stopTimer(); emit("finish"); } else { timer = rAF(frameFunc); } rawValue.value = diff; }; timer = rAF(frameFunc); }; watch(() => [props.value, props.format], () => { stopTimer(); startTimer(); }, { immediate: true }); onBeforeUnmount(() => { stopTimer(); }); expose({ displayValue }); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ElStatistic), { value: rawValue.value, title: _ctx.title, prefix: _ctx.prefix, suffix: _ctx.suffix, "value-style": _ctx.valueStyle, formatter: formatter2 }, createSlots({ _: 2 }, [ renderList(_ctx.$slots, (_2, name) => { return { name, fn: withCtx(() => [ renderSlot(_ctx.$slots, name) ]) }; }) ]), 1032, ["value", "title", "prefix", "suffix", "value-style"]); }; } }); var Countdown = _export_sfc(_sfc_main116, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/countdown/index.mjs var ElCountdown = withInstall(Countdown); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/steps/src/steps.mjs var stepsProps = buildProps({ space: { type: [Number, String], default: "" }, active: { type: Number, default: 0 }, direction: { type: String, default: "horizontal", values: ["horizontal", "vertical"] }, alignCenter: { type: Boolean }, simple: { type: Boolean }, finishStatus: { type: String, values: ["wait", "process", "finish", "error", "success"], default: "finish" }, processStatus: { type: String, values: ["wait", "process", "finish", "error", "success"], default: "process" } }); var stepsEmits = { [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber) }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/steps/src/steps2.mjs var __default__80 = defineComponent({ name: "ElSteps" }); var _sfc_main117 = defineComponent({ ...__default__80, props: stepsProps, emits: stepsEmits, setup(__props, { emit }) { const props = __props; const ns = useNamespace("steps"); const steps = ref([]); watch(steps, () => { steps.value.forEach((instance, index) => { instance.setIndex(index); }); }); provide("ElSteps", { props, steps }); watch(() => props.active, (newVal, oldVal) => { emit(CHANGE_EVENT, newVal, oldVal); }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.simple ? "simple" : _ctx.direction)]) }, [ renderSlot(_ctx.$slots, "default") ], 2); }; } }); var Steps = _export_sfc(_sfc_main117, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/steps/src/item.mjs var stepProps = buildProps({ title: { type: String, default: "" }, icon: { type: iconPropType }, description: { type: String, default: "" }, status: { type: String, values: ["", "wait", "process", "finish", "error", "success"], default: "" } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/steps/src/item2.mjs var __default__81 = defineComponent({ name: "ElStep" }); var _sfc_main118 = defineComponent({ ...__default__81, props: stepProps, setup(__props) { const props = __props; const ns = useNamespace("step"); const index = ref(-1); const lineStyle = ref({}); const internalStatus = ref(""); const parent2 = inject("ElSteps"); const currentInstance = getCurrentInstance(); onMounted(() => { watch([ () => parent2.props.active, () => parent2.props.processStatus, () => parent2.props.finishStatus ], ([active]) => { updateStatus(active); }, { immediate: true }); }); onBeforeUnmount(() => { parent2.steps.value = parent2.steps.value.filter((instance) => instance.uid !== (currentInstance == null ? void 0 : currentInstance.uid)); }); const currentStatus = computed2(() => { return props.status || internalStatus.value; }); const prevStatus = computed2(() => { const prevStep = parent2.steps.value[index.value - 1]; return prevStep ? prevStep.currentStatus : "wait"; }); const isCenter = computed2(() => { return parent2.props.alignCenter; }); const isVertical = computed2(() => { return parent2.props.direction === "vertical"; }); const isSimple = computed2(() => { return parent2.props.simple; }); const stepsCount = computed2(() => { return parent2.steps.value.length; }); const isLast = computed2(() => { var _a2; return ((_a2 = parent2.steps.value[stepsCount.value - 1]) == null ? void 0 : _a2.uid) === (currentInstance == null ? void 0 : currentInstance.uid); }); const space = computed2(() => { return isSimple.value ? "" : parent2.props.space; }); const style = computed2(() => { const style2 = { flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` }; if (isVertical.value) return style2; if (isLast.value) { style2.maxWidth = `${100 / stepsCount.value}%`; } return style2; }); const setIndex = (val) => { index.value = val; }; const calcProgress = (status) => { const isWait = status === "wait"; const style2 = { transitionDelay: `${isWait ? "-" : ""}${150 * index.value}ms` }; const step = status === parent2.props.processStatus || isWait ? 0 : 100; style2.borderWidth = step && !isSimple.value ? "1px" : 0; style2[parent2.props.direction === "vertical" ? "height" : "width"] = `${step}%`; lineStyle.value = style2; }; const updateStatus = (activeIndex) => { if (activeIndex > index.value) { internalStatus.value = parent2.props.finishStatus; } else if (activeIndex === index.value && prevStatus.value !== "error") { internalStatus.value = parent2.props.processStatus; } else { internalStatus.value = "wait"; } const prevChild = parent2.steps.value[index.value - 1]; if (prevChild) prevChild.calcProgress(internalStatus.value); }; const stepItemState = reactive({ uid: computed2(() => currentInstance == null ? void 0 : currentInstance.uid), currentStatus, setIndex, calcProgress }); parent2.steps.value = [...parent2.steps.value, stepItemState]; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { style: normalizeStyle(unref(style)), class: normalizeClass([ unref(ns).b(), unref(ns).is(unref(isSimple) ? "simple" : unref(parent2).props.direction), unref(ns).is("flex", unref(isLast) && !unref(space) && !unref(isCenter)), unref(ns).is("center", unref(isCenter) && !unref(isVertical) && !unref(isSimple)) ]) }, [ createCommentVNode(" icon & line "), createBaseVNode("div", { class: normalizeClass([unref(ns).e("head"), unref(ns).is(unref(currentStatus))]) }, [ !unref(isSimple) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns).e("line")) }, [ createBaseVNode("i", { class: normalizeClass(unref(ns).e("line-inner")), style: normalizeStyle(lineStyle.value) }, null, 6) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")]) }, [ renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns).e("icon-inner")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) ]), _: 1 }, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), { key: 1, class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")]) }, { default: withCtx(() => [ createVNode(unref(check_default)) ]), _: 1 }, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), { key: 2, class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")]) }, { default: withCtx(() => [ createVNode(unref(close_default)) ]), _: 1 }, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", { key: 3, class: normalizeClass(unref(ns).e("icon-inner")) }, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true) ]) ], 2) ], 2), createCommentVNode(" title & description "), createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [ createBaseVNode("div", { class: normalizeClass([unref(ns).e("title"), unref(ns).is(unref(currentStatus))]) }, [ renderSlot(_ctx.$slots, "title", {}, () => [ createTextVNode(toDisplayString(_ctx.title), 1) ]) ], 2), unref(isSimple) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns).e("arrow")) }, null, 2)) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([unref(ns).e("description"), unref(ns).is(unref(currentStatus))]) }, [ renderSlot(_ctx.$slots, "description", {}, () => [ createTextVNode(toDisplayString(_ctx.description), 1) ]) ], 2)) ], 2) ], 6); }; } }); var Step = _export_sfc(_sfc_main118, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/steps/index.mjs var ElSteps = withInstall(Steps, { Step }); var ElStep = withNoopInstall(Step); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/switch/src/switch.mjs var switchProps = buildProps({ modelValue: { type: [Boolean, String, Number], default: false }, value: { type: [Boolean, String, Number], default: false }, disabled: { type: Boolean, default: false }, width: { type: [String, Number], default: "" }, inlinePrompt: { type: Boolean, default: false }, activeIcon: { type: iconPropType }, inactiveIcon: { type: iconPropType }, activeText: { type: String, default: "" }, inactiveText: { type: String, default: "" }, activeColor: { type: String, default: "" }, inactiveColor: { type: String, default: "" }, borderColor: { type: String, default: "" }, activeValue: { type: [Boolean, String, Number], default: true }, inactiveValue: { type: [Boolean, String, Number], default: false }, name: { type: String, default: "" }, validateEvent: { type: Boolean, default: true }, id: String, loading: { type: Boolean, default: false }, beforeChange: { type: definePropType(Function) }, size: { type: String, validator: isValidComponentSize }, tabindex: { type: [String, Number] } }); var switchEmits = { [UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val), [CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val), [INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val) }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/switch/src/switch2.mjs var _hoisted_158 = ["onClick"]; var _hoisted_236 = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]; var _hoisted_318 = ["aria-hidden"]; var _hoisted_410 = ["aria-hidden"]; var _hoisted_57 = ["aria-hidden"]; var COMPONENT_NAME17 = "ElSwitch"; var __default__82 = defineComponent({ name: COMPONENT_NAME17 }); var _sfc_main119 = defineComponent({ ...__default__82, props: switchProps, emits: switchEmits, setup(__props, { expose, emit }) { const props = __props; const vm = getCurrentInstance(); const { formItem } = useFormItem(); const switchSize = useFormSize(); const ns = useNamespace("switch"); useDeprecated({ from: '"value"', replacement: '"model-value" or "v-model"', scope: COMPONENT_NAME17, version: "2.3.0", ref: "https://element-plus.org/en-US/component/switch.html#attributes", type: "Attribute" }, computed2(() => { var _a2; return !!((_a2 = vm.vnode.props) == null ? void 0 : _a2.value); })); const { inputId } = useFormItemInputId(props, { formItemContext: formItem }); const switchDisabled = useFormDisabled(computed2(() => props.loading)); const isControlled = ref(props.modelValue !== false); const input = ref(); const core = ref(); const switchKls = computed2(() => [ ns.b(), ns.m(switchSize.value), ns.is("disabled", switchDisabled.value), ns.is("checked", checked.value) ]); const coreStyle = computed2(() => ({ width: addUnit(props.width) })); watch(() => props.modelValue, () => { isControlled.value = true; }); watch(() => props.value, () => { isControlled.value = false; }); const actualValue = computed2(() => { return isControlled.value ? props.modelValue : props.value; }); const checked = computed2(() => actualValue.value === props.activeValue); if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) { emit(UPDATE_MODEL_EVENT, props.inactiveValue); emit(CHANGE_EVENT, props.inactiveValue); emit(INPUT_EVENT, props.inactiveValue); } watch(checked, (val) => { var _a2; input.value.checked = val; if (props.validateEvent) { (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change").catch((err) => debugWarn(err)); } }); const handleChange = () => { const val = checked.value ? props.inactiveValue : props.activeValue; emit(UPDATE_MODEL_EVENT, val); emit(CHANGE_EVENT, val); emit(INPUT_EVENT, val); nextTick(() => { input.value.checked = checked.value; }); }; const switchValue = () => { if (switchDisabled.value) return; const { beforeChange } = props; if (!beforeChange) { handleChange(); return; } const shouldChange = beforeChange(); const isPromiseOrBool = [ isPromise(shouldChange), isBoolean(shouldChange) ].includes(true); if (!isPromiseOrBool) { throwError(COMPONENT_NAME17, "beforeChange must return type `Promise<boolean>` or `boolean`"); } if (isPromise(shouldChange)) { shouldChange.then((result2) => { if (result2) { handleChange(); } }).catch((e) => { debugWarn(COMPONENT_NAME17, `some error occurred: ${e}`); }); } else if (shouldChange) { handleChange(); } }; const styles = computed2(() => { return ns.cssVarBlock({ ...props.activeColor ? { "on-color": props.activeColor } : null, ...props.inactiveColor ? { "off-color": props.inactiveColor } : null, ...props.borderColor ? { "border-color": props.borderColor } : null }); }); const focus = () => { var _a2, _b; (_b = (_a2 = input.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2); }; onMounted(() => { input.value.checked = checked.value; }); expose({ focus, checked }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(unref(switchKls)), style: normalizeStyle(unref(styles)), onClick: withModifiers(switchValue, ["prevent"]) }, [ createBaseVNode("input", { id: unref(inputId), ref_key: "input", ref: input, class: normalizeClass(unref(ns).e("input")), type: "checkbox", role: "switch", "aria-checked": unref(checked), "aria-disabled": unref(switchDisabled), name: _ctx.name, "true-value": _ctx.activeValue, "false-value": _ctx.inactiveValue, disabled: unref(switchDisabled), tabindex: _ctx.tabindex, onChange: handleChange, onKeydown: withKeys(switchValue, ["enter"]) }, null, 42, _hoisted_236), !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass([ unref(ns).e("label"), unref(ns).em("label", "left"), unref(ns).is("active", !unref(checked)) ]) }, [ _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon))) ]), _: 1 })) : createCommentVNode("v-if", true), !_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock("span", { key: 1, "aria-hidden": unref(checked) }, toDisplayString(_ctx.inactiveText), 9, _hoisted_318)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("span", { ref_key: "core", ref: core, class: normalizeClass(unref(ns).e("core")), style: normalizeStyle(unref(coreStyle)) }, [ _ctx.inlinePrompt ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns).e("inner")) }, [ _ctx.activeIcon || _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns).is("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon))) ]), _: 1 }, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(unref(ns).is("text")), "aria-hidden": !unref(checked) }, toDisplayString(unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, _hoisted_410)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [ _ctx.loading ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns).is("loading")) }, { default: withCtx(() => [ createVNode(unref(loading_default)) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 6), !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass([ unref(ns).e("label"), unref(ns).em("label", "right"), unref(ns).is("active", unref(checked)) ]) }, [ _ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon))) ]), _: 1 })) : createCommentVNode("v-if", true), !_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock("span", { key: 1, "aria-hidden": !unref(checked) }, toDisplayString(_ctx.activeText), 9, _hoisted_57)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ], 14, _hoisted_158); }; } }); var Switch = _export_sfc(_sfc_main119, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/switch/index.mjs var ElSwitch = withInstall(Switch); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/util.mjs var import_escape_html = __toESM(require_escape_html(), 1); var getCell = function(event) { var _a2; return (_a2 = event.target) == null ? void 0 : _a2.closest("td"); }; var orderBy2 = function(array4, sortKey, reverse2, sortMethod, sortBy2) { if (!sortKey && !sortMethod && (!sortBy2 || Array.isArray(sortBy2) && !sortBy2.length)) { return array4; } if (typeof reverse2 === "string") { reverse2 = reverse2 === "descending" ? -1 : 1; } else { reverse2 = reverse2 && reverse2 < 0 ? -1 : 1; } const getKey = sortMethod ? null : function(value, index) { if (sortBy2) { if (!Array.isArray(sortBy2)) { sortBy2 = [sortBy2]; } return sortBy2.map((by) => { if (typeof by === "string") { return get_default(value, by); } else { return by(value, index, array4); } }); } if (sortKey !== "$key") { if (isObject(value) && "$value" in value) value = value.$value; } return [isObject(value) ? get_default(value, sortKey) : value]; }; const compare = function(a2, b2) { if (sortMethod) { return sortMethod(a2.value, b2.value); } for (let i = 0, len = a2.key.length; i < len; i++) { if (a2.key[i] < b2.key[i]) { return -1; } if (a2.key[i] > b2.key[i]) { return 1; } } return 0; }; return array4.map((value, index) => { return { value, index, key: getKey ? getKey(value, index) : null }; }).sort((a2, b2) => { let order = compare(a2, b2); if (!order) { order = a2.index - b2.index; } return order * +reverse2; }).map((item) => item.value); }; var getColumnById = function(table, columnId) { let column2 = null; table.columns.forEach((item) => { if (item.id === columnId) { column2 = item; } }); return column2; }; var getColumnByKey = function(table, columnKey) { let column2 = null; for (let i = 0; i < table.columns.length; i++) { const item = table.columns[i]; if (item.columnKey === columnKey) { column2 = item; break; } } if (!column2) throwError("ElTable", `No column matching with column-key: ${columnKey}`); return column2; }; var getColumnByCell = function(table, cell, namespace) { const matches2 = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm")); if (matches2) { return getColumnById(table, matches2[0]); } return null; }; var getRowIdentity = (row, rowKey2) => { if (!row) throw new Error("Row is required when get row identity"); if (typeof rowKey2 === "string") { if (!rowKey2.includes(".")) { return `${row[rowKey2]}`; } const key = rowKey2.split("."); let current = row; for (const element of key) { current = current[element]; } return `${current}`; } else if (typeof rowKey2 === "function") { return rowKey2.call(null, row); } }; var getKeysMap = function(array4, rowKey2) { const arrayMap2 = {}; (array4 || []).forEach((row, index) => { arrayMap2[getRowIdentity(row, rowKey2)] = { row, index }; }); return arrayMap2; }; function mergeOptions(defaults2, config) { const options = {}; let key; for (key in defaults2) { options[key] = defaults2[key]; } for (key in config) { if (hasOwn(config, key)) { const value = config[key]; if (typeof value !== "undefined") { options[key] = value; } } } return options; } function parseWidth(width) { if (width === "") return width; if (width !== void 0) { width = Number.parseInt(width, 10); if (Number.isNaN(width)) { width = ""; } } return width; } function parseMinWidth(minWidth) { if (minWidth === "") return minWidth; if (minWidth !== void 0) { minWidth = parseWidth(minWidth); if (Number.isNaN(minWidth)) { minWidth = 80; } } return minWidth; } function parseHeight(height) { if (typeof height === "number") { return height; } if (typeof height === "string") { if (/^\d+(?:px)?$/.test(height)) { return Number.parseInt(height, 10); } else { return height; } } return null; } function compose(...funcs) { if (funcs.length === 0) { return (arg) => arg; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce((a2, b2) => (...args) => a2(b2(...args))); } function toggleRowStatus(statusArr, row, newVal) { let changed = false; const index = statusArr.indexOf(row); const included = index !== -1; const toggleStatus = (type4) => { if (type4 === "add") { statusArr.push(row); } else { statusArr.splice(index, 1); } changed = true; if (isArray(row.children)) { row.children.forEach((item) => { toggleRowStatus(statusArr, item, newVal != null ? newVal : !included); }); } }; if (isBoolean(newVal)) { if (newVal && !included) { toggleStatus("add"); } else if (!newVal && included) { toggleStatus("remove"); } } else { included ? toggleStatus("remove") : toggleStatus("add"); } return changed; } function walkTreeNode(root2, cb, childrenKey = "children", lazyKey = "hasChildren") { const isNil2 = (array4) => !(Array.isArray(array4) && array4.length); function _walker(parent2, children, level) { cb(parent2, children, level); children.forEach((item) => { if (item[lazyKey]) { cb(item, null, level + 1); return; } const children2 = item[childrenKey]; if (!isNil2(children2)) { _walker(item, children2, level + 1); } }); } root2.forEach((item) => { if (item[lazyKey]) { cb(item, null, 0); return; } const children = item[childrenKey]; if (!isNil2(children)) { _walker(item, children, 0); } }); } var removePopper; function createTablePopper(parentNode, trigger, popperContent, nextZIndex, tooltipOptions) { tooltipOptions = merge_default({ enterable: true, showArrow: true }, tooltipOptions); const ns = parentNode == null ? void 0 : parentNode.dataset.prefix; const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns}-scrollbar__wrap`); function renderContent() { const isLight = tooltipOptions.effect === "light"; const content2 = document.createElement("div"); content2.className = [ `${ns}-popper`, isLight ? "is-light" : "is-dark", tooltipOptions.popperClass || "" ].join(" "); popperContent = (0, import_escape_html.default)(popperContent); content2.innerHTML = popperContent; content2.style.zIndex = String(nextZIndex()); parentNode == null ? void 0 : parentNode.appendChild(content2); return content2; } function renderArrow() { const arrow2 = document.createElement("div"); arrow2.className = `${ns}-popper__arrow`; return arrow2; } function showPopper() { popperInstance && popperInstance.update(); } removePopper == null ? void 0 : removePopper(); removePopper = () => { try { popperInstance && popperInstance.destroy(); content && (parentNode == null ? void 0 : parentNode.removeChild(content)); trigger.removeEventListener("mouseenter", onOpen); trigger.removeEventListener("mouseleave", onClose); scrollContainer == null ? void 0 : scrollContainer.removeEventListener("scroll", removePopper); removePopper = void 0; } catch (e) { } }; let popperInstance = null; let onOpen = showPopper; let onClose = removePopper; if (tooltipOptions.enterable) { ; ({ onOpen, onClose } = useDelayedToggle({ showAfter: tooltipOptions.showAfter, hideAfter: tooltipOptions.hideAfter, open: showPopper, close: removePopper })); } const content = renderContent(); content.onmouseenter = onOpen; content.onmouseleave = onClose; const modifiers = []; if (tooltipOptions.offset) { modifiers.push({ name: "offset", options: { offset: [0, tooltipOptions.offset] } }); } if (tooltipOptions.showArrow) { const arrow2 = content.appendChild(renderArrow()); modifiers.push({ name: "arrow", options: { element: arrow2, padding: 10 } }); } const popperOptions = tooltipOptions.popperOptions || {}; popperInstance = yn(trigger, content, { placement: tooltipOptions.placement || "top", strategy: "fixed", ...popperOptions, modifiers: popperOptions.modifiers ? modifiers.concat(popperOptions.modifiers) : modifiers }); trigger.addEventListener("mouseenter", onOpen); trigger.addEventListener("mouseleave", onClose); scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper); return popperInstance; } function getCurrentColumns(column2) { if (column2.children) { return flatMap_default(column2.children, getCurrentColumns); } else { return [column2]; } } function getColSpan(colSpan, column2) { return colSpan + column2.colSpan; } var isFixedColumn = (index, fixed, store, realColumns) => { let start = 0; let after2 = index; const columns2 = store.states.columns.value; if (realColumns) { const curColumns = getCurrentColumns(realColumns[index]); const preColumns = columns2.slice(0, columns2.indexOf(curColumns[0])); start = preColumns.reduce(getColSpan, 0); after2 = start + curColumns.reduce(getColSpan, 0) - 1; } else { start = index; } let fixedLayout; switch (fixed) { case "left": if (after2 < store.states.fixedLeafColumnsLength.value) { fixedLayout = "left"; } break; case "right": if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) { fixedLayout = "right"; } break; default: if (after2 < store.states.fixedLeafColumnsLength.value) { fixedLayout = "left"; } else if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) { fixedLayout = "right"; } } return fixedLayout ? { direction: fixedLayout, start, after: after2 } : {}; }; var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset2 = 0) => { const classes = []; const { direction: direction2, start, after: after2 } = isFixedColumn(index, fixed, store, realColumns); if (direction2) { const isLeft = direction2 === "left"; classes.push(`${namespace}-fixed-column--${direction2}`); if (isLeft && after2 + offset2 === store.states.fixedLeafColumnsLength.value - 1) { classes.push("is-last-column"); } else if (!isLeft && start - offset2 === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) { classes.push("is-first-column"); } } return classes; }; function getOffset2(offset2, column2) { return offset2 + (column2.realWidth === null || Number.isNaN(column2.realWidth) ? Number(column2.width) : column2.realWidth); } var getFixedColumnOffset = (index, fixed, store, realColumns) => { const { direction: direction2, start = 0, after: after2 = 0 } = isFixedColumn(index, fixed, store, realColumns); if (!direction2) { return; } const styles = {}; const isLeft = direction2 === "left"; const columns2 = store.states.columns.value; if (isLeft) { styles.left = columns2.slice(0, start).reduce(getOffset2, 0); } else { styles.right = columns2.slice(after2 + 1).reverse().reduce(getOffset2, 0); } return styles; }; var ensurePosition = (style, key) => { if (!style) return; if (!Number.isNaN(style[key])) { style[key] = `${style[key]}px`; } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/store/expand.mjs function useExpand(watcherData) { const instance = getCurrentInstance(); const defaultExpandAll = ref(false); const expandRows = ref([]); const updateExpandRows = () => { const data = watcherData.data.value || []; const rowKey2 = watcherData.rowKey.value; if (defaultExpandAll.value) { expandRows.value = data.slice(); } else if (rowKey2) { const expandRowsMap = getKeysMap(expandRows.value, rowKey2); expandRows.value = data.reduce((prev, row) => { const rowId = getRowIdentity(row, rowKey2); const rowInfo = expandRowsMap[rowId]; if (rowInfo) { prev.push(row); } return prev; }, []); } else { expandRows.value = []; } }; const toggleRowExpansion = (row, expanded) => { const changed = toggleRowStatus(expandRows.value, row, expanded); if (changed) { instance.emit("expand-change", row, expandRows.value.slice()); } }; const setExpandRowKeys = (rowKeys) => { instance.store.assertRowKey(); const data = watcherData.data.value || []; const rowKey2 = watcherData.rowKey.value; const keysMap = getKeysMap(data, rowKey2); expandRows.value = rowKeys.reduce((prev, cur) => { const info = keysMap[cur]; if (info) { prev.push(info.row); } return prev; }, []); }; const isRowExpanded = (row) => { const rowKey2 = watcherData.rowKey.value; if (rowKey2) { const expandMap = getKeysMap(expandRows.value, rowKey2); return !!expandMap[getRowIdentity(row, rowKey2)]; } return expandRows.value.includes(row); }; return { updateExpandRows, toggleRowExpansion, setExpandRowKeys, isRowExpanded, states: { expandRows, defaultExpandAll } }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/store/current.mjs function useCurrent(watcherData) { const instance = getCurrentInstance(); const _currentRowKey = ref(null); const currentRow = ref(null); const setCurrentRowKey = (key) => { instance.store.assertRowKey(); _currentRowKey.value = key; setCurrentRowByKey(key); }; const restoreCurrentRowKey = () => { _currentRowKey.value = null; }; const setCurrentRowByKey = (key) => { const { data, rowKey: rowKey2 } = watcherData; let _currentRow = null; if (rowKey2.value) { _currentRow = (unref(data) || []).find((item) => getRowIdentity(item, rowKey2.value) === key); } currentRow.value = _currentRow; instance.emit("current-change", currentRow.value, null); }; const updateCurrentRow = (_currentRow) => { const oldCurrentRow = currentRow.value; if (_currentRow && _currentRow !== oldCurrentRow) { currentRow.value = _currentRow; instance.emit("current-change", currentRow.value, oldCurrentRow); return; } if (!_currentRow && oldCurrentRow) { currentRow.value = null; instance.emit("current-change", null, oldCurrentRow); } }; const updateCurrentRowData = () => { const rowKey2 = watcherData.rowKey.value; const data = watcherData.data.value || []; const oldCurrentRow = currentRow.value; if (!data.includes(oldCurrentRow) && oldCurrentRow) { if (rowKey2) { const currentRowKey = getRowIdentity(oldCurrentRow, rowKey2); setCurrentRowByKey(currentRowKey); } else { currentRow.value = null; } if (currentRow.value === null) { instance.emit("current-change", null, oldCurrentRow); } } else if (_currentRowKey.value) { setCurrentRowByKey(_currentRowKey.value); restoreCurrentRowKey(); } }; return { setCurrentRowKey, restoreCurrentRowKey, setCurrentRowByKey, updateCurrentRow, updateCurrentRowData, states: { _currentRowKey, currentRow } }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/store/tree.mjs function useTree(watcherData) { const expandRowKeys = ref([]); const treeData = ref({}); const indent = ref(16); const lazy = ref(false); const lazyTreeNodeMap = ref({}); const lazyColumnIdentifier = ref("hasChildren"); const childrenColumnName = ref("children"); const instance = getCurrentInstance(); const normalizedData = computed2(() => { if (!watcherData.rowKey.value) return {}; const data = watcherData.data.value || []; return normalize(data); }); const normalizedLazyNode = computed2(() => { const rowKey2 = watcherData.rowKey.value; const keys3 = Object.keys(lazyTreeNodeMap.value); const res = {}; if (!keys3.length) return res; keys3.forEach((key) => { if (lazyTreeNodeMap.value[key].length) { const item = { children: [] }; lazyTreeNodeMap.value[key].forEach((row) => { const currentRowKey = getRowIdentity(row, rowKey2); item.children.push(currentRowKey); if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) { res[currentRowKey] = { children: [] }; } }); res[key] = item; } }); return res; }); const normalize = (data) => { const rowKey2 = watcherData.rowKey.value; const res = {}; walkTreeNode(data, (parent2, children, level) => { const parentId = getRowIdentity(parent2, rowKey2); if (Array.isArray(children)) { res[parentId] = { children: children.map((row) => getRowIdentity(row, rowKey2)), level }; } else if (lazy.value) { res[parentId] = { children: [], lazy: true, level }; } }, childrenColumnName.value, lazyColumnIdentifier.value); return res; }; const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll = ((_a2) => (_a2 = instance.store) == null ? void 0 : _a2.states.defaultExpandAll.value)()) => { var _a2; const nested = normalizedData.value; const normalizedLazyNode_ = normalizedLazyNode.value; const keys3 = Object.keys(nested); const newTreeData = {}; if (keys3.length) { const oldTreeData = unref(treeData); const rootLazyRowKeys = []; const getExpanded = (oldValue, key) => { if (ifChangeExpandRowKeys) { if (expandRowKeys.value) { return ifExpandAll || expandRowKeys.value.includes(key); } else { return !!(ifExpandAll || (oldValue == null ? void 0 : oldValue.expanded)); } } else { const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key); return !!((oldValue == null ? void 0 : oldValue.expanded) || included); } }; keys3.forEach((key) => { const oldValue = oldTreeData[key]; const newValue = { ...nested[key] }; newValue.expanded = getExpanded(oldValue, key); if (newValue.lazy) { const { loaded = false, loading = false } = oldValue || {}; newValue.loaded = !!loaded; newValue.loading = !!loading; rootLazyRowKeys.push(key); } newTreeData[key] = newValue; }); const lazyKeys = Object.keys(normalizedLazyNode_); if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) { lazyKeys.forEach((key) => { const oldValue = oldTreeData[key]; const lazyNodeChildren = normalizedLazyNode_[key].children; if (rootLazyRowKeys.includes(key)) { if (newTreeData[key].children.length !== 0) { throw new Error("[ElTable]children must be an empty array."); } newTreeData[key].children = lazyNodeChildren; } else { const { loaded = false, loading = false } = oldValue || {}; newTreeData[key] = { lazy: true, loaded: !!loaded, loading: !!loading, expanded: getExpanded(oldValue, key), children: lazyNodeChildren, level: "" }; } }); } } treeData.value = newTreeData; (_a2 = instance.store) == null ? void 0 : _a2.updateTableScrollY(); }; watch(() => expandRowKeys.value, () => { updateTreeData(true); }); watch(() => normalizedData.value, () => { updateTreeData(); }); watch(() => normalizedLazyNode.value, () => { updateTreeData(); }); const updateTreeExpandKeys = (value) => { expandRowKeys.value = value; updateTreeData(); }; const toggleTreeExpansion = (row, expanded) => { instance.store.assertRowKey(); const rowKey2 = watcherData.rowKey.value; const id = getRowIdentity(row, rowKey2); const data = id && treeData.value[id]; if (id && data && "expanded" in data) { const oldExpanded = data.expanded; expanded = typeof expanded === "undefined" ? !data.expanded : expanded; treeData.value[id].expanded = expanded; if (oldExpanded !== expanded) { instance.emit("expand-change", row, expanded); } instance.store.updateTableScrollY(); } }; const loadOrToggle = (row) => { instance.store.assertRowKey(); const rowKey2 = watcherData.rowKey.value; const id = getRowIdentity(row, rowKey2); const data = treeData.value[id]; if (lazy.value && data && "loaded" in data && !data.loaded) { loadData(row, id, data); } else { toggleTreeExpansion(row, void 0); } }; const loadData = (row, key, treeNode) => { const { load } = instance.props; if (load && !treeData.value[key].loaded) { treeData.value[key].loading = true; load(row, treeNode, (data) => { if (!Array.isArray(data)) { throw new TypeError("[ElTable] data must be an array"); } treeData.value[key].loading = false; treeData.value[key].loaded = true; treeData.value[key].expanded = true; if (data.length) { lazyTreeNodeMap.value[key] = data; } instance.emit("expand-change", row, true); }); } }; return { loadData, loadOrToggle, toggleTreeExpansion, updateTreeExpandKeys, updateTreeData, normalize, states: { expandRowKeys, treeData, indent, lazy, lazyTreeNodeMap, lazyColumnIdentifier, childrenColumnName } }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/store/watcher.mjs var sortData = (data, states) => { const sortingColumn = states.sortingColumn; if (!sortingColumn || typeof sortingColumn.sortable === "string") { return data; } return orderBy2(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy); }; var doFlattenColumns = (columns2) => { const result2 = []; columns2.forEach((column2) => { if (column2.children) { result2.push.apply(result2, doFlattenColumns(column2.children)); } else { result2.push(column2); } }); return result2; }; function useWatcher() { var _a2; const instance = getCurrentInstance(); const { size: tableSize } = toRefs((_a2 = instance.proxy) == null ? void 0 : _a2.$props); const rowKey2 = ref(null); const data = ref([]); const _data = ref([]); const isComplex = ref(false); const _columns = ref([]); const originColumns = ref([]); const columns2 = ref([]); const fixedColumns = ref([]); const rightFixedColumns = ref([]); const leafColumns = ref([]); const fixedLeafColumns = ref([]); const rightFixedLeafColumns = ref([]); const updateOrderFns = []; const leafColumnsLength = ref(0); const fixedLeafColumnsLength = ref(0); const rightFixedLeafColumnsLength = ref(0); const isAllSelected = ref(false); const selection = ref([]); const reserveSelection = ref(false); const selectOnIndeterminate = ref(false); const selectable = ref(null); const filters = ref({}); const filteredData = ref(null); const sortingColumn = ref(null); const sortProp = ref(null); const sortOrder = ref(null); const hoverRow = ref(null); watch(data, () => instance.state && scheduleLayout(false), { deep: true }); const assertRowKey = () => { if (!rowKey2.value) throw new Error("[ElTable] prop row-key is required"); }; const updateChildFixed = (column2) => { var _a22; (_a22 = column2.children) == null ? void 0 : _a22.forEach((childColumn) => { childColumn.fixed = column2.fixed; updateChildFixed(childColumn); }); }; const updateColumns = () => { _columns.value.forEach((column2) => { updateChildFixed(column2); }); fixedColumns.value = _columns.value.filter((column2) => column2.fixed === true || column2.fixed === "left"); rightFixedColumns.value = _columns.value.filter((column2) => column2.fixed === "right"); if (fixedColumns.value.length > 0 && _columns.value[0] && _columns.value[0].type === "selection" && !_columns.value[0].fixed) { _columns.value[0].fixed = true; fixedColumns.value.unshift(_columns.value[0]); } const notFixedColumns = _columns.value.filter((column2) => !column2.fixed); originColumns.value = [].concat(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value); const leafColumns2 = doFlattenColumns(notFixedColumns); const fixedLeafColumns2 = doFlattenColumns(fixedColumns.value); const rightFixedLeafColumns2 = doFlattenColumns(rightFixedColumns.value); leafColumnsLength.value = leafColumns2.length; fixedLeafColumnsLength.value = fixedLeafColumns2.length; rightFixedLeafColumnsLength.value = rightFixedLeafColumns2.length; columns2.value = [].concat(fixedLeafColumns2).concat(leafColumns2).concat(rightFixedLeafColumns2); isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0; }; const scheduleLayout = (needUpdateColumns, immediate = false) => { if (needUpdateColumns) { updateColumns(); } if (immediate) { instance.state.doLayout(); } else { instance.state.debouncedUpdateLayout(); } }; const isSelected = (row) => { return selection.value.includes(row); }; const clearSelection = () => { isAllSelected.value = false; const oldSelection = selection.value; if (oldSelection.length) { selection.value = []; instance.emit("selection-change", []); } }; const cleanSelection = () => { let deleted; if (rowKey2.value) { deleted = []; const selectedMap = getKeysMap(selection.value, rowKey2.value); const dataMap = getKeysMap(data.value, rowKey2.value); for (const key in selectedMap) { if (hasOwn(selectedMap, key) && !dataMap[key]) { deleted.push(selectedMap[key].row); } } } else { deleted = selection.value.filter((item) => !data.value.includes(item)); } if (deleted.length) { const newSelection = selection.value.filter((item) => !deleted.includes(item)); selection.value = newSelection; instance.emit("selection-change", newSelection.slice()); } }; const getSelectionRows = () => { return (selection.value || []).slice(); }; const toggleRowSelection = (row, selected = void 0, emitChange = true) => { const changed = toggleRowStatus(selection.value, row, selected); if (changed) { const newSelection = (selection.value || []).slice(); if (emitChange) { instance.emit("select", newSelection, row); } instance.emit("selection-change", newSelection); } }; const _toggleAllSelection = () => { var _a22, _b; const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length); isAllSelected.value = value; let selectionChanged = false; let childrenCount = 0; const rowKey22 = (_b = (_a22 = instance == null ? void 0 : instance.store) == null ? void 0 : _a22.states) == null ? void 0 : _b.rowKey.value; data.value.forEach((row, index) => { const rowIndex = index + childrenCount; if (selectable.value) { if (selectable.value.call(null, row, rowIndex) && toggleRowStatus(selection.value, row, value)) { selectionChanged = true; } } else { if (toggleRowStatus(selection.value, row, value)) { selectionChanged = true; } } childrenCount += getChildrenCount(getRowIdentity(row, rowKey22)); }); if (selectionChanged) { instance.emit("selection-change", selection.value ? selection.value.slice() : []); } instance.emit("select-all", selection.value); }; const updateSelectionByRowKey = () => { const selectedMap = getKeysMap(selection.value, rowKey2.value); data.value.forEach((row) => { const rowId = getRowIdentity(row, rowKey2.value); const rowInfo = selectedMap[rowId]; if (rowInfo) { selection.value[rowInfo.index] = row; } }); }; const updateAllSelected = () => { var _a22, _b, _c; if (((_a22 = data.value) == null ? void 0 : _a22.length) === 0) { isAllSelected.value = false; return; } let selectedMap; if (rowKey2.value) { selectedMap = getKeysMap(selection.value, rowKey2.value); } const isSelected2 = function(row) { if (selectedMap) { return !!selectedMap[getRowIdentity(row, rowKey2.value)]; } else { return selection.value.includes(row); } }; let isAllSelected_ = true; let selectedCount = 0; let childrenCount = 0; for (let i = 0, j = (data.value || []).length; i < j; i++) { const keyProp = (_c = (_b = instance == null ? void 0 : instance.store) == null ? void 0 : _b.states) == null ? void 0 : _c.rowKey.value; const rowIndex = i + childrenCount; const item = data.value[i]; const isRowSelectable = selectable.value && selectable.value.call(null, item, rowIndex); if (!isSelected2(item)) { if (!selectable.value || isRowSelectable) { isAllSelected_ = false; break; } } else { selectedCount++; } childrenCount += getChildrenCount(getRowIdentity(item, keyProp)); } if (selectedCount === 0) isAllSelected_ = false; isAllSelected.value = isAllSelected_; }; const getChildrenCount = (rowKey22) => { var _a22; if (!instance || !instance.store) return 0; const { treeData } = instance.store.states; let count = 0; const children = (_a22 = treeData.value[rowKey22]) == null ? void 0 : _a22.children; if (children) { count += children.length; children.forEach((childKey) => { count += getChildrenCount(childKey); }); } return count; }; const updateFilters = (columns22, values2) => { if (!Array.isArray(columns22)) { columns22 = [columns22]; } const filters_ = {}; columns22.forEach((col) => { filters.value[col.id] = values2; filters_[col.columnKey || col.id] = values2; }); return filters_; }; const updateSort = (column2, prop, order) => { if (sortingColumn.value && sortingColumn.value !== column2) { sortingColumn.value.order = null; } sortingColumn.value = column2; sortProp.value = prop; sortOrder.value = order; }; const execFilter = () => { let sourceData = unref(_data); Object.keys(filters.value).forEach((columnId) => { const values2 = filters.value[columnId]; if (!values2 || values2.length === 0) return; const column2 = getColumnById({ columns: columns2.value }, columnId); if (column2 && column2.filterMethod) { sourceData = sourceData.filter((row) => { return values2.some((value) => column2.filterMethod.call(null, value, row, column2)); }); } }); filteredData.value = sourceData; }; const execSort = () => { data.value = sortData(filteredData.value, { sortingColumn: sortingColumn.value, sortProp: sortProp.value, sortOrder: sortOrder.value }); }; const execQuery = (ignore = void 0) => { if (!(ignore && ignore.filter)) { execFilter(); } execSort(); }; const clearFilter = (columnKeys) => { const { tableHeaderRef } = instance.refs; if (!tableHeaderRef) return; const panels = Object.assign({}, tableHeaderRef.filterPanels); const keys3 = Object.keys(panels); if (!keys3.length) return; if (typeof columnKeys === "string") { columnKeys = [columnKeys]; } if (Array.isArray(columnKeys)) { const columns_ = columnKeys.map((key) => getColumnByKey({ columns: columns2.value }, key)); keys3.forEach((key) => { const column2 = columns_.find((col) => col.id === key); if (column2) { column2.filteredValue = []; } }); instance.store.commit("filterChange", { column: columns_, values: [], silent: true, multi: true }); } else { keys3.forEach((key) => { const column2 = columns2.value.find((col) => col.id === key); if (column2) { column2.filteredValue = []; } }); filters.value = {}; instance.store.commit("filterChange", { column: {}, values: [], silent: true }); } }; const clearSort = () => { if (!sortingColumn.value) return; updateSort(null, null, null); instance.store.commit("changeSortCondition", { silent: true }); }; const { setExpandRowKeys, toggleRowExpansion, updateExpandRows, states: expandStates, isRowExpanded } = useExpand({ data, rowKey: rowKey2 }); const { updateTreeExpandKeys, toggleTreeExpansion, updateTreeData, loadOrToggle, states: treeStates } = useTree({ data, rowKey: rowKey2 }); const { updateCurrentRowData, updateCurrentRow, setCurrentRowKey, states: currentData } = useCurrent({ data, rowKey: rowKey2 }); const setExpandRowKeysAdapter = (val) => { setExpandRowKeys(val); updateTreeExpandKeys(val); }; const toggleRowExpansionAdapter = (row, expanded) => { const hasExpandColumn = columns2.value.some(({ type: type4 }) => type4 === "expand"); if (hasExpandColumn) { toggleRowExpansion(row, expanded); } else { toggleTreeExpansion(row, expanded); } }; return { assertRowKey, updateColumns, scheduleLayout, isSelected, clearSelection, cleanSelection, getSelectionRows, toggleRowSelection, _toggleAllSelection, toggleAllSelection: null, updateSelectionByRowKey, updateAllSelected, updateFilters, updateCurrentRow, updateSort, execFilter, execSort, execQuery, clearFilter, clearSort, toggleRowExpansion, setExpandRowKeysAdapter, setCurrentRowKey, toggleRowExpansionAdapter, isRowExpanded, updateExpandRows, updateCurrentRowData, loadOrToggle, updateTreeData, states: { tableSize, rowKey: rowKey2, data, _data, isComplex, _columns, originColumns, columns: columns2, fixedColumns, rightFixedColumns, leafColumns, fixedLeafColumns, rightFixedLeafColumns, updateOrderFns, leafColumnsLength, fixedLeafColumnsLength, rightFixedLeafColumnsLength, isAllSelected, selection, reserveSelection, selectOnIndeterminate, selectable, filters, filteredData, sortingColumn, sortProp, sortOrder, hoverRow, ...expandStates, ...treeStates, ...currentData } }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/store/index.mjs function replaceColumn(array4, column2) { return array4.map((item) => { var _a2; if (item.id === column2.id) { return column2; } else if ((_a2 = item.children) == null ? void 0 : _a2.length) { item.children = replaceColumn(item.children, column2); } return item; }); } function sortColumn(array4) { array4.forEach((item) => { var _a2, _b; item.no = (_a2 = item.getColumnIndex) == null ? void 0 : _a2.call(item); if ((_b = item.children) == null ? void 0 : _b.length) { sortColumn(item.children); } }); array4.sort((cur, pre) => cur.no - pre.no); } function useStore() { const instance = getCurrentInstance(); const watcher = useWatcher(); const ns = useNamespace("table"); const mutations = { setData(states, data) { const dataInstanceChanged = unref(states._data) !== data; states.data.value = data; states._data.value = data; instance.store.execQuery(); instance.store.updateCurrentRowData(); instance.store.updateExpandRows(); instance.store.updateTreeData(instance.store.states.defaultExpandAll.value); if (unref(states.reserveSelection)) { instance.store.assertRowKey(); instance.store.updateSelectionByRowKey(); } else { if (dataInstanceChanged) { instance.store.clearSelection(); } else { instance.store.cleanSelection(); } } instance.store.updateAllSelected(); if (instance.$ready) { instance.store.scheduleLayout(); } }, insertColumn(states, column2, parent2, updateColumnOrder) { const array4 = unref(states._columns); let newColumns = []; if (!parent2) { array4.push(column2); newColumns = array4; } else { if (parent2 && !parent2.children) { parent2.children = []; } parent2.children.push(column2); newColumns = replaceColumn(array4, parent2); } sortColumn(newColumns); states._columns.value = newColumns; states.updateOrderFns.push(updateColumnOrder); if (column2.type === "selection") { states.selectable.value = column2.selectable; states.reserveSelection.value = column2.reserveSelection; } if (instance.$ready) { instance.store.updateColumns(); instance.store.scheduleLayout(); } }, updateColumnOrder(states, column2) { var _a2; const newColumnIndex = (_a2 = column2.getColumnIndex) == null ? void 0 : _a2.call(column2); if (newColumnIndex === column2.no) return; sortColumn(states._columns.value); if (instance.$ready) { instance.store.updateColumns(); } }, removeColumn(states, column2, parent2, updateColumnOrder) { const array4 = unref(states._columns) || []; if (parent2) { parent2.children.splice(parent2.children.findIndex((item) => item.id === column2.id), 1); nextTick(() => { var _a2; if (((_a2 = parent2.children) == null ? void 0 : _a2.length) === 0) { delete parent2.children; } }); states._columns.value = replaceColumn(array4, parent2); } else { const index = array4.indexOf(column2); if (index > -1) { array4.splice(index, 1); states._columns.value = array4; } } const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder); updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1); if (instance.$ready) { instance.store.updateColumns(); instance.store.scheduleLayout(); } }, sort(states, options) { const { prop, order, init } = options; if (prop) { const column2 = unref(states.columns).find((column22) => column22.property === prop); if (column2) { column2.order = order; instance.store.updateSort(column2, prop, order); instance.store.commit("changeSortCondition", { init }); } } }, changeSortCondition(states, options) { const { sortingColumn, sortProp, sortOrder } = states; const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder); if (orderValue === null) { states.sortingColumn.value = null; states.sortProp.value = null; } const ignore = { filter: true }; instance.store.execQuery(ignore); if (!options || !(options.silent || options.init)) { instance.emit("sort-change", { column: columnValue, prop: propValue, order: orderValue }); } instance.store.updateTableScrollY(); }, filterChange(_states, options) { const { column: column2, values: values2, silent } = options; const newFilters = instance.store.updateFilters(column2, values2); instance.store.execQuery(); if (!silent) { instance.emit("filter-change", newFilters); } instance.store.updateTableScrollY(); }, toggleAllSelection() { instance.store.toggleAllSelection(); }, rowSelectedChanged(_states, row) { instance.store.toggleRowSelection(row); instance.store.updateAllSelected(); }, setHoverRow(states, row) { states.hoverRow.value = row; }, setCurrentRow(_states, row) { instance.store.updateCurrentRow(row); } }; const commit = function(name, ...args) { const mutations2 = instance.store.mutations; if (mutations2[name]) { mutations2[name].apply(instance, [instance.store.states].concat(args)); } else { throw new Error(`Action not found: ${name}`); } }; const updateTableScrollY = function() { nextTick(() => instance.layout.updateScrollY.apply(instance.layout)); }; return { ns, ...watcher, mutations, commit, updateTableScrollY }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/store/helper.mjs var InitialStateMap = { rowKey: "rowKey", defaultExpandAll: "defaultExpandAll", selectOnIndeterminate: "selectOnIndeterminate", indent: "indent", lazy: "lazy", data: "data", ["treeProps.hasChildren"]: { key: "lazyColumnIdentifier", default: "hasChildren" }, ["treeProps.children"]: { key: "childrenColumnName", default: "children" } }; function createStore(table, props) { if (!table) { throw new Error("Table is required."); } const store = useStore(); store.toggleAllSelection = debounce_default(store._toggleAllSelection, 10); Object.keys(InitialStateMap).forEach((key) => { handleValue(getArrKeysValue(props, key), key, store); }); proxyTableProps(store, props); return store; } function proxyTableProps(store, props) { Object.keys(InitialStateMap).forEach((key) => { watch(() => getArrKeysValue(props, key), (value) => { handleValue(value, key, store); }); }); } function handleValue(value, propsKey, store) { let newVal = value; let storeKey = InitialStateMap[propsKey]; if (typeof InitialStateMap[propsKey] === "object") { storeKey = storeKey.key; newVal = newVal || InitialStateMap[propsKey].default; } store.states[storeKey].value = newVal; } function getArrKeysValue(props, keys3) { if (keys3.includes(".")) { const keyList = keys3.split("."); let value = props; keyList.forEach((key) => { value = value[key]; }); return value; } else { return props[keys3]; } } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-layout.mjs var TableLayout = class { constructor(options) { this.observers = []; this.table = null; this.store = null; this.columns = []; this.fit = true; this.showHeader = true; this.height = ref(null); this.scrollX = ref(false); this.scrollY = ref(false); this.bodyWidth = ref(null); this.fixedWidth = ref(null); this.rightFixedWidth = ref(null); this.gutterWidth = 0; for (const name in options) { if (hasOwn(options, name)) { if (isRef(this[name])) { this[name].value = options[name]; } else { this[name] = options[name]; } } } if (!this.table) { throw new Error("Table is required for Table Layout"); } if (!this.store) { throw new Error("Store is required for Table Layout"); } } updateScrollY() { const height = this.height.value; if (height === null) return false; const scrollBarRef = this.table.refs.scrollBarRef; if (this.table.vnode.el && (scrollBarRef == null ? void 0 : scrollBarRef.wrapRef)) { let scrollY = true; const prevScrollY = this.scrollY.value; scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight; this.scrollY.value = scrollY; return prevScrollY !== scrollY; } return false; } setHeight(value, prop = "height") { if (!isClient) return; const el = this.table.vnode.el; value = parseHeight(value); this.height.value = Number(value); if (!el && (value || value === 0)) return nextTick(() => this.setHeight(value, prop)); if (typeof value === "number") { el.style[prop] = `${value}px`; this.updateElsHeight(); } else if (typeof value === "string") { el.style[prop] = value; this.updateElsHeight(); } } setMaxHeight(value) { this.setHeight(value, "max-height"); } getFlattenColumns() { const flattenColumns = []; const columns2 = this.table.store.states.columns.value; columns2.forEach((column2) => { if (column2.isColumnGroup) { flattenColumns.push.apply(flattenColumns, column2.columns); } else { flattenColumns.push(column2); } }); return flattenColumns; } updateElsHeight() { this.updateScrollY(); this.notifyObservers("scrollable"); } headerDisplayNone(elm) { if (!elm) return true; let headerChild = elm; while (headerChild.tagName !== "DIV") { if (getComputedStyle(headerChild).display === "none") { return true; } headerChild = headerChild.parentElement; } return false; } updateColumnsWidth() { if (!isClient) return; const fit = this.fit; const bodyWidth = this.table.vnode.el.clientWidth; let bodyMinWidth = 0; const flattenColumns = this.getFlattenColumns(); const flexColumns = flattenColumns.filter((column2) => typeof column2.width !== "number"); flattenColumns.forEach((column2) => { if (typeof column2.width === "number" && column2.realWidth) column2.realWidth = null; }); if (flexColumns.length > 0 && fit) { flattenColumns.forEach((column2) => { bodyMinWidth += Number(column2.width || column2.minWidth || 80); }); if (bodyMinWidth <= bodyWidth) { this.scrollX.value = false; const totalFlexWidth = bodyWidth - bodyMinWidth; if (flexColumns.length === 1) { flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth; } else { const allColumnsWidth = flexColumns.reduce((prev, column2) => prev + Number(column2.minWidth || 80), 0); const flexWidthPerPixel = totalFlexWidth / allColumnsWidth; let noneFirstWidth = 0; flexColumns.forEach((column2, index) => { if (index === 0) return; const flexWidth = Math.floor(Number(column2.minWidth || 80) * flexWidthPerPixel); noneFirstWidth += flexWidth; column2.realWidth = Number(column2.minWidth || 80) + flexWidth; }); flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth; } } else { this.scrollX.value = true; flexColumns.forEach((column2) => { column2.realWidth = Number(column2.minWidth); }); } this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth); this.table.state.resizeState.value.width = this.bodyWidth.value; } else { flattenColumns.forEach((column2) => { if (!column2.width && !column2.minWidth) { column2.realWidth = 80; } else { column2.realWidth = Number(column2.width || column2.minWidth); } bodyMinWidth += column2.realWidth; }); this.scrollX.value = bodyMinWidth > bodyWidth; this.bodyWidth.value = bodyMinWidth; } const fixedColumns = this.store.states.fixedColumns.value; if (fixedColumns.length > 0) { let fixedWidth = 0; fixedColumns.forEach((column2) => { fixedWidth += Number(column2.realWidth || column2.width); }); this.fixedWidth.value = fixedWidth; } const rightFixedColumns = this.store.states.rightFixedColumns.value; if (rightFixedColumns.length > 0) { let rightFixedWidth = 0; rightFixedColumns.forEach((column2) => { rightFixedWidth += Number(column2.realWidth || column2.width); }); this.rightFixedWidth.value = rightFixedWidth; } this.notifyObservers("columns"); } addObserver(observer) { this.observers.push(observer); } removeObserver(observer) { const index = this.observers.indexOf(observer); if (index !== -1) { this.observers.splice(index, 1); } } notifyObservers(event) { const observers = this.observers; observers.forEach((observer) => { var _a2, _b; switch (event) { case "columns": (_a2 = observer.state) == null ? void 0 : _a2.onColumnsChange(this); break; case "scrollable": (_b = observer.state) == null ? void 0 : _b.onScrollableChange(this); break; default: throw new Error(`Table Layout don't have event ${event}.`); } }); } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/filter-panel.mjs var { CheckboxGroup: ElCheckboxGroup2 } = ElCheckbox; var _sfc_main120 = defineComponent({ name: "ElTableFilterPanel", components: { ElCheckbox, ElCheckboxGroup: ElCheckboxGroup2, ElScrollbar, ElTooltip, ElIcon, ArrowDown: arrow_down_default, ArrowUp: arrow_up_default }, directives: { ClickOutside }, props: { placement: { type: String, default: "bottom-start" }, store: { type: Object }, column: { type: Object }, upDataColumn: { type: Function } }, setup(props) { const instance = getCurrentInstance(); const { t } = useLocale(); const ns = useNamespace("table-filter"); const parent2 = instance == null ? void 0 : instance.parent; if (!parent2.filterPanels.value[props.column.id]) { parent2.filterPanels.value[props.column.id] = instance; } const tooltipVisible = ref(false); const tooltip = ref(null); const filters = computed2(() => { return props.column && props.column.filters; }); const filterValue = computed2({ get: () => { var _a2; return (((_a2 = props.column) == null ? void 0 : _a2.filteredValue) || [])[0]; }, set: (value) => { if (filteredValue.value) { if (typeof value !== "undefined" && value !== null) { filteredValue.value.splice(0, 1, value); } else { filteredValue.value.splice(0, 1); } } } }); const filteredValue = computed2({ get() { if (props.column) { return props.column.filteredValue || []; } return []; }, set(value) { if (props.column) { props.upDataColumn("filteredValue", value); } } }); const multiple = computed2(() => { if (props.column) { return props.column.filterMultiple; } return true; }); const isActive = (filter2) => { return filter2.value === filterValue.value; }; const hidden = () => { tooltipVisible.value = false; }; const showFilterPanel = (e) => { e.stopPropagation(); tooltipVisible.value = !tooltipVisible.value; }; const hideFilterPanel = () => { tooltipVisible.value = false; }; const handleConfirm = () => { confirmFilter(filteredValue.value); hidden(); }; const handleReset = () => { filteredValue.value = []; confirmFilter(filteredValue.value); hidden(); }; const handleSelect = (_filterValue) => { filterValue.value = _filterValue; if (typeof _filterValue !== "undefined" && _filterValue !== null) { confirmFilter(filteredValue.value); } else { confirmFilter([]); } hidden(); }; const confirmFilter = (filteredValue2) => { props.store.commit("filterChange", { column: props.column, values: filteredValue2 }); props.store.updateAllSelected(); }; watch(tooltipVisible, (value) => { if (props.column) { props.upDataColumn("filterOpened", value); } }, { immediate: true }); const popperPaneRef = computed2(() => { var _a2, _b; return (_b = (_a2 = tooltip.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef; }); return { tooltipVisible, multiple, filteredValue, filterValue, filters, handleConfirm, handleReset, handleSelect, isActive, t, ns, showFilterPanel, hideFilterPanel, popperPaneRef, tooltip }; } }); var _hoisted_159 = { key: 0 }; var _hoisted_237 = ["disabled"]; var _hoisted_319 = ["label", "onClick"]; function _sfc_render28(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_checkbox = resolveComponent("el-checkbox"); const _component_el_checkbox_group = resolveComponent("el-checkbox-group"); const _component_el_scrollbar = resolveComponent("el-scrollbar"); const _component_arrow_up = resolveComponent("arrow-up"); const _component_arrow_down = resolveComponent("arrow-down"); const _component_el_icon = resolveComponent("el-icon"); const _component_el_tooltip = resolveComponent("el-tooltip"); const _directive_click_outside = resolveDirective("click-outside"); return openBlock(), createBlock(_component_el_tooltip, { ref: "tooltip", visible: _ctx.tooltipVisible, offset: 0, placement: _ctx.placement, "show-arrow": false, "stop-popper-mouse-event": false, teleported: "", effect: "light", pure: "", "popper-class": _ctx.ns.b(), persistent: "" }, { content: withCtx(() => [ _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_159, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("content")) }, [ createVNode(_component_el_scrollbar, { "wrap-class": _ctx.ns.e("wrap") }, { default: withCtx(() => [ createVNode(_component_el_checkbox_group, { modelValue: _ctx.filteredValue, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.filteredValue = $event), class: normalizeClass(_ctx.ns.e("checkbox-group")) }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter2) => { return openBlock(), createBlock(_component_el_checkbox, { key: filter2.value, label: filter2.value }, { default: withCtx(() => [ createTextVNode(toDisplayString(filter2.text), 1) ]), _: 2 }, 1032, ["label"]); }), 128)) ]), _: 1 }, 8, ["modelValue", "class"]) ]), _: 1 }, 8, ["wrap-class"]) ], 2), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("bottom")) }, [ createBaseVNode("button", { class: normalizeClass({ [_ctx.ns.is("disabled")]: _ctx.filteredValue.length === 0 }), disabled: _ctx.filteredValue.length === 0, type: "button", onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args)) }, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, _hoisted_237), createBaseVNode("button", { type: "button", onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args)) }, toDisplayString(_ctx.t("el.table.resetFilter")), 1) ], 2) ])) : (openBlock(), createElementBlock("ul", { key: 1, class: normalizeClass(_ctx.ns.e("list")) }, [ createBaseVNode("li", { class: normalizeClass([ _ctx.ns.e("list-item"), { [_ctx.ns.is("active")]: _ctx.filterValue === void 0 || _ctx.filterValue === null } ]), onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null)) }, toDisplayString(_ctx.t("el.table.clearFilter")), 3), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter2) => { return openBlock(), createElementBlock("li", { key: filter2.value, class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter2))]), label: filter2.value, onClick: ($event) => _ctx.handleSelect(filter2.value) }, toDisplayString(filter2.text), 11, _hoisted_319); }), 128)) ], 2)) ]), default: withCtx(() => [ withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass([ `${_ctx.ns.namespace.value}-table__column-filter-trigger`, `${_ctx.ns.namespace.value}-none-outline` ]), onClick: _cache[4] || (_cache[4] = (...args) => _ctx.showFilterPanel && _ctx.showFilterPanel(...args)) }, [ createVNode(_component_el_icon, null, { default: withCtx(() => [ _ctx.column.filterOpened ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 })) ]), _: 1 }) ], 2)), [ [_directive_click_outside, _ctx.hideFilterPanel, _ctx.popperPaneRef] ]) ]), _: 1 }, 8, ["visible", "placement", "popper-class"]); } var FilterPanel = _export_sfc(_sfc_main120, [["render", _sfc_render28], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/layout-observer.mjs function useLayoutObserver(root2) { const instance = getCurrentInstance(); onBeforeMount(() => { tableLayout.value.addObserver(instance); }); onMounted(() => { onColumnsChange(tableLayout.value); onScrollableChange(tableLayout.value); }); onUpdated(() => { onColumnsChange(tableLayout.value); onScrollableChange(tableLayout.value); }); onUnmounted(() => { tableLayout.value.removeObserver(instance); }); const tableLayout = computed2(() => { const layout2 = root2.layout; if (!layout2) { throw new Error("Can not find table layout."); } return layout2; }); const onColumnsChange = (layout2) => { var _a2; const cols = ((_a2 = root2.vnode.el) == null ? void 0 : _a2.querySelectorAll("colgroup > col")) || []; if (!cols.length) return; const flattenColumns = layout2.getFlattenColumns(); const columnsMap = {}; flattenColumns.forEach((column2) => { columnsMap[column2.id] = column2; }); for (let i = 0, j = cols.length; i < j; i++) { const col = cols[i]; const name = col.getAttribute("name"); const column2 = columnsMap[name]; if (column2) { col.setAttribute("width", column2.realWidth || column2.width); } } }; const onScrollableChange = (layout2) => { var _a2, _b; const cols = ((_a2 = root2.vnode.el) == null ? void 0 : _a2.querySelectorAll("colgroup > col[name=gutter]")) || []; for (let i = 0, j = cols.length; i < j; i++) { const col = cols[i]; col.setAttribute("width", layout2.scrollY.value ? layout2.gutterWidth : "0"); } const ths = ((_b = root2.vnode.el) == null ? void 0 : _b.querySelectorAll("th.gutter")) || []; for (let i = 0, j = ths.length; i < j; i++) { const th = ths[i]; th.style.width = layout2.scrollY.value ? `${layout2.gutterWidth}px` : "0"; th.style.display = layout2.scrollY.value ? "" : "none"; } }; return { tableLayout: tableLayout.value, onColumnsChange, onScrollableChange }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/tokens.mjs var TABLE_INJECTION_KEY = Symbol("ElTable"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs function useEvent(props, emit) { const instance = getCurrentInstance(); const parent2 = inject(TABLE_INJECTION_KEY); const handleFilterClick = (event) => { event.stopPropagation(); return; }; const handleHeaderClick = (event, column2) => { if (!column2.filters && column2.sortable) { handleSortClick(event, column2, false); } else if (column2.filterable && !column2.sortable) { handleFilterClick(event); } parent2 == null ? void 0 : parent2.emit("header-click", column2, event); }; const handleHeaderContextMenu = (event, column2) => { parent2 == null ? void 0 : parent2.emit("header-contextmenu", column2, event); }; const draggingColumn = ref(null); const dragging = ref(false); const dragState = ref({}); const handleMouseDown = (event, column2) => { if (!isClient) return; if (column2.children && column2.children.length > 0) return; if (draggingColumn.value && props.border) { dragging.value = true; const table = parent2; emit("set-drag-visible", true); const tableEl = table == null ? void 0 : table.vnode.el; const tableLeft = tableEl.getBoundingClientRect().left; const columnEl = instance.vnode.el.querySelector(`th.${column2.id}`); const columnRect = columnEl.getBoundingClientRect(); const minLeft = columnRect.left - tableLeft + 30; addClass(columnEl, "noclick"); dragState.value = { startMouseLeft: event.clientX, startLeft: columnRect.right - tableLeft, startColumnLeft: columnRect.left - tableLeft, tableLeft }; const resizeProxy = table == null ? void 0 : table.refs.resizeProxy; resizeProxy.style.left = `${dragState.value.startLeft}px`; document.onselectstart = function() { return false; }; document.ondragstart = function() { return false; }; const handleMouseMove2 = (event2) => { const deltaLeft = event2.clientX - dragState.value.startMouseLeft; const proxyLeft = dragState.value.startLeft + deltaLeft; resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`; }; const handleMouseUp = () => { if (dragging.value) { const { startColumnLeft, startLeft } = dragState.value; const finalLeft = Number.parseInt(resizeProxy.style.left, 10); const columnWidth = finalLeft - startColumnLeft; column2.width = column2.realWidth = columnWidth; table == null ? void 0 : table.emit("header-dragend", column2.width, startLeft - startColumnLeft, column2, event); requestAnimationFrame(() => { props.store.scheduleLayout(false, true); }); document.body.style.cursor = ""; dragging.value = false; draggingColumn.value = null; dragState.value = {}; emit("set-drag-visible", false); } document.removeEventListener("mousemove", handleMouseMove2); document.removeEventListener("mouseup", handleMouseUp); document.onselectstart = null; document.ondragstart = null; setTimeout(() => { removeClass(columnEl, "noclick"); }, 0); }; document.addEventListener("mousemove", handleMouseMove2); document.addEventListener("mouseup", handleMouseUp); } }; const handleMouseMove = (event, column2) => { var _a2; if (column2.children && column2.children.length > 0) return; const target2 = (_a2 = event.target) == null ? void 0 : _a2.closest("th"); if (!column2 || !column2.resizable) return; if (!dragging.value && props.border) { const rect = target2.getBoundingClientRect(); const bodyStyle = document.body.style; if (rect.width > 12 && rect.right - event.pageX < 8) { bodyStyle.cursor = "col-resize"; if (hasClass(target2, "is-sortable")) { target2.style.cursor = "col-resize"; } draggingColumn.value = column2; } else if (!dragging.value) { bodyStyle.cursor = ""; if (hasClass(target2, "is-sortable")) { target2.style.cursor = "pointer"; } draggingColumn.value = null; } } }; const handleMouseOut = () => { if (!isClient) return; document.body.style.cursor = ""; }; const toggleOrder = ({ order, sortOrders }) => { if (order === "") return sortOrders[0]; const index = sortOrders.indexOf(order || null); return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1]; }; const handleSortClick = (event, column2, givenOrder) => { var _a2; event.stopPropagation(); const order = column2.order === givenOrder ? null : givenOrder || toggleOrder(column2); const target2 = (_a2 = event.target) == null ? void 0 : _a2.closest("th"); if (target2) { if (hasClass(target2, "noclick")) { removeClass(target2, "noclick"); return; } } if (!column2.sortable) return; const states = props.store.states; let sortProp = states.sortProp.value; let sortOrder; const sortingColumn = states.sortingColumn.value; if (sortingColumn !== column2 || sortingColumn === column2 && sortingColumn.order === null) { if (sortingColumn) { sortingColumn.order = null; } states.sortingColumn.value = column2; sortProp = column2.property; } if (!order) { sortOrder = column2.order = null; } else { sortOrder = column2.order = order; } states.sortProp.value = sortProp; states.sortOrder.value = sortOrder; parent2 == null ? void 0 : parent2.store.commit("changeSortCondition"); }; return { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs function useStyle(props) { const parent2 = inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const getHeaderRowStyle = (rowIndex) => { const headerRowStyle = parent2 == null ? void 0 : parent2.props.headerRowStyle; if (typeof headerRowStyle === "function") { return headerRowStyle.call(null, { rowIndex }); } return headerRowStyle; }; const getHeaderRowClass = (rowIndex) => { const classes = []; const headerRowClassName = parent2 == null ? void 0 : parent2.props.headerRowClassName; if (typeof headerRowClassName === "string") { classes.push(headerRowClassName); } else if (typeof headerRowClassName === "function") { classes.push(headerRowClassName.call(null, { rowIndex })); } return classes.join(" "); }; const getHeaderCellStyle = (rowIndex, columnIndex, row, column2) => { var _a2; let headerCellStyles = (_a2 = parent2 == null ? void 0 : parent2.props.headerCellStyle) != null ? _a2 : {}; if (typeof headerCellStyles === "function") { headerCellStyles = headerCellStyles.call(null, { rowIndex, columnIndex, row, column: column2 }); } const fixedStyle = getFixedColumnOffset(columnIndex, column2.fixed, props.store, row); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return Object.assign({}, headerCellStyles, fixedStyle); }; const getHeaderCellClass = (rowIndex, columnIndex, row, column2) => { const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column2.fixed, props.store, row); const classes = [ column2.id, column2.order, column2.headerAlign, column2.className, column2.labelClassName, ...fixedClasses ]; if (!column2.children) { classes.push("is-leaf"); } if (column2.sortable) { classes.push("is-sortable"); } const headerCellClassName = parent2 == null ? void 0 : parent2.props.headerCellClassName; if (typeof headerCellClassName === "string") { classes.push(headerCellClassName); } else if (typeof headerCellClassName === "function") { classes.push(headerCellClassName.call(null, { rowIndex, columnIndex, row, column: column2 })); } classes.push(ns.e("cell")); return classes.filter((className) => Boolean(className)).join(" "); }; return { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs var getAllColumns = (columns2) => { const result2 = []; columns2.forEach((column2) => { if (column2.children) { result2.push(column2); result2.push.apply(result2, getAllColumns(column2.children)); } else { result2.push(column2); } }); return result2; }; var convertToRows = (originColumns) => { let maxLevel = 1; const traverse = (column2, parent2) => { if (parent2) { column2.level = parent2.level + 1; if (maxLevel < column2.level) { maxLevel = column2.level; } } if (column2.children) { let colSpan = 0; column2.children.forEach((subColumn) => { traverse(subColumn, column2); colSpan += subColumn.colSpan; }); column2.colSpan = colSpan; } else { column2.colSpan = 1; } }; originColumns.forEach((column2) => { column2.level = 1; traverse(column2, void 0); }); const rows = []; for (let i = 0; i < maxLevel; i++) { rows.push([]); } const allColumns = getAllColumns(originColumns); allColumns.forEach((column2) => { if (!column2.children) { column2.rowSpan = maxLevel - column2.level + 1; } else { column2.rowSpan = 1; column2.children.forEach((col) => col.isSubColumn = true); } rows[column2.level - 1].push(column2); }); return rows; }; function useUtils(props) { const parent2 = inject(TABLE_INJECTION_KEY); const columnRows = computed2(() => { return convertToRows(props.store.states.originColumns.value); }); const isGroup = computed2(() => { const result2 = columnRows.value.length > 1; if (result2 && parent2) { parent2.state.isGroup.value = true; } return result2; }); const toggleAllSelection = (event) => { event.stopPropagation(); parent2 == null ? void 0 : parent2.store.commit("toggleAllSelection"); }; return { isGroup, toggleAllSelection, columnRows }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-header/index.mjs var TableHeader = defineComponent({ name: "ElTableHeader", components: { ElCheckbox }, props: { fixed: { type: String, default: "" }, store: { required: true, type: Object }, border: Boolean, defaultSort: { type: Object, default: () => { return { prop: "", order: "" }; } } }, setup(props, { emit }) { const instance = getCurrentInstance(); const parent2 = inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const filterPanels = ref({}); const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2); onMounted(async () => { await nextTick(); await nextTick(); const { prop, order } = props.defaultSort; parent2 == null ? void 0 : parent2.store.commit("sort", { prop, order, init: true }); }); const { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick } = useEvent(props, emit); const { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass } = useStyle(props); const { isGroup, toggleAllSelection, columnRows } = useUtils(props); instance.state = { onColumnsChange, onScrollableChange }; instance.filterPanels = filterPanels; return { ns, filterPanels, onColumnsChange, onScrollableChange, columnRows, getHeaderRowClass, getHeaderRowStyle, getHeaderCellClass, getHeaderCellStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick, isGroup, toggleAllSelection }; }, render() { const { ns, isGroup, columnRows, getHeaderCellStyle, getHeaderCellClass, getHeaderRowClass, getHeaderRowStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleSortClick, handleMouseOut, store, $parent } = this; let rowSpan = 1; return h("thead", { class: { [ns.is("group")]: isGroup } }, columnRows.map((subColumns, rowIndex) => h("tr", { class: getHeaderRowClass(rowIndex), key: rowIndex, style: getHeaderRowStyle(rowIndex) }, subColumns.map((column2, cellIndex) => { if (column2.rowSpan > rowSpan) { rowSpan = column2.rowSpan; } return h("th", { class: getHeaderCellClass(rowIndex, cellIndex, subColumns, column2), colspan: column2.colSpan, key: `${column2.id}-thead`, rowspan: column2.rowSpan, style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column2), onClick: ($event) => handleHeaderClick($event, column2), onContextmenu: ($event) => handleHeaderContextMenu($event, column2), onMousedown: ($event) => handleMouseDown($event, column2), onMousemove: ($event) => handleMouseMove($event, column2), onMouseout: handleMouseOut }, [ h("div", { class: [ "cell", column2.filteredValue && column2.filteredValue.length > 0 ? "highlight" : "" ] }, [ column2.renderHeader ? column2.renderHeader({ column: column2, $index: cellIndex, store, _self: $parent }) : column2.label, column2.sortable && h("span", { onClick: ($event) => handleSortClick($event, column2), class: "caret-wrapper" }, [ h("i", { onClick: ($event) => handleSortClick($event, column2, "ascending"), class: "sort-caret ascending" }), h("i", { onClick: ($event) => handleSortClick($event, column2, "descending"), class: "sort-caret descending" }) ]), column2.filterable && h(FilterPanel, { store, placement: column2.filterPlacement || "bottom-start", column: column2, upDataColumn: (key, value) => { column2[key] = value; } }) ]) ]); })))); } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs function useEvents(props) { const parent2 = inject(TABLE_INJECTION_KEY); const tooltipContent = ref(""); const tooltipTrigger = ref(h("div")); const { nextZIndex } = useZIndex(); const handleEvent = (event, row, name) => { var _a2; const table = parent2; const cell = getCell(event); let column2; const namespace = (_a2 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a2.dataset.prefix; if (cell) { column2 = getColumnByCell({ columns: props.store.states.columns.value }, cell, namespace); if (column2) { table == null ? void 0 : table.emit(`cell-${name}`, row, column2, cell, event); } } table == null ? void 0 : table.emit(`row-${name}`, row, column2, event); }; const handleDoubleClick = (event, row) => { handleEvent(event, row, "dblclick"); }; const handleClick = (event, row) => { props.store.commit("setCurrentRow", row); handleEvent(event, row, "click"); }; const handleContextMenu = (event, row) => { handleEvent(event, row, "contextmenu"); }; const handleMouseEnter = debounce_default((index) => { props.store.commit("setHoverRow", index); }, 30); const handleMouseLeave = debounce_default(() => { props.store.commit("setHoverRow", null); }, 30); const handleCellMouseEnter = (event, row, tooltipOptions) => { var _a2; const table = parent2; const cell = getCell(event); const namespace = (_a2 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a2.dataset.prefix; if (cell) { const column2 = getColumnByCell({ columns: props.store.states.columns.value }, cell, namespace); const hoverState = table.hoverState = { cell, column: column2, row }; table == null ? void 0 : table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event); } if (!tooltipOptions) { return; } const cellChild = event.target.querySelector(".cell"); if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length)) { return; } const range4 = document.createRange(); range4.setStart(cellChild, 0); range4.setEnd(cellChild, cellChild.childNodes.length); const rangeWidth = Math.round(range4.getBoundingClientRect().width); const padding = (Number.parseInt(getStyle(cellChild, "paddingLeft"), 10) || 0) + (Number.parseInt(getStyle(cellChild, "paddingRight"), 10) || 0); if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) { createTablePopper(parent2 == null ? void 0 : parent2.refs.tableWrapper, cell, cell.innerText || cell.textContent, nextZIndex, tooltipOptions); } }; const handleCellMouseLeave = (event) => { const cell = getCell(event); if (!cell) return; const oldHoverState = parent2 == null ? void 0 : parent2.hoverState; parent2 == null ? void 0 : parent2.emit("cell-mouse-leave", oldHoverState == null ? void 0 : oldHoverState.row, oldHoverState == null ? void 0 : oldHoverState.column, oldHoverState == null ? void 0 : oldHoverState.cell, event); }; return { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs function useStyles(props) { const parent2 = inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const getRowStyle = (row, rowIndex) => { const rowStyle = parent2 == null ? void 0 : parent2.props.rowStyle; if (typeof rowStyle === "function") { return rowStyle.call(null, { row, rowIndex }); } return rowStyle || null; }; const getRowClass = (row, rowIndex) => { const classes = [ns.e("row")]; if ((parent2 == null ? void 0 : parent2.props.highlightCurrentRow) && row === props.store.states.currentRow.value) { classes.push("current-row"); } if (props.stripe && rowIndex % 2 === 1) { classes.push(ns.em("row", "striped")); } const rowClassName = parent2 == null ? void 0 : parent2.props.rowClassName; if (typeof rowClassName === "string") { classes.push(rowClassName); } else if (typeof rowClassName === "function") { classes.push(rowClassName.call(null, { row, rowIndex })); } return classes; }; const getCellStyle = (rowIndex, columnIndex, row, column2) => { const cellStyle = parent2 == null ? void 0 : parent2.props.cellStyle; let cellStyles = cellStyle != null ? cellStyle : {}; if (typeof cellStyle === "function") { cellStyles = cellStyle.call(null, { rowIndex, columnIndex, row, column: column2 }); } const fixedStyle = getFixedColumnOffset(columnIndex, props == null ? void 0 : props.fixed, props.store); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return Object.assign({}, cellStyles, fixedStyle); }; const getCellClass = (rowIndex, columnIndex, row, column2, offset2) => { const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset2); const classes = [column2.id, column2.align, column2.className, ...fixedClasses]; const cellClassName = parent2 == null ? void 0 : parent2.props.cellClassName; if (typeof cellClassName === "string") { classes.push(cellClassName); } else if (typeof cellClassName === "function") { classes.push(cellClassName.call(null, { rowIndex, columnIndex, row, column: column2 })); } classes.push(ns.e("cell")); return classes.filter((className) => Boolean(className)).join(" "); }; const getSpan = (row, column2, rowIndex, columnIndex) => { let rowspan = 1; let colspan = 1; const fn2 = parent2 == null ? void 0 : parent2.props.spanMethod; if (typeof fn2 === "function") { const result2 = fn2({ row, column: column2, rowIndex, columnIndex }); if (Array.isArray(result2)) { rowspan = result2[0]; colspan = result2[1]; } else if (typeof result2 === "object") { rowspan = result2.rowspan; colspan = result2.colspan; } } return { rowspan, colspan }; }; const getColspanRealWidth = (columns2, colspan, index) => { if (colspan < 1) { return columns2[index].realWidth; } const widthArr = columns2.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan); return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1)); }; return { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs function useRender(props) { const parent2 = inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger } = useEvents(props); const { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth } = useStyles(props); const firstDefaultColumnIndex = computed2(() => { return props.store.states.columns.value.findIndex(({ type: type4 }) => type4 === "default"); }); const getKeyOfRow = (row, index) => { const rowKey2 = parent2.props.rowKey; if (rowKey2) { return getRowIdentity(row, rowKey2); } return index; }; const rowRender = (row, $index, treeRowData, expanded = false) => { const { tooltipEffect, tooltipOptions, store } = props; const { indent, columns: columns2 } = store.states; const rowClasses = getRowClass(row, $index); let display = true; if (treeRowData) { rowClasses.push(ns.em("row", `level-${treeRowData.level}`)); display = treeRowData.display; } const displayStyle = display ? null : { display: "none" }; return h("tr", { style: [displayStyle, getRowStyle(row, $index)], class: rowClasses, key: getKeyOfRow(row, $index), onDblclick: ($event) => handleDoubleClick($event, row), onClick: ($event) => handleClick($event, row), onContextmenu: ($event) => handleContextMenu($event, row), onMouseenter: () => handleMouseEnter($index), onMouseleave: handleMouseLeave }, columns2.value.map((column2, cellIndex) => { const { rowspan, colspan } = getSpan(row, column2, $index, cellIndex); if (!rowspan || !colspan) { return null; } const columnData = { ...column2 }; columnData.realWidth = getColspanRealWidth(columns2.value, colspan, cellIndex); const data = { store: props.store, _self: props.context || parent2, column: columnData, row, $index, cellIndex, expanded }; if (cellIndex === firstDefaultColumnIndex.value && treeRowData) { data.treeNode = { indent: treeRowData.level * indent.value, level: treeRowData.level }; if (typeof treeRowData.expanded === "boolean") { data.treeNode.expanded = treeRowData.expanded; if ("loading" in treeRowData) { data.treeNode.loading = treeRowData.loading; } if ("noLazyChildren" in treeRowData) { data.treeNode.noLazyChildren = treeRowData.noLazyChildren; } } } const baseKey = `${$index},${cellIndex}`; const patchKey = columnData.columnKey || columnData.rawColumnKey || ""; const tdChildren = cellChildren(cellIndex, column2, data); const mergedTooltipOptions = column2.showOverflowTooltip && merge_default({ effect: tooltipEffect }, tooltipOptions, column2.showOverflowTooltip); return h("td", { style: getCellStyle($index, cellIndex, row, column2), class: getCellClass($index, cellIndex, row, column2, colspan - 1), key: `${patchKey}${baseKey}`, rowspan, colspan, onMouseenter: ($event) => handleCellMouseEnter($event, row, mergedTooltipOptions), onMouseleave: handleCellMouseLeave }, [tdChildren]); })); }; const cellChildren = (cellIndex, column2, data) => { return column2.renderCell(data); }; const wrappedRowRender = (row, $index) => { const store = props.store; const { isRowExpanded, assertRowKey } = store; const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey: rowKey2 } = store.states; const columns2 = store.states.columns.value; const hasExpandColumn = columns2.some(({ type: type4 }) => type4 === "expand"); if (hasExpandColumn) { const expanded = isRowExpanded(row); const tr = rowRender(row, $index, void 0, expanded); const renderExpanded = parent2.renderExpanded; if (expanded) { if (!renderExpanded) { console.error("[Element Error]renderExpanded is required."); return tr; } return [ [ tr, h("tr", { key: `expanded-row__${tr.key}` }, [ h("td", { colspan: columns2.length, class: `${ns.e("cell")} ${ns.e("expanded-cell")}` }, [renderExpanded({ row, $index, store, expanded })]) ]) ] ]; } else { return [[tr]]; } } else if (Object.keys(treeData.value).length) { assertRowKey(); const key = getRowIdentity(row, rowKey2.value); let cur = treeData.value[key]; let treeRowData = null; if (cur) { treeRowData = { expanded: cur.expanded, level: cur.level, display: true }; if (typeof cur.lazy === "boolean") { if (typeof cur.loaded === "boolean" && cur.loaded) { treeRowData.noLazyChildren = !(cur.children && cur.children.length); } treeRowData.loading = cur.loading; } } const tmp = [rowRender(row, $index, treeRowData)]; if (cur) { let i = 0; const traverse = (children, parent22) => { if (!(children && children.length && parent22)) return; children.forEach((node) => { const innerTreeRowData = { display: parent22.display && parent22.expanded, level: parent22.level + 1, expanded: false, noLazyChildren: false, loading: false }; const childKey = getRowIdentity(node, rowKey2.value); if (childKey === void 0 || childKey === null) { throw new Error("For nested data item, row-key is required."); } cur = { ...treeData.value[childKey] }; if (cur) { innerTreeRowData.expanded = cur.expanded; cur.level = cur.level || innerTreeRowData.level; cur.display = !!(cur.expanded && innerTreeRowData.display); if (typeof cur.lazy === "boolean") { if (typeof cur.loaded === "boolean" && cur.loaded) { innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length); } innerTreeRowData.loading = cur.loading; } } i++; tmp.push(rowRender(node, $index + i, innerTreeRowData)); if (cur) { const nodes2 = lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value]; traverse(nodes2, cur); } }); }; cur.display = true; const nodes = lazyTreeNodeMap.value[key] || row[childrenColumnName.value]; traverse(nodes, cur); } return tmp; } else { return rowRender(row, $index, void 0); } }; return { wrappedRowRender, tooltipContent, tooltipTrigger }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-body/defaults.mjs var defaultProps = { store: { required: true, type: Object }, stripe: Boolean, tooltipEffect: String, tooltipOptions: { type: Object }, context: { default: () => ({}), type: Object }, rowClassName: [String, Function], rowStyle: [Object, Function], fixed: { type: String, default: "" }, highlight: Boolean }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-body/index.mjs var TableBody = defineComponent({ name: "ElTableBody", props: defaultProps, setup(props) { const instance = getCurrentInstance(); const parent2 = inject(TABLE_INJECTION_KEY); const ns = useNamespace("table"); const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender(props); const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2); watch(props.store.states.hoverRow, (newVal, oldVal) => { if (!props.store.states.isComplex.value || !isClient) return; let raf = window.requestAnimationFrame; if (!raf) { raf = (fn2) => window.setTimeout(fn2, 16); } raf(() => { const el = instance == null ? void 0 : instance.vnode.el; const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`)); const oldRow = rows[oldVal]; const newRow = rows[newVal]; if (oldRow) { removeClass(oldRow, "hover-row"); } if (newRow) { addClass(newRow, "hover-row"); } }); }); onUnmounted(() => { var _a2; (_a2 = removePopper) == null ? void 0 : _a2(); }); return { ns, onColumnsChange, onScrollableChange, wrappedRowRender, tooltipContent, tooltipTrigger }; }, render() { const { wrappedRowRender, store } = this; const data = store.states.data.value || []; return h("tbody", {}, [ data.reduce((acc, row) => { return acc.concat(wrappedRowRender(row, acc.length)); }, []) ]); } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/h-helper.mjs function hColgroup(props) { const isAuto = props.tableLayout === "auto"; let columns2 = props.columns || []; if (isAuto) { if (columns2.every((column2) => column2.width === void 0)) { columns2 = []; } } const getPropsData = (column2) => { const propsData = { key: `${props.tableLayout}_${column2.id}`, style: {}, name: void 0 }; if (isAuto) { propsData.style = { width: `${column2.width}px` }; } else { propsData.name = column2.id; } return propsData; }; return h("colgroup", {}, columns2.map((column2) => h("col", getPropsData(column2)))); } hColgroup.props = ["columns", "tableLayout"]; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs function useMapState() { const table = inject(TABLE_INJECTION_KEY); const store = table == null ? void 0 : table.store; const leftFixedLeafCount = computed2(() => { return store.states.fixedLeafColumnsLength.value; }); const rightFixedLeafCount = computed2(() => { return store.states.rightFixedColumns.value.length; }); const columnsCount = computed2(() => { return store.states.columns.value.length; }); const leftFixedCount = computed2(() => { return store.states.fixedColumns.value.length; }); const rightFixedCount = computed2(() => { return store.states.rightFixedColumns.value.length; }); return { leftFixedLeafCount, rightFixedLeafCount, columnsCount, leftFixedCount, rightFixedCount, columns: store.states.columns }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs function useStyle2(props) { const { columns: columns2 } = useMapState(); const ns = useNamespace("table"); const getCellClasses = (columns22, cellIndex) => { const column2 = columns22[cellIndex]; const classes = [ ns.e("cell"), column2.id, column2.align, column2.labelClassName, ...getFixedColumnsClass(ns.b(), cellIndex, column2.fixed, props.store) ]; if (column2.className) { classes.push(column2.className); } if (!column2.children) { classes.push(ns.is("leaf")); } return classes; }; const getCellStyles = (column2, cellIndex) => { const fixedStyle = getFixedColumnOffset(cellIndex, column2.fixed, props.store); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return fixedStyle; }; return { getCellClasses, getCellStyles, columns: columns2 }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-footer/index.mjs var TableFooter = defineComponent({ name: "ElTableFooter", props: { fixed: { type: String, default: "" }, store: { required: true, type: Object }, summaryMethod: Function, sumText: String, border: Boolean, defaultSort: { type: Object, default: () => { return { prop: "", order: "" }; } } }, setup(props) { const { getCellClasses, getCellStyles, columns: columns2 } = useStyle2(props); const ns = useNamespace("table"); return { ns, getCellClasses, getCellStyles, columns: columns2 }; }, render() { const { columns: columns2, getCellStyles, getCellClasses, summaryMethod, sumText, ns } = this; const data = this.store.states.data.value; let sums = []; if (summaryMethod) { sums = summaryMethod({ columns: columns2, data }); } else { columns2.forEach((column2, index) => { if (index === 0) { sums[index] = sumText; return; } const values2 = data.map((item) => Number(item[column2.property])); const precisions = []; let notNumber = true; values2.forEach((value) => { if (!Number.isNaN(+value)) { notNumber = false; const decimal = `${value}`.split(".")[1]; precisions.push(decimal ? decimal.length : 0); } }); const precision = Math.max.apply(null, precisions); if (!notNumber) { sums[index] = values2.reduce((prev, curr) => { const value = Number(curr); if (!Number.isNaN(+value)) { return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20))); } else { return prev; } }, 0); } else { sums[index] = ""; } }); } return h("table", { class: ns.e("footer"), cellspacing: "0", cellpadding: "0", border: "0" }, [ hColgroup({ columns: columns2 }), h("tbody", [ h("tr", {}, [ ...columns2.map((column2, cellIndex) => h("td", { key: cellIndex, colspan: column2.colSpan, rowspan: column2.rowSpan, class: getCellClasses(columns2, cellIndex), style: getCellStyles(column2, cellIndex) }, [ h("div", { class: ["cell", column2.labelClassName] }, [sums[cellIndex]]) ])) ]) ]) ]); } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table/utils-helper.mjs function useUtils2(store) { const setCurrentRow = (row) => { store.commit("setCurrentRow", row); }; const getSelectionRows = () => { return store.getSelectionRows(); }; const toggleRowSelection = (row, selected) => { store.toggleRowSelection(row, selected, false); store.updateAllSelected(); }; const clearSelection = () => { store.clearSelection(); }; const clearFilter = (columnKeys) => { store.clearFilter(columnKeys); }; const toggleAllSelection = () => { store.commit("toggleAllSelection"); }; const toggleRowExpansion = (row, expanded) => { store.toggleRowExpansionAdapter(row, expanded); }; const clearSort = () => { store.clearSort(); }; const sort = (prop, order) => { store.commit("sort", { prop, order }); }; return { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table/style-helper.mjs function useStyle3(props, layout2, store, table) { const isHidden2 = ref(false); const renderExpanded = ref(null); const resizeProxyVisible = ref(false); const setDragVisible = (visible) => { resizeProxyVisible.value = visible; }; const resizeState = ref({ width: null, height: null, headerHeight: null }); const isGroup = ref(false); const scrollbarViewStyle = { display: "inline-block", verticalAlign: "middle" }; const tableWidth = ref(); const tableScrollHeight = ref(0); const bodyScrollHeight = ref(0); const headerScrollHeight = ref(0); const footerScrollHeight = ref(0); watchEffect(() => { layout2.setHeight(props.height); }); watchEffect(() => { layout2.setMaxHeight(props.maxHeight); }); watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey2]) => { if (!unref(rowKey2) || !unref(currentRowKey)) return; store.setCurrentRowKey(`${currentRowKey}`); }, { immediate: true }); watch(() => props.data, (data) => { table.store.commit("setData", data); }, { immediate: true, deep: true }); watchEffect(() => { if (props.expandRowKeys) { store.setExpandRowKeysAdapter(props.expandRowKeys); } }); const handleMouseLeave = () => { table.store.commit("setHoverRow", null); if (table.hoverState) table.hoverState = null; }; const handleHeaderFooterMousewheel = (event, data) => { const { pixelX, pixelY } = data; if (Math.abs(pixelX) >= Math.abs(pixelY)) { table.refs.bodyWrapper.scrollLeft += data.pixelX / 5; } }; const shouldUpdateHeight = computed2(() => { return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0; }); const tableBodyStyles = computed2(() => { return { width: layout2.bodyWidth.value ? `${layout2.bodyWidth.value}px` : "" }; }); const doLayout = () => { if (shouldUpdateHeight.value) { layout2.updateElsHeight(); } layout2.updateColumnsWidth(); requestAnimationFrame(syncPosition); }; onMounted(async () => { await nextTick(); store.updateColumns(); bindEvents(); requestAnimationFrame(doLayout); const el = table.vnode.el; const tableHeader = table.refs.headerWrapper; if (props.flexible && el && el.parentElement) { el.parentElement.style.minWidth = "0"; } resizeState.value = { width: tableWidth.value = el.offsetWidth, height: el.offsetHeight, headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null }; store.states.columns.value.forEach((column2) => { if (column2.filteredValue && column2.filteredValue.length) { table.store.commit("filterChange", { column: column2, values: column2.filteredValue, silent: true }); } }); table.$ready = true; }); const setScrollClassByEl = (el, className) => { if (!el) return; const classList = Array.from(el.classList).filter((item) => !item.startsWith("is-scrolling-")); classList.push(layout2.scrollX.value ? className : "is-scrolling-none"); el.className = classList.join(" "); }; const setScrollClass = (className) => { const { tableWrapper } = table.refs; setScrollClassByEl(tableWrapper, className); }; const hasScrollClass = (className) => { const { tableWrapper } = table.refs; return !!(tableWrapper && tableWrapper.classList.contains(className)); }; const syncPosition = function() { if (!table.refs.scrollBarRef) return; if (!layout2.scrollX.value) { const scrollingNoneClass = "is-scrolling-none"; if (!hasScrollClass(scrollingNoneClass)) { setScrollClass(scrollingNoneClass); } return; } const scrollContainer = table.refs.scrollBarRef.wrapRef; if (!scrollContainer) return; const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer; const { headerWrapper, footerWrapper } = table.refs; if (headerWrapper) headerWrapper.scrollLeft = scrollLeft; if (footerWrapper) footerWrapper.scrollLeft = scrollLeft; const maxScrollLeftPosition = scrollWidth - offsetWidth - 1; if (scrollLeft >= maxScrollLeftPosition) { setScrollClass("is-scrolling-right"); } else if (scrollLeft === 0) { setScrollClass("is-scrolling-left"); } else { setScrollClass("is-scrolling-middle"); } }; const bindEvents = () => { if (!table.refs.scrollBarRef) return; if (table.refs.scrollBarRef.wrapRef) { useEventListener(table.refs.scrollBarRef.wrapRef, "scroll", syncPosition, { passive: true }); } if (props.fit) { useResizeObserver(table.vnode.el, resizeListener); } else { useEventListener(window, "resize", resizeListener); } useResizeObserver(table.refs.bodyWrapper, () => { var _a2, _b; resizeListener(); (_b = (_a2 = table.refs) == null ? void 0 : _a2.scrollBarRef) == null ? void 0 : _b.update(); }); }; const resizeListener = () => { var _a2, _b, _c; const el = table.vnode.el; if (!table.$ready || !el) return; let shouldUpdateLayout = false; const { width: oldWidth, height: oldHeight, headerHeight: oldHeaderHeight } = resizeState.value; const width = tableWidth.value = el.offsetWidth; if (oldWidth !== width) { shouldUpdateLayout = true; } const height = el.offsetHeight; if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) { shouldUpdateLayout = true; } const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : (_a2 = table.refs.tableHeaderRef) == null ? void 0 : _a2.$el; if (props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) !== oldHeaderHeight) { shouldUpdateLayout = true; } tableScrollHeight.value = ((_b = table.refs.tableWrapper) == null ? void 0 : _b.scrollHeight) || 0; headerScrollHeight.value = (tableHeader == null ? void 0 : tableHeader.scrollHeight) || 0; footerScrollHeight.value = ((_c = table.refs.footerWrapper) == null ? void 0 : _c.offsetHeight) || 0; bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value; if (shouldUpdateLayout) { resizeState.value = { width, height, headerHeight: props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) || 0 }; doLayout(); } }; const tableSize = useFormSize(); const bodyWidth = computed2(() => { const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout2; return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : ""; }); const tableLayout = computed2(() => { if (props.maxHeight) return "fixed"; return props.tableLayout; }); const emptyBlockStyle = computed2(() => { if (props.data && props.data.length) return null; let height = "100%"; if (props.height && bodyScrollHeight.value) { height = `${bodyScrollHeight.value}px`; } const width = tableWidth.value; return { width: width ? `${width}px` : "", height }; }); const tableInnerStyle = computed2(() => { if (props.height) { return { height: !Number.isNaN(Number(props.height)) ? `${props.height}px` : props.height }; } if (props.maxHeight) { return { maxHeight: !Number.isNaN(Number(props.maxHeight)) ? `${props.maxHeight}px` : props.maxHeight }; } return {}; }); const scrollbarStyle = computed2(() => { if (props.height) { return { height: "100%" }; } if (props.maxHeight) { if (!Number.isNaN(Number(props.maxHeight))) { const maxHeight = props.maxHeight; const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight); if (reachMaxHeight) { return { maxHeight: `${tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value}px` }; } } else { return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` }; } } return {}; }); const handleFixedMousewheel = (event, data) => { const bodyWrapper = table.refs.bodyWrapper; if (Math.abs(data.spinY) > 0) { const currentScrollTop = bodyWrapper.scrollTop; if (data.pixelY < 0 && currentScrollTop !== 0) { event.preventDefault(); } if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) { event.preventDefault(); } bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5); } else { bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5); } }; return { isHidden: isHidden2, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, handleFixedMousewheel, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, tableInnerStyle, scrollbarStyle }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table/key-render-helper.mjs function useKeyRender(table) { const observer = ref(); const initWatchDom = () => { const el = table.vnode.el; const columnsWrapper = el.querySelector(".hidden-columns"); const config = { childList: true, subtree: true }; const updateOrderFns = table.store.states.updateOrderFns; observer.value = new MutationObserver(() => { updateOrderFns.forEach((fn2) => fn2()); }); observer.value.observe(columnsWrapper, config); }; onMounted(() => { initWatchDom(); }); onUnmounted(() => { var _a2; (_a2 = observer.value) == null ? void 0 : _a2.disconnect(); }); } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table/defaults.mjs var defaultProps2 = { data: { type: Array, default: () => [] }, size: useSizeProp, width: [String, Number], height: [String, Number], maxHeight: [String, Number], fit: { type: Boolean, default: true }, stripe: Boolean, border: Boolean, rowKey: [String, Function], showHeader: { type: Boolean, default: true }, showSummary: Boolean, sumText: String, summaryMethod: Function, rowClassName: [String, Function], rowStyle: [Object, Function], cellClassName: [String, Function], cellStyle: [Object, Function], headerRowClassName: [String, Function], headerRowStyle: [Object, Function], headerCellClassName: [String, Function], headerCellStyle: [Object, Function], highlightCurrentRow: Boolean, currentRowKey: [String, Number], emptyText: String, expandRowKeys: Array, defaultExpandAll: Boolean, defaultSort: Object, tooltipEffect: String, tooltipOptions: Object, spanMethod: Function, selectOnIndeterminate: { type: Boolean, default: true }, indent: { type: Number, default: 16 }, treeProps: { type: Object, default: () => { return { hasChildren: "hasChildren", children: "children" }; } }, lazy: Boolean, load: Function, style: { type: Object, default: () => ({}) }, className: { type: String, default: "" }, tableLayout: { type: String, default: "fixed" }, scrollbarAlwaysOn: { type: Boolean, default: false }, flexible: Boolean }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs var useScrollbar = () => { const scrollBarRef = ref(); const scrollTo = (options, yCoord) => { const scrollbar = scrollBarRef.value; if (scrollbar) { scrollbar.scrollTo(options, yCoord); } }; const setScrollPosition = (position, offset2) => { const scrollbar = scrollBarRef.value; if (scrollbar && isNumber(offset2) && ["Top", "Left"].includes(position)) { scrollbar[`setScroll${position}`](offset2); } }; const setScrollTop = (top) => setScrollPosition("Top", top); const setScrollLeft = (left2) => setScrollPosition("Left", left2); return { scrollBarRef, scrollTo, setScrollTop, setScrollLeft }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table.mjs var tableIdSeed = 1; var _sfc_main121 = defineComponent({ name: "ElTable", directives: { Mousewheel }, components: { TableHeader, TableBody, TableFooter, ElScrollbar, hColgroup }, props: defaultProps2, emits: [ "select", "select-all", "selection-change", "cell-mouse-enter", "cell-mouse-leave", "cell-contextmenu", "cell-click", "cell-dblclick", "row-click", "row-contextmenu", "row-dblclick", "header-click", "header-contextmenu", "sort-change", "filter-change", "current-change", "header-dragend", "expand-change" ], setup(props) { const { t } = useLocale(); const ns = useNamespace("table"); const table = getCurrentInstance(); provide(TABLE_INJECTION_KEY, table); const store = createStore(table, props); table.store = store; const layout2 = new TableLayout({ store: table.store, table, fit: props.fit, showHeader: props.showHeader }); table.layout = layout2; const isEmpty3 = computed2(() => (store.states.data.value || []).length === 0); const { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort } = useUtils2(store); const { isHidden: isHidden2, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, handleFixedMousewheel, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, tableInnerStyle, scrollbarStyle } = useStyle3(props, layout2, store, table); const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar(); const debouncedUpdateLayout = debounce_default(doLayout, 50); const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`; table.tableId = tableId; table.state = { isGroup, resizeState, doLayout, debouncedUpdateLayout }; const computedSumText = computed2(() => props.sumText || t("el.table.sumText")); const computedEmptyText = computed2(() => { return props.emptyText || t("el.table.emptyText"); }); useKeyRender(table); return { ns, layout: layout2, store, handleHeaderFooterMousewheel, handleMouseLeave, tableId, tableSize, isHidden: isHidden2, isEmpty: isEmpty3, renderExpanded, resizeProxyVisible, resizeState, isGroup, bodyWidth, tableBodyStyles, emptyBlockStyle, debouncedUpdateLayout, handleFixedMousewheel, setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, doLayout, sort, t, setDragVisible, context: table, computedSumText, computedEmptyText, tableLayout, scrollbarViewStyle, tableInnerStyle, scrollbarStyle, scrollBarRef, scrollTo, setScrollLeft, setScrollTop }; } }); var _hoisted_160 = ["data-prefix"]; var _hoisted_238 = { ref: "hiddenColumns", class: "hidden-columns" }; function _sfc_render29(_ctx, _cache, $props, $setup, $data, $options) { const _component_hColgroup = resolveComponent("hColgroup"); const _component_table_header = resolveComponent("table-header"); const _component_table_body = resolveComponent("table-body"); const _component_el_scrollbar = resolveComponent("el-scrollbar"); const _component_table_footer = resolveComponent("table-footer"); const _directive_mousewheel = resolveDirective("mousewheel"); return openBlock(), createElementBlock("div", { ref: "tableWrapper", class: normalizeClass([ { [_ctx.ns.m("fit")]: _ctx.fit, [_ctx.ns.m("striped")]: _ctx.stripe, [_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup, [_ctx.ns.m("hidden")]: _ctx.isHidden, [_ctx.ns.m("group")]: _ctx.isGroup, [_ctx.ns.m("fluid-height")]: _ctx.maxHeight, [_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value, [_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value, [_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value, [_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100, "has-footer": _ctx.showSummary }, _ctx.ns.m(_ctx.tableSize), _ctx.className, _ctx.ns.b(), _ctx.ns.m(`layout-${_ctx.tableLayout}`) ]), style: normalizeStyle(_ctx.style), "data-prefix": _ctx.ns.namespace.value, onMouseleave: _cache[0] || (_cache[0] = ($event) => _ctx.handleMouseLeave()) }, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("inner-wrapper")), style: normalizeStyle(_ctx.tableInnerStyle) }, [ createBaseVNode("div", _hoisted_238, [ renderSlot(_ctx.$slots, "default") ], 512), _ctx.showHeader && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", { key: 0, ref: "headerWrapper", class: normalizeClass(_ctx.ns.e("header-wrapper")) }, [ createBaseVNode("table", { ref: "tableHeader", class: normalizeClass(_ctx.ns.e("header")), style: normalizeStyle(_ctx.tableBodyStyles), border: "0", cellpadding: "0", cellspacing: "0" }, [ createVNode(_component_hColgroup, { columns: _ctx.store.states.columns.value, "table-layout": _ctx.tableLayout }, null, 8, ["columns", "table-layout"]), createVNode(_component_table_header, { ref: "tableHeaderRef", border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, onSetDragVisible: _ctx.setDragVisible }, null, 8, ["border", "default-sort", "store", "onSetDragVisible"]) ], 6) ], 2)), [ [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel] ]) : createCommentVNode("v-if", true), createBaseVNode("div", { ref: "bodyWrapper", class: normalizeClass(_ctx.ns.e("body-wrapper")) }, [ createVNode(_component_el_scrollbar, { ref: "scrollBarRef", "view-style": _ctx.scrollbarViewStyle, "wrap-style": _ctx.scrollbarStyle, always: _ctx.scrollbarAlwaysOn }, { default: withCtx(() => [ createBaseVNode("table", { ref: "tableBody", class: normalizeClass(_ctx.ns.e("body")), cellspacing: "0", cellpadding: "0", border: "0", style: normalizeStyle({ width: _ctx.bodyWidth, tableLayout: _ctx.tableLayout }) }, [ createVNode(_component_hColgroup, { columns: _ctx.store.states.columns.value, "table-layout": _ctx.tableLayout }, null, 8, ["columns", "table-layout"]), _ctx.showHeader && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_header, { key: 0, ref: "tableHeaderRef", border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, onSetDragVisible: _ctx.setDragVisible }, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])) : createCommentVNode("v-if", true), createVNode(_component_table_body, { context: _ctx.context, highlight: _ctx.highlightCurrentRow, "row-class-name": _ctx.rowClassName, "tooltip-effect": _ctx.tooltipEffect, "tooltip-options": _ctx.tooltipOptions, "row-style": _ctx.rowStyle, store: _ctx.store, stripe: _ctx.stripe }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"]) ], 6), _ctx.isEmpty ? (openBlock(), createElementBlock("div", { key: 0, ref: "emptyBlock", style: normalizeStyle(_ctx.emptyBlockStyle), class: normalizeClass(_ctx.ns.e("empty-block")) }, [ createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, [ renderSlot(_ctx.$slots, "empty", {}, () => [ createTextVNode(toDisplayString(_ctx.computedEmptyText), 1) ]) ], 2) ], 6)) : createCommentVNode("v-if", true), _ctx.$slots.append ? (openBlock(), createElementBlock("div", { key: 1, ref: "appendWrapper", class: normalizeClass(_ctx.ns.e("append-wrapper")) }, [ renderSlot(_ctx.$slots, "append") ], 2)) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["view-style", "wrap-style", "always"]) ], 2), _ctx.showSummary ? withDirectives((openBlock(), createElementBlock("div", { key: 1, ref: "footerWrapper", class: normalizeClass(_ctx.ns.e("footer-wrapper")) }, [ createVNode(_component_table_footer, { border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, style: normalizeStyle(_ctx.tableBodyStyles), "sum-text": _ctx.computedSumText, "summary-method": _ctx.summaryMethod }, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"]) ], 2)), [ [vShow, !_ctx.isEmpty], [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel] ]) : createCommentVNode("v-if", true), _ctx.border || _ctx.isGroup ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass(_ctx.ns.e("border-left-patch")) }, null, 2)) : createCommentVNode("v-if", true) ], 6), withDirectives(createBaseVNode("div", { ref: "resizeProxy", class: normalizeClass(_ctx.ns.e("column-resize-proxy")) }, null, 2), [ [vShow, _ctx.resizeProxyVisible] ]) ], 46, _hoisted_160); } var Table = _export_sfc(_sfc_main121, [["render", _sfc_render29], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/config.mjs var defaultClassNames = { selection: "table-column--selection", expand: "table__expand-column" }; var cellStarts = { default: { order: "" }, selection: { width: 48, minWidth: 48, realWidth: 48, order: "" }, expand: { width: 48, minWidth: 48, realWidth: 48, order: "" }, index: { width: 48, minWidth: 48, realWidth: 48, order: "" } }; var getDefaultClassName = (type4) => { return defaultClassNames[type4] || ""; }; var cellForced = { selection: { renderHeader({ store }) { function isDisabled() { return store.states.data.value && store.states.data.value.length === 0; } return h(ElCheckbox, { disabled: isDisabled(), size: store.states.tableSize.value, indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value, "onUpdate:modelValue": store.toggleAllSelection, modelValue: store.states.isAllSelected.value }); }, renderCell({ row, column: column2, store, $index }) { return h(ElCheckbox, { disabled: column2.selectable ? !column2.selectable.call(null, row, $index) : false, size: store.states.tableSize.value, onChange: () => { store.commit("rowSelectedChanged", row); }, onClick: (event) => event.stopPropagation(), modelValue: store.isSelected(row) }); }, sortable: false, resizable: false }, index: { renderHeader({ column: column2 }) { return column2.label || "#"; }, renderCell({ column: column2, $index }) { let i = $index + 1; const index = column2.index; if (typeof index === "number") { i = $index + index; } else if (typeof index === "function") { i = index($index); } return h("div", {}, [i]); }, sortable: false }, expand: { renderHeader({ column: column2 }) { return column2.label || ""; }, renderCell({ row, store, expanded }) { const { ns } = store; const classes = [ns.e("expand-icon")]; if (expanded) { classes.push(ns.em("expand-icon", "expanded")); } const callback = function(e) { e.stopPropagation(); store.toggleRowExpansion(row); }; return h("div", { class: classes, onClick: callback }, { default: () => { return [ h(ElIcon, null, { default: () => { return [h(arrow_right_default)]; } }) ]; } }); }, sortable: false, resizable: false } }; function defaultRenderCell({ row, column: column2, $index }) { var _a2; const property2 = column2.property; const value = property2 && getProp(row, property2).value; if (column2 && column2.formatter) { return column2.formatter(row, column2, value, $index); } return ((_a2 = value == null ? void 0 : value.toString) == null ? void 0 : _a2.call(value)) || ""; } function treeCellPrefix({ row, treeNode, store }, createPlaceholder = false) { const { ns } = store; if (!treeNode) { if (createPlaceholder) { return [ h("span", { class: ns.e("placeholder") }) ]; } return null; } const ele = []; const callback = function(e) { e.stopPropagation(); if (treeNode.loading) { return; } store.loadOrToggle(row); }; if (treeNode.indent) { ele.push(h("span", { class: ns.e("indent"), style: { "padding-left": `${treeNode.indent}px` } })); } if (typeof treeNode.expanded === "boolean" && !treeNode.noLazyChildren) { const expandClasses = [ ns.e("expand-icon"), treeNode.expanded ? ns.em("expand-icon", "expanded") : "" ]; let icon = arrow_right_default; if (treeNode.loading) { icon = loading_default; } ele.push(h("div", { class: expandClasses, onClick: callback }, { default: () => { return [ h(ElIcon, { class: { [ns.is("loading")]: treeNode.loading } }, { default: () => [h(icon)] }) ]; } })); } else { ele.push(h("span", { class: ns.e("placeholder") })); } return ele; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs function getAllAliases(props, aliases) { return props.reduce((prev, cur) => { prev[cur] = cur; return prev; }, aliases); } function useWatcher2(owner, props_) { const instance = getCurrentInstance(); const registerComplexWatchers = () => { const props = ["fixed"]; const aliases = { realWidth: "width", realMinWidth: "minWidth" }; const allAliases = getAllAliases(props, aliases); Object.keys(allAliases).forEach((key) => { const columnKey = aliases[key]; if (hasOwn(props_, columnKey)) { watch(() => props_[columnKey], (newVal) => { let value = newVal; if (columnKey === "width" && key === "realWidth") { value = parseWidth(newVal); } if (columnKey === "minWidth" && key === "realMinWidth") { value = parseMinWidth(newVal); } instance.columnConfig.value[columnKey] = value; instance.columnConfig.value[key] = value; const updateColumns = columnKey === "fixed"; owner.value.store.scheduleLayout(updateColumns); }); } }); }; const registerNormalWatchers = () => { const props = [ "label", "filters", "filterMultiple", "sortable", "index", "formatter", "className", "labelClassName", "showOverflowTooltip" ]; const aliases = { property: "prop", align: "realAlign", headerAlign: "realHeaderAlign" }; const allAliases = getAllAliases(props, aliases); Object.keys(allAliases).forEach((key) => { const columnKey = aliases[key]; if (hasOwn(props_, columnKey)) { watch(() => props_[columnKey], (newVal) => { instance.columnConfig.value[key] = newVal; }); } }); }; return { registerComplexWatchers, registerNormalWatchers }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs function useRender2(props, slots, owner) { const instance = getCurrentInstance(); const columnId = ref(""); const isSubColumn = ref(false); const realAlign = ref(); const realHeaderAlign = ref(); const ns = useNamespace("table"); watchEffect(() => { realAlign.value = props.align ? `is-${props.align}` : null; realAlign.value; }); watchEffect(() => { realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value; realHeaderAlign.value; }); const columnOrTableParent = computed2(() => { let parent2 = instance.vnode.vParent || instance.parent; while (parent2 && !parent2.tableId && !parent2.columnId) { parent2 = parent2.vnode.vParent || parent2.parent; } return parent2; }); const hasTreeColumn = computed2(() => { const { store } = instance.parent; if (!store) return false; const { treeData } = store.states; const treeDataValue = treeData.value; return treeDataValue && Object.keys(treeDataValue).length > 0; }); const realWidth = ref(parseWidth(props.width)); const realMinWidth = ref(parseMinWidth(props.minWidth)); const setColumnWidth = (column2) => { if (realWidth.value) column2.width = realWidth.value; if (realMinWidth.value) { column2.minWidth = realMinWidth.value; } if (!realWidth.value && realMinWidth.value) { column2.width = void 0; } if (!column2.minWidth) { column2.minWidth = 80; } column2.realWidth = Number(column2.width === void 0 ? column2.minWidth : column2.width); return column2; }; const setColumnForcedProps = (column2) => { const type4 = column2.type; const source = cellForced[type4] || {}; Object.keys(source).forEach((prop) => { const value = source[prop]; if (prop !== "className" && value !== void 0) { column2[prop] = value; } }); const className = getDefaultClassName(type4); if (className) { const forceClass = `${unref(ns.namespace)}-${className}`; column2.className = column2.className ? `${column2.className} ${forceClass}` : forceClass; } return column2; }; const checkSubColumn = (children) => { if (Array.isArray(children)) { children.forEach((child) => check(child)); } else { check(children); } function check(item) { var _a2; if (((_a2 = item == null ? void 0 : item.type) == null ? void 0 : _a2.name) === "ElTableColumn") { item.vParent = instance; } } }; const setColumnRenders = (column2) => { if (props.renderHeader) { debugWarn("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."); } else if (column2.type !== "selection") { column2.renderHeader = (scope) => { instance.columnConfig.value["label"]; const renderHeader = slots.header; return renderHeader ? renderHeader(scope) : column2.label; }; } let originRenderCell = column2.renderCell; if (column2.type === "expand") { column2.renderCell = (data) => h("div", { class: "cell" }, [originRenderCell(data)]); owner.value.renderExpanded = (data) => { return slots.default ? slots.default(data) : slots.default; }; } else { originRenderCell = originRenderCell || defaultRenderCell; column2.renderCell = (data) => { let children = null; if (slots.default) { const vnodes = slots.default(data); children = vnodes.some((v2) => v2.type !== Comment) ? vnodes : originRenderCell(data); } else { children = originRenderCell(data); } const { columns: columns2 } = owner.value.store.states; const firstUserColumnIndex = columns2.value.findIndex((item) => item.type === "default"); const shouldCreatePlaceholder = hasTreeColumn.value && data.cellIndex === firstUserColumnIndex; const prefix = treeCellPrefix(data, shouldCreatePlaceholder); const props2 = { class: "cell", style: {} }; if (column2.showOverflowTooltip) { props2.class = `${props2.class} ${unref(ns.namespace)}-tooltip`; props2.style = { width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` }; } checkSubColumn(children); return h("div", props2, [prefix, children]); }; } return column2; }; const getPropsData = (...propsKey) => { return propsKey.reduce((prev, cur) => { if (Array.isArray(cur)) { cur.forEach((key) => { prev[key] = props[key]; }); } return prev; }, {}); }; const getColumnElIndex = (children, child) => { return Array.prototype.indexOf.call(children, child); }; const updateColumnOrder = () => { owner.value.store.commit("updateColumnOrder", instance.columnConfig.value); }; return { columnId, realAlign, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, updateColumnOrder }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-column/defaults.mjs var defaultProps3 = { type: { type: String, default: "default" }, label: String, className: String, labelClassName: String, property: String, prop: String, width: { type: [String, Number], default: "" }, minWidth: { type: [String, Number], default: "" }, renderHeader: Function, sortable: { type: [Boolean, String], default: false }, sortMethod: Function, sortBy: [String, Function, Array], resizable: { type: Boolean, default: true }, columnKey: String, align: String, headerAlign: String, showOverflowTooltip: [Boolean, Object], fixed: [Boolean, String], formatter: Function, selectable: Function, reserveSelection: Boolean, filterMethod: Function, filteredValue: Array, filters: Array, filterPlacement: String, filterMultiple: { type: Boolean, default: true }, index: [Number, Function], sortOrders: { type: Array, default: () => { return ["ascending", "descending", null]; }, validator: (val) => { return val.every((order) => ["ascending", "descending", null].includes(order)); } } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/src/table-column/index.mjs var columnIdSeed = 1; var ElTableColumn = defineComponent({ name: "ElTableColumn", components: { ElCheckbox }, props: defaultProps3, setup(props, { slots }) { const instance = getCurrentInstance(); const columnConfig = ref({}); const owner = computed2(() => { let parent22 = instance.parent; while (parent22 && !parent22.tableId) { parent22 = parent22.parent; } return parent22; }); const { registerNormalWatchers, registerComplexWatchers } = useWatcher2(owner, props); const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = useRender2(props, slots, owner); const parent2 = columnOrTableParent.value; columnId.value = `${parent2.tableId || parent2.columnId}_column_${columnIdSeed++}`; onBeforeMount(() => { isSubColumn.value = owner.value !== parent2; const type4 = props.type || "default"; const sortable = props.sortable === "" ? true : props.sortable; const defaults2 = { ...cellStarts[type4], id: columnId.value, type: type4, property: props.prop || props.property, align: realAlign, headerAlign: realHeaderAlign, showOverflowTooltip: props.showOverflowTooltip, filterable: props.filters || props.filterMethod, filteredValue: [], filterPlacement: "", isColumnGroup: false, isSubColumn: false, filterOpened: false, sortable, index: props.index, rawColumnKey: instance.vnode.key }; const basicProps = [ "columnKey", "label", "className", "labelClassName", "type", "renderHeader", "formatter", "fixed", "resizable" ]; const sortProps = ["sortMethod", "sortBy", "sortOrders"]; const selectProps = ["selectable", "reserveSelection"]; const filterProps = [ "filterMethod", "filters", "filterMultiple", "filterOpened", "filteredValue", "filterPlacement" ]; let column2 = getPropsData(basicProps, sortProps, selectProps, filterProps); column2 = mergeOptions(defaults2, column2); const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps); column2 = chains(column2); columnConfig.value = column2; registerNormalWatchers(); registerComplexWatchers(); }); onMounted(() => { var _a2; const parent22 = columnOrTableParent.value; const children = isSubColumn.value ? parent22.vnode.el.children : (_a2 = parent22.refs.hiddenColumns) == null ? void 0 : _a2.children; const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el); columnConfig.value.getColumnIndex = getColumnIndex; const columnIndex = getColumnIndex(); columnIndex > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? parent22.columnConfig.value : null, updateColumnOrder); }); onBeforeUnmount(() => { owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? parent2.columnConfig.value : null, updateColumnOrder); }); instance.columnId = columnId.value; instance.columnConfig = columnConfig; return; }, render() { var _a2, _b, _c; try { const renderDefault = (_b = (_a2 = this.$slots).default) == null ? void 0 : _b.call(_a2, { row: {}, column: {}, $index: -1 }); const children = []; if (Array.isArray(renderDefault)) { for (const childNode of renderDefault) { if (((_c = childNode.type) == null ? void 0 : _c.name) === "ElTableColumn" || childNode.shapeFlag & 2) { children.push(childNode); } else if (childNode.type === Fragment && Array.isArray(childNode.children)) { childNode.children.forEach((vnode2) => { if ((vnode2 == null ? void 0 : vnode2.patchFlag) !== 1024 && !isString(vnode2 == null ? void 0 : vnode2.children)) { children.push(vnode2); } }); } } } const vnode = h("div", children); return vnode; } catch (e) { return h("div", []); } } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table/index.mjs var ElTable = withInstall(Table, { TableColumn: ElTableColumn }); var ElTableColumn2 = withNoopInstall(ElTableColumn); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/constants.mjs var SortOrder = ((SortOrder2) => { SortOrder2["ASC"] = "asc"; SortOrder2["DESC"] = "desc"; return SortOrder2; })(SortOrder || {}); var Alignment = ((Alignment2) => { Alignment2["CENTER"] = "center"; Alignment2["RIGHT"] = "right"; return Alignment2; })(Alignment || {}); var FixedDir = ((FixedDir2) => { FixedDir2["LEFT"] = "left"; FixedDir2["RIGHT"] = "right"; return FixedDir2; })(FixedDir || {}); var oppositeOrderMap = { [ "asc" /* ASC */ ]: "desc", [ "desc" /* DESC */ ]: "asc" /* ASC */ }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/private.mjs var placeholderSign = Symbol("placeholder"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs var calcColumnStyle = (column2, fixedColumn, fixed) => { var _a2; const flex = { flexGrow: 0, flexShrink: 0, ...fixed ? {} : { flexGrow: column2.flexGrow || 0, flexShrink: column2.flexShrink || 1 } }; if (!fixed) { flex.flexShrink = 1; } const style = { ...(_a2 = column2.style) != null ? _a2 : {}, ...flex, flexBasis: "auto", width: column2.width }; if (!fixedColumn) { if (column2.maxWidth) style.maxWidth = column2.maxWidth; if (column2.minWidth) style.minWidth = column2.minWidth; } return style; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs function useColumns(props, columns2, fixed) { const visibleColumns = computed2(() => { return unref(columns2).filter((column2) => !column2.hidden); }); const fixedColumnsOnLeft = computed2(() => unref(visibleColumns).filter((column2) => column2.fixed === "left" || column2.fixed === true)); const fixedColumnsOnRight = computed2(() => unref(visibleColumns).filter((column2) => column2.fixed === "right")); const normalColumns = computed2(() => unref(visibleColumns).filter((column2) => !column2.fixed)); const mainColumns = computed2(() => { const ret = []; unref(fixedColumnsOnLeft).forEach((column2) => { ret.push({ ...column2, placeholderSign }); }); unref(normalColumns).forEach((column2) => { ret.push(column2); }); unref(fixedColumnsOnRight).forEach((column2) => { ret.push({ ...column2, placeholderSign }); }); return ret; }); const hasFixedColumns = computed2(() => { return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length; }); const columnsStyles = computed2(() => { const _columns = unref(columns2); return _columns.reduce((style, column2) => { style[column2.key] = calcColumnStyle(column2, unref(fixed), props.fixed); return style; }, {}); }); const columnsTotalWidth = computed2(() => { return unref(visibleColumns).reduce((width, column2) => width + column2.width, 0); }); const getColumn = (key) => { return unref(columns2).find((column2) => column2.key === key); }; const getColumnStyle = (key) => { return unref(columnsStyles)[key]; }; const updateColumnWidth = (column2, width) => { column2.width = width; }; function onColumnSorted(e) { var _a2; const { key } = e.currentTarget.dataset; if (!key) return; const { sortState, sortBy: sortBy2 } = props; let order = SortOrder.ASC; if (isObject(sortState)) { order = oppositeOrderMap[sortState[key]]; } else { order = oppositeOrderMap[sortBy2.order]; } (_a2 = props.onColumnSort) == null ? void 0 : _a2.call(props, { column: getColumn(key), key, order }); } return { columns: columns2, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, normalColumns, visibleColumns, getColumn, getColumnStyle, updateColumnWidth, onColumnSorted }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs var useScrollbar2 = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => { const scrollPos = ref({ scrollLeft: 0, scrollTop: 0 }); function doScroll(params) { var _a2, _b, _c; const { scrollTop } = params; (_a2 = mainTableRef.value) == null ? void 0 : _a2.scrollTo(params); (_b = leftTableRef.value) == null ? void 0 : _b.scrollToTop(scrollTop); (_c = rightTableRef.value) == null ? void 0 : _c.scrollToTop(scrollTop); } function scrollTo(params) { scrollPos.value = params; doScroll(params); } function scrollToTop(scrollTop) { scrollPos.value.scrollTop = scrollTop; doScroll(unref(scrollPos)); } function scrollToLeft(scrollLeft) { var _a2, _b; scrollPos.value.scrollLeft = scrollLeft; (_b = (_a2 = mainTableRef.value) == null ? void 0 : _a2.scrollTo) == null ? void 0 : _b.call(_a2, unref(scrollPos)); } function onScroll(params) { var _a2; scrollTo(params); (_a2 = props.onScroll) == null ? void 0 : _a2.call(props, params); } function onVerticalScroll({ scrollTop }) { const { scrollTop: currentScrollTop } = unref(scrollPos); if (scrollTop !== currentScrollTop) scrollToTop(scrollTop); } function scrollToRow(row, strategy = "auto") { var _a2; (_a2 = mainTableRef.value) == null ? void 0 : _a2.scrollToRow(row, strategy); } watch(() => unref(scrollPos).scrollTop, (cur, prev) => { if (cur > prev) onMaybeEndReached(); }); return { scrollPos, scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs var useRow = (props, { mainTableRef, leftTableRef, rightTableRef }) => { const vm = getCurrentInstance(); const { emit } = vm; const isResetting = shallowRef(false); const hoveringRowKey = shallowRef(null); const expandedRowKeys = ref(props.defaultExpandedRowKeys || []); const lastRenderedRowIndex = ref(-1); const resetIndex = shallowRef(null); const rowHeights = ref({}); const pendingRowHeights = ref({}); const leftTableHeights = shallowRef({}); const mainTableHeights = shallowRef({}); const rightTableHeights = shallowRef({}); const isDynamic = computed2(() => isNumber(props.estimatedRowHeight)); function onRowsRendered(params) { var _a2; (_a2 = props.onRowsRendered) == null ? void 0 : _a2.call(props, params); if (params.rowCacheEnd > unref(lastRenderedRowIndex)) { lastRenderedRowIndex.value = params.rowCacheEnd; } } function onRowHovered({ hovered, rowKey: rowKey2 }) { hoveringRowKey.value = hovered ? rowKey2 : null; } function onRowExpanded({ expanded, rowData, rowIndex, rowKey: rowKey2 }) { var _a2, _b; const _expandedRowKeys = [...unref(expandedRowKeys)]; const currentKeyIndex = _expandedRowKeys.indexOf(rowKey2); if (expanded) { if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey2); } else { if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1); } expandedRowKeys.value = _expandedRowKeys; emit("update:expandedRowKeys", _expandedRowKeys); (_a2 = props.onRowExpand) == null ? void 0 : _a2.call(props, { expanded, rowData, rowIndex, rowKey: rowKey2 }); (_b = props.onExpandedRowsChange) == null ? void 0 : _b.call(props, _expandedRowKeys); } const flushingRowHeights = debounce_default(() => { var _a2, _b, _c, _d; isResetting.value = true; rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) }; resetAfterIndex(unref(resetIndex), false); pendingRowHeights.value = {}; resetIndex.value = null; (_a2 = mainTableRef.value) == null ? void 0 : _a2.forceUpdate(); (_b = leftTableRef.value) == null ? void 0 : _b.forceUpdate(); (_c = rightTableRef.value) == null ? void 0 : _c.forceUpdate(); (_d = vm.proxy) == null ? void 0 : _d.$forceUpdate(); isResetting.value = false; }, 0); function resetAfterIndex(index, forceUpdate = false) { if (!unref(isDynamic)) return; [mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => { const table = unref(tableRef); if (table) table.resetAfterRowIndex(index, forceUpdate); }); } function resetHeights(rowKey2, height, rowIdx) { const resetIdx = unref(resetIndex); if (resetIdx === null) { resetIndex.value = rowIdx; } else { if (resetIdx > rowIdx) { resetIndex.value = rowIdx; } } pendingRowHeights.value[rowKey2] = height; } function onRowHeightChange({ rowKey: rowKey2, height, rowIndex }, fixedDir) { if (!fixedDir) { mainTableHeights.value[rowKey2] = height; } else { if (fixedDir === FixedDir.RIGHT) { rightTableHeights.value[rowKey2] = height; } else { leftTableHeights.value[rowKey2] = height; } } const maximumHeight = Math.max(...[leftTableHeights, rightTableHeights, mainTableHeights].map((records) => records.value[rowKey2] || 0)); if (unref(rowHeights)[rowKey2] !== maximumHeight) { resetHeights(rowKey2, maximumHeight, rowIndex); flushingRowHeights(); } } return { hoveringRowKey, expandedRowKeys, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHovered, onRowsRendered, onRowHeightChange }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs var useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => { const depthMap = ref({}); const flattenedData = computed2(() => { const depths = {}; const { data: data2, rowKey: rowKey2 } = props; const _expandedRowKeys = unref(expandedRowKeys); if (!_expandedRowKeys || !_expandedRowKeys.length) return data2; const array4 = []; const keysSet = /* @__PURE__ */ new Set(); _expandedRowKeys.forEach((x2) => keysSet.add(x2)); let copy = data2.slice(); copy.forEach((x2) => depths[x2[rowKey2]] = 0); while (copy.length > 0) { const item = copy.shift(); array4.push(item); if (keysSet.has(item[rowKey2]) && Array.isArray(item.children) && item.children.length > 0) { copy = [...item.children, ...copy]; item.children.forEach((child) => depths[child[rowKey2]] = depths[item[rowKey2]] + 1); } } depthMap.value = depths; return array4; }); const data = computed2(() => { const { data: data2, expandColumnKey: expandColumnKey2 } = props; return expandColumnKey2 ? unref(flattenedData) : data2; }); watch(data, (val, prev) => { if (val !== prev) { lastRenderedRowIndex.value = -1; resetAfterIndex(0, true); } }); return { data, depthMap }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/utils.mjs var sumReducer = (sum22, num) => sum22 + num; var sum2 = (listLike) => { return isArray(listLike) ? listLike.reduce(sumReducer, 0) : listLike; }; var tryCall = (fLike, params, defaultRet = {}) => { return isFunction(fLike) ? fLike(params) : fLike != null ? fLike : defaultRet; }; var enforceUnit = (style) => { ; ["width", "maxWidth", "minWidth", "height"].forEach((key) => { style[key] = addUnit(style[key]); }); return style; }; var componentToSlot = (ComponentLike) => isVNode(ComponentLike) ? (props) => h(ComponentLike, props) : ComponentLike; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs var useStyles2 = (props, { columnsTotalWidth, data, fixedColumnsOnLeft, fixedColumnsOnRight }) => { const bodyWidth = computed2(() => { const { fixed, width, vScrollbarSize } = props; const ret = width - vScrollbarSize; return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret; }); const headerWidth = computed2(() => unref(bodyWidth) + (props.fixed ? props.vScrollbarSize : 0)); const mainTableHeight = computed2(() => { const { height = 0, maxHeight = 0, footerHeight: footerHeight2, hScrollbarSize } = props; if (maxHeight > 0) { const _fixedRowsHeight = unref(fixedRowsHeight); const _rowsHeight = unref(rowsHeight); const _headerHeight = unref(headerHeight); const total2 = _headerHeight + _fixedRowsHeight + _rowsHeight + hScrollbarSize; return Math.min(total2, maxHeight - footerHeight2); } return height - footerHeight2; }); const rowsHeight = computed2(() => { const { rowHeight, estimatedRowHeight } = props; const _data = unref(data); if (isNumber(estimatedRowHeight)) { return _data.length * estimatedRowHeight; } return _data.length * rowHeight; }); const fixedTableHeight = computed2(() => { const { maxHeight } = props; const tableHeight = unref(mainTableHeight); if (isNumber(maxHeight) && maxHeight > 0) return tableHeight; const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight); return Math.min(tableHeight, totalHeight); }); const mapColumn = (column2) => column2.width; const leftTableWidth = computed2(() => sum2(unref(fixedColumnsOnLeft).map(mapColumn))); const rightTableWidth = computed2(() => sum2(unref(fixedColumnsOnRight).map(mapColumn))); const headerHeight = computed2(() => sum2(props.headerHeight)); const fixedRowsHeight = computed2(() => { var _a2; return (((_a2 = props.fixedData) == null ? void 0 : _a2.length) || 0) * props.rowHeight; }); const windowHeight = computed2(() => { return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight); }); const rootStyle = computed2(() => { const { style = {}, height, width } = props; return enforceUnit({ ...style, height, width }); }); const footerHeight = computed2(() => enforceUnit({ height: props.footerHeight })); const emptyStyle = computed2(() => ({ top: addUnit(unref(headerHeight)), bottom: addUnit(props.footerHeight), width: addUnit(props.width) })); return { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, headerWidth, rowsHeight, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs var useAutoResize = (props) => { const sizer = ref(); const width$ = ref(0); const height$ = ref(0); let resizerStopper; onMounted(() => { resizerStopper = useResizeObserver(sizer, ([entry]) => { const { width, height } = entry.contentRect; const { paddingLeft, paddingRight, paddingTop, paddingBottom } = getComputedStyle(entry.target); const left2 = Number.parseInt(paddingLeft) || 0; const right2 = Number.parseInt(paddingRight) || 0; const top = Number.parseInt(paddingTop) || 0; const bottom = Number.parseInt(paddingBottom) || 0; width$.value = width - left2 - right2; height$.value = height - top - bottom; }).stop; }); onBeforeUnmount(() => { resizerStopper == null ? void 0 : resizerStopper(); }); watch([width$, height$], ([width, height]) => { var _a2; (_a2 = props.onResize) == null ? void 0 : _a2.call(props, { width, height }); }); return { sizer, width: width$, height: height$ }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/use-table.mjs function useTable(props) { const mainTableRef = ref(); const leftTableRef = ref(); const rightTableRef = ref(); const { columns: columns2, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, onColumnSorted } = useColumns(props, toRef(props, "columns"), toRef(props, "fixed")); const { scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll, scrollPos } = useScrollbar2(props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }); const { expandedRowKeys, hoveringRowKey, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHeightChange, onRowHovered, onRowsRendered } = useRow(props, { mainTableRef, leftTableRef, rightTableRef }); const { data, depthMap } = useData(props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }); const { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, headerWidth, rowsHeight, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight } = useStyles2(props, { columnsTotalWidth, data, fixedColumnsOnLeft, fixedColumnsOnRight }); const isScrolling = shallowRef(false); const containerRef = ref(); const showEmpty = computed2(() => { const noData = unref(data).length === 0; return isArray(props.fixedData) ? props.fixedData.length === 0 && noData : noData; }); function getRowHeight(rowIndex) { const { estimatedRowHeight, rowHeight, rowKey: rowKey2 } = props; if (!estimatedRowHeight) return rowHeight; return unref(rowHeights)[unref(data)[rowIndex][rowKey2]] || estimatedRowHeight; } function onMaybeEndReached() { const { onEndReached } = props; if (!onEndReached) return; const { scrollTop } = unref(scrollPos); const _totalHeight = unref(rowsHeight); const clientHeight = unref(windowHeight); const heightUntilEnd = _totalHeight - (scrollTop + clientHeight) + props.hScrollbarSize; if (unref(lastRenderedRowIndex) >= 0 && _totalHeight === scrollTop + unref(mainTableHeight) - unref(headerHeight)) { onEndReached(heightUntilEnd); } } watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, { deep: true }); return { columns: columns2, containerRef, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, hoveringRowKey, hasFixedColumns, columnsStyles, columnsTotalWidth, data, expandedRowKeys, depthMap, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, bodyWidth, emptyStyle, rootStyle, headerWidth, footerHeight, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, showEmpty, getRowHeight, onColumnSorted, onRowHovered, onRowExpanded, onRowsRendered, onRowHeightChange, scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/tokens.mjs var TableV2InjectionKey = Symbol("tableV2"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/common.mjs var classType = String; var columns = { type: definePropType(Array), required: true }; var column = { type: definePropType(Object) }; var fixedDataType = { type: definePropType(Array) }; var dataType = { ...fixedDataType, required: true }; var expandColumnKey = String; var expandKeys = { type: definePropType(Array), default: () => mutable([]) }; var requiredNumber = { type: Number, required: true }; var rowKey = { type: definePropType([String, Number, Symbol]), default: "id" }; var styleType = { type: definePropType(Object) }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/row.mjs var tableV2RowProps = buildProps({ class: String, columns, columnsStyles: { type: definePropType(Object), required: true }, depth: Number, expandColumnKey, estimatedRowHeight: { ...virtualizedGridProps.estimatedRowHeight, default: void 0 }, isScrolling: Boolean, onRowExpand: { type: definePropType(Function) }, onRowHover: { type: definePropType(Function) }, onRowHeightChange: { type: definePropType(Function) }, rowData: { type: definePropType(Object), required: true }, rowEventHandlers: { type: definePropType(Object) }, rowIndex: { type: Number, required: true }, rowKey, style: { type: definePropType(Object) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/header.mjs var requiredNumberType = { type: Number, required: true }; var tableV2HeaderProps = buildProps({ class: String, columns, fixedHeaderData: { type: definePropType(Array) }, headerData: { type: definePropType(Array), required: true }, headerHeight: { type: definePropType([Number, Array]), default: 50 }, rowWidth: requiredNumberType, rowHeight: { type: Number, default: 50 }, height: requiredNumberType, width: requiredNumberType }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/grid.mjs var tableV2GridProps = buildProps({ columns, data: dataType, fixedData: fixedDataType, estimatedRowHeight: tableV2RowProps.estimatedRowHeight, width: requiredNumber, height: requiredNumber, headerWidth: requiredNumber, headerHeight: tableV2HeaderProps.headerHeight, bodyWidth: requiredNumber, rowHeight: requiredNumber, cache: virtualizedListProps.cache, useIsScrolling: Boolean, scrollbarAlwaysOn: virtualizedGridProps.scrollbarAlwaysOn, scrollbarStartGap: virtualizedGridProps.scrollbarStartGap, scrollbarEndGap: virtualizedGridProps.scrollbarEndGap, class: classType, style: styleType, containerStyle: styleType, getRowHeight: { type: definePropType(Function), required: true }, rowKey: tableV2RowProps.rowKey, onRowsRendered: { type: definePropType(Function) }, onScroll: { type: definePropType(Function) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/table.mjs var tableV2Props = buildProps({ cache: tableV2GridProps.cache, estimatedRowHeight: tableV2RowProps.estimatedRowHeight, rowKey, headerClass: { type: definePropType([ String, Function ]) }, headerProps: { type: definePropType([ Object, Function ]) }, headerCellProps: { type: definePropType([ Object, Function ]) }, headerHeight: tableV2HeaderProps.headerHeight, footerHeight: { type: Number, default: 0 }, rowClass: { type: definePropType([String, Function]) }, rowProps: { type: definePropType([Object, Function]) }, rowHeight: { type: Number, default: 50 }, cellProps: { type: definePropType([ Object, Function ]) }, columns, data: dataType, dataGetter: { type: definePropType(Function) }, fixedData: fixedDataType, expandColumnKey: tableV2RowProps.expandColumnKey, expandedRowKeys: expandKeys, defaultExpandedRowKeys: expandKeys, class: classType, fixed: Boolean, style: { type: definePropType(Object) }, width: requiredNumber, height: requiredNumber, maxHeight: Number, useIsScrolling: Boolean, indentSize: { type: Number, default: 12 }, iconSize: { type: Number, default: 12 }, hScrollbarSize: virtualizedGridProps.hScrollbarSize, vScrollbarSize: virtualizedGridProps.vScrollbarSize, scrollbarAlwaysOn: virtualizedScrollbarProps.alwaysOn, sortBy: { type: definePropType(Object), default: () => ({}) }, sortState: { type: definePropType(Object), default: void 0 }, onColumnSort: { type: definePropType(Function) }, onExpandedRowsChange: { type: definePropType(Function) }, onEndReached: { type: definePropType(Function) }, onRowExpand: tableV2RowProps.onRowExpand, onScroll: tableV2GridProps.onScroll, onRowsRendered: tableV2GridProps.onRowsRendered, rowEventHandlers: tableV2RowProps.rowEventHandlers }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/cell.mjs var TableV2Cell = (props, { slots }) => { var _a2; const { cellData, style } = props; const displayText = ((_a2 = cellData == null ? void 0 : cellData.toString) == null ? void 0 : _a2.call(cellData)) || ""; return createVNode("div", { "class": props.class, "title": displayText, "style": style }, [slots.default ? slots.default(props) : displayText]); }; TableV2Cell.displayName = "ElTableV2Cell"; TableV2Cell.inheritAttrs = false; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs var HeaderCell = (props, { slots }) => { var _a2, _b; return slots.default ? slots.default(props) : createVNode("div", { "class": props.class, "title": (_a2 = props.column) == null ? void 0 : _a2.title }, [(_b = props.column) == null ? void 0 : _b.title]); }; HeaderCell.displayName = "ElTableV2HeaderCell"; HeaderCell.inheritAttrs = false; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/header-row.mjs var tableV2HeaderRowProps = buildProps({ class: String, columns, columnsStyles: { type: definePropType(Object), required: true }, headerIndex: Number, style: { type: definePropType(Object) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs var TableV2HeaderRow = defineComponent({ name: "ElTableV2HeaderRow", props: tableV2HeaderRowProps, setup(props, { slots }) { return () => { const { columns: columns2, columnsStyles, headerIndex, style } = props; let Cells = columns2.map((column2, columnIndex) => { return slots.cell({ columns: columns2, column: column2, columnIndex, headerIndex, style: columnsStyles[column2.key] }); }); if (slots.header) { Cells = slots.header({ cells: Cells.map((node) => { if (isArray(node) && node.length === 1) { return node[0]; } return node; }), columns: columns2, headerIndex }); } return createVNode("div", { "class": props.class, "style": style, "role": "row" }, [Cells]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/header.mjs var COMPONENT_NAME18 = "ElTableV2Header"; var TableV2Header = defineComponent({ name: COMPONENT_NAME18, props: tableV2HeaderProps, setup(props, { slots, expose }) { const ns = useNamespace("table-v2"); const headerRef = ref(); const headerStyle = computed2(() => enforceUnit({ width: props.width, height: props.height })); const rowStyle = computed2(() => enforceUnit({ width: props.rowWidth, height: props.height })); const headerHeights = computed2(() => castArray_default(unref(props.headerHeight))); const scrollToLeft = (left2) => { const headerEl = unref(headerRef); nextTick(() => { (headerEl == null ? void 0 : headerEl.scroll) && headerEl.scroll({ left: left2 }); }); }; const renderFixedRows = () => { const fixedRowClassName = ns.e("fixed-header-row"); const { columns: columns2, fixedHeaderData, rowHeight } = props; return fixedHeaderData == null ? void 0 : fixedHeaderData.map((fixedRowData, fixedRowIndex) => { var _a2; const style = enforceUnit({ height: rowHeight, width: "100%" }); return (_a2 = slots.fixed) == null ? void 0 : _a2.call(slots, { class: fixedRowClassName, columns: columns2, rowData: fixedRowData, rowIndex: -(fixedRowIndex + 1), style }); }); }; const renderDynamicRows = () => { const dynamicRowClassName = ns.e("dynamic-header-row"); const { columns: columns2 } = props; return unref(headerHeights).map((rowHeight, rowIndex) => { var _a2; const style = enforceUnit({ width: "100%", height: rowHeight }); return (_a2 = slots.dynamic) == null ? void 0 : _a2.call(slots, { class: dynamicRowClassName, columns: columns2, headerIndex: rowIndex, style }); }); }; expose({ scrollToLeft }); return () => { if (props.height <= 0) return; return createVNode("div", { "ref": headerRef, "class": props.class, "style": unref(headerStyle), "role": "rowgroup" }, [createVNode("div", { "style": unref(rowStyle), "class": ns.e("header") }, [renderDynamicRows(), renderFixedRows()])]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/row.mjs var useTableRow = (props) => { const { isScrolling } = inject(TableV2InjectionKey); const measured = ref(false); const rowRef = ref(); const measurable = computed2(() => { return isNumber(props.estimatedRowHeight) && props.rowIndex >= 0; }); const doMeasure = (isInit = false) => { const $rowRef = unref(rowRef); if (!$rowRef) return; const { columns: columns2, onRowHeightChange, rowKey: rowKey2, rowIndex, style } = props; const { height } = $rowRef.getBoundingClientRect(); measured.value = true; nextTick(() => { if (isInit || height !== Number.parseInt(style.height)) { const firstColumn = columns2[0]; const isPlaceholder = (firstColumn == null ? void 0 : firstColumn.placeholderSign) === placeholderSign; onRowHeightChange == null ? void 0 : onRowHeightChange({ rowKey: rowKey2, height, rowIndex }, firstColumn && !isPlaceholder && firstColumn.fixed); } }); }; const eventHandlers = computed2(() => { const { rowData, rowIndex, rowKey: rowKey2, onRowHover } = props; const handlers2 = props.rowEventHandlers || {}; const eventHandlers2 = {}; Object.entries(handlers2).forEach(([eventName, handler]) => { if (isFunction(handler)) { eventHandlers2[eventName] = (event) => { handler({ event, rowData, rowIndex, rowKey: rowKey2 }); }; } }); if (onRowHover) { ; [{ name: "onMouseleave", hovered: false }, { name: "onMouseenter", hovered: true }].forEach(({ name, hovered }) => { const existedHandler = eventHandlers2[name]; eventHandlers2[name] = (event) => { onRowHover({ event, hovered, rowData, rowIndex, rowKey: rowKey2 }); existedHandler == null ? void 0 : existedHandler(event); }; }); } return eventHandlers2; }); const onExpand = (expanded) => { const { onRowExpand, rowData, rowIndex, rowKey: rowKey2 } = props; onRowExpand == null ? void 0 : onRowExpand({ expanded, rowData, rowIndex, rowKey: rowKey2 }); }; onMounted(() => { if (unref(measurable)) { doMeasure(true); } }); return { isScrolling, measurable, measured, rowRef, eventHandlers, onExpand }; }; var COMPONENT_NAME19 = "ElTableV2TableRow"; var TableV2Row = defineComponent({ name: COMPONENT_NAME19, props: tableV2RowProps, setup(props, { expose, slots, attrs }) { const { eventHandlers, isScrolling, measurable, measured, rowRef, onExpand } = useTableRow(props); expose({ onExpand }); return () => { const { columns: columns2, columnsStyles, expandColumnKey: expandColumnKey2, depth, rowData, rowIndex, style } = props; let ColumnCells = columns2.map((column2, columnIndex) => { const expandable = isArray(rowData.children) && rowData.children.length > 0 && column2.key === expandColumnKey2; return slots.cell({ column: column2, columns: columns2, columnIndex, depth, style: columnsStyles[column2.key], rowData, rowIndex, isScrolling: unref(isScrolling), expandIconProps: expandable ? { rowData, rowIndex, onExpand } : void 0 }); }); if (slots.row) { ColumnCells = slots.row({ cells: ColumnCells.map((node) => { if (isArray(node) && node.length === 1) { return node[0]; } return node; }), style, columns: columns2, depth, rowData, rowIndex, isScrolling: unref(isScrolling) }); } if (unref(measurable)) { const { height, ...exceptHeightStyle } = style || {}; const _measured = unref(measured); return createVNode("div", mergeProps({ "ref": rowRef, "class": props.class, "style": _measured ? style : exceptHeightStyle, "role": "row" }, attrs, unref(eventHandlers)), [ColumnCells]); } return createVNode("div", mergeProps(attrs, { "ref": rowRef, "class": props.class, "style": style, "role": "row" }, unref(eventHandlers)), [ColumnCells]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs var SortIcon = (props) => { const { sortOrder } = props; return createVNode(ElIcon, { "size": 14, "class": props.class }, { default: () => [sortOrder === SortOrder.ASC ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs var ExpandIcon = (props) => { const { expanded, expandable, onExpand, style, size: size3 } = props; const expandIconProps = { onClick: expandable ? () => onExpand(!expanded) : void 0, class: props.class }; return createVNode(ElIcon, mergeProps(expandIconProps, { "size": size3, "style": style }), { default: () => [createVNode(arrow_right_default, null, null)] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/table-grid.mjs var COMPONENT_NAME20 = "ElTableV2Grid"; var useTableGrid = (props) => { const headerRef = ref(); const bodyRef = ref(); const totalHeight = computed2(() => { const { data, rowHeight, estimatedRowHeight } = props; if (estimatedRowHeight) { return; } return data.length * rowHeight; }); const fixedRowHeight = computed2(() => { const { fixedData, rowHeight } = props; return ((fixedData == null ? void 0 : fixedData.length) || 0) * rowHeight; }); const headerHeight = computed2(() => sum2(props.headerHeight)); const gridHeight = computed2(() => { const { height } = props; return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight)); }); const hasHeader = computed2(() => { return unref(headerHeight) + unref(fixedRowHeight) > 0; }); const itemKey = ({ data, rowIndex }) => data[rowIndex][props.rowKey]; function onItemRendered({ rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }) { var _a2; (_a2 = props.onRowsRendered) == null ? void 0 : _a2.call(props, { rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }); } function resetAfterRowIndex(index, forceUpdate2) { var _a2; (_a2 = bodyRef.value) == null ? void 0 : _a2.resetAfterRowIndex(index, forceUpdate2); } function scrollTo(leftOrOptions, top) { const header$ = unref(headerRef); const body$ = unref(bodyRef); if (!header$ || !body$) return; if (isObject(leftOrOptions)) { header$.scrollToLeft(leftOrOptions.scrollLeft); body$.scrollTo(leftOrOptions); } else { header$.scrollToLeft(leftOrOptions); body$.scrollTo({ scrollLeft: leftOrOptions, scrollTop: top }); } } function scrollToTop(scrollTop) { var _a2; (_a2 = unref(bodyRef)) == null ? void 0 : _a2.scrollTo({ scrollTop }); } function scrollToRow(row, strategy) { var _a2; (_a2 = unref(bodyRef)) == null ? void 0 : _a2.scrollToItem(row, 1, strategy); } function forceUpdate() { var _a2, _b; (_a2 = unref(bodyRef)) == null ? void 0 : _a2.$forceUpdate(); (_b = unref(headerRef)) == null ? void 0 : _b.$forceUpdate(); } return { bodyRef, forceUpdate, fixedRowHeight, gridHeight, hasHeader, headerHeight, headerRef, totalHeight, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow }; }; var TableGrid = defineComponent({ name: COMPONENT_NAME20, props: tableV2GridProps, setup(props, { slots, expose }) { const { ns } = inject(TableV2InjectionKey); const { bodyRef, fixedRowHeight, gridHeight, hasHeader, headerRef, headerHeight, totalHeight, forceUpdate, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow } = useTableGrid(props); expose({ forceUpdate, totalHeight, scrollTo, scrollToTop, scrollToRow, resetAfterRowIndex }); const getColumnWidth = () => props.bodyWidth; return () => { const { cache: cache2, columns: columns2, data, fixedData, useIsScrolling, scrollbarAlwaysOn, scrollbarEndGap, scrollbarStartGap, style, rowHeight, bodyWidth, estimatedRowHeight, headerWidth, height, width, getRowHeight, onScroll } = props; const isDynamicRowEnabled = isNumber(estimatedRowHeight); const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid; const _headerHeight = unref(headerHeight); return createVNode("div", { "role": "table", "class": [ns.e("table"), props.class], "style": style }, [createVNode(Grid, { "ref": bodyRef, "data": data, "useIsScrolling": useIsScrolling, "itemKey": itemKey, "columnCache": 0, "columnWidth": isDynamicRowEnabled ? getColumnWidth : bodyWidth, "totalColumn": 1, "totalRow": data.length, "rowCache": cache2, "rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight, "width": width, "height": unref(gridHeight), "class": ns.e("body"), "role": "rowgroup", "scrollbarStartGap": scrollbarStartGap, "scrollbarEndGap": scrollbarEndGap, "scrollbarAlwaysOn": scrollbarAlwaysOn, "onScroll": onScroll, "onItemRendered": onItemRendered, "perfMode": false }, { default: (params) => { var _a2; const rowData = data[params.rowIndex]; return (_a2 = slots.row) == null ? void 0 : _a2.call(slots, { ...params, columns: columns2, rowData }); } }), unref(hasHeader) && createVNode(TableV2Header, { "ref": headerRef, "class": ns.e("header-wrapper"), "columns": columns2, "headerData": data, "headerHeight": props.headerHeight, "fixedHeaderData": fixedData, "rowWidth": headerWidth, "rowHeight": rowHeight, "width": width, "height": Math.min(_headerHeight + unref(fixedRowHeight), height) }, { dynamic: slots.header, fixed: slots.row })]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs function _isSlot(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var MainTable = (props, { slots }) => { const { mainTableRef, ...rest2 } = props; return createVNode(TableGrid, mergeProps({ "ref": mainTableRef }, rest2), _isSlot(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs function _isSlot2(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var LeftTable = (props, { slots }) => { if (!props.columns.length) return; const { leftTableRef, ...rest2 } = props; return createVNode(TableGrid, mergeProps({ "ref": leftTableRef }, rest2), _isSlot2(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs function _isSlot3(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var LeftTable2 = (props, { slots }) => { if (!props.columns.length) return; const { rightTableRef, ...rest2 } = props; return createVNode(TableGrid, mergeProps({ "ref": rightTableRef }, rest2), _isSlot3(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs function _isSlot4(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var RowRenderer = (props, { slots }) => { const { columns: columns2, columnsStyles, depthMap, expandColumnKey: expandColumnKey2, expandedRowKeys, estimatedRowHeight, hasFixedColumns, hoveringRowKey, rowData, rowIndex, style, isScrolling, rowProps: rowProps2, rowClass, rowKey: rowKey2, rowEventHandlers, ns, onRowHovered, onRowExpanded } = props; const rowKls = tryCall(rowClass, { columns: columns2, rowData, rowIndex }, ""); const additionalProps = tryCall(rowProps2, { columns: columns2, rowData, rowIndex }); const _rowKey = rowData[rowKey2]; const depth = depthMap[_rowKey] || 0; const canExpand = Boolean(expandColumnKey2); const isFixedRow = rowIndex < 0; const kls = [ns.e("row"), rowKls, { [ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0, [ns.is("expanded")]: canExpand && expandedRowKeys.includes(_rowKey), [ns.is("hovered")]: !isScrolling && _rowKey === hoveringRowKey, [ns.is("fixed")]: !depth && isFixedRow, [ns.is("customized")]: Boolean(slots.row) }]; const onRowHover = hasFixedColumns ? onRowHovered : void 0; const _rowProps = { ...additionalProps, columns: columns2, columnsStyles, class: kls, depth, expandColumnKey: expandColumnKey2, estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight, isScrolling, rowIndex, rowData, rowKey: _rowKey, rowEventHandlers, style }; return createVNode(TableV2Row, mergeProps(_rowProps, { "onRowHover": onRowHover, "onRowExpand": onRowExpanded }), _isSlot4(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs var CellRenderer = ({ columns: columns2, column: column2, columnIndex, depth, expandIconProps, isScrolling, rowData, rowIndex, style, expandedRowKeys, ns, cellProps: _cellProps, expandColumnKey: expandColumnKey2, indentSize, iconSize, rowKey: rowKey2 }, { slots }) => { const cellStyle = enforceUnit(style); if (column2.placeholderSign === placeholderSign) { return createVNode("div", { "class": ns.em("row-cell", "placeholder"), "style": cellStyle }, null); } const { cellRenderer, dataKey, dataGetter } = column2; const columnCellRenderer = componentToSlot(cellRenderer); const CellComponent = columnCellRenderer || slots.default || ((props) => createVNode(TableV2Cell, props, null)); const cellData = isFunction(dataGetter) ? dataGetter({ columns: columns2, column: column2, columnIndex, rowData, rowIndex }) : get_default(rowData, dataKey != null ? dataKey : ""); const extraCellProps = tryCall(_cellProps, { cellData, columns: columns2, column: column2, columnIndex, rowIndex, rowData }); const cellProps = { class: ns.e("cell-text"), columns: columns2, column: column2, columnIndex, cellData, isScrolling, rowData, rowIndex }; const Cell = CellComponent(cellProps); const kls = [ns.e("row-cell"), column2.class, column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right")]; const expandable = rowIndex >= 0 && column2.key === expandColumnKey2; const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey2]); let IconOrPlaceholder; const iconStyle = `margin-inline-start: ${depth * indentSize}px;`; if (expandable) { if (isObject(expandIconProps)) { IconOrPlaceholder = createVNode(ExpandIcon, mergeProps(expandIconProps, { "class": [ns.e("expand-icon"), ns.is("expanded", expanded)], "size": iconSize, "expanded": expanded, "style": iconStyle, "expandable": true }), null); } else { IconOrPlaceholder = createVNode("div", { "style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ") }, null); } } return createVNode("div", mergeProps({ "class": kls, "style": cellStyle }, extraCellProps, { "role": "cell" }), [IconOrPlaceholder, Cell]); }; CellRenderer.inheritAttrs = false; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs function _isSlot5(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var HeaderRenderer = ({ columns: columns2, columnsStyles, headerIndex, style, headerClass, headerProps, ns }, { slots }) => { const param = { columns: columns2, headerIndex }; const kls = [ns.e("header-row"), tryCall(headerClass, param, ""), { [ns.is("customized")]: Boolean(slots.header) }]; const extraProps = { ...tryCall(headerProps, param), columnsStyles, class: kls, columns: columns2, headerIndex, style }; return createVNode(TableV2HeaderRow, extraProps, _isSlot5(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs var HeaderCellRenderer = (props, { slots }) => { const { column: column2, ns, style, onColumnSorted } = props; const cellStyle = enforceUnit(style); if (column2.placeholderSign === placeholderSign) { return createVNode("div", { "class": ns.em("header-row-cell", "placeholder"), "style": cellStyle }, null); } const { headerCellRenderer, headerClass, sortable } = column2; const cellProps = { ...props, class: ns.e("header-cell-text") }; const cellRenderer = componentToSlot(headerCellRenderer) || slots.default || ((props2) => createVNode(HeaderCell, props2, null)); const Cell = cellRenderer(cellProps); const { sortBy: sortBy2, sortState, headerCellProps } = props; let sorting, sortOrder; if (sortState) { const order = sortState[column2.key]; sorting = Boolean(oppositeOrderMap[order]); sortOrder = sorting ? order : SortOrder.ASC; } else { sorting = column2.key === sortBy2.key; sortOrder = sorting ? sortBy2.order : SortOrder.ASC; } const cellKls = [ns.e("header-cell"), tryCall(headerClass, props, ""), column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right"), sortable && ns.is("sortable")]; const cellWrapperProps = { ...tryCall(headerCellProps, props), onClick: column2.sortable ? onColumnSorted : void 0, class: cellKls, style: cellStyle, ["data-key"]: column2.key }; return createVNode("div", mergeProps(cellWrapperProps, { "role": "columnheader" }), [Cell, sortable && createVNode(SortIcon, { "class": [ns.e("sort-icon"), sorting && ns.is("sorting")], "sortOrder": sortOrder }, null)]); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs var Footer2 = (props, { slots }) => { var _a2; return createVNode("div", { "class": props.class, "style": props.style }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]); }; Footer2.displayName = "ElTableV2Footer"; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs var Footer3 = (props, { slots }) => { return createVNode("div", { "class": props.class, "style": props.style }, [slots.default ? slots.default() : createVNode(ElEmpty, null, null)]); }; Footer3.displayName = "ElTableV2Empty"; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs var Overlay2 = (props, { slots }) => { var _a2; return createVNode("div", { "class": props.class, "style": props.style }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]); }; Overlay2.displayName = "ElTableV2Overlay"; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/table-v2.mjs function _isSlot6(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var COMPONENT_NAME21 = "ElTableV2"; var TableV2 = defineComponent({ name: COMPONENT_NAME21, props: tableV2Props, setup(props, { slots, expose }) { const ns = useNamespace("table-v2"); const { columnsStyles, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, data, depthMap, expandedRowKeys, hasFixedColumns, hoveringRowKey, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, bodyWidth, emptyStyle, rootStyle, headerWidth, footerHeight, showEmpty, scrollTo, scrollToLeft, scrollToTop, scrollToRow, getRowHeight, onColumnSorted, onRowHeightChange, onRowHovered, onRowExpanded, onRowsRendered, onScroll, onVerticalScroll } = useTable(props); expose({ scrollTo, scrollToLeft, scrollToTop, scrollToRow }); provide(TableV2InjectionKey, { ns, isResetting, hoveringRowKey, isScrolling }); return () => { const { cache: cache2, cellProps, estimatedRowHeight, expandColumnKey: expandColumnKey2, fixedData, headerHeight, headerClass, headerProps, headerCellProps, sortBy: sortBy2, sortState, rowHeight, rowClass, rowEventHandlers, rowKey: rowKey2, rowProps: rowProps2, scrollbarAlwaysOn, indentSize, iconSize, useIsScrolling, vScrollbarSize, width } = props; const _data = unref(data); const mainTableProps = { cache: cache2, class: ns.e("main"), columns: unref(mainColumns), data: _data, fixedData, estimatedRowHeight, bodyWidth: unref(bodyWidth), headerHeight, headerWidth: unref(headerWidth), height: unref(mainTableHeight), mainTableRef, rowKey: rowKey2, rowHeight, scrollbarAlwaysOn, scrollbarStartGap: 2, scrollbarEndGap: vScrollbarSize, useIsScrolling, width, getRowHeight, onRowsRendered, onScroll }; const leftColumnsWidth = unref(leftTableWidth); const _fixedTableHeight = unref(fixedTableHeight); const leftTableProps = { cache: cache2, class: ns.e("left"), columns: unref(fixedColumnsOnLeft), data: _data, estimatedRowHeight, leftTableRef, rowHeight, bodyWidth: leftColumnsWidth, headerWidth: leftColumnsWidth, headerHeight, height: _fixedTableHeight, rowKey: rowKey2, scrollbarAlwaysOn, scrollbarStartGap: 2, scrollbarEndGap: vScrollbarSize, useIsScrolling, width: leftColumnsWidth, getRowHeight, onScroll: onVerticalScroll }; const rightColumnsWidth = unref(rightTableWidth); const rightColumnsWidthWithScrollbar = rightColumnsWidth + vScrollbarSize; const rightTableProps = { cache: cache2, class: ns.e("right"), columns: unref(fixedColumnsOnRight), data: _data, estimatedRowHeight, rightTableRef, rowHeight, bodyWidth: rightColumnsWidthWithScrollbar, headerWidth: rightColumnsWidthWithScrollbar, headerHeight, height: _fixedTableHeight, rowKey: rowKey2, scrollbarAlwaysOn, scrollbarStartGap: 2, scrollbarEndGap: vScrollbarSize, width: rightColumnsWidthWithScrollbar, style: `--${unref(ns.namespace)}-table-scrollbar-size: ${vScrollbarSize}px`, useIsScrolling, getRowHeight, onScroll: onVerticalScroll }; const _columnsStyles = unref(columnsStyles); const tableRowProps = { ns, depthMap: unref(depthMap), columnsStyles: _columnsStyles, expandColumnKey: expandColumnKey2, expandedRowKeys: unref(expandedRowKeys), estimatedRowHeight, hasFixedColumns: unref(hasFixedColumns), hoveringRowKey: unref(hoveringRowKey), rowProps: rowProps2, rowClass, rowKey: rowKey2, rowEventHandlers, onRowHovered, onRowExpanded, onRowHeightChange }; const tableCellProps = { cellProps, expandColumnKey: expandColumnKey2, indentSize, iconSize, rowKey: rowKey2, expandedRowKeys: unref(expandedRowKeys), ns }; const tableHeaderProps = { ns, headerClass, headerProps, columnsStyles: _columnsStyles }; const tableHeaderCellProps = { ns, sortBy: sortBy2, sortState, headerCellProps, onColumnSorted }; const tableSlots = { row: (props2) => createVNode(RowRenderer, mergeProps(props2, tableRowProps), { row: slots.row, cell: (props3) => { let _slot; return slots.cell ? createVNode(CellRenderer, mergeProps(props3, tableCellProps, { "style": _columnsStyles[props3.column.key] }), _isSlot6(_slot = slots.cell(props3)) ? _slot : { default: () => [_slot] }) : createVNode(CellRenderer, mergeProps(props3, tableCellProps, { "style": _columnsStyles[props3.column.key] }), null); } }), header: (props2) => createVNode(HeaderRenderer, mergeProps(props2, tableHeaderProps), { header: slots.header, cell: (props3) => { let _slot2; return slots["header-cell"] ? createVNode(HeaderCellRenderer, mergeProps(props3, tableHeaderCellProps, { "style": _columnsStyles[props3.column.key] }), _isSlot6(_slot2 = slots["header-cell"](props3)) ? _slot2 : { default: () => [_slot2] }) : createVNode(HeaderCellRenderer, mergeProps(props3, tableHeaderCellProps, { "style": _columnsStyles[props3.column.key] }), null); } }) }; const rootKls = [props.class, ns.b(), ns.e("root"), { [ns.is("dynamic")]: unref(isDynamic) }]; const footerProps = { class: ns.e("footer"), style: unref(footerHeight) }; return createVNode("div", { "class": rootKls, "style": unref(rootStyle) }, [createVNode(MainTable, mainTableProps, _isSlot6(tableSlots) ? tableSlots : { default: () => [tableSlots] }), createVNode(LeftTable, leftTableProps, _isSlot6(tableSlots) ? tableSlots : { default: () => [tableSlots] }), createVNode(LeftTable2, rightTableProps, _isSlot6(tableSlots) ? tableSlots : { default: () => [tableSlots] }), slots.footer && createVNode(Footer2, footerProps, { default: slots.footer }), unref(showEmpty) && createVNode(Footer3, { "class": ns.e("empty"), "style": unref(emptyStyle) }, { default: slots.empty }), slots.overlay && createVNode(Overlay2, { "class": ns.e("overlay") }, { default: slots.overlay })]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/auto-resizer.mjs var autoResizerProps = buildProps({ disableWidth: Boolean, disableHeight: Boolean, onResize: { type: definePropType(Function) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs var AutoResizer = defineComponent({ name: "ElAutoResizer", props: autoResizerProps, setup(props, { slots }) { const ns = useNamespace("auto-resizer"); const { height, width, sizer } = useAutoResize(props); const style = { width: "100%", height: "100%" }; return () => { var _a2; return createVNode("div", { "ref": sizer, "class": ns.b(), "style": style }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots, { height: height.value, width: width.value })]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/table-v2/index.mjs var ElTableV2 = withInstall(TableV2); var ElAutoResizer = withInstall(AutoResizer); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/constants.mjs var tabsRootContextKey = Symbol("tabsRootContextKey"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/tab-bar.mjs var tabBarProps = buildProps({ tabs: { type: definePropType(Array), default: () => mutable([]) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs var COMPONENT_NAME22 = "ElTabBar"; var __default__83 = defineComponent({ name: COMPONENT_NAME22 }); var _sfc_main122 = defineComponent({ ...__default__83, props: tabBarProps, setup(__props, { expose }) { const props = __props; const instance = getCurrentInstance(); const rootTabs = inject(tabsRootContextKey); if (!rootTabs) throwError(COMPONENT_NAME22, "<el-tabs><el-tab-bar /></el-tabs>"); const ns = useNamespace("tabs"); const barRef = ref(); const barStyle = ref(); const getBarStyle = () => { let offset2 = 0; let tabSize = 0; const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height"; const sizeDir = sizeName === "width" ? "x" : "y"; const position = sizeDir === "x" ? "left" : "top"; props.tabs.every((tab) => { var _a2, _b; const $el = (_b = (_a2 = instance.parent) == null ? void 0 : _a2.refs) == null ? void 0 : _b[`tab-${tab.uid}`]; if (!$el) return false; if (!tab.active) { return true; } offset2 = $el[`offset${capitalize3(position)}`]; tabSize = $el[`client${capitalize3(sizeName)}`]; const tabStyles = window.getComputedStyle($el); if (sizeName === "width") { if (props.tabs.length > 1) { tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight); } offset2 += Number.parseFloat(tabStyles.paddingLeft); } return false; }); return { [sizeName]: `${tabSize}px`, transform: `translate${capitalize3(sizeDir)}(${offset2}px)` }; }; const update2 = () => barStyle.value = getBarStyle(); watch(() => props.tabs, async () => { await nextTick(); update2(); }, { immediate: true }); useResizeObserver(barRef, () => update2()); expose({ ref: barRef, update: update2 }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { ref_key: "barRef", ref: barRef, class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]), style: normalizeStyle(barStyle.value) }, null, 6); }; } }); var TabBar = _export_sfc(_sfc_main122, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/tab-nav.mjs var tabNavProps = buildProps({ panes: { type: definePropType(Array), default: () => mutable([]) }, currentName: { type: [String, Number], default: "" }, editable: Boolean, type: { type: String, values: ["card", "border-card", ""], default: "" }, stretch: Boolean }); var tabNavEmits = { tabClick: (tab, tabName, ev) => ev instanceof Event, tabRemove: (tab, ev) => ev instanceof Event }; var COMPONENT_NAME23 = "ElTabNav"; var TabNav = defineComponent({ name: COMPONENT_NAME23, props: tabNavProps, emits: tabNavEmits, setup(props, { expose, emit }) { const vm = getCurrentInstance(); const rootTabs = inject(tabsRootContextKey); if (!rootTabs) throwError(COMPONENT_NAME23, `<el-tabs><tab-nav /></el-tabs>`); const ns = useNamespace("tabs"); const visibility = useDocumentVisibility(); const focused = useWindowFocus(); const navScroll$ = ref(); const nav$ = ref(); const el$ = ref(); const tabBarRef = ref(); const scrollable = ref(false); const navOffset = ref(0); const isFocus = ref(false); const focusable = ref(true); const sizeName = computed2(() => ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height"); const navStyle = computed2(() => { const dir = sizeName.value === "width" ? "X" : "Y"; return { transform: `translate${dir}(-${navOffset.value}px)` }; }); const scrollPrev = () => { if (!navScroll$.value) return; const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; const currentOffset = navOffset.value; if (!currentOffset) return; const newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0; navOffset.value = newOffset; }; const scrollNext = () => { if (!navScroll$.value || !nav$.value) return; const navSize = nav$.value[`offset${capitalize3(sizeName.value)}`]; const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; const currentOffset = navOffset.value; if (navSize - currentOffset <= containerSize) return; const newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize; navOffset.value = newOffset; }; const scrollToActiveTab = async () => { const nav = nav$.value; if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return; await nextTick(); const activeTab = el$.value.querySelector(".is-active"); if (!activeTab) return; const navScroll = navScroll$.value; const isHorizontal2 = ["top", "bottom"].includes(rootTabs.props.tabPosition); const activeTabBounding = activeTab.getBoundingClientRect(); const navScrollBounding = navScroll.getBoundingClientRect(); const maxOffset = isHorizontal2 ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height; const currentOffset = navOffset.value; let newOffset = currentOffset; if (isHorizontal2) { if (activeTabBounding.left < navScrollBounding.left) { newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left); } if (activeTabBounding.right > navScrollBounding.right) { newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right; } } else { if (activeTabBounding.top < navScrollBounding.top) { newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top); } if (activeTabBounding.bottom > navScrollBounding.bottom) { newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom); } } newOffset = Math.max(newOffset, 0); navOffset.value = Math.min(newOffset, maxOffset); }; const update2 = () => { var _a2; if (!nav$.value || !navScroll$.value) return; props.stretch && ((_a2 = tabBarRef.value) == null ? void 0 : _a2.update()); const navSize = nav$.value[`offset${capitalize3(sizeName.value)}`]; const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; const currentOffset = navOffset.value; if (containerSize < navSize) { scrollable.value = scrollable.value || {}; scrollable.value.prev = currentOffset; scrollable.value.next = currentOffset + containerSize < navSize; if (navSize - currentOffset < containerSize) { navOffset.value = navSize - containerSize; } } else { scrollable.value = false; if (currentOffset > 0) { navOffset.value = 0; } } }; const changeTab = (e) => { const code = e.code; const { up: up2, down: down2, left: left2, right: right2 } = EVENT_CODE; if (![up2, down2, left2, right2].includes(code)) return; const tabList = Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")); const currentIndex = tabList.indexOf(e.target); let nextIndex; if (code === left2 || code === up2) { if (currentIndex === 0) { nextIndex = tabList.length - 1; } else { nextIndex = currentIndex - 1; } } else { if (currentIndex < tabList.length - 1) { nextIndex = currentIndex + 1; } else { nextIndex = 0; } } tabList[nextIndex].focus({ preventScroll: true }); tabList[nextIndex].click(); setFocus(); }; const setFocus = () => { if (focusable.value) isFocus.value = true; }; const removeFocus = () => isFocus.value = false; watch(visibility, (visibility2) => { if (visibility2 === "hidden") { focusable.value = false; } else if (visibility2 === "visible") { setTimeout(() => focusable.value = true, 50); } }); watch(focused, (focused2) => { if (focused2) { setTimeout(() => focusable.value = true, 50); } else { focusable.value = false; } }); useResizeObserver(el$, update2); onMounted(() => setTimeout(() => scrollToActiveTab(), 0)); onUpdated(() => update2()); expose({ scrollToActiveTab, removeFocus }); watch(() => props.panes, () => vm.update(), { flush: "post", deep: true }); return () => { const scrollBtn = scrollable.value ? [createVNode("span", { "class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)], "onClick": scrollPrev }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_left_default, null, null)] })]), createVNode("span", { "class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)], "onClick": scrollNext }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_right_default, null, null)] })])] : null; const tabs = props.panes.map((pane, index) => { var _a2, _b, _c, _d; const uid2 = pane.uid; const disabled = pane.props.disabled; const tabName = (_b = (_a2 = pane.props.name) != null ? _a2 : pane.index) != null ? _b : `${index}`; const closable = !disabled && (pane.isClosable || props.editable); pane.index = `${index}`; const btnClose = closable ? createVNode(ElIcon, { "class": "is-icon-close", "onClick": (ev) => emit("tabRemove", pane, ev) }, { default: () => [createVNode(close_default, null, null)] }) : null; const tabLabelContent = ((_d = (_c = pane.slots).label) == null ? void 0 : _d.call(_c)) || pane.props.label; const tabindex = !disabled && pane.active ? 0 : -1; return createVNode("div", { "ref": `tab-${uid2}`, "class": [ns.e("item"), ns.is(rootTabs.props.tabPosition), ns.is("active", pane.active), ns.is("disabled", disabled), ns.is("closable", closable), ns.is("focus", isFocus.value)], "id": `tab-${tabName}`, "key": `tab-${uid2}`, "aria-controls": `pane-${tabName}`, "role": "tab", "aria-selected": pane.active, "tabindex": tabindex, "onFocus": () => setFocus(), "onBlur": () => removeFocus(), "onClick": (ev) => { removeFocus(); emit("tabClick", pane, tabName, ev); }, "onKeydown": (ev) => { if (closable && (ev.code === EVENT_CODE.delete || ev.code === EVENT_CODE.backspace)) { emit("tabRemove", pane, ev); } } }, [...[tabLabelContent, btnClose]]); }); return createVNode("div", { "ref": el$, "class": [ns.e("nav-wrap"), ns.is("scrollable", !!scrollable.value), ns.is(rootTabs.props.tabPosition)] }, [scrollBtn, createVNode("div", { "class": ns.e("nav-scroll"), "ref": navScroll$ }, [createVNode("div", { "class": [ns.e("nav"), ns.is(rootTabs.props.tabPosition), ns.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))], "ref": nav$, "style": navStyle.value, "role": "tablist", "onKeydown": changeTab }, [...[!props.type ? createVNode(TabBar, { "ref": tabBarRef, "tabs": [...props.panes] }, null) : null, tabs]])])]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/tabs.mjs var tabsProps = buildProps({ type: { type: String, values: ["card", "border-card", ""], default: "" }, activeName: { type: [String, Number] }, closable: Boolean, addable: Boolean, modelValue: { type: [String, Number] }, editable: Boolean, tabPosition: { type: String, values: ["top", "right", "bottom", "left"], default: "top" }, beforeLeave: { type: definePropType(Function), default: () => true }, stretch: Boolean }); var isPaneName = (value) => isString(value) || isNumber(value); var tabsEmits = { [UPDATE_MODEL_EVENT]: (name) => isPaneName(name), tabClick: (pane, ev) => ev instanceof Event, tabChange: (name) => isPaneName(name), edit: (paneName, action) => ["remove", "add"].includes(action), tabRemove: (name) => isPaneName(name), tabAdd: () => true }; var Tabs = defineComponent({ name: "ElTabs", props: tabsProps, emits: tabsEmits, setup(props, { emit, slots, expose }) { var _a2, _b; const ns = useNamespace("tabs"); const { children: panes, addChild: registerPane, removeChild: unregisterPane } = useOrderedChildren(getCurrentInstance(), "ElTabPane"); const nav$ = ref(); const currentName = ref((_b = (_a2 = props.modelValue) != null ? _a2 : props.activeName) != null ? _b : "0"); const changeCurrentName = (value) => { currentName.value = value; emit(UPDATE_MODEL_EVENT, value); emit("tabChange", value); }; const setCurrentName = async (value) => { var _a22, _b2, _c; if (currentName.value === value || isUndefined2(value)) return; try { const canLeave = await ((_a22 = props.beforeLeave) == null ? void 0 : _a22.call(props, value, currentName.value)); if (canLeave !== false) { changeCurrentName(value); (_c = (_b2 = nav$.value) == null ? void 0 : _b2.removeFocus) == null ? void 0 : _c.call(_b2); } } catch (e) { } }; const handleTabClick = (tab, tabName, event) => { if (tab.props.disabled) return; setCurrentName(tabName); emit("tabClick", tab, event); }; const handleTabRemove = (pane, ev) => { if (pane.props.disabled || isUndefined2(pane.props.name)) return; ev.stopPropagation(); emit("edit", pane.props.name, "remove"); emit("tabRemove", pane.props.name); }; const handleTabAdd = () => { emit("edit", void 0, "add"); emit("tabAdd"); }; useDeprecated({ from: '"activeName"', replacement: '"model-value" or "v-model"', scope: "ElTabs", version: "2.3.0", ref: "https://element-plus.org/en-US/component/tabs.html#attributes", type: "Attribute" }, computed2(() => !!props.activeName)); watch(() => props.activeName, (modelValue) => setCurrentName(modelValue)); watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue)); watch(currentName, async () => { var _a22; await nextTick(); (_a22 = nav$.value) == null ? void 0 : _a22.scrollToActiveTab(); }); provide(tabsRootContextKey, { props, currentName, registerPane, unregisterPane }); expose({ currentName }); return () => { const newButton = props.editable || props.addable ? createVNode("span", { "class": ns.e("new-tab"), "tabindex": "0", "onClick": handleTabAdd, "onKeydown": (ev) => { if (ev.code === EVENT_CODE.enter) handleTabAdd(); } }, [createVNode(ElIcon, { "class": ns.is("icon-plus") }, { default: () => [createVNode(plus_default, null, null)] })]) : null; const header = createVNode("div", { "class": [ns.e("header"), ns.is(props.tabPosition)] }, [newButton, createVNode(TabNav, { "ref": nav$, "currentName": currentName.value, "editable": props.editable, "type": props.type, "panes": panes.value, "stretch": props.stretch, "onTabClick": handleTabClick, "onTabRemove": handleTabRemove }, null)]); const panels = createVNode("div", { "class": ns.e("content") }, [renderSlot(slots, "default")]); return createVNode("div", { "class": [ns.b(), ns.m(props.tabPosition), { [ns.m("card")]: props.type === "card", [ns.m("border-card")]: props.type === "border-card" }] }, [...props.tabPosition !== "bottom" ? [header, panels] : [panels, header]]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/tab-pane.mjs var tabPaneProps = buildProps({ label: { type: String, default: "" }, name: { type: [String, Number] }, closable: Boolean, disabled: Boolean, lazy: Boolean }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs var _hoisted_161 = ["id", "aria-hidden", "aria-labelledby"]; var COMPONENT_NAME24 = "ElTabPane"; var __default__84 = defineComponent({ name: COMPONENT_NAME24 }); var _sfc_main123 = defineComponent({ ...__default__84, props: tabPaneProps, setup(__props) { const props = __props; const instance = getCurrentInstance(); const slots = useSlots(); const tabsRoot = inject(tabsRootContextKey); if (!tabsRoot) throwError(COMPONENT_NAME24, "usage: <el-tabs><el-tab-pane /></el-tabs/>"); const ns = useNamespace("tab-pane"); const index = ref(); const isClosable = computed2(() => props.closable || tabsRoot.props.closable); const active = computedEager(() => { var _a2; return tabsRoot.currentName.value === ((_a2 = props.name) != null ? _a2 : index.value); }); const loaded = ref(active.value); const paneName = computed2(() => { var _a2; return (_a2 = props.name) != null ? _a2 : index.value; }); const shouldBeRender = computedEager(() => !props.lazy || loaded.value || active.value); watch(active, (val) => { if (val) loaded.value = true; }); const pane = reactive({ uid: instance.uid, slots, props, paneName, active, index, isClosable }); onMounted(() => { tabsRoot.registerPane(pane); }); onUnmounted(() => { tabsRoot.unregisterPane(pane.uid); }); return (_ctx, _cache) => { return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", { key: 0, id: `pane-${unref(paneName)}`, class: normalizeClass(unref(ns).b()), role: "tabpanel", "aria-hidden": !unref(active), "aria-labelledby": `tab-${unref(paneName)}` }, [ renderSlot(_ctx.$slots, "default") ], 10, _hoisted_161)), [ [vShow, unref(active)] ]) : createCommentVNode("v-if", true); }; } }); var TabPane = _export_sfc(_sfc_main123, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tabs/index.mjs var ElTabs = withInstall(Tabs, { TabPane }); var ElTabPane = withNoopInstall(TabPane); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/text/src/text.mjs var textProps = buildProps({ type: { type: String, values: ["primary", "success", "info", "warning", "danger", ""], default: "" }, size: { type: String, values: componentSizes, default: "" }, truncated: { type: Boolean }, tag: { type: String, default: "span" } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/text/src/text2.mjs var __default__85 = defineComponent({ name: "ElText" }); var _sfc_main124 = defineComponent({ ...__default__85, props: textProps, setup(__props) { const props = __props; const textSize = useFormSize(); const ns = useNamespace("text"); const textKls = computed2(() => [ ns.b(), ns.m(props.type), ns.m(textSize.value), ns.is("truncated", props.truncated) ]); return (_ctx, _cache) => { return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { class: normalizeClass(unref(textKls)) }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["class"]); }; } }); var Text2 = _export_sfc(_sfc_main124, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/text/index.mjs var ElText = withInstall(Text2); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/time-select/src/time-select2.mjs var import_dayjs16 = __toESM(require_dayjs_min(), 1); var import_customParseFormat3 = __toESM(require_customParseFormat(), 1); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/time-select/src/time-select.mjs var timeSelectProps = buildProps({ format: { type: String, default: "HH:mm" }, modelValue: String, disabled: Boolean, editable: { type: Boolean, default: true }, effect: { type: String, default: "light" }, clearable: { type: Boolean, default: true }, size: useSizeProp, placeholder: String, start: { type: String, default: "09:00" }, end: { type: String, default: "18:00" }, step: { type: String, default: "00:30" }, minTime: String, maxTime: String, name: String, prefixIcon: { type: definePropType([String, Object]), default: () => clock_default }, clearIcon: { type: definePropType([String, Object]), default: () => circle_close_default } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/time-select/src/utils.mjs var parseTime = (time) => { const values2 = (time || "").split(":"); if (values2.length >= 2) { let hours = Number.parseInt(values2[0], 10); const minutes = Number.parseInt(values2[1], 10); const timeUpper = time.toUpperCase(); if (timeUpper.includes("AM") && hours === 12) { hours = 0; } else if (timeUpper.includes("PM") && hours !== 12) { hours += 12; } return { hours, minutes }; } return null; }; var compareTime = (time1, time2) => { const value1 = parseTime(time1); if (!value1) return -1; const value2 = parseTime(time2); if (!value2) return -1; const minutes1 = value1.minutes + value1.hours * 60; const minutes2 = value2.minutes + value2.hours * 60; if (minutes1 === minutes2) { return 0; } return minutes1 > minutes2 ? 1 : -1; }; var padTime = (time) => { return `${time}`.padStart(2, "0"); }; var formatTime2 = (time) => { return `${padTime(time.hours)}:${padTime(time.minutes)}`; }; var nextTime = (time, step) => { const timeValue = parseTime(time); if (!timeValue) return ""; const stepValue = parseTime(step); if (!stepValue) return ""; const next = { hours: timeValue.hours, minutes: timeValue.minutes }; next.minutes += stepValue.minutes; next.hours += stepValue.hours; next.hours += Math.floor(next.minutes / 60); next.minutes = next.minutes % 60; return formatTime2(next); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/time-select/src/time-select2.mjs var __default__86 = defineComponent({ name: "ElTimeSelect" }); var _sfc_main125 = defineComponent({ ...__default__86, props: timeSelectProps, emits: ["change", "blur", "focus", "update:modelValue"], setup(__props, { expose }) { const props = __props; import_dayjs16.default.extend(import_customParseFormat3.default); const { Option: ElOption2 } = ElSelect; const nsInput = useNamespace("input"); const select = ref(); const _disabled = useFormDisabled(); const value = computed2(() => props.modelValue); const start = computed2(() => { const time = parseTime(props.start); return time ? formatTime2(time) : null; }); const end2 = computed2(() => { const time = parseTime(props.end); return time ? formatTime2(time) : null; }); const step = computed2(() => { const time = parseTime(props.step); return time ? formatTime2(time) : null; }); const minTime = computed2(() => { const time = parseTime(props.minTime || ""); return time ? formatTime2(time) : null; }); const maxTime = computed2(() => { const time = parseTime(props.maxTime || ""); return time ? formatTime2(time) : null; }); const items = computed2(() => { const result2 = []; if (props.start && props.end && props.step) { let current = start.value; let currentTime; while (current && end2.value && compareTime(current, end2.value) <= 0) { currentTime = (0, import_dayjs16.default)(current, "HH:mm").format(props.format); result2.push({ value: currentTime, disabled: compareTime(current, minTime.value || "-1:-1") <= 0 || compareTime(current, maxTime.value || "100:100") >= 0 }); current = nextTime(current, step.value); } } return result2; }); const blur = () => { var _a2, _b; (_b = (_a2 = select.value) == null ? void 0 : _a2.blur) == null ? void 0 : _b.call(_a2); }; const focus = () => { var _a2, _b; (_b = (_a2 = select.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2); }; expose({ blur, focus }); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ElSelect), { ref_key: "select", ref: select, "model-value": unref(value), disabled: unref(_disabled), clearable: _ctx.clearable, "clear-icon": _ctx.clearIcon, size: _ctx.size, effect: _ctx.effect, placeholder: _ctx.placeholder, "default-first-option": "", filterable: _ctx.editable, "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit("update:modelValue", event)), onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit("change", event)), onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)), onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event)) }, { prefix: withCtx(() => [ _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(nsInput).e("prefix-icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ]), default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => { return openBlock(), createBlock(unref(ElOption2), { key: item.value, label: item.value, value: item.value, disabled: item.disabled }, null, 8, ["label", "value", "disabled"]); }), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable"]); }; } }); var TimeSelect = _export_sfc(_sfc_main125, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/time-select/index.mjs TimeSelect.install = (app) => { app.component(TimeSelect.name, TimeSelect); }; var _TimeSelect = TimeSelect; var ElTimeSelect = _TimeSelect; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/timeline/src/timeline.mjs var Timeline = defineComponent({ name: "ElTimeline", setup(_2, { slots }) { const ns = useNamespace("timeline"); provide("timeline", slots); return () => { return h("ul", { class: [ns.b()] }, [renderSlot(slots, "default")]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/timeline/src/timeline-item.mjs var timelineItemProps = buildProps({ timestamp: { type: String, default: "" }, hideTimestamp: { type: Boolean, default: false }, center: { type: Boolean, default: false }, placement: { type: String, values: ["top", "bottom"], default: "bottom" }, type: { type: String, values: ["primary", "success", "warning", "danger", "info"], default: "" }, color: { type: String, default: "" }, size: { type: String, values: ["normal", "large"], default: "normal" }, icon: { type: iconPropType }, hollow: { type: Boolean, default: false } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs var __default__87 = defineComponent({ name: "ElTimelineItem" }); var _sfc_main126 = defineComponent({ ...__default__87, props: timelineItemProps, setup(__props) { const ns = useNamespace("timeline-item"); return (_ctx, _cache) => { return openBlock(), createElementBlock("li", { class: normalizeClass([unref(ns).b(), { [unref(ns).e("center")]: _ctx.center }]) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns).e("tail")) }, null, 2), !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([ unref(ns).e("node"), unref(ns).em("node", _ctx.size || ""), unref(ns).em("node", _ctx.type || ""), unref(ns).is("hollow", _ctx.hollow) ]), style: normalizeStyle({ backgroundColor: _ctx.color }) }, [ _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns).e("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 6)) : createCommentVNode("v-if", true), _ctx.$slots.dot ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(ns).e("dot")) }, [ renderSlot(_ctx.$slots, "dot") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [ !_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")]) }, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [ renderSlot(_ctx.$slots, "default") ], 2), !_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")]) }, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true) ], 2) ], 2); }; } }); var TimelineItem = _export_sfc(_sfc_main126, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/timeline/index.mjs var ElTimeline = withInstall(Timeline, { TimelineItem }); var ElTimelineItem = withNoopInstall(TimelineItem); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/common.mjs var tooltipV2CommonProps = buildProps({ nowrap: Boolean }); var TooltipV2Sides = ((TooltipV2Sides2) => { TooltipV2Sides2["top"] = "top"; TooltipV2Sides2["bottom"] = "bottom"; TooltipV2Sides2["left"] = "left"; TooltipV2Sides2["right"] = "right"; return TooltipV2Sides2; })(TooltipV2Sides || {}); var tooltipV2Sides = Object.values(TooltipV2Sides); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/arrow.mjs var tooltipV2ArrowProps = buildProps({ width: { type: Number, default: 10 }, height: { type: Number, default: 10 }, style: { type: definePropType(Object), default: null } }); var tooltipV2ArrowSpecialProps = buildProps({ side: { type: definePropType(String), values: tooltipV2Sides, required: true } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/content.mjs var tooltipV2Strategies = ["absolute", "fixed"]; var tooltipV2Placements = [ "top-start", "top-end", "top", "bottom-start", "bottom-end", "bottom", "left-start", "left-end", "left", "right-start", "right-end", "right" ]; var tooltipV2ContentProps = buildProps({ ariaLabel: String, arrowPadding: { type: definePropType(Number), default: 5 }, effect: { type: String, default: "" }, contentClass: String, placement: { type: definePropType(String), values: tooltipV2Placements, default: "bottom" }, reference: { type: definePropType(Object), default: null }, offset: { type: Number, default: 8 }, strategy: { type: definePropType(String), values: tooltipV2Strategies, default: "absolute" }, showArrow: { type: Boolean, default: false } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/root.mjs var tooltipV2RootProps = buildProps({ delayDuration: { type: Number, default: 300 }, defaultOpen: Boolean, open: { type: Boolean, default: void 0 }, onOpenChange: { type: definePropType(Function) }, "onUpdate:open": { type: definePropType(Function) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/trigger.mjs var EventHandler = { type: definePropType(Function) }; var tooltipV2TriggerProps = buildProps({ onBlur: EventHandler, onClick: EventHandler, onFocus: EventHandler, onMouseDown: EventHandler, onMouseEnter: EventHandler, onMouseLeave: EventHandler }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/tooltip.mjs var tooltipV2Props = buildProps({ ...tooltipV2RootProps, ...tooltipV2ArrowProps, ...tooltipV2TriggerProps, ...tooltipV2ContentProps, alwaysOn: Boolean, fullTransition: Boolean, transitionProps: { type: definePropType(Object), default: null }, teleported: Boolean, to: { type: definePropType(String), default: "body" } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/constants.mjs var tooltipV2RootKey = Symbol("tooltipV2"); var tooltipV2ContentKey = Symbol("tooltipV2Content"); var TOOLTIP_V2_OPEN = "tooltip_v2.open"; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/root2.mjs var __default__88 = defineComponent({ name: "ElTooltipV2Root" }); var _sfc_main127 = defineComponent({ ...__default__88, props: tooltipV2RootProps, setup(__props, { expose }) { const props = __props; const _open = ref(props.defaultOpen); const triggerRef2 = ref(null); const open = computed2({ get: () => isPropAbsent(props.open) ? _open.value : props.open, set: (open2) => { var _a2; _open.value = open2; (_a2 = props["onUpdate:open"]) == null ? void 0 : _a2.call(props, open2); } }); const isOpenDelayed = computed2(() => isNumber(props.delayDuration) && props.delayDuration > 0); const { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(() => { open.value = true; }, computed2(() => props.delayDuration), { immediate: false }); const ns = useNamespace("tooltip-v2"); const contentId = useId(); const onNormalOpen = () => { clearTimer(); open.value = true; }; const onDelayOpen = () => { unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen(); }; const onOpen = onNormalOpen; const onClose = () => { clearTimer(); open.value = false; }; const onChange = (open2) => { var _a2; if (open2) { document.dispatchEvent(new CustomEvent(TOOLTIP_V2_OPEN)); onOpen(); } (_a2 = props.onOpenChange) == null ? void 0 : _a2.call(props, open2); }; watch(open, onChange); onMounted(() => { document.addEventListener(TOOLTIP_V2_OPEN, onClose); }); onBeforeUnmount(() => { clearTimer(); document.removeEventListener(TOOLTIP_V2_OPEN, onClose); }); provide(tooltipV2RootKey, { contentId, triggerRef: triggerRef2, ns, onClose, onDelayOpen, onOpen }); expose({ onOpen, onClose }); return (_ctx, _cache) => { return renderSlot(_ctx.$slots, "default", { open: unref(open) }); }; } }); var TooltipV2Root = _export_sfc(_sfc_main127, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/root.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/arrow2.mjs var __default__89 = defineComponent({ name: "ElTooltipV2Arrow" }); var _sfc_main128 = defineComponent({ ...__default__89, props: { ...tooltipV2ArrowProps, ...tooltipV2ArrowSpecialProps }, setup(__props) { const props = __props; const { ns } = inject(tooltipV2RootKey); const { arrowRef } = inject(tooltipV2ContentKey); const arrowStyle = computed2(() => { const { style, width, height } = props; const namespace = ns.namespace.value; return { [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`, [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`, [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`, [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1, ...style || {} }; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("span", { ref_key: "arrowRef", ref: arrowRef, style: normalizeStyle(unref(arrowStyle)), class: normalizeClass(unref(ns).e("arrow")) }, null, 6); }; } }); var TooltipV2Arrow = _export_sfc(_sfc_main128, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/arrow.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/visual-hidden/src/visual-hidden.mjs var visualHiddenProps = buildProps({ style: { type: definePropType([String, Object, Array]), default: () => ({}) } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/visual-hidden/src/visual-hidden2.mjs var __default__90 = defineComponent({ name: "ElVisuallyHidden" }); var _sfc_main129 = defineComponent({ ...__default__90, props: visualHiddenProps, setup(__props) { const props = __props; const computedStyle = computed2(() => { return [ props.style, { position: "absolute", border: 0, width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", wordWrap: "normal" } ]; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, { style: unref(computedStyle) }), [ renderSlot(_ctx.$slots, "default") ], 16); }; } }); var ElVisuallyHidden = _export_sfc(_sfc_main129, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/visual-hidden/src/visual-hidden.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/content2.mjs var _hoisted_163 = ["data-side"]; var __default__91 = defineComponent({ name: "ElTooltipV2Content" }); var _sfc_main130 = defineComponent({ ...__default__91, props: { ...tooltipV2ContentProps, ...tooltipV2CommonProps }, setup(__props) { const props = __props; const { triggerRef: triggerRef2, contentId } = inject(tooltipV2RootKey); const placement = ref(props.placement); const strategy = ref(props.strategy); const arrowRef = ref(null); const { referenceRef, contentRef, middlewareData, x: x2, y, update: update2 } = useFloating({ placement, strategy, middleware: computed2(() => { const middleware = [offset(props.offset)]; if (props.showArrow) { middleware.push(arrowMiddleware({ arrowRef })); } return middleware; }) }); const zIndex2 = useZIndex().nextZIndex(); const ns = useNamespace("tooltip-v2"); const side = computed2(() => { return placement.value.split("-")[0]; }); const contentStyle = computed2(() => { return { position: unref(strategy), top: `${unref(y) || 0}px`, left: `${unref(x2) || 0}px`, zIndex: zIndex2 }; }); const arrowStyle = computed2(() => { if (!props.showArrow) return {}; const { arrow: arrow2 } = unref(middlewareData); return { [`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow2 == null ? void 0 : arrow2.x}px` || "", [`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow2 == null ? void 0 : arrow2.y}px` || "" }; }); const contentClass = computed2(() => [ ns.e("content"), ns.is("dark", props.effect === "dark"), ns.is(unref(strategy)), props.contentClass ]); watch(arrowRef, () => update2()); watch(() => props.placement, (val) => placement.value = val); onMounted(() => { watch(() => props.reference || triggerRef2.value, (el) => { referenceRef.value = el || void 0; }, { immediate: true }); }); provide(tooltipV2ContentKey, { arrowRef }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { ref_key: "contentRef", ref: contentRef, style: normalizeStyle(unref(contentStyle)), "data-tooltip-v2-root": "" }, [ !_ctx.nowrap ? (openBlock(), createElementBlock("div", { key: 0, "data-side": unref(side), class: normalizeClass(unref(contentClass)) }, [ renderSlot(_ctx.$slots, "default", { contentStyle: unref(contentStyle), contentClass: unref(contentClass) }), createVNode(unref(ElVisuallyHidden), { id: unref(contentId), role: "tooltip" }, { default: withCtx(() => [ _ctx.ariaLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createTextVNode(toDisplayString(_ctx.ariaLabel), 1) ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 }) ]), _: 3 }, 8, ["id"]), renderSlot(_ctx.$slots, "arrow", { style: normalizeStyle(unref(arrowStyle)), side: unref(side) }) ], 10, _hoisted_163)) : createCommentVNode("v-if", true) ], 4); }; } }); var TooltipV2Content = _export_sfc(_sfc_main130, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/content.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/forward-ref.mjs var forwardRefProps = buildProps({ setRef: { type: definePropType(Function), required: true }, onlyChild: Boolean }); var ForwardRef = defineComponent({ props: forwardRefProps, setup(props, { slots }) { const fragmentRef = ref(); const setRef = composeRefs(fragmentRef, (el) => { if (el) { props.setRef(el.nextElementSibling); } else { props.setRef(null); } }); return () => { var _a2; const [firstChild] = ((_a2 = slots.default) == null ? void 0 : _a2.call(slots)) || []; const child = props.onlyChild ? ensureOnlyChild(firstChild.children) : firstChild.children; return createVNode(Fragment, { "ref": setRef }, [child]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/trigger2.mjs var __default__92 = defineComponent({ name: "ElTooltipV2Trigger" }); var _sfc_main131 = defineComponent({ ...__default__92, props: { ...tooltipV2CommonProps, ...tooltipV2TriggerProps }, setup(__props) { const props = __props; const { onClose, onOpen, onDelayOpen, triggerRef: triggerRef2, contentId } = inject(tooltipV2RootKey); let isMousedown = false; const setTriggerRef = (el) => { triggerRef2.value = el; }; const onMouseup = () => { isMousedown = false; }; const onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen); const onMouseleave = composeEventHandlers(props.onMouseLeave, onClose); const onMousedown = composeEventHandlers(props.onMouseDown, () => { onClose(); isMousedown = true; document.addEventListener("mouseup", onMouseup, { once: true }); }); const onFocus = composeEventHandlers(props.onFocus, () => { if (!isMousedown) onOpen(); }); const onBlur = composeEventHandlers(props.onBlur, onClose); const onClick = composeEventHandlers(props.onClick, (e) => { if (e.detail === 0) onClose(); }); const events = { blur: onBlur, click: onClick, focus: onFocus, mousedown: onMousedown, mouseenter: onMouseenter, mouseleave: onMouseleave }; const setEvents = (el, events2, type4) => { if (el) { Object.entries(events2).forEach(([name, handler]) => { el[type4](name, handler); }); } }; watch(triggerRef2, (triggerEl, previousTriggerEl) => { setEvents(triggerEl, events, "addEventListener"); setEvents(previousTriggerEl, events, "removeEventListener"); if (triggerEl) { triggerEl.setAttribute("aria-describedby", contentId.value); } }); onBeforeUnmount(() => { setEvents(triggerRef2.value, events, "removeEventListener"); document.removeEventListener("mouseup", onMouseup); }); return (_ctx, _cache) => { return _ctx.nowrap ? (openBlock(), createBlock(unref(ForwardRef), { key: 0, "set-ref": setTriggerRef, "only-child": "" }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 })) : (openBlock(), createElementBlock("button", mergeProps({ key: 1, ref_key: "triggerRef", ref: triggerRef2 }, _ctx.$attrs), [ renderSlot(_ctx.$slots, "default") ], 16)); }; } }); var TooltipV2Trigger = _export_sfc(_sfc_main131, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/trigger.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/src/tooltip2.mjs var __default__93 = defineComponent({ name: "ElTooltipV2" }); var _sfc_main132 = defineComponent({ ...__default__93, props: tooltipV2Props, setup(__props) { const props = __props; const refedProps = toRefs(props); const arrowProps = reactive(pick_default(refedProps, Object.keys(tooltipV2ArrowProps))); const contentProps = reactive(pick_default(refedProps, Object.keys(tooltipV2ContentProps))); const rootProps = reactive(pick_default(refedProps, Object.keys(tooltipV2RootProps))); const triggerProps = reactive(pick_default(refedProps, Object.keys(tooltipV2TriggerProps))); return (_ctx, _cache) => { return openBlock(), createBlock(TooltipV2Root, normalizeProps(guardReactiveProps(rootProps)), { default: withCtx(({ open }) => [ createVNode(TooltipV2Trigger, mergeProps(triggerProps, { nowrap: "" }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "trigger") ]), _: 3 }, 16), (openBlock(), createBlock(Teleport, { to: _ctx.to, disabled: !_ctx.teleported }, [ _ctx.fullTransition ? (openBlock(), createBlock(Transition, normalizeProps(mergeProps({ key: 0 }, _ctx.transitionProps)), { default: withCtx(() => [ _ctx.alwaysOn || open ? (openBlock(), createBlock(TooltipV2Content, normalizeProps(mergeProps({ key: 0 }, contentProps)), { arrow: withCtx(({ style, side }) => [ _ctx.showArrow ? (openBlock(), createBlock(TooltipV2Arrow, mergeProps({ key: 0 }, arrowProps, { style, side }), null, 16, ["style", "side"])) : createCommentVNode("v-if", true) ]), default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16)) : createCommentVNode("v-if", true) ]), _: 2 }, 1040)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ _ctx.alwaysOn || open ? (openBlock(), createBlock(TooltipV2Content, normalizeProps(mergeProps({ key: 0 }, contentProps)), { arrow: withCtx(({ style, side }) => [ _ctx.showArrow ? (openBlock(), createBlock(TooltipV2Arrow, mergeProps({ key: 0 }, arrowProps, { style, side }), null, 16, ["style", "side"])) : createCommentVNode("v-if", true) ]), default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16)) : createCommentVNode("v-if", true) ], 64)) ], 8, ["to", "disabled"])) ]), _: 3 }, 16); }; } }); var TooltipV2 = _export_sfc(_sfc_main132, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/tooltip.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tooltip-v2/index.mjs var ElTooltipV2 = withInstall(TooltipV2); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/transfer.mjs var LEFT_CHECK_CHANGE_EVENT = "left-check-change"; var RIGHT_CHECK_CHANGE_EVENT = "right-check-change"; var transferProps = buildProps({ data: { type: definePropType(Array), default: () => [] }, titles: { type: definePropType(Array), default: () => [] }, buttonTexts: { type: definePropType(Array), default: () => [] }, filterPlaceholder: String, filterMethod: { type: definePropType(Function) }, leftDefaultChecked: { type: definePropType(Array), default: () => [] }, rightDefaultChecked: { type: definePropType(Array), default: () => [] }, renderContent: { type: definePropType(Function) }, modelValue: { type: definePropType(Array), default: () => [] }, format: { type: definePropType(Object), default: () => ({}) }, filterable: Boolean, props: { type: definePropType(Object), default: () => mutable({ label: "label", key: "key", disabled: "disabled" }) }, targetOrder: { type: String, values: ["original", "push", "unshift"], default: "original" }, validateEvent: { type: Boolean, default: true } }); var transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray) || isArray(value) && isNil_default(movedKeys); var transferEmits = { [CHANGE_EVENT]: (value, direction2, movedKeys) => [value, movedKeys].every(isArray) && ["left", "right"].includes(direction2), [UPDATE_MODEL_EVENT]: (value) => isArray(value), [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn, [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs var CHECKED_CHANGE_EVENT = "checked-change"; var transferPanelProps = buildProps({ data: transferProps.data, optionRender: { type: definePropType(Function) }, placeholder: String, title: String, filterable: Boolean, format: transferProps.format, filterMethod: transferProps.filterMethod, defaultChecked: transferProps.leftDefaultChecked, props: transferProps.props }); var transferPanelEmits = { [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs var usePropsAlias = (props) => { const initProps = { label: "label", key: "key", disabled: "disabled" }; return computed2(() => ({ ...initProps, ...props.props })); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs var useCheck = (props, panelState, emit) => { const propsAlias = usePropsAlias(props); const filteredData = computed2(() => { return props.data.filter((item) => { if (isFunction(props.filterMethod)) { return props.filterMethod(panelState.query, item); } else { const label = String(item[propsAlias.value.label] || item[propsAlias.value.key]); return label.toLowerCase().includes(panelState.query.toLowerCase()); } }); }); const checkableData = computed2(() => filteredData.value.filter((item) => !item[propsAlias.value.disabled])); const checkedSummary = computed2(() => { const checkedLength = panelState.checked.length; const dataLength = props.data.length; const { noChecked, hasChecked } = props.format; if (noChecked && hasChecked) { return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString()); } else { return `${checkedLength}/${dataLength}`; } }); const isIndeterminate = computed2(() => { const checkedLength = panelState.checked.length; return checkedLength > 0 && checkedLength < checkableData.value.length; }); const updateAllChecked = () => { const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]); panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item)); }; const handleAllCheckedChange = (value) => { panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : []; }; watch(() => panelState.checked, (val, oldVal) => { updateAllChecked(); if (panelState.checkChangeByUser) { const movedKeys = val.concat(oldVal).filter((v2) => !val.includes(v2) || !oldVal.includes(v2)); emit(CHECKED_CHANGE_EVENT, val, movedKeys); } else { emit(CHECKED_CHANGE_EVENT, val); panelState.checkChangeByUser = true; } }); watch(checkableData, () => { updateAllChecked(); }); watch(() => props.data, () => { const checked = []; const filteredDataKeys = filteredData.value.map((item) => item[propsAlias.value.key]); panelState.checked.forEach((item) => { if (filteredDataKeys.includes(item)) { checked.push(item); } }); panelState.checkChangeByUser = false; panelState.checked = checked; }); watch(() => props.defaultChecked, (val, oldVal) => { if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item))) return; const checked = []; const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]); val.forEach((item) => { if (checkableDataKeys.includes(item)) { checked.push(item); } }); panelState.checkChangeByUser = false; panelState.checked = checked; }, { immediate: true }); return { filteredData, checkableData, checkedSummary, isIndeterminate, updateAllChecked, handleAllCheckedChange }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/composables/use-checked-change.mjs var useCheckedChange = (checkedState, emit) => { const onSourceCheckedChange = (val, movedKeys) => { checkedState.leftChecked = val; if (!movedKeys) return; emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys); }; const onTargetCheckedChange = (val, movedKeys) => { checkedState.rightChecked = val; if (!movedKeys) return; emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys); }; return { onSourceCheckedChange, onTargetCheckedChange }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs var useComputedData = (props) => { const propsAlias = usePropsAlias(props); const dataObj = computed2(() => props.data.reduce((o2, cur) => (o2[cur[propsAlias.value.key]] = cur) && o2, {})); const sourceData = computed2(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key]))); const targetData = computed2(() => { if (props.targetOrder === "original") { return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key])); } else { return props.modelValue.reduce((arr, cur) => { const val = dataObj.value[cur]; if (val) { arr.push(val); } return arr; }, []); } }); return { sourceData, targetData }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs var useMove = (props, checkedState, emit) => { const propsAlias = usePropsAlias(props); const _emit = (value, direction2, movedKeys) => { emit(UPDATE_MODEL_EVENT, value); emit(CHANGE_EVENT, value, direction2, movedKeys); }; const addToLeft = () => { const currentValue = props.modelValue.slice(); checkedState.rightChecked.forEach((item) => { const index = currentValue.indexOf(item); if (index > -1) { currentValue.splice(index, 1); } }); _emit(currentValue, "left", checkedState.rightChecked); }; const addToRight = () => { let currentValue = props.modelValue.slice(); const itemsToBeMoved = props.data.filter((item) => { const itemKey = item[propsAlias.value.key]; return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey); }).map((item) => item[propsAlias.value.key]); currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved); if (props.targetOrder === "original") { currentValue = props.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]); } _emit(currentValue, "right", checkedState.leftChecked); }; return { addToLeft, addToRight }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs var __default__94 = defineComponent({ name: "ElTransferPanel" }); var _sfc_main133 = defineComponent({ ...__default__94, props: transferPanelProps, emits: transferPanelEmits, setup(__props, { expose, emit }) { const props = __props; const slots = useSlots(); const OptionContent = ({ option }) => option; const { t } = useLocale(); const ns = useNamespace("transfer"); const panelState = reactive({ checked: [], allChecked: false, query: "", checkChangeByUser: true }); const propsAlias = usePropsAlias(props); const { filteredData, checkedSummary, isIndeterminate, handleAllCheckedChange } = useCheck(props, panelState, emit); const hasNoMatch = computed2(() => !isEmpty2(panelState.query) && isEmpty2(filteredData.value)); const hasFooter = computed2(() => !isEmpty2(slots.default()[0].children)); const { checked, allChecked, query } = toRefs(panelState); expose({ query }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b("panel")) }, [ createBaseVNode("p", { class: normalizeClass(unref(ns).be("panel", "header")) }, [ createVNode(unref(ElCheckbox), { modelValue: unref(allChecked), "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null), indeterminate: unref(isIndeterminate), "validate-event": false, onChange: unref(handleAllCheckedChange) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.title) + " ", 1), createBaseVNode("span", null, toDisplayString(unref(checkedSummary)), 1) ]), _: 1 }, 8, ["modelValue", "indeterminate", "onChange"]) ], 2), createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", unref(hasFooter))]) }, [ _ctx.filterable ? (openBlock(), createBlock(unref(ElInput), { key: 0, modelValue: unref(query), "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null), class: normalizeClass(unref(ns).be("panel", "filter")), size: "default", placeholder: _ctx.placeholder, "prefix-icon": unref(search_default), clearable: "", "validate-event": false }, null, 8, ["modelValue", "class", "placeholder", "prefix-icon"])) : createCommentVNode("v-if", true), withDirectives(createVNode(unref(ElCheckboxGroup), { modelValue: unref(checked), "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(checked) ? checked.value = $event : null), "validate-event": false, class: normalizeClass([unref(ns).is("filterable", _ctx.filterable), unref(ns).be("panel", "list")]) }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => { return openBlock(), createBlock(unref(ElCheckbox), { key: item[unref(propsAlias).key], class: normalizeClass(unref(ns).be("panel", "item")), label: item[unref(propsAlias).key], disabled: item[unref(propsAlias).disabled], "validate-event": false }, { default: withCtx(() => { var _a2; return [ createVNode(OptionContent, { option: (_a2 = _ctx.optionRender) == null ? void 0 : _a2.call(_ctx, item) }, null, 8, ["option"]) ]; }), _: 2 }, 1032, ["class", "label", "disabled"]); }), 128)) ]), _: 1 }, 8, ["modelValue", "class"]), [ [vShow, !unref(hasNoMatch) && !unref(isEmpty2)(_ctx.data)] ]), withDirectives(createBaseVNode("p", { class: normalizeClass(unref(ns).be("panel", "empty")) }, toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 3), [ [vShow, unref(hasNoMatch) || unref(isEmpty2)(_ctx.data)] ]) ], 2), unref(hasFooter) ? (openBlock(), createElementBlock("p", { key: 0, class: normalizeClass(unref(ns).be("panel", "footer")) }, [ renderSlot(_ctx.$slots, "default") ], 2)) : createCommentVNode("v-if", true) ], 2); }; } }); var TransferPanel = _export_sfc(_sfc_main133, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/src/transfer2.mjs var _hoisted_164 = { key: 0 }; var _hoisted_239 = { key: 0 }; var __default__95 = defineComponent({ name: "ElTransfer" }); var _sfc_main134 = defineComponent({ ...__default__95, props: transferProps, emits: transferEmits, setup(__props, { expose, emit }) { const props = __props; const slots = useSlots(); const { t } = useLocale(); const ns = useNamespace("transfer"); const { formItem } = useFormItem(); const checkedState = reactive({ leftChecked: [], rightChecked: [] }); const propsAlias = usePropsAlias(props); const { sourceData, targetData } = useComputedData(props); const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit); const { addToLeft, addToRight } = useMove(props, checkedState, emit); const leftPanel = ref(); const rightPanel = ref(); const clearQuery = (which) => { switch (which) { case "left": leftPanel.value.query = ""; break; case "right": rightPanel.value.query = ""; break; } }; const hasButtonTexts = computed2(() => props.buttonTexts.length === 2); const leftPanelTitle = computed2(() => props.titles[0] || t("el.transfer.titles.0")); const rightPanelTitle = computed2(() => props.titles[1] || t("el.transfer.titles.1")); const panelFilterPlaceholder = computed2(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder")); watch(() => props.modelValue, () => { var _a2; if (props.validateEvent) { (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change").catch((err) => debugWarn(err)); } }); const optionRender = computed2(() => (option) => { if (props.renderContent) return props.renderContent(h, option); if (slots.default) return slots.default({ option }); return h("span", option[propsAlias.value.label] || option[propsAlias.value.key]); }); expose({ clearQuery, leftPanel, rightPanel }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [ createVNode(TransferPanel, { ref_key: "leftPanel", ref: leftPanel, data: unref(sourceData), "option-render": unref(optionRender), placeholder: unref(panelFilterPlaceholder), title: unref(leftPanelTitle), filterable: _ctx.filterable, format: _ctx.format, "filter-method": _ctx.filterMethod, "default-checked": _ctx.leftDefaultChecked, props: props.props, onCheckedChange: unref(onSourceCheckedChange) }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "left-footer") ]), _: 3 }, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "onCheckedChange"]), createBaseVNode("div", { class: normalizeClass(unref(ns).e("buttons")) }, [ createVNode(unref(ElButton), { type: "primary", class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", unref(hasButtonTexts))]), disabled: unref(isEmpty2)(checkedState.rightChecked), onClick: unref(addToLeft) }, { default: withCtx(() => [ createVNode(unref(ElIcon), null, { default: withCtx(() => [ createVNode(unref(arrow_left_default)) ]), _: 1 }), !unref(isUndefined2)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_164, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true) ]), _: 1 }, 8, ["class", "disabled", "onClick"]), createVNode(unref(ElButton), { type: "primary", class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", unref(hasButtonTexts))]), disabled: unref(isEmpty2)(checkedState.leftChecked), onClick: unref(addToRight) }, { default: withCtx(() => [ !unref(isUndefined2)(_ctx.buttonTexts[1]) ? (openBlock(), createElementBlock("span", _hoisted_239, toDisplayString(_ctx.buttonTexts[1]), 1)) : createCommentVNode("v-if", true), createVNode(unref(ElIcon), null, { default: withCtx(() => [ createVNode(unref(arrow_right_default)) ]), _: 1 }) ]), _: 1 }, 8, ["class", "disabled", "onClick"]) ], 2), createVNode(TransferPanel, { ref_key: "rightPanel", ref: rightPanel, data: unref(targetData), "option-render": unref(optionRender), placeholder: unref(panelFilterPlaceholder), filterable: _ctx.filterable, format: _ctx.format, "filter-method": _ctx.filterMethod, title: unref(rightPanelTitle), "default-checked": _ctx.rightDefaultChecked, props: props.props, onCheckedChange: unref(onTargetCheckedChange) }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "right-footer") ]), _: 3 }, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "onCheckedChange"]) ], 2); }; } }); var Transfer = _export_sfc(_sfc_main134, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/transfer/index.mjs var ElTransfer = withInstall(Transfer); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/model/util.mjs var NODE_KEY = "$treeNodeId"; var markNodeData = function(node, data) { if (!data || data[NODE_KEY]) return; Object.defineProperty(data, NODE_KEY, { value: node.id, enumerable: false, configurable: false, writable: false }); }; var getNodeKey = function(key, data) { if (!key) return data[NODE_KEY]; return data[key]; }; var handleCurrentChange = (store, emit, setCurrent) => { const preCurrentNode = store.value.currentNode; setCurrent(); const currentNode = store.value.currentNode; if (preCurrentNode === currentNode) return; emit("current-change", currentNode ? currentNode.data : null, currentNode); }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/model/node.mjs var getChildState = (node) => { let all = true; let none = true; let allWithoutDisable = true; for (let i = 0, j = node.length; i < j; i++) { const n = node[i]; if (n.checked !== true || n.indeterminate) { all = false; if (!n.disabled) { allWithoutDisable = false; } } if (n.checked !== false || n.indeterminate) { none = false; } } return { all, none, allWithoutDisable, half: !all && !none }; }; var reInitChecked = function(node) { if (node.childNodes.length === 0 || node.loading) return; const { all, none, half } = getChildState(node.childNodes); if (all) { node.checked = true; node.indeterminate = false; } else if (half) { node.checked = false; node.indeterminate = true; } else if (none) { node.checked = false; node.indeterminate = false; } const parent2 = node.parent; if (!parent2 || parent2.level === 0) return; if (!node.store.checkStrictly) { reInitChecked(parent2); } }; var getPropertyFromData = function(node, prop) { const props = node.store.props; const data = node.data || {}; const config = props[prop]; if (typeof config === "function") { return config(data, node); } else if (typeof config === "string") { return data[config]; } else if (typeof config === "undefined") { const dataProp = data[prop]; return dataProp === void 0 ? "" : dataProp; } }; var nodeIdSeed = 0; var Node2 = class { constructor(options) { this.id = nodeIdSeed++; this.text = null; this.checked = false; this.indeterminate = false; this.data = null; this.expanded = false; this.parent = null; this.visible = true; this.isCurrent = false; this.canFocus = false; for (const name in options) { if (hasOwn(options, name)) { this[name] = options[name]; } } this.level = 0; this.loaded = false; this.childNodes = []; this.loading = false; if (this.parent) { this.level = this.parent.level + 1; } } initialize() { const store = this.store; if (!store) { throw new Error("[Node]store is required!"); } store.registerNode(this); const props = store.props; if (props && typeof props.isLeaf !== "undefined") { const isLeaf2 = getPropertyFromData(this, "isLeaf"); if (typeof isLeaf2 === "boolean") { this.isLeafByUser = isLeaf2; } } if (store.lazy !== true && this.data) { this.setData(this.data); if (store.defaultExpandAll) { this.expanded = true; this.canFocus = true; } } else if (this.level > 0 && store.lazy && store.defaultExpandAll) { this.expand(); } if (!Array.isArray(this.data)) { markNodeData(this, this.data); } if (!this.data) return; const defaultExpandedKeys = store.defaultExpandedKeys; const key = store.key; if (key && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) { this.expand(null, store.autoExpandParent); } if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) { store.currentNode = this; store.currentNode.isCurrent = true; } if (store.lazy) { store._initDefaultCheckedNode(this); } this.updateLeafState(); if (this.parent && (this.level === 1 || this.parent.expanded === true)) this.canFocus = true; } setData(data) { if (!Array.isArray(data)) { markNodeData(this, data); } this.data = data; this.childNodes = []; let children; if (this.level === 0 && Array.isArray(this.data)) { children = this.data; } else { children = getPropertyFromData(this, "children") || []; } for (let i = 0, j = children.length; i < j; i++) { this.insertChild({ data: children[i] }); } } get label() { return getPropertyFromData(this, "label"); } get key() { const nodeKey = this.store.key; if (this.data) return this.data[nodeKey]; return null; } get disabled() { return getPropertyFromData(this, "disabled"); } get nextSibling() { const parent2 = this.parent; if (parent2) { const index = parent2.childNodes.indexOf(this); if (index > -1) { return parent2.childNodes[index + 1]; } } return null; } get previousSibling() { const parent2 = this.parent; if (parent2) { const index = parent2.childNodes.indexOf(this); if (index > -1) { return index > 0 ? parent2.childNodes[index - 1] : null; } } return null; } contains(target2, deep = true) { return (this.childNodes || []).some((child) => child === target2 || deep && child.contains(target2)); } remove() { const parent2 = this.parent; if (parent2) { parent2.removeChild(this); } } insertChild(child, index, batch) { if (!child) throw new Error("InsertChild error: child is required."); if (!(child instanceof Node2)) { if (!batch) { const children = this.getChildren(true); if (!children.includes(child.data)) { if (typeof index === "undefined" || index < 0) { children.push(child.data); } else { children.splice(index, 0, child.data); } } } Object.assign(child, { parent: this, store: this.store }); child = reactive(new Node2(child)); if (child instanceof Node2) { child.initialize(); } } ; child.level = this.level + 1; if (typeof index === "undefined" || index < 0) { this.childNodes.push(child); } else { this.childNodes.splice(index, 0, child); } this.updateLeafState(); } insertBefore(child, ref2) { let index; if (ref2) { index = this.childNodes.indexOf(ref2); } this.insertChild(child, index); } insertAfter(child, ref2) { let index; if (ref2) { index = this.childNodes.indexOf(ref2); if (index !== -1) index += 1; } this.insertChild(child, index); } removeChild(child) { const children = this.getChildren() || []; const dataIndex = children.indexOf(child.data); if (dataIndex > -1) { children.splice(dataIndex, 1); } const index = this.childNodes.indexOf(child); if (index > -1) { this.store && this.store.deregisterNode(child); child.parent = null; this.childNodes.splice(index, 1); } this.updateLeafState(); } removeChildByData(data) { let targetNode = null; for (let i = 0; i < this.childNodes.length; i++) { if (this.childNodes[i].data === data) { targetNode = this.childNodes[i]; break; } } if (targetNode) { this.removeChild(targetNode); } } expand(callback, expandParent) { const done = () => { if (expandParent) { let parent2 = this.parent; while (parent2.level > 0) { parent2.expanded = true; parent2 = parent2.parent; } } this.expanded = true; if (callback) callback(); this.childNodes.forEach((item) => { item.canFocus = true; }); }; if (this.shouldLoadData()) { this.loadData((data) => { if (Array.isArray(data)) { if (this.checked) { this.setChecked(true, true); } else if (!this.store.checkStrictly) { reInitChecked(this); } done(); } }); } else { done(); } } doCreateChildren(array4, defaultProps4 = {}) { array4.forEach((item) => { this.insertChild(Object.assign({ data: item }, defaultProps4), void 0, true); }); } collapse() { this.expanded = false; this.childNodes.forEach((item) => { item.canFocus = false; }); } shouldLoadData() { return this.store.lazy === true && this.store.load && !this.loaded; } updateLeafState() { if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") { this.isLeaf = this.isLeafByUser; return; } const childNodes = this.childNodes; if (!this.store.lazy || this.store.lazy === true && this.loaded === true) { this.isLeaf = !childNodes || childNodes.length === 0; return; } this.isLeaf = false; } setChecked(value, deep, recursion, passValue) { this.indeterminate = value === "half"; this.checked = value === true; if (this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all, allWithoutDisable } = getChildState(this.childNodes); if (!this.isLeaf && !all && allWithoutDisable) { this.checked = false; value = false; } const handleDescendants = () => { if (deep) { const childNodes = this.childNodes; for (let i = 0, j = childNodes.length; i < j; i++) { const child = childNodes[i]; passValue = passValue || value !== false; const isCheck = child.disabled ? child.checked : passValue; child.setChecked(isCheck, deep, true, passValue); } const { half, all: all2 } = getChildState(childNodes); if (!all2) { this.checked = all2; this.indeterminate = half; } } }; if (this.shouldLoadData()) { this.loadData(() => { handleDescendants(); reInitChecked(this); }, { checked: value !== false }); return; } else { handleDescendants(); } } const parent2 = this.parent; if (!parent2 || parent2.level === 0) return; if (!recursion) { reInitChecked(parent2); } } getChildren(forceInit = false) { if (this.level === 0) return this.data; const data = this.data; if (!data) return null; const props = this.store.props; let children = "children"; if (props) { children = props.children || "children"; } if (data[children] === void 0) { data[children] = null; } if (forceInit && !data[children]) { data[children] = []; } return data[children]; } updateChildren() { const newData = this.getChildren() || []; const oldData = this.childNodes.map((node) => node.data); const newDataMap = {}; const newNodes = []; newData.forEach((item, index) => { const key = item[NODE_KEY]; const isNodeExists = !!key && oldData.findIndex((data) => data[NODE_KEY] === key) >= 0; if (isNodeExists) { newDataMap[key] = { index, data: item }; } else { newNodes.push({ index, data: item }); } }); if (!this.store.lazy) { oldData.forEach((item) => { if (!newDataMap[item[NODE_KEY]]) this.removeChildByData(item); }); } newNodes.forEach(({ index, data }) => { this.insertChild({ data }, index); }); this.updateLeafState(); } loadData(callback, defaultProps4 = {}) { if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps4).length)) { this.loading = true; const resolve = (children) => { this.childNodes = []; this.doCreateChildren(children, defaultProps4); this.loaded = true; this.loading = false; this.updateLeafState(); if (callback) { callback.call(this, children); } }; this.store.load(this, resolve); } else { if (callback) { callback.call(this); } } } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/model/tree-store.mjs var TreeStore = class { constructor(options) { this.currentNode = null; this.currentNodeKey = null; for (const option in options) { if (hasOwn(options, option)) { this[option] = options[option]; } } this.nodesMap = {}; } initialize() { this.root = new Node2({ data: this.data, store: this }); this.root.initialize(); if (this.lazy && this.load) { const loadFn = this.load; loadFn(this.root, (data) => { this.root.doCreateChildren(data); this._initDefaultCheckedNodes(); }); } else { this._initDefaultCheckedNodes(); } } filter(value) { const filterNodeMethod = this.filterNodeMethod; const lazy = this.lazy; const traverse = function(node) { const childNodes = node.root ? node.root.childNodes : node.childNodes; childNodes.forEach((child) => { child.visible = filterNodeMethod.call(child, value, child.data, child); traverse(child); }); if (!node.visible && childNodes.length) { let allHidden = true; allHidden = !childNodes.some((child) => child.visible); if (node.root) { ; node.root.visible = allHidden === false; } else { ; node.visible = allHidden === false; } } if (!value) return; if (node.visible && !node.isLeaf && !lazy) node.expand(); }; traverse(this); } setData(newVal) { const instanceChanged = newVal !== this.root.data; if (instanceChanged) { this.root.setData(newVal); this._initDefaultCheckedNodes(); } else { this.root.updateChildren(); } } getNode(data) { if (data instanceof Node2) return data; const key = isObject(data) ? getNodeKey(this.key, data) : data; return this.nodesMap[key] || null; } insertBefore(data, refData) { const refNode = this.getNode(refData); refNode.parent.insertBefore({ data }, refNode); } insertAfter(data, refData) { const refNode = this.getNode(refData); refNode.parent.insertAfter({ data }, refNode); } remove(data) { const node = this.getNode(data); if (node && node.parent) { if (node === this.currentNode) { this.currentNode = null; } node.parent.removeChild(node); } } append(data, parentData) { const parentNode = parentData ? this.getNode(parentData) : this.root; if (parentNode) { parentNode.insertChild({ data }); } } _initDefaultCheckedNodes() { const defaultCheckedKeys = this.defaultCheckedKeys || []; const nodesMap = this.nodesMap; defaultCheckedKeys.forEach((checkedKey) => { const node = nodesMap[checkedKey]; if (node) { node.setChecked(true, !this.checkStrictly); } }); } _initDefaultCheckedNode(node) { const defaultCheckedKeys = this.defaultCheckedKeys || []; if (defaultCheckedKeys.includes(node.key)) { node.setChecked(true, !this.checkStrictly); } } setDefaultCheckedKey(newVal) { if (newVal !== this.defaultCheckedKeys) { this.defaultCheckedKeys = newVal; this._initDefaultCheckedNodes(); } } registerNode(node) { const key = this.key; if (!node || !node.data) return; if (!key) { this.nodesMap[node.id] = node; } else { const nodeKey = node.key; if (nodeKey !== void 0) this.nodesMap[node.key] = node; } } deregisterNode(node) { const key = this.key; if (!key || !node || !node.data) return; node.childNodes.forEach((child) => { this.deregisterNode(child); }); delete this.nodesMap[node.key]; } getCheckedNodes(leafOnly = false, includeHalfChecked = false) { const checkedNodes = []; const traverse = function(node) { const childNodes = node.root ? node.root.childNodes : node.childNodes; childNodes.forEach((child) => { if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) { checkedNodes.push(child.data); } traverse(child); }); }; traverse(this); return checkedNodes; } getCheckedKeys(leafOnly = false) { return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]); } getHalfCheckedNodes() { const nodes = []; const traverse = function(node) { const childNodes = node.root ? node.root.childNodes : node.childNodes; childNodes.forEach((child) => { if (child.indeterminate) { nodes.push(child.data); } traverse(child); }); }; traverse(this); return nodes; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]); } _getAllNodes() { const allNodes = []; const nodesMap = this.nodesMap; for (const nodeKey in nodesMap) { if (hasOwn(nodesMap, nodeKey)) { allNodes.push(nodesMap[nodeKey]); } } return allNodes; } updateChildren(key, data) { const node = this.nodesMap[key]; if (!node) return; const childNodes = node.childNodes; for (let i = childNodes.length - 1; i >= 0; i--) { const child = childNodes[i]; this.remove(child.data); } for (let i = 0, j = data.length; i < j; i++) { const child = data[i]; this.append(child, node.data); } } _setCheckedKeys(key, leafOnly = false, checkedKeys) { const allNodes = this._getAllNodes().sort((a2, b2) => b2.level - a2.level); const cache2 = /* @__PURE__ */ Object.create(null); const keys3 = Object.keys(checkedKeys); allNodes.forEach((node) => node.setChecked(false, false)); for (let i = 0, j = allNodes.length; i < j; i++) { const node = allNodes[i]; const nodeKey = node.data[key].toString(); const checked = keys3.includes(nodeKey); if (!checked) { if (node.checked && !cache2[nodeKey]) { node.setChecked(false, false); } continue; } let parent2 = node.parent; while (parent2 && parent2.level > 0) { cache2[parent2.data[key]] = true; parent2 = parent2.parent; } if (node.isLeaf || this.checkStrictly) { node.setChecked(true, false); continue; } node.setChecked(true, true); if (leafOnly) { node.setChecked(false, false); const traverse = function(node2) { const childNodes = node2.childNodes; childNodes.forEach((child) => { if (!child.isLeaf) { child.setChecked(false, false); } traverse(child); }); }; traverse(node); } } } setCheckedNodes(array4, leafOnly = false) { const key = this.key; const checkedKeys = {}; array4.forEach((item) => { checkedKeys[(item || {})[key]] = true; }); this._setCheckedKeys(key, leafOnly, checkedKeys); } setCheckedKeys(keys3, leafOnly = false) { this.defaultCheckedKeys = keys3; const key = this.key; const checkedKeys = {}; keys3.forEach((key2) => { checkedKeys[key2] = true; }); this._setCheckedKeys(key, leafOnly, checkedKeys); } setDefaultExpandedKeys(keys3) { keys3 = keys3 || []; this.defaultExpandedKeys = keys3; keys3.forEach((key) => { const node = this.getNode(key); if (node) node.expand(null, this.autoExpandParent); }); } setChecked(data, checked, deep) { const node = this.getNode(data); if (node) { node.setChecked(!!checked, deep); } } getCurrentNode() { return this.currentNode; } setCurrentNode(currentNode) { const prevCurrentNode = this.currentNode; if (prevCurrentNode) { prevCurrentNode.isCurrent = false; } this.currentNode = currentNode; this.currentNode.isCurrent = true; } setUserCurrentNode(node, shouldAutoExpandParent = true) { const key = node[this.key]; const currNode = this.nodesMap[key]; this.setCurrentNode(currNode); if (shouldAutoExpandParent && this.currentNode.level > 1) { this.currentNode.parent.expand(null, true); } } setCurrentNodeKey(key, shouldAutoExpandParent = true) { if (key === null || key === void 0) { this.currentNode && (this.currentNode.isCurrent = false); this.currentNode = null; return; } const node = this.getNode(key); if (node) { this.setCurrentNode(node); if (shouldAutoExpandParent && this.currentNode.level > 1) { this.currentNode.parent.expand(null, true); } } } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/tree-node-content.mjs var _sfc_main135 = defineComponent({ name: "ElTreeNodeContent", props: { node: { type: Object, required: true }, renderContent: Function }, setup(props) { const ns = useNamespace("tree"); const nodeInstance = inject("NodeInstance"); const tree = inject("RootTree"); return () => { const node = props.node; const { data, store } = node; return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : tree.ctx.slots.default ? tree.ctx.slots.default({ node, data }) : h("span", { class: ns.be("node", "label") }, [node.label]); }; } }); var NodeContent2 = _export_sfc(_sfc_main135, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs function useNodeExpandEventBroadcast(props) { const parentNodeMap = inject("TreeNodeMap", null); const currentNodeMap = { treeNodeExpand: (node) => { if (props.node !== node) { props.node.collapse(); } }, children: [] }; if (parentNodeMap) { parentNodeMap.children.push(currentNodeMap); } provide("TreeNodeMap", currentNodeMap); return { broadcastExpanded: (node) => { if (!props.accordion) return; for (const childNode of currentNodeMap.children) { childNode.treeNodeExpand(node); } } }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs var dragEventsKey = Symbol("dragEvents"); function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) { const ns = useNamespace("tree"); const dragState = ref({ showDropIndicator: false, draggingNode: null, dropNode: null, allowDrop: true, dropType: null }); const treeNodeDragStart = ({ event, treeNode }) => { if (typeof props.allowDrag === "function" && !props.allowDrag(treeNode.node)) { event.preventDefault(); return false; } event.dataTransfer.effectAllowed = "move"; try { event.dataTransfer.setData("text/plain", ""); } catch (e) { } dragState.value.draggingNode = treeNode; ctx.emit("node-drag-start", treeNode.node, event); }; const treeNodeDragOver = ({ event, treeNode }) => { const dropNode = treeNode; const oldDropNode = dragState.value.dropNode; if (oldDropNode && oldDropNode !== dropNode) { removeClass(oldDropNode.$el, ns.is("drop-inner")); } const draggingNode = dragState.value.draggingNode; if (!draggingNode || !dropNode) return; let dropPrev = true; let dropInner = true; let dropNext = true; let userAllowDropInner = true; if (typeof props.allowDrop === "function") { dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev"); userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner"); dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next"); } event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none"; if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) { if (oldDropNode) { ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event); } ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event); } if (dropPrev || dropInner || dropNext) { dragState.value.dropNode = dropNode; } if (dropNode.node.nextSibling === draggingNode.node) { dropNext = false; } if (dropNode.node.previousSibling === draggingNode.node) { dropPrev = false; } if (dropNode.node.contains(draggingNode.node, false)) { dropInner = false; } if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) { dropPrev = false; dropInner = false; dropNext = false; } const targetPosition = dropNode.$el.getBoundingClientRect(); const treePosition = el$.value.getBoundingClientRect(); let dropType; const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1; const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1; let indicatorTop = -9999; const distance = event.clientY - targetPosition.top; if (distance < targetPosition.height * prevPercent) { dropType = "before"; } else if (distance > targetPosition.height * nextPercent) { dropType = "after"; } else if (dropInner) { dropType = "inner"; } else { dropType = "none"; } const iconPosition = dropNode.$el.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect(); const dropIndicator = dropIndicator$.value; if (dropType === "before") { indicatorTop = iconPosition.top - treePosition.top; } else if (dropType === "after") { indicatorTop = iconPosition.bottom - treePosition.top; } dropIndicator.style.top = `${indicatorTop}px`; dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`; if (dropType === "inner") { addClass(dropNode.$el, ns.is("drop-inner")); } else { removeClass(dropNode.$el, ns.is("drop-inner")); } dragState.value.showDropIndicator = dropType === "before" || dropType === "after"; dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner; dragState.value.dropType = dropType; ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event); }; const treeNodeDragEnd = (event) => { const { draggingNode, dropType, dropNode } = dragState.value; event.preventDefault(); event.dataTransfer.dropEffect = "move"; if (draggingNode && dropNode) { const draggingNodeCopy = { data: draggingNode.node.data }; if (dropType !== "none") { draggingNode.node.remove(); } if (dropType === "before") { dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node); } else if (dropType === "after") { dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node); } else if (dropType === "inner") { dropNode.node.insertChild(draggingNodeCopy); } if (dropType !== "none") { store.value.registerNode(draggingNodeCopy); } removeClass(dropNode.$el, ns.is("drop-inner")); ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event); if (dropType !== "none") { ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event); } } if (draggingNode && !dropNode) { ctx.emit("node-drag-end", draggingNode.node, null, dropType, event); } dragState.value.showDropIndicator = false; dragState.value.draggingNode = null; dragState.value.dropNode = null; dragState.value.allowDrop = true; }; provide(dragEventsKey, { treeNodeDragStart, treeNodeDragOver, treeNodeDragEnd }); return { dragState }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/tree-node.mjs var _sfc_main136 = defineComponent({ name: "ElTreeNode", components: { ElCollapseTransition: _CollapseTransition, ElCheckbox, NodeContent: NodeContent2, ElIcon, Loading: loading_default }, props: { node: { type: Node2, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: false } }, emits: ["node-expand"], setup(props, ctx) { const ns = useNamespace("tree"); const { broadcastExpanded } = useNodeExpandEventBroadcast(props); const tree = inject("RootTree"); const expanded = ref(false); const childNodeRendered = ref(false); const oldChecked = ref(null); const oldIndeterminate = ref(null); const node$ = ref(null); const dragEvents = inject(dragEventsKey); const instance = getCurrentInstance(); provide("NodeInstance", instance); if (!tree) { debugWarn("Tree", "Can not find node's tree."); } if (props.node.expanded) { expanded.value = true; childNodeRendered.value = true; } const childrenKey = tree.props["children"] || "children"; watch(() => { const children = props.node.data[childrenKey]; return children && [...children]; }, () => { props.node.updateChildren(); }); watch(() => props.node.indeterminate, (val) => { handleSelectChange(props.node.checked, val); }); watch(() => props.node.checked, (val) => { handleSelectChange(val, props.node.indeterminate); }); watch(() => props.node.expanded, (val) => { nextTick(() => expanded.value = val); if (val) { childNodeRendered.value = true; } }); const getNodeKey$1 = (node) => { return getNodeKey(tree.props.nodeKey, node.data); }; const getNodeClass = (node) => { const nodeClassFunc = props.props.class; if (!nodeClassFunc) { return {}; } let className; if (isFunction(nodeClassFunc)) { const { data } = node; className = nodeClassFunc(data, node); } else { className = nodeClassFunc; } if (isString(className)) { return { [className]: true }; } else { return className; } }; const handleSelectChange = (checked, indeterminate) => { if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) { tree.ctx.emit("check-change", props.node.data, checked, indeterminate); } oldChecked.value = checked; oldIndeterminate.value = indeterminate; }; const handleClick = (e) => { handleCurrentChange(tree.store, tree.ctx.emit, () => tree.store.value.setCurrentNode(props.node)); tree.currentNode.value = props.node; if (tree.props.expandOnClickNode) { handleExpandIconClick(); } if (tree.props.checkOnClickNode && !props.node.disabled) { handleCheckChange(null, { target: { checked: !props.node.checked } }); } tree.ctx.emit("node-click", props.node.data, props.node, instance, e); }; const handleContextMenu = (event) => { if (tree.instance.vnode.props["onNodeContextmenu"]) { event.stopPropagation(); event.preventDefault(); } tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance); }; const handleExpandIconClick = () => { if (props.node.isLeaf) return; if (expanded.value) { tree.ctx.emit("node-collapse", props.node.data, props.node, instance); props.node.collapse(); } else { props.node.expand(); ctx.emit("node-expand", props.node.data, props.node, instance); } }; const handleCheckChange = (value, ev) => { props.node.setChecked(ev.target.checked, !tree.props.checkStrictly); nextTick(() => { const store = tree.store.value; tree.ctx.emit("check", props.node.data, { checkedNodes: store.getCheckedNodes(), checkedKeys: store.getCheckedKeys(), halfCheckedNodes: store.getHalfCheckedNodes(), halfCheckedKeys: store.getHalfCheckedKeys() }); }); }; const handleChildNodeExpand = (nodeData, node, instance2) => { broadcastExpanded(node); tree.ctx.emit("node-expand", nodeData, node, instance2); }; const handleDragStart = (event) => { if (!tree.props.draggable) return; dragEvents.treeNodeDragStart({ event, treeNode: props }); }; const handleDragOver = (event) => { event.preventDefault(); if (!tree.props.draggable) return; dragEvents.treeNodeDragOver({ event, treeNode: { $el: node$.value, node: props.node } }); }; const handleDrop = (event) => { event.preventDefault(); }; const handleDragEnd = (event) => { if (!tree.props.draggable) return; dragEvents.treeNodeDragEnd(event); }; return { ns, node$, tree, expanded, childNodeRendered, oldChecked, oldIndeterminate, getNodeKey: getNodeKey$1, getNodeClass, handleSelectChange, handleClick, handleContextMenu, handleExpandIconClick, handleCheckChange, handleChildNodeExpand, handleDragStart, handleDragOver, handleDrop, handleDragEnd, CaretRight: caret_right_default }; } }); var _hoisted_165 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"]; var _hoisted_240 = ["aria-expanded"]; function _sfc_render30(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_icon = resolveComponent("el-icon"); const _component_el_checkbox = resolveComponent("el-checkbox"); const _component_loading = resolveComponent("loading"); const _component_node_content = resolveComponent("node-content"); const _component_el_tree_node = resolveComponent("el-tree-node"); const _component_el_collapse_transition = resolveComponent("el-collapse-transition"); return withDirectives((openBlock(), createElementBlock("div", { ref: "node$", class: normalizeClass([ _ctx.ns.b("node"), _ctx.ns.is("expanded", _ctx.expanded), _ctx.ns.is("current", _ctx.node.isCurrent), _ctx.ns.is("hidden", !_ctx.node.visible), _ctx.ns.is("focusable", !_ctx.node.disabled), _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked), _ctx.getNodeClass(_ctx.node) ]), role: "treeitem", tabindex: "-1", "aria-expanded": _ctx.expanded, "aria-disabled": _ctx.node.disabled, "aria-checked": _ctx.node.checked, draggable: _ctx.tree.props.draggable, "data-key": _ctx.getNodeKey(_ctx.node), onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])), onContextmenu: _cache[2] || (_cache[2] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)), onDragstart: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])), onDragover: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])), onDragend: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])), onDrop: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"])) }, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.be("node", "content")), style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" }) }, [ _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, { key: 0, class: normalizeClass([ _ctx.ns.be("node", "expand-icon"), _ctx.ns.is("leaf", _ctx.node.isLeaf), { expanded: !_ctx.node.isLeaf && _ctx.expanded } ]), onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, { key: 1, "model-value": _ctx.node.checked, indeterminate: _ctx.node.indeterminate, disabled: !!_ctx.node.disabled, onClick: _cache[0] || (_cache[0] = withModifiers(() => { }, ["stop"])), onChange: _ctx.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : createCommentVNode("v-if", true), _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, { key: 2, class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")]) }, { default: withCtx(() => [ createVNode(_component_loading) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), createVNode(_component_node_content, { node: _ctx.node, "render-content": _ctx.renderContent }, null, 8, ["node", "render-content"]) ], 6), createVNode(_component_el_collapse_transition, null, { default: withCtx(() => [ !_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(_ctx.ns.be("node", "children")), role: "group", "aria-expanded": _ctx.expanded }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => { return openBlock(), createBlock(_component_el_tree_node, { key: _ctx.getNodeKey(child), "render-content": _ctx.renderContent, "render-after-expand": _ctx.renderAfterExpand, "show-checkbox": _ctx.showCheckbox, node: child, accordion: _ctx.accordion, props: _ctx.props, onNodeExpand: _ctx.handleChildNodeExpand }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]); }), 128)) ], 10, _hoisted_240)), [ [vShow, _ctx.expanded] ]) : createCommentVNode("v-if", true) ]), _: 1 }) ], 42, _hoisted_165)), [ [vShow, _ctx.node.visible] ]); } var ElTreeNode = _export_sfc(_sfc_main136, [["render", _sfc_render30], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs function useKeydown({ el$ }, store) { const ns = useNamespace("tree"); const treeItems = shallowRef([]); const checkboxItems = shallowRef([]); onMounted(() => { initTabIndex(); }); onUpdated(() => { treeItems.value = Array.from(el$.value.querySelectorAll("[role=treeitem]")); checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]")); }); watch(checkboxItems, (val) => { val.forEach((checkbox) => { checkbox.setAttribute("tabindex", "-1"); }); }); const handleKeydown = (ev) => { const currentItem = ev.target; if (!currentItem.className.includes(ns.b("node"))) return; const code = ev.code; treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`)); const currentIndex = treeItems.value.indexOf(currentItem); let nextIndex; if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) { ev.preventDefault(); if (code === EVENT_CODE.up) { nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.value.length - 1; const startIndex = nextIndex; while (true) { if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus) break; nextIndex--; if (nextIndex === startIndex) { nextIndex = -1; break; } if (nextIndex < 0) { nextIndex = treeItems.value.length - 1; } } } else { nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.value.length - 1 ? currentIndex + 1 : 0; const startIndex = nextIndex; while (true) { if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus) break; nextIndex++; if (nextIndex === startIndex) { nextIndex = -1; break; } if (nextIndex >= treeItems.value.length) { nextIndex = 0; } } } nextIndex !== -1 && treeItems.value[nextIndex].focus(); } if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) { ev.preventDefault(); currentItem.click(); } const hasInput = currentItem.querySelector('[type="checkbox"]'); if ([EVENT_CODE.enter, EVENT_CODE.space].includes(code) && hasInput) { ev.preventDefault(); hasInput.click(); } }; useEventListener(el$, "keydown", handleKeydown); const initTabIndex = () => { var _a2; treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`)); checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]")); const checkedItem = el$.value.querySelectorAll(`.${ns.is("checked")}[role=treeitem]`); if (checkedItem.length) { checkedItem[0].setAttribute("tabindex", "0"); return; } (_a2 = treeItems.value[0]) == null ? void 0 : _a2.setAttribute("tabindex", "0"); }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/src/tree.mjs var _sfc_main137 = defineComponent({ name: "ElTree", components: { ElTreeNode }, props: { data: { type: Array, default: () => [] }, emptyText: { type: String }, renderAfterExpand: { type: Boolean, default: true }, nodeKey: String, checkStrictly: Boolean, defaultExpandAll: Boolean, expandOnClickNode: { type: Boolean, default: true }, checkOnClickNode: Boolean, checkDescendants: { type: Boolean, default: false }, autoExpandParent: { type: Boolean, default: true }, defaultCheckedKeys: Array, defaultExpandedKeys: Array, currentNodeKey: [String, Number], renderContent: Function, showCheckbox: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, allowDrag: Function, allowDrop: Function, props: { type: Object, default: () => ({ children: "children", label: "label", disabled: "disabled" }) }, lazy: { type: Boolean, default: false }, highlightCurrent: Boolean, load: Function, filterNodeMethod: Function, accordion: Boolean, indent: { type: Number, default: 18 }, icon: { type: iconPropType } }, emits: [ "check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over" ], setup(props, ctx) { const { t } = useLocale(); const ns = useNamespace("tree"); const store = ref(new TreeStore({ key: props.nodeKey, data: props.data, lazy: props.lazy, props: props.props, load: props.load, currentNodeKey: props.currentNodeKey, checkStrictly: props.checkStrictly, checkDescendants: props.checkDescendants, defaultCheckedKeys: props.defaultCheckedKeys, defaultExpandedKeys: props.defaultExpandedKeys, autoExpandParent: props.autoExpandParent, defaultExpandAll: props.defaultExpandAll, filterNodeMethod: props.filterNodeMethod })); store.value.initialize(); const root2 = ref(store.value.root); const currentNode = ref(null); const el$ = ref(null); const dropIndicator$ = ref(null); const { broadcastExpanded } = useNodeExpandEventBroadcast(props); const { dragState } = useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }); useKeydown({ el$ }, store); const isEmpty3 = computed2(() => { const { childNodes } = root2.value; return !childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible); }); watch(() => props.currentNodeKey, (newVal) => { store.value.setCurrentNodeKey(newVal); }); watch(() => props.defaultCheckedKeys, (newVal) => { store.value.setDefaultCheckedKey(newVal); }); watch(() => props.defaultExpandedKeys, (newVal) => { store.value.setDefaultExpandedKeys(newVal); }); watch(() => props.data, (newVal) => { store.value.setData(newVal); }, { deep: true }); watch(() => props.checkStrictly, (newVal) => { store.value.checkStrictly = newVal; }); const filter2 = (value) => { if (!props.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); store.value.filter(value); }; const getNodeKey$1 = (node) => { return getNodeKey(props.nodeKey, node.data); }; const getNodePath = (data) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const node = store.value.getNode(data); if (!node) return []; const path = [node.data]; let parent2 = node.parent; while (parent2 && parent2 !== root2.value) { path.push(parent2.data); parent2 = parent2.parent; } return path.reverse(); }; const getCheckedNodes = (leafOnly, includeHalfChecked) => { return store.value.getCheckedNodes(leafOnly, includeHalfChecked); }; const getCheckedKeys = (leafOnly) => { return store.value.getCheckedKeys(leafOnly); }; const getCurrentNode = () => { const currentNode2 = store.value.getCurrentNode(); return currentNode2 ? currentNode2.data : null; }; const getCurrentKey = () => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const currentNode2 = getCurrentNode(); return currentNode2 ? currentNode2[props.nodeKey] : null; }; const setCheckedNodes = (nodes, leafOnly) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); store.value.setCheckedNodes(nodes, leafOnly); }; const setCheckedKeys = (keys3, leafOnly) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); store.value.setCheckedKeys(keys3, leafOnly); }; const setChecked = (data, checked, deep) => { store.value.setChecked(data, checked, deep); }; const getHalfCheckedNodes = () => { return store.value.getHalfCheckedNodes(); }; const getHalfCheckedKeys = () => { return store.value.getHalfCheckedKeys(); }; const setCurrentNode = (node, shouldAutoExpandParent = true) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); handleCurrentChange(store, ctx.emit, () => store.value.setUserCurrentNode(node, shouldAutoExpandParent)); }; const setCurrentKey = (key, shouldAutoExpandParent = true) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); handleCurrentChange(store, ctx.emit, () => store.value.setCurrentNodeKey(key, shouldAutoExpandParent)); }; const getNode = (data) => { return store.value.getNode(data); }; const remove2 = (data) => { store.value.remove(data); }; const append = (data, parentNode) => { store.value.append(data, parentNode); }; const insertBefore = (data, refNode) => { store.value.insertBefore(data, refNode); }; const insertAfter = (data, refNode) => { store.value.insertAfter(data, refNode); }; const handleNodeExpand = (nodeData, node, instance) => { broadcastExpanded(node); ctx.emit("node-expand", nodeData, node, instance); }; const updateKeyChildren = (key, data) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); store.value.updateChildren(key, data); }; provide("RootTree", { ctx, props, store, root: root2, currentNode, instance: getCurrentInstance() }); provide(formItemContextKey, void 0); return { ns, store, root: root2, currentNode, dragState, el$, dropIndicator$, isEmpty: isEmpty3, filter: filter2, getNodeKey: getNodeKey$1, getNodePath, getCheckedNodes, getCheckedKeys, getCurrentNode, getCurrentKey, setCheckedNodes, setCheckedKeys, setChecked, getHalfCheckedNodes, getHalfCheckedKeys, setCurrentNode, setCurrentKey, t, getNode, remove: remove2, append, insertBefore, insertAfter, handleNodeExpand, updateKeyChildren }; } }); function _sfc_render31(_ctx, _cache, $props, $setup, $data, $options) { var _a2; const _component_el_tree_node = resolveComponent("el-tree-node"); return openBlock(), createElementBlock("div", { ref: "el$", class: normalizeClass([ _ctx.ns.b(), _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode), _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop), _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"), { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent } ]), role: "tree" }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => { return openBlock(), createBlock(_component_el_tree_node, { key: _ctx.getNodeKey(child), node: child, props: _ctx.props, accordion: _ctx.accordion, "render-after-expand": _ctx.renderAfterExpand, "show-checkbox": _ctx.showCheckbox, "render-content": _ctx.renderContent, onNodeExpand: _ctx.handleNodeExpand }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]); }), 128)), _ctx.isEmpty ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(_ctx.ns.e("empty-block")) }, [ createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, toDisplayString((_a2 = _ctx.emptyText) != null ? _a2 : _ctx.t("el.tree.emptyText")), 3) ], 2)) : createCommentVNode("v-if", true), withDirectives(createBaseVNode("div", { ref: "dropIndicator$", class: normalizeClass(_ctx.ns.e("drop-indicator")) }, null, 2), [ [vShow, _ctx.dragState.showDropIndicator] ]) ], 2); } var Tree = _export_sfc(_sfc_main137, [["render", _sfc_render31], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree/index.mjs Tree.install = (app) => { app.component(Tree.name, Tree); }; var _Tree = Tree; var ElTree = _Tree; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/src/select.mjs var useSelect3 = (props, { attrs }, { tree, key }) => { const ns = useNamespace("tree-select"); const result2 = { ...pick_default(toRefs(props), Object.keys(ElSelect.props)), ...attrs, valueKey: key, popperClass: computed2(() => { const classes = [ns.e("popper")]; if (props.popperClass) classes.push(props.popperClass); return classes.join(" "); }), filterMethod: (keyword = "") => { if (props.filterMethod) props.filterMethod(keyword); nextTick(() => { var _a2; (_a2 = tree.value) == null ? void 0 : _a2.filter(keyword); }); }, onVisibleChange: (visible) => { var _a2; (_a2 = attrs.onVisibleChange) == null ? void 0 : _a2.call(attrs, visible); if (props.filterable && visible) { result2.filterMethod(); } } }; return result2; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs var component = defineComponent({ extends: ElOption, setup(props, ctx) { const result2 = ElOption.setup(props, ctx); delete result2.selectOptionClick; const vm = getCurrentInstance().proxy; nextTick(() => { if (!result2.select.cachedOptions.get(vm.value)) { result2.select.onOptionCreate(vm); } }); return result2; }, methods: { selectOptionClick() { this.$el.parentElement.click(); } } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/src/utils.mjs function isValidValue2(val) { return val || val === 0; } function isValidArray(val) { return Array.isArray(val) && val.length; } function toValidArray(val) { return Array.isArray(val) ? val : isValidValue2(val) ? [val] : []; } function treeFind(treeData, findCallback, getChildren, resultCallback, parent2) { for (let i = 0; i < treeData.length; i++) { const data = treeData[i]; if (findCallback(data, i, treeData, parent2)) { return resultCallback ? resultCallback(data, i, treeData, parent2) : data; } else { const children = getChildren(data); if (isValidArray(children)) { const find2 = treeFind(children, findCallback, getChildren, resultCallback, data); if (find2) return find2; } } } } function treeEach(treeData, callback, getChildren, parent2) { for (let i = 0; i < treeData.length; i++) { const data = treeData[i]; callback(data, i, treeData, parent2); const children = getChildren(data); if (isValidArray(children)) { treeEach(children, callback, getChildren, data); } } } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/src/tree.mjs var useTree2 = (props, { attrs, slots, emit }, { select, tree, key }) => { watch(() => props.modelValue, () => { if (props.showCheckbox) { nextTick(() => { const treeInstance = tree.value; if (treeInstance && !isEqual_default(treeInstance.getCheckedKeys(), toValidArray(props.modelValue))) { treeInstance.setCheckedKeys(toValidArray(props.modelValue)); } }); } }, { immediate: true, deep: true }); const propsMap = computed2(() => ({ value: key.value, label: "label", children: "children", disabled: "disabled", isLeaf: "isLeaf", ...props.props })); const getNodeValByProp = (prop, data) => { var _a2; const propVal = propsMap.value[prop]; if (isFunction(propVal)) { return propVal(data, (_a2 = tree.value) == null ? void 0 : _a2.getNode(getNodeValByProp("value", data))); } else { return data[propVal]; } }; const defaultExpandedParentKeys = toValidArray(props.modelValue).map((value) => { return treeFind(props.data || [], (data) => getNodeValByProp("value", data) === value, (data) => getNodeValByProp("children", data), (data, index, array4, parent2) => parent2 && getNodeValByProp("value", parent2)); }).filter((item) => isValidValue2(item)); const cacheOptions = computed2(() => { if (!props.renderAfterExpand && !props.lazy) return []; const options = []; treeEach(props.data.concat(props.cacheData), (node) => { const value = getNodeValByProp("value", node); options.push({ value, currentLabel: getNodeValByProp("label", node), isDisabled: getNodeValByProp("disabled", node) }); }, (data) => getNodeValByProp("children", data)); return options; }); return { ...pick_default(toRefs(props), Object.keys(_Tree.props)), ...attrs, nodeKey: key, expandOnClickNode: computed2(() => { return !props.checkStrictly && props.expandOnClickNode; }), defaultExpandedKeys: computed2(() => { return props.defaultExpandedKeys ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys; }), renderContent: (h3, { node, data, store }) => { return h3(component, { value: getNodeValByProp("value", data), label: getNodeValByProp("label", data), disabled: getNodeValByProp("disabled", data) }, props.renderContent ? () => props.renderContent(h3, { node, data, store }) : slots.default ? () => slots.default({ node, data, store }) : void 0); }, filterNodeMethod: (value, data, node) => { var _a2; if (props.filterNodeMethod) return props.filterNodeMethod(value, data, node); if (!value) return true; return (_a2 = getNodeValByProp("label", data)) == null ? void 0 : _a2.includes(value); }, onNodeClick: (data, node, e) => { var _a2, _b, _c; (_a2 = attrs.onNodeClick) == null ? void 0 : _a2.call(attrs, data, node, e); if (props.showCheckbox && props.checkOnClickNode) return; if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) { if (!getNodeValByProp("disabled", data)) { const option = (_b = select.value) == null ? void 0 : _b.options.get(getNodeValByProp("value", data)); (_c = select.value) == null ? void 0 : _c.handleOptionSelect(option, true); } } else if (props.expandOnClickNode) { e.proxy.handleExpandIconClick(); } }, onCheck: (data, params) => { var _a2; (_a2 = attrs.onCheck) == null ? void 0 : _a2.call(attrs, data, params); const dataValue = getNodeValByProp("value", data); if (props.checkStrictly) { emit(UPDATE_MODEL_EVENT, props.multiple ? params.checkedKeys : params.checkedKeys.includes(dataValue) ? dataValue : void 0); } else { if (props.multiple) { emit(UPDATE_MODEL_EVENT, tree.value.getCheckedKeys(true)); } else { const firstLeaf = treeFind([data], (data2) => !isValidArray(getNodeValByProp("children", data2)) && !getNodeValByProp("disabled", data2), (data2) => getNodeValByProp("children", data2)); const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0; const hasCheckedChild = isValidValue2(props.modelValue) && !!treeFind([data], (data2) => getNodeValByProp("value", data2) === props.modelValue, (data2) => getNodeValByProp("children", data2)); emit(UPDATE_MODEL_EVENT, firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey); } } }, cacheOptions }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/src/cache-options.mjs var CacheOptions = defineComponent({ props: { data: { type: Array, default: () => [] } }, setup(props) { const select = inject(selectKey); watch(() => props.data, () => { var _a2; props.data.forEach((item) => { if (!select.cachedOptions.has(item.value)) { select.cachedOptions.set(item.value, item); } }); const inputs = ((_a2 = select.selectWrapper) == null ? void 0 : _a2.querySelectorAll("input")) || []; if (!Array.from(inputs).includes(document.activeElement)) { select.setSelected(); } }, { flush: "post", immediate: true }); return () => void 0; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/src/tree-select.mjs var _sfc_main138 = defineComponent({ name: "ElTreeSelect", inheritAttrs: false, props: { ...ElSelect.props, ..._Tree.props, cacheData: { type: Array, default: () => [] } }, setup(props, context) { const { slots, expose } = context; const select = ref(); const tree = ref(); const key = computed2(() => props.nodeKey || props.valueKey || "value"); const selectProps = useSelect3(props, context, { select, tree, key }); const { cacheOptions, ...treeProps2 } = useTree2(props, context, { select, tree, key }); const methods = reactive({}); expose(methods); onMounted(() => { Object.assign(methods, { ...pick_default(tree.value, [ "filter", "updateKeyChildren", "getCheckedNodes", "setCheckedNodes", "getCheckedKeys", "setCheckedKeys", "setChecked", "getHalfCheckedNodes", "getHalfCheckedKeys", "getCurrentKey", "getCurrentNode", "setCurrentKey", "setCurrentNode", "getNode", "remove", "append", "insertBefore", "insertAfter" ]), ...pick_default(select.value, ["focus", "blur"]) }); }); return () => h(ElSelect, reactive({ ...selectProps, ref: (ref2) => select.value = ref2 }), { ...slots, default: () => [ h(CacheOptions, { data: cacheOptions.value }), h(_Tree, reactive({ ...treeProps2, ref: (ref2) => tree.value = ref2 })) ] }); } }); var TreeSelect = _export_sfc(_sfc_main138, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-select/index.mjs TreeSelect.install = (app) => { app.component(TreeSelect.name, TreeSelect); }; var _TreeSelect = TreeSelect; var ElTreeSelect = _TreeSelect; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs var ROOT_TREE_INJECTION_KEY = Symbol(); var EMPTY_NODE = { key: -1, level: -1, data: {} }; var TreeOptionsEnum = ((TreeOptionsEnum2) => { TreeOptionsEnum2["KEY"] = "id"; TreeOptionsEnum2["LABEL"] = "label"; TreeOptionsEnum2["CHILDREN"] = "children"; TreeOptionsEnum2["DISABLED"] = "disabled"; return TreeOptionsEnum2; })(TreeOptionsEnum || {}); var SetOperationEnum = ((SetOperationEnum2) => { SetOperationEnum2["ADD"] = "add"; SetOperationEnum2["DELETE"] = "delete"; return SetOperationEnum2; })(SetOperationEnum || {}); var itemSize2 = { type: Number, default: 26 }; var treeProps = buildProps({ data: { type: definePropType(Array), default: () => mutable([]) }, emptyText: { type: String }, height: { type: Number, default: 200 }, props: { type: definePropType(Object), default: () => mutable({ children: "children", label: "label", disabled: "disabled", value: "id" /* KEY */ }) }, highlightCurrent: { type: Boolean, default: false }, showCheckbox: { type: Boolean, default: false }, defaultCheckedKeys: { type: definePropType(Array), default: () => mutable([]) }, checkStrictly: { type: Boolean, default: false }, defaultExpandedKeys: { type: definePropType(Array), default: () => mutable([]) }, indent: { type: Number, default: 16 }, itemSize: itemSize2, icon: { type: iconPropType }, expandOnClickNode: { type: Boolean, default: true }, checkOnClickNode: { type: Boolean, default: false }, currentNodeKey: { type: definePropType([String, Number]) }, accordion: { type: Boolean, default: false }, filterMethod: { type: definePropType(Function) }, perfMode: { type: Boolean, default: true } }); var treeNodeProps = buildProps({ node: { type: definePropType(Object), default: () => mutable(EMPTY_NODE) }, expanded: { type: Boolean, default: false }, checked: { type: Boolean, default: false }, indeterminate: { type: Boolean, default: false }, showCheckbox: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, current: { type: Boolean, default: false }, hiddenExpandIcon: { type: Boolean, default: false }, itemSize: itemSize2 }); var treeNodeContentProps = buildProps({ node: { type: definePropType(Object), required: true } }); var NODE_CLICK = "node-click"; var NODE_EXPAND = "node-expand"; var NODE_COLLAPSE = "node-collapse"; var CURRENT_CHANGE = "current-change"; var NODE_CHECK = "check"; var NODE_CHECK_CHANGE = "check-change"; var NODE_CONTEXTMENU = "node-contextmenu"; var treeEmits = { [NODE_CLICK]: (data, node, e) => data && node && e, [NODE_EXPAND]: (data, node) => data && node, [NODE_COLLAPSE]: (data, node) => data && node, [CURRENT_CHANGE]: (data, node) => data && node, [NODE_CHECK]: (data, checkedInfo) => data && checkedInfo, [NODE_CHECK_CHANGE]: (data, checked) => data && typeof checked === "boolean", [NODE_CONTEXTMENU]: (event, data, node) => event && data && node }; var treeNodeEmits = { click: (node, e) => !!(node && e), toggle: (node) => !!node, check: (node, checked) => node && typeof checked === "boolean" }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs function useCheck2(props, tree) { const checkedKeys = ref(/* @__PURE__ */ new Set()); const indeterminateKeys = ref(/* @__PURE__ */ new Set()); const { emit } = getCurrentInstance(); watch([() => tree.value, () => props.defaultCheckedKeys], () => { return nextTick(() => { _setCheckedKeys(props.defaultCheckedKeys); }); }, { immediate: true }); const updateCheckedKeys = () => { if (!tree.value || !props.showCheckbox || props.checkStrictly) { return; } const { levelTreeNodeMap, maxLevel } = tree.value; const checkedKeySet = checkedKeys.value; const indeterminateKeySet = /* @__PURE__ */ new Set(); for (let level = maxLevel - 1; level >= 1; --level) { const nodes = levelTreeNodeMap.get(level); if (!nodes) continue; nodes.forEach((node) => { const children = node.children; if (children) { let allChecked = true; let hasChecked = false; for (const childNode of children) { const key = childNode.key; if (checkedKeySet.has(key)) { hasChecked = true; } else if (indeterminateKeySet.has(key)) { allChecked = false; hasChecked = true; break; } else { allChecked = false; } } if (allChecked) { checkedKeySet.add(node.key); } else if (hasChecked) { indeterminateKeySet.add(node.key); checkedKeySet.delete(node.key); } else { checkedKeySet.delete(node.key); indeterminateKeySet.delete(node.key); } } }); } indeterminateKeys.value = indeterminateKeySet; }; const isChecked = (node) => checkedKeys.value.has(node.key); const isIndeterminate = (node) => indeterminateKeys.value.has(node.key); const toggleCheckbox = (node, isChecked2, nodeClick = true) => { const checkedKeySet = checkedKeys.value; const toggle = (node2, checked) => { checkedKeySet[checked ? SetOperationEnum.ADD : SetOperationEnum.DELETE](node2.key); const children = node2.children; if (!props.checkStrictly && children) { children.forEach((childNode) => { if (!childNode.disabled) { toggle(childNode, checked); } }); } }; toggle(node, isChecked2); updateCheckedKeys(); if (nodeClick) { afterNodeCheck(node, isChecked2); } }; const afterNodeCheck = (node, checked) => { const { checkedNodes, checkedKeys: checkedKeys2 } = getChecked(); const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked(); emit(NODE_CHECK, node.data, { checkedKeys: checkedKeys2, checkedNodes, halfCheckedKeys, halfCheckedNodes }); emit(NODE_CHECK_CHANGE, node.data, checked); }; function getCheckedKeys(leafOnly = false) { return getChecked(leafOnly).checkedKeys; } function getCheckedNodes(leafOnly = false) { return getChecked(leafOnly).checkedNodes; } function getHalfCheckedKeys() { return getHalfChecked().halfCheckedKeys; } function getHalfCheckedNodes() { return getHalfChecked().halfCheckedNodes; } function getChecked(leafOnly = false) { const checkedNodes = []; const keys3 = []; if ((tree == null ? void 0 : tree.value) && props.showCheckbox) { const { treeNodeMap } = tree.value; checkedKeys.value.forEach((key) => { const node = treeNodeMap.get(key); if (node && (!leafOnly || leafOnly && node.isLeaf)) { keys3.push(key); checkedNodes.push(node.data); } }); } return { checkedKeys: keys3, checkedNodes }; } function getHalfChecked() { const halfCheckedNodes = []; const halfCheckedKeys = []; if ((tree == null ? void 0 : tree.value) && props.showCheckbox) { const { treeNodeMap } = tree.value; indeterminateKeys.value.forEach((key) => { const node = treeNodeMap.get(key); if (node) { halfCheckedKeys.push(key); halfCheckedNodes.push(node.data); } }); } return { halfCheckedNodes, halfCheckedKeys }; } function setCheckedKeys(keys3) { checkedKeys.value.clear(); indeterminateKeys.value.clear(); _setCheckedKeys(keys3); } function setChecked(key, isChecked2) { if ((tree == null ? void 0 : tree.value) && props.showCheckbox) { const node = tree.value.treeNodeMap.get(key); if (node) { toggleCheckbox(node, isChecked2, false); } } } function _setCheckedKeys(keys3) { if (tree == null ? void 0 : tree.value) { const { treeNodeMap } = tree.value; if (props.showCheckbox && treeNodeMap && keys3) { for (const key of keys3) { const node = treeNodeMap.get(key); if (node && !isChecked(node)) { toggleCheckbox(node, true, false); } } } } } return { updateCheckedKeys, toggleCheckbox, isChecked, isIndeterminate, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs function useFilter(props, tree) { const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([])); const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([])); const filterable = computed2(() => { return isFunction(props.filterMethod); }); function doFilter(query) { var _a2; if (!filterable.value) { return; } const expandKeySet = /* @__PURE__ */ new Set(); const hiddenExpandIconKeys = hiddenExpandIconKeySet.value; const hiddenKeys = hiddenNodeKeySet.value; const family = []; const nodes = ((_a2 = tree.value) == null ? void 0 : _a2.treeNodes) || []; const filter2 = props.filterMethod; hiddenKeys.clear(); function traverse(nodes2) { nodes2.forEach((node) => { family.push(node); if (filter2 == null ? void 0 : filter2(query, node.data)) { family.forEach((member) => { expandKeySet.add(member.key); }); } else if (node.isLeaf) { hiddenKeys.add(node.key); } const children = node.children; if (children) { traverse(children); } if (!node.isLeaf) { if (!expandKeySet.has(node.key)) { hiddenKeys.add(node.key); } else if (children) { let allHidden = true; for (const childNode of children) { if (!hiddenKeys.has(childNode.key)) { allHidden = false; break; } } if (allHidden) { hiddenExpandIconKeys.add(node.key); } else { hiddenExpandIconKeys.delete(node.key); } } } family.pop(); }); } traverse(nodes); return expandKeySet; } function isForceHiddenExpandIcon(node) { return hiddenExpandIconKeySet.value.has(node.key); } return { hiddenExpandIconKeySet, hiddenNodeKeySet, doFilter, isForceHiddenExpandIcon }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs function useTree3(props, emit) { const expandedKeySet = ref(new Set(props.defaultExpandedKeys)); const currentKey = ref(); const tree = shallowRef(); watch(() => props.currentNodeKey, (key) => { currentKey.value = key; }, { immediate: true }); watch(() => props.data, (data) => { setData2(data); }, { immediate: true }); const { isIndeterminate, isChecked, toggleCheckbox, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys } = useCheck2(props, tree); const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree); const valueKey = computed2(() => { var _a2; return ((_a2 = props.props) == null ? void 0 : _a2.value) || TreeOptionsEnum.KEY; }); const childrenKey = computed2(() => { var _a2; return ((_a2 = props.props) == null ? void 0 : _a2.children) || TreeOptionsEnum.CHILDREN; }); const disabledKey = computed2(() => { var _a2; return ((_a2 = props.props) == null ? void 0 : _a2.disabled) || TreeOptionsEnum.DISABLED; }); const labelKey = computed2(() => { var _a2; return ((_a2 = props.props) == null ? void 0 : _a2.label) || TreeOptionsEnum.LABEL; }); const flattenTree = computed2(() => { const expandedKeys = expandedKeySet.value; const hiddenKeys = hiddenNodeKeySet.value; const flattenNodes = []; const nodes = tree.value && tree.value.treeNodes || []; function traverse() { const stack = []; for (let i = nodes.length - 1; i >= 0; --i) { stack.push(nodes[i]); } while (stack.length) { const node = stack.pop(); if (!node) continue; if (!hiddenKeys.has(node.key)) { flattenNodes.push(node); } if (expandedKeys.has(node.key)) { const children = node.children; if (children) { const length = children.length; for (let i = length - 1; i >= 0; --i) { stack.push(children[i]); } } } } } traverse(); return flattenNodes; }); const isNotEmpty = computed2(() => { return flattenTree.value.length > 0; }); function createTree(data) { const treeNodeMap = /* @__PURE__ */ new Map(); const levelTreeNodeMap = /* @__PURE__ */ new Map(); let maxLevel = 1; function traverse(nodes, level = 1, parent2 = void 0) { var _a2; const siblings = []; for (const rawNode of nodes) { const value = getKey(rawNode); const node = { level, key: value, data: rawNode }; node.label = getLabel(rawNode); node.parent = parent2; const children = getChildren(rawNode); node.disabled = getDisabled(rawNode); node.isLeaf = !children || children.length === 0; if (children && children.length) { node.children = traverse(children, level + 1, node); } siblings.push(node); treeNodeMap.set(value, node); if (!levelTreeNodeMap.has(level)) { levelTreeNodeMap.set(level, []); } (_a2 = levelTreeNodeMap.get(level)) == null ? void 0 : _a2.push(node); } if (level > maxLevel) { maxLevel = level; } return siblings; } const treeNodes = traverse(data); return { treeNodeMap, levelTreeNodeMap, maxLevel, treeNodes }; } function filter2(query) { const keys3 = doFilter(query); if (keys3) { expandedKeySet.value = keys3; } } function getChildren(node) { return node[childrenKey.value]; } function getKey(node) { if (!node) { return ""; } return node[valueKey.value]; } function getDisabled(node) { return node[disabledKey.value]; } function getLabel(node) { return node[labelKey.value]; } function toggleExpand(node) { const expandedKeys = expandedKeySet.value; if (expandedKeys.has(node.key)) { collapseNode(node); } else { expandNode(node); } } function setExpandedKeys(keys3) { expandedKeySet.value = new Set(keys3); } function handleNodeClick(node, e) { emit(NODE_CLICK, node.data, node, e); handleCurrentChange2(node); if (props.expandOnClickNode) { toggleExpand(node); } if (props.showCheckbox && props.checkOnClickNode && !node.disabled) { toggleCheckbox(node, !isChecked(node), true); } } function handleCurrentChange2(node) { if (!isCurrent(node)) { currentKey.value = node.key; emit(CURRENT_CHANGE, node.data, node); } } function handleNodeCheck(node, checked) { toggleCheckbox(node, checked); } function expandNode(node) { const keySet = expandedKeySet.value; if (tree.value && props.accordion) { const { treeNodeMap } = tree.value; keySet.forEach((key) => { const treeNode = treeNodeMap.get(key); if (node && node.level === (treeNode == null ? void 0 : treeNode.level)) { keySet.delete(key); } }); } keySet.add(node.key); emit(NODE_EXPAND, node.data, node); } function collapseNode(node) { expandedKeySet.value.delete(node.key); emit(NODE_COLLAPSE, node.data, node); } function isExpanded(node) { return expandedKeySet.value.has(node.key); } function isDisabled(node) { return !!node.disabled; } function isCurrent(node) { const current = currentKey.value; return !!current && current === node.key; } function getCurrentNode() { var _a2, _b; if (!currentKey.value) return void 0; return (_b = (_a2 = tree.value) == null ? void 0 : _a2.treeNodeMap.get(currentKey.value)) == null ? void 0 : _b.data; } function getCurrentKey() { return currentKey.value; } function setCurrentKey(key) { currentKey.value = key; } function setData2(data) { nextTick(() => tree.value = createTree(data)); } function getNode(data) { var _a2; const key = isObject(data) ? getKey(data) : data; return (_a2 = tree.value) == null ? void 0 : _a2.treeNodeMap.get(key); } return { tree, flattenTree, isNotEmpty, getKey, getChildren, toggleExpand, toggleCheckbox, isExpanded, isChecked, isIndeterminate, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeCheck, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter: filter2, setData: setData2, getNode, expandNode, collapseNode, setExpandedKeys }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs var ElNodeContent = defineComponent({ name: "ElTreeNodeContent", props: treeNodeContentProps, setup(props) { const tree = inject(ROOT_TREE_INJECTION_KEY); const ns = useNamespace("tree"); return () => { const node = props.node; const { data } = node; return (tree == null ? void 0 : tree.ctx.slots.default) ? tree.ctx.slots.default({ node, data }) : h("span", { class: ns.be("node", "label") }, [node == null ? void 0 : node.label]); }; } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs var _hoisted_166 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"]; var __default__96 = defineComponent({ name: "ElTreeNode" }); var _sfc_main139 = defineComponent({ ...__default__96, props: treeNodeProps, emits: treeNodeEmits, setup(__props, { emit }) { const props = __props; const tree = inject(ROOT_TREE_INJECTION_KEY); const ns = useNamespace("tree"); const indent = computed2(() => { var _a2; return (_a2 = tree == null ? void 0 : tree.props.indent) != null ? _a2 : 16; }); const icon = computed2(() => { var _a2; return (_a2 = tree == null ? void 0 : tree.props.icon) != null ? _a2 : caret_right_default; }); const handleClick = (e) => { emit("click", props.node, e); }; const handleExpandIconClick = () => { emit("toggle", props.node); }; const handleCheckChange = (value) => { emit("check", props.node, value); }; const handleContextMenu = (event) => { var _a2, _b, _c, _d; if ((_c = (_b = (_a2 = tree == null ? void 0 : tree.instance) == null ? void 0 : _a2.vnode) == null ? void 0 : _b.props) == null ? void 0 : _c["onNodeContextmenu"]) { event.stopPropagation(); event.preventDefault(); } tree == null ? void 0 : tree.ctx.emit(NODE_CONTEXTMENU, event, (_d = props.node) == null ? void 0 : _d.data, props.node); }; return (_ctx, _cache) => { var _a2, _b, _c; return openBlock(), createElementBlock("div", { ref: "node$", class: normalizeClass([ unref(ns).b("node"), unref(ns).is("expanded", _ctx.expanded), unref(ns).is("current", _ctx.current), unref(ns).is("focusable", !_ctx.disabled), unref(ns).is("checked", !_ctx.disabled && _ctx.checked) ]), role: "treeitem", tabindex: "-1", "aria-expanded": _ctx.expanded, "aria-disabled": _ctx.disabled, "aria-checked": _ctx.checked, "data-key": (_a2 = _ctx.node) == null ? void 0 : _a2.key, onClick: withModifiers(handleClick, ["stop"]), onContextmenu: handleContextMenu }, [ createBaseVNode("div", { class: normalizeClass(unref(ns).be("node", "content")), style: normalizeStyle({ paddingLeft: `${(_ctx.node.level - 1) * unref(indent)}px`, height: _ctx.itemSize + "px" }) }, [ unref(icon) ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass([ unref(ns).is("leaf", !!((_b = _ctx.node) == null ? void 0 : _b.isLeaf)), unref(ns).is("hidden", _ctx.hiddenExpandIcon), { expanded: !((_c = _ctx.node) == null ? void 0 : _c.isLeaf) && _ctx.expanded }, unref(ns).be("node", "expand-icon") ]), onClick: withModifiers(handleExpandIconClick, ["stop"]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(icon)))) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), _ctx.showCheckbox ? (openBlock(), createBlock(unref(ElCheckbox), { key: 1, "model-value": _ctx.checked, indeterminate: _ctx.indeterminate, disabled: _ctx.disabled, onChange: handleCheckChange, onClick: _cache[0] || (_cache[0] = withModifiers(() => { }, ["stop"])) }, null, 8, ["model-value", "indeterminate", "disabled"])) : createCommentVNode("v-if", true), createVNode(unref(ElNodeContent), { node: _ctx.node }, null, 8, ["node"]) ], 6) ], 42, _hoisted_166); }; } }); var ElTreeNode2 = _export_sfc(_sfc_main139, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/src/tree.mjs var __default__97 = defineComponent({ name: "ElTreeV2" }); var _sfc_main140 = defineComponent({ ...__default__97, props: treeProps, emits: treeEmits, setup(__props, { expose, emit }) { const props = __props; const slots = useSlots(); const treeNodeSize = computed2(() => props.itemSize); provide(ROOT_TREE_INJECTION_KEY, { ctx: { emit, slots }, props, instance: getCurrentInstance() }); provide(formItemContextKey, void 0); const { t } = useLocale(); const ns = useNamespace("tree"); const { flattenTree, isNotEmpty, toggleExpand, isExpanded, isIndeterminate, isChecked, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeCheck, toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter: filter2, setData: setData2, getNode, expandNode, collapseNode, setExpandedKeys } = useTree3(props, emit); expose({ toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter: filter2, setData: setData2, getNode, expandNode, collapseNode, setExpandedKeys }); return (_ctx, _cache) => { var _a2; return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: _ctx.highlightCurrent }]), role: "tree" }, [ unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), { key: 0, "class-name": unref(ns).b("virtual-list"), data: unref(flattenTree), total: unref(flattenTree).length, height: _ctx.height, "item-size": unref(treeNodeSize), "perf-mode": _ctx.perfMode }, { default: withCtx(({ data, index, style }) => [ (openBlock(), createBlock(ElTreeNode2, { key: data[index].key, style: normalizeStyle(style), node: data[index], expanded: unref(isExpanded)(data[index]), "show-checkbox": _ctx.showCheckbox, checked: unref(isChecked)(data[index]), indeterminate: unref(isIndeterminate)(data[index]), "item-size": unref(treeNodeSize), disabled: unref(isDisabled)(data[index]), current: unref(isCurrent)(data[index]), "hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]), onClick: unref(handleNodeClick), onToggle: unref(toggleExpand), onCheck: unref(handleNodeCheck) }, null, 8, ["style", "node", "expanded", "show-checkbox", "checked", "indeterminate", "item-size", "disabled", "current", "hidden-expand-icon", "onClick", "onToggle", "onCheck"])) ]), _: 1 }, 8, ["class-name", "data", "total", "height", "item-size", "perf-mode"])) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(ns).e("empty-block")) }, [ createBaseVNode("span", { class: normalizeClass(unref(ns).e("empty-text")) }, toDisplayString((_a2 = _ctx.emptyText) != null ? _a2 : unref(t)("el.tree.emptyText")), 3) ], 2)) ], 2); }; } }); var TreeV2 = _export_sfc(_sfc_main140, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/tree-v2/index.mjs var ElTreeV2 = withInstall(TreeV2); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/constants.mjs var uploadContextKey = Symbol("uploadContextKey"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/ajax.mjs var SCOPE7 = "ElUpload"; var UploadAjaxError = class extends Error { constructor(message2, status, method5, url2) { super(message2); this.name = "UploadAjaxError"; this.status = status; this.method = method5; this.url = url2; } }; function getError(action, option, xhr) { let msg; if (xhr.response) { msg = `${xhr.response.error || xhr.response}`; } else if (xhr.responseText) { msg = `${xhr.responseText}`; } else { msg = `fail to ${option.method} ${action} ${xhr.status}`; } return new UploadAjaxError(msg, xhr.status, option.method, action); } function getBody(xhr) { const text = xhr.responseText || xhr.response; if (!text) { return text; } try { return JSON.parse(text); } catch (e) { return text; } } var ajaxUpload = (option) => { if (typeof XMLHttpRequest === "undefined") throwError(SCOPE7, "XMLHttpRequest is undefined"); const xhr = new XMLHttpRequest(); const action = option.action; if (xhr.upload) { xhr.upload.addEventListener("progress", (evt) => { const progressEvt = evt; progressEvt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0; option.onProgress(progressEvt); }); } const formData = new FormData(); if (option.data) { for (const [key, value] of Object.entries(option.data)) { if (Array.isArray(value)) formData.append(key, ...value); else formData.append(key, value); } } formData.append(option.filename, option.file, option.file.name); xhr.addEventListener("error", () => { option.onError(getError(action, option, xhr)); }); xhr.addEventListener("load", () => { if (xhr.status < 200 || xhr.status >= 300) { return option.onError(getError(action, option, xhr)); } option.onSuccess(getBody(xhr)); }); xhr.open(option.method, action, true); if (option.withCredentials && "withCredentials" in xhr) { xhr.withCredentials = true; } const headers = option.headers || {}; if (headers instanceof Headers) { headers.forEach((value, key) => xhr.setRequestHeader(key, value)); } else { for (const [key, value] of Object.entries(headers)) { if (isNil_default(value)) continue; xhr.setRequestHeader(key, String(value)); } } xhr.send(formData); return xhr; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload.mjs var uploadListTypes = ["text", "picture", "picture-card"]; var fileId = 1; var genFileId = () => Date.now() + fileId++; var uploadBaseProps = buildProps({ action: { type: String, default: "#" }, headers: { type: definePropType(Object) }, method: { type: String, default: "post" }, data: { type: Object, default: () => mutable({}) }, multiple: { type: Boolean, default: false }, name: { type: String, default: "file" }, drag: { type: Boolean, default: false }, withCredentials: Boolean, showFileList: { type: Boolean, default: true }, accept: { type: String, default: "" }, type: { type: String, default: "select" }, fileList: { type: definePropType(Array), default: () => mutable([]) }, autoUpload: { type: Boolean, default: true }, listType: { type: String, values: uploadListTypes, default: "text" }, httpRequest: { type: definePropType(Function), default: ajaxUpload }, disabled: Boolean, limit: Number }); var uploadProps = buildProps({ ...uploadBaseProps, beforeUpload: { type: definePropType(Function), default: NOOP }, beforeRemove: { type: definePropType(Function) }, onRemove: { type: definePropType(Function), default: NOOP }, onChange: { type: definePropType(Function), default: NOOP }, onPreview: { type: definePropType(Function), default: NOOP }, onSuccess: { type: definePropType(Function), default: NOOP }, onProgress: { type: definePropType(Function), default: NOOP }, onError: { type: definePropType(Function), default: NOOP }, onExceed: { type: definePropType(Function), default: NOOP } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload-list.mjs var uploadListProps = buildProps({ files: { type: definePropType(Array), default: () => mutable([]) }, disabled: { type: Boolean, default: false }, handlePreview: { type: definePropType(Function), default: NOOP }, listType: { type: String, values: uploadListTypes, default: "text" } }); var uploadListEmits = { remove: (file) => !!file }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload-list2.mjs var _hoisted_167 = ["onKeydown"]; var _hoisted_241 = ["src"]; var _hoisted_320 = ["onClick"]; var _hoisted_411 = ["onClick"]; var _hoisted_58 = ["onClick"]; var __default__98 = defineComponent({ name: "ElUploadList" }); var _sfc_main141 = defineComponent({ ...__default__98, props: uploadListProps, emits: uploadListEmits, setup(__props, { emit }) { const { t } = useLocale(); const nsUpload = useNamespace("upload"); const nsIcon = useNamespace("icon"); const nsList = useNamespace("list"); const disabled = useFormDisabled(); const focusing = ref(false); const handleRemove = (file) => { emit("remove", file); }; return (_ctx, _cache) => { return openBlock(), createBlock(TransitionGroup, { tag: "ul", class: normalizeClass([ unref(nsUpload).b("list"), unref(nsUpload).bm("list", _ctx.listType), unref(nsUpload).is("disabled", unref(disabled)) ]), name: unref(nsList).b() }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.files, (file) => { return openBlock(), createElementBlock("li", { key: file.uid || file.name, class: normalizeClass([ unref(nsUpload).be("list", "item"), unref(nsUpload).is(file.status), { focusing: focusing.value } ]), tabindex: "0", onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]), onFocus: _cache[0] || (_cache[0] = ($event) => focusing.value = true), onBlur: _cache[1] || (_cache[1] = ($event) => focusing.value = false), onClick: _cache[2] || (_cache[2] = ($event) => focusing.value = false) }, [ renderSlot(_ctx.$slots, "default", { file }, () => [ _ctx.listType === "picture" || file.status !== "uploading" && _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("img", { key: 0, class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")), src: file.url, alt: "" }, null, 10, _hoisted_241)) : createCommentVNode("v-if", true), file.status === "uploading" || _ctx.listType !== "picture-card" ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(nsUpload).be("list", "item-info")) }, [ createBaseVNode("a", { class: normalizeClass(unref(nsUpload).be("list", "item-name")), onClick: withModifiers(($event) => _ctx.handlePreview(file), ["prevent"]) }, [ createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("document")) }, { default: withCtx(() => [ createVNode(unref(document_default)) ]), _: 1 }, 8, ["class"]), createBaseVNode("span", { class: normalizeClass(unref(nsUpload).be("list", "item-file-name")) }, toDisplayString(file.name), 3) ], 10, _hoisted_320), file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), { key: 0, type: _ctx.listType === "picture-card" ? "circle" : "line", "stroke-width": _ctx.listType === "picture-card" ? 6 : 2, percentage: Number(file.percentage), style: normalizeStyle(_ctx.listType === "picture-card" ? "" : "margin-top: 0.5rem") }, null, 8, ["type", "stroke-width", "percentage", "style"])) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("label", { class: normalizeClass(unref(nsUpload).be("list", "item-status-label")) }, [ _ctx.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")]) }, { default: withCtx(() => [ createVNode(unref(circle_check_default)) ]), _: 1 }, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(unref(ElIcon), { key: 1, class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")]) }, { default: withCtx(() => [ createVNode(unref(check_default)) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2), !unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), { key: 2, class: normalizeClass(unref(nsIcon).m("close")), onClick: ($event) => handleRemove(file) }, { default: withCtx(() => [ createVNode(unref(close_default)) ]), _: 2 }, 1032, ["class", "onClick"])) : createCommentVNode("v-if", true), createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"), createCommentVNode(" This is a bug which needs to be fixed "), createCommentVNode(" TODO: Fix the incorrect navigation interaction "), !unref(disabled) ? (openBlock(), createElementBlock("i", { key: 3, class: normalizeClass(unref(nsIcon).m("close-tip")) }, toDisplayString(unref(t)("el.upload.deleteTip")), 3)) : createCommentVNode("v-if", true), _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("span", { key: 4, class: normalizeClass(unref(nsUpload).be("list", "item-actions")) }, [ createBaseVNode("span", { class: normalizeClass(unref(nsUpload).be("list", "item-preview")), onClick: ($event) => _ctx.handlePreview(file) }, [ createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("zoom-in")) }, { default: withCtx(() => [ createVNode(unref(zoom_in_default)) ]), _: 1 }, 8, ["class"]) ], 10, _hoisted_411), !unref(disabled) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(nsUpload).be("list", "item-delete")), onClick: ($event) => handleRemove(file) }, [ createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("delete")) }, { default: withCtx(() => [ createVNode(unref(delete_default)) ]), _: 1 }, 8, ["class"]) ], 10, _hoisted_58)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ]) ], 42, _hoisted_167); }), 128)), renderSlot(_ctx.$slots, "append") ]), _: 3 }, 8, ["class", "name"]); }; } }); var UploadList = _export_sfc(_sfc_main141, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload-dragger.mjs var uploadDraggerProps = buildProps({ disabled: { type: Boolean, default: false } }); var uploadDraggerEmits = { file: (file) => isArray(file) }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs var _hoisted_168 = ["onDrop", "onDragover"]; var COMPONENT_NAME25 = "ElUploadDrag"; var __default__99 = defineComponent({ name: COMPONENT_NAME25 }); var _sfc_main142 = defineComponent({ ...__default__99, props: uploadDraggerProps, emits: uploadDraggerEmits, setup(__props, { emit }) { const uploaderContext = inject(uploadContextKey); if (!uploaderContext) { throwError(COMPONENT_NAME25, "usage: <el-upload><el-upload-dragger /></el-upload>"); } const ns = useNamespace("upload"); const dragover = ref(false); const disabled = useFormDisabled(); const onDrop = (e) => { if (disabled.value) return; dragover.value = false; e.stopPropagation(); const files = Array.from(e.dataTransfer.files); const accept = uploaderContext.accept.value; if (!accept) { emit("file", files); return; } const filesFiltered = files.filter((file) => { const { type: type4, name } = file; const extension = name.includes(".") ? `.${name.split(".").pop()}` : ""; const baseType = type4.replace(/\/.*$/, ""); return accept.split(",").map((type22) => type22.trim()).filter((type22) => type22).some((acceptedType) => { if (acceptedType.startsWith(".")) { return extension === acceptedType; } if (/\/\*$/.test(acceptedType)) { return baseType === acceptedType.replace(/\/\*$/, ""); } if (/^[^/]+\/[^/]+$/.test(acceptedType)) { return type4 === acceptedType; } return false; }); }); emit("file", filesFiltered); }; const onDragover = () => { if (!disabled.value) dragover.value = true; }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("dragger"), unref(ns).is("dragover", dragover.value)]), onDrop: withModifiers(onDrop, ["prevent"]), onDragover: withModifiers(onDragover, ["prevent"]), onDragleave: _cache[0] || (_cache[0] = withModifiers(($event) => dragover.value = false, ["prevent"])) }, [ renderSlot(_ctx.$slots, "default") ], 42, _hoisted_168); }; } }); var UploadDragger = _export_sfc(_sfc_main142, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload-content.mjs var uploadContentProps = buildProps({ ...uploadBaseProps, beforeUpload: { type: definePropType(Function), default: NOOP }, onRemove: { type: definePropType(Function), default: NOOP }, onStart: { type: definePropType(Function), default: NOOP }, onSuccess: { type: definePropType(Function), default: NOOP }, onProgress: { type: definePropType(Function), default: NOOP }, onError: { type: definePropType(Function), default: NOOP }, onExceed: { type: definePropType(Function), default: NOOP } }); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload-content2.mjs var _hoisted_169 = ["onKeydown"]; var _hoisted_242 = ["name", "multiple", "accept"]; var __default__100 = defineComponent({ name: "ElUploadContent", inheritAttrs: false }); var _sfc_main143 = defineComponent({ ...__default__100, props: uploadContentProps, setup(__props, { expose }) { const props = __props; const ns = useNamespace("upload"); const disabled = useFormDisabled(); const requests = shallowRef({}); const inputRef = shallowRef(); const uploadFiles = (files) => { if (files.length === 0) return; const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props; if (limit && fileList.length + files.length > limit) { onExceed(files, fileList); return; } if (!multiple) { files = files.slice(0, 1); } for (const file of files) { const rawFile = file; rawFile.uid = genFileId(); onStart(rawFile); if (autoUpload) upload(rawFile); } }; const upload = async (rawFile) => { inputRef.value.value = ""; if (!props.beforeUpload) { return doUpload(rawFile); } let hookResult; let beforeData = {}; try { const beforeUploadPromise = props.beforeUpload(rawFile); beforeData = isObject(props.data) ? cloneDeep_default(props.data) : props.data; hookResult = await beforeUploadPromise; } catch (e) { hookResult = false; } if (hookResult === false) { props.onRemove(rawFile); return; } let file = rawFile; if (hookResult instanceof Blob) { if (hookResult instanceof File) { file = hookResult; } else { file = new File([hookResult], rawFile.name, { type: rawFile.type }); } } doUpload(Object.assign(file, { uid: rawFile.uid }), beforeData); }; const doUpload = (rawFile, beforeData) => { const { headers, data, method: method5, withCredentials, name: filename, action, onProgress, onSuccess, onError, httpRequest } = props; const { uid: uid2 } = rawFile; const options = { headers: headers || {}, withCredentials, file: rawFile, data: beforeData != null ? beforeData : data, method: method5, filename, action, onProgress: (evt) => { onProgress(evt, rawFile); }, onSuccess: (res) => { onSuccess(res, rawFile); delete requests.value[uid2]; }, onError: (err) => { onError(err, rawFile); delete requests.value[uid2]; } }; const request = httpRequest(options); requests.value[uid2] = request; if (request instanceof Promise) { request.then(options.onSuccess, options.onError); } }; const handleChange = (e) => { const files = e.target.files; if (!files) return; uploadFiles(Array.from(files)); }; const handleClick = () => { if (!disabled.value) { inputRef.value.value = ""; inputRef.value.click(); } }; const handleKeydown = () => { handleClick(); }; const abort = (file) => { const _reqs = entriesOf(requests.value).filter(file ? ([uid2]) => String(file.uid) === uid2 : () => true); _reqs.forEach(([uid2, req]) => { if (req instanceof XMLHttpRequest) req.abort(); delete requests.value[uid2]; }); }; expose({ abort, upload }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.listType), unref(ns).is("drag", _ctx.drag)]), tabindex: "0", onClick: handleClick, onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"]) }, [ _ctx.drag ? (openBlock(), createBlock(UploadDragger, { key: 0, disabled: unref(disabled), onFile: uploadFiles }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["disabled"])) : renderSlot(_ctx.$slots, "default", { key: 1 }), createBaseVNode("input", { ref_key: "inputRef", ref: inputRef, class: normalizeClass(unref(ns).e("input")), name: _ctx.name, multiple: _ctx.multiple, accept: _ctx.accept, type: "file", onChange: handleChange, onClick: _cache[0] || (_cache[0] = withModifiers(() => { }, ["stop"])) }, null, 42, _hoisted_242) ], 42, _hoisted_169); }; } }); var UploadContent = _export_sfc(_sfc_main143, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/use-handlers.mjs var SCOPE8 = "ElUpload"; var revokeObjectURL = (file) => { var _a2; if ((_a2 = file.url) == null ? void 0 : _a2.startsWith("blob:")) { URL.revokeObjectURL(file.url); } }; var useHandlers = (props, uploadRef) => { const uploadFiles = useVModel(props, "fileList", void 0, { passive: true }); const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid); function abort(file) { var _a2; (_a2 = uploadRef.value) == null ? void 0 : _a2.abort(file); } function clearFiles(states = ["ready", "uploading", "success", "fail"]) { uploadFiles.value = uploadFiles.value.filter((row) => !states.includes(row.status)); } const handleError = (err, rawFile) => { const file = getFile(rawFile); if (!file) return; console.error(err); file.status = "fail"; uploadFiles.value.splice(uploadFiles.value.indexOf(file), 1); props.onError(err, file, uploadFiles.value); props.onChange(file, uploadFiles.value); }; const handleProgress = (evt, rawFile) => { const file = getFile(rawFile); if (!file) return; props.onProgress(evt, file, uploadFiles.value); file.status = "uploading"; file.percentage = Math.round(evt.percent); }; const handleSuccess = (response, rawFile) => { const file = getFile(rawFile); if (!file) return; file.status = "success"; file.response = response; props.onSuccess(response, file, uploadFiles.value); props.onChange(file, uploadFiles.value); }; const handleStart = (file) => { if (isNil_default(file.uid)) file.uid = genFileId(); const uploadFile = { name: file.name, percentage: 0, status: "ready", size: file.size, raw: file, uid: file.uid }; if (props.listType === "picture-card" || props.listType === "picture") { try { uploadFile.url = URL.createObjectURL(file); } catch (err) { debugWarn(SCOPE8, err.message); props.onError(err, uploadFile, uploadFiles.value); } } uploadFiles.value = [...uploadFiles.value, uploadFile]; props.onChange(uploadFile, uploadFiles.value); }; const handleRemove = async (file) => { const uploadFile = file instanceof File ? getFile(file) : file; if (!uploadFile) throwError(SCOPE8, "file to be removed not found"); const doRemove = (file2) => { abort(file2); const fileList = uploadFiles.value; fileList.splice(fileList.indexOf(file2), 1); props.onRemove(file2, fileList); revokeObjectURL(file2); }; if (props.beforeRemove) { const before2 = await props.beforeRemove(uploadFile, uploadFiles.value); if (before2 !== false) doRemove(uploadFile); } else { doRemove(uploadFile); } }; function submit() { uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => { var _a2; return raw && ((_a2 = uploadRef.value) == null ? void 0 : _a2.upload(raw)); }); } watch(() => props.listType, (val) => { if (val !== "picture-card" && val !== "picture") { return; } uploadFiles.value = uploadFiles.value.map((file) => { const { raw, url: url2 } = file; if (!url2 && raw) { try { file.url = URL.createObjectURL(raw); } catch (err) { props.onError(err, file, uploadFiles.value); } } return file; }); }); watch(uploadFiles, (files) => { for (const file of files) { file.uid || (file.uid = genFileId()); file.status || (file.status = "success"); } }, { immediate: true, deep: true }); return { uploadFiles, abort, clearFiles, handleError, handleProgress, handleStart, handleSuccess, handleRemove, submit }; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/src/upload2.mjs var __default__101 = defineComponent({ name: "ElUpload" }); var _sfc_main144 = defineComponent({ ...__default__101, props: uploadProps, setup(__props, { expose }) { const props = __props; const slots = useSlots(); const disabled = useFormDisabled(); const uploadRef = shallowRef(); const { abort, submit, clearFiles, uploadFiles, handleStart, handleError, handleRemove, handleSuccess, handleProgress } = useHandlers(props, uploadRef); const isPictureCard = computed2(() => props.listType === "picture-card"); const uploadContentProps2 = computed2(() => ({ ...props, fileList: uploadFiles.value, onStart: handleStart, onProgress: handleProgress, onSuccess: handleSuccess, onError: handleError, onRemove: handleRemove })); onBeforeUnmount(() => { uploadFiles.value.forEach(({ url: url2 }) => { if (url2 == null ? void 0 : url2.startsWith("blob:")) URL.revokeObjectURL(url2); }); }); provide(uploadContextKey, { accept: toRef(props, "accept") }); expose({ abort, submit, clearFiles, handleStart, handleRemove }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", null, [ unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, { key: 0, disabled: unref(disabled), "list-type": _ctx.listType, files: unref(uploadFiles), "handle-preview": _ctx.onPreview, onRemove: unref(handleRemove) }, createSlots({ append: withCtx(() => [ createVNode(UploadContent, mergeProps({ ref_key: "uploadRef", ref: uploadRef }, unref(uploadContentProps2)), { default: withCtx(() => [ unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) ]), _: 3 }, 16) ]), _: 2 }, [ _ctx.$slots.file ? { name: "default", fn: withCtx(({ file }) => [ renderSlot(_ctx.$slots, "file", { file }) ]) } : void 0 ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true), !unref(isPictureCard) || unref(isPictureCard) && !_ctx.showFileList ? (openBlock(), createBlock(UploadContent, mergeProps({ key: 1, ref_key: "uploadRef", ref: uploadRef }, unref(uploadContentProps2)), { default: withCtx(() => [ unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) ]), _: 3 }, 16)) : createCommentVNode("v-if", true), _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "tip"), !unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, { key: 3, disabled: unref(disabled), "list-type": _ctx.listType, files: unref(uploadFiles), "handle-preview": _ctx.onPreview, onRemove: unref(handleRemove) }, createSlots({ _: 2 }, [ _ctx.$slots.file ? { name: "default", fn: withCtx(({ file }) => [ renderSlot(_ctx.$slots, "file", { file }) ]) } : void 0 ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true) ]); }; } }); var Upload = _export_sfc(_sfc_main144, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/upload/index.mjs var ElUpload = withInstall(Upload); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/component.mjs var Components = [ ElAffix, ElAlert, ElAutocomplete, ElAutoResizer, ElAvatar, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElConfigProvider, ElContainer, ElAside, ElFooter, ElHeader, ElMain, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElForm, ElFormItem, ElIcon, ElImage, ElImageViewer, ElInput, ElInputNumber, ElLink, ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopper, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSelect, ElOption, ElOptionGroup, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElStatistic, ElCountdown, ElSteps, ElStep, ElSwitch, ElTable, ElTableColumn2, ElTableV2, ElTabs, ElTabPane, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTooltipV2, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload ]; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/infinite-scroll/src/index.mjs var SCOPE9 = "ElInfiniteScroll"; var CHECK_INTERVAL = 50; var DEFAULT_DELAY = 200; var DEFAULT_DISTANCE = 0; var attributes = { delay: { type: Number, default: DEFAULT_DELAY }, distance: { type: Number, default: DEFAULT_DISTANCE }, disabled: { type: Boolean, default: false }, immediate: { type: Boolean, default: true } }; var getScrollOptions = (el, instance) => { return Object.entries(attributes).reduce((acm, [name, option]) => { var _a2, _b; const { type: type4, default: defaultValue } = option; const attrVal = el.getAttribute(`infinite-scroll-${name}`); let value = (_b = (_a2 = instance[attrVal]) != null ? _a2 : attrVal) != null ? _b : defaultValue; value = value === "false" ? false : value; value = type4(value); acm[name] = Number.isNaN(value) ? defaultValue : value; return acm; }, {}); }; var destroyObserver = (el) => { const { observer } = el[SCOPE9]; if (observer) { observer.disconnect(); delete el[SCOPE9].observer; } }; var handleScroll = (el, cb) => { const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE9]; const { disabled, distance } = getScrollOptions(el, instance); const { clientHeight, scrollHeight, scrollTop } = containerEl; const delta = scrollTop - lastScrollTop; el[SCOPE9].lastScrollTop = scrollTop; if (observer || disabled || delta < 0) return; let shouldTrigger = false; if (container === el) { shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance; } else { const { clientTop, scrollHeight: height } = el; const offsetTop = getOffsetTopDistance(el, containerEl); shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance; } if (shouldTrigger) { cb.call(instance); } }; function checkFull(el, cb) { const { containerEl, instance } = el[SCOPE9]; const { disabled } = getScrollOptions(el, instance); if (disabled || containerEl.clientHeight === 0) return; if (containerEl.scrollHeight <= containerEl.clientHeight) { cb.call(instance); } else { destroyObserver(el); } } var InfiniteScroll = { async mounted(el, binding) { const { instance, value: cb } = binding; if (!isFunction(cb)) { throwError(SCOPE9, "'v-infinite-scroll' binding value must be a function"); } await nextTick(); const { delay: delay2, immediate } = getScrollOptions(el, instance); const container = getScrollContainer(el, true); const containerEl = container === window ? document.documentElement : container; const onScroll = throttle_default(handleScroll.bind(null, el, cb), delay2); if (!container) return; el[SCOPE9] = { instance, container, containerEl, delay: delay2, cb, onScroll, lastScrollTop: containerEl.scrollTop }; if (immediate) { const observer = new MutationObserver(throttle_default(checkFull.bind(null, el, cb), CHECK_INTERVAL)); el[SCOPE9].observer = observer; observer.observe(el, { childList: true, subtree: true }); checkFull(el, cb); } container.addEventListener("scroll", onScroll); }, unmounted(el) { const { container, onScroll } = el[SCOPE9]; container == null ? void 0 : container.removeEventListener("scroll", onScroll); destroyObserver(el); }, async updated(el) { if (!el[SCOPE9]) { await nextTick(); } else { const { containerEl, cb, observer } = el[SCOPE9]; if (containerEl.clientHeight && observer) { checkFull(el, cb); } } } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/infinite-scroll/index.mjs var _InfiniteScroll = InfiniteScroll; _InfiniteScroll.install = (app) => { app.directive("InfiniteScroll", _InfiniteScroll); }; var ElInfiniteScroll = _InfiniteScroll; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/loading/src/loading.mjs function createLoadingComponent(options) { let afterLeaveTimer; const afterLeaveFlag = ref(false); const data = reactive({ ...options, originalPosition: "", originalOverflow: "", visible: false }); function setText(text) { data.text = text; } function destroySelf() { const target2 = data.parent; const ns = vm.ns; if (!target2.vLoadingAddClassList) { let loadingNumber = target2.getAttribute("loading-number"); loadingNumber = Number.parseInt(loadingNumber) - 1; if (!loadingNumber) { removeClass(target2, ns.bm("parent", "relative")); target2.removeAttribute("loading-number"); } else { target2.setAttribute("loading-number", loadingNumber.toString()); } removeClass(target2, ns.bm("parent", "hidden")); } removeElLoadingChild(); loadingInstance.unmount(); } function removeElLoadingChild() { var _a2, _b; (_b = (_a2 = vm.$el) == null ? void 0 : _a2.parentNode) == null ? void 0 : _b.removeChild(vm.$el); } function close2() { var _a2; if (options.beforeClose && !options.beforeClose()) return; afterLeaveFlag.value = true; clearTimeout(afterLeaveTimer); afterLeaveTimer = window.setTimeout(handleAfterLeave, 400); data.visible = false; (_a2 = options.closed) == null ? void 0 : _a2.call(options); } function handleAfterLeave() { if (!afterLeaveFlag.value) return; const target2 = data.parent; afterLeaveFlag.value = false; target2.vLoadingAddClassList = void 0; destroySelf(); } const elLoadingComponent = defineComponent({ name: "ElLoading", setup(_2, { expose }) { const { ns } = useGlobalComponentSettings("loading"); const zIndex2 = useZIndex(); expose({ ns, zIndex: zIndex2 }); return () => { const svg = data.spinner || data.svg; const spinner = h("svg", { class: "circular", viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50", ...svg ? { innerHTML: svg } : {} }, [ h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]); const spinnerText = data.text ? h("p", { class: ns.b("text") }, [data.text]) : void 0; return h(Transition, { name: ns.b("fade"), onAfterLeave: handleAfterLeave }, { default: withCtx(() => [ withDirectives(createVNode("div", { style: { backgroundColor: data.background || "" }, class: [ ns.b("mask"), data.customClass, data.fullscreen ? "is-fullscreen" : "" ] }, [ h("div", { class: ns.b("spinner") }, [spinner, spinnerText]) ]), [[vShow, data.visible]]) ]) }); }; } }); const loadingInstance = createApp(elLoadingComponent); const vm = loadingInstance.mount(document.createElement("div")); return { ...toRefs(data), setText, removeElLoadingChild, close: close2, handleAfterLeave, vm, get $el() { return vm.$el; } }; } // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/loading/src/service.mjs var fullscreenInstance = void 0; var Loading = function(options = {}) { if (!isClient) return void 0; const resolved = resolveOptions(options); if (resolved.fullscreen && fullscreenInstance) { return fullscreenInstance; } const instance = createLoadingComponent({ ...resolved, closed: () => { var _a2; (_a2 = resolved.closed) == null ? void 0 : _a2.call(resolved); if (resolved.fullscreen) fullscreenInstance = void 0; } }); addStyle(resolved, resolved.parent, instance); addClassList(resolved, resolved.parent, instance); resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance); let loadingNumber = resolved.parent.getAttribute("loading-number"); if (!loadingNumber) { loadingNumber = "1"; } else { loadingNumber = `${Number.parseInt(loadingNumber) + 1}`; } resolved.parent.setAttribute("loading-number", loadingNumber); resolved.parent.appendChild(instance.$el); nextTick(() => instance.visible.value = resolved.visible); if (resolved.fullscreen) { fullscreenInstance = instance; } return instance; }; var resolveOptions = (options) => { var _a2, _b, _c, _d; let target2; if (isString(options.target)) { target2 = (_a2 = document.querySelector(options.target)) != null ? _a2 : document.body; } else { target2 = options.target || document.body; } return { parent: target2 === document.body || options.body ? document.body : target2, background: options.background || "", svg: options.svg || "", svgViewBox: options.svgViewBox || "", spinner: options.spinner || false, text: options.text || "", fullscreen: target2 === document.body && ((_b = options.fullscreen) != null ? _b : true), lock: (_c = options.lock) != null ? _c : false, customClass: options.customClass || "", visible: (_d = options.visible) != null ? _d : true, target: target2 }; }; var addStyle = async (options, parent2, instance) => { const { nextZIndex } = instance.vm.zIndex; const maskStyle = {}; if (options.fullscreen) { instance.originalPosition.value = getStyle(document.body, "position"); instance.originalOverflow.value = getStyle(document.body, "overflow"); maskStyle.zIndex = nextZIndex(); } else if (options.parent === document.body) { instance.originalPosition.value = getStyle(document.body, "position"); await nextTick(); for (const property2 of ["top", "left"]) { const scroll = property2 === "top" ? "scrollTop" : "scrollLeft"; maskStyle[property2] = `${options.target.getBoundingClientRect()[property2] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property2}`), 10)}px`; } for (const property2 of ["height", "width"]) { maskStyle[property2] = `${options.target.getBoundingClientRect()[property2]}px`; } } else { instance.originalPosition.value = getStyle(parent2, "position"); } for (const [key, value] of Object.entries(maskStyle)) { instance.$el.style[key] = value; } }; var addClassList = (options, parent2, instance) => { const ns = instance.vm.ns; if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) { addClass(parent2, ns.bm("parent", "relative")); } else { removeClass(parent2, ns.bm("parent", "relative")); } if (options.fullscreen && options.lock) { addClass(parent2, ns.bm("parent", "hidden")); } else { removeClass(parent2, ns.bm("parent", "hidden")); } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/loading/src/directive.mjs var INSTANCE_KEY = Symbol("ElLoading"); var createInstance = (el, binding) => { var _a2, _b, _c, _d; const vm = binding.instance; const getBindingProp = (key) => isObject(binding.value) ? binding.value[key] : void 0; const resolveExpression = (key) => { const data = isString(key) && (vm == null ? void 0 : vm[key]) || key; if (data) return ref(data); else return data; }; const getProp2 = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(`element-loading-${hyphenate(name)}`)); const fullscreen = (_a2 = getBindingProp("fullscreen")) != null ? _a2 : binding.modifiers.fullscreen; const options = { text: getProp2("text"), svg: getProp2("svg"), svgViewBox: getProp2("svgViewBox"), spinner: getProp2("spinner"), background: getProp2("background"), customClass: getProp2("customClass"), fullscreen, target: (_b = getBindingProp("target")) != null ? _b : fullscreen ? void 0 : el, body: (_c = getBindingProp("body")) != null ? _c : binding.modifiers.body, lock: (_d = getBindingProp("lock")) != null ? _d : binding.modifiers.lock }; el[INSTANCE_KEY] = { options, instance: Loading(options) }; }; var updateOptions = (newOptions, originalOptions) => { for (const key of Object.keys(originalOptions)) { if (isRef(originalOptions[key])) originalOptions[key].value = newOptions[key]; } }; var vLoading = { mounted(el, binding) { if (binding.value) { createInstance(el, binding); } }, updated(el, binding) { const instance = el[INSTANCE_KEY]; if (binding.oldValue !== binding.value) { if (binding.value && !binding.oldValue) { createInstance(el, binding); } else if (binding.value && binding.oldValue) { if (isObject(binding.value)) updateOptions(binding.value, instance.options); } else { instance == null ? void 0 : instance.instance.close(); } } }, unmounted(el) { var _a2; (_a2 = el[INSTANCE_KEY]) == null ? void 0 : _a2.instance.close(); } }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/loading/index.mjs var ElLoading = { install(app) { app.directive("loading", vLoading); app.config.globalProperties.$loading = Loading; }, directive: vLoading, service: Loading }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message/src/message.mjs var messageTypes = ["success", "info", "warning", "error"]; var messageDefaults = mutable({ customClass: "", center: false, dangerouslyUseHTMLString: false, duration: 3e3, icon: void 0, id: "", message: "", onClose: void 0, showClose: false, type: "info", offset: 16, zIndex: 0, grouping: false, repeatNum: 1, appendTo: isClient ? document.body : void 0 }); var messageProps = buildProps({ customClass: { type: String, default: messageDefaults.customClass }, center: { type: Boolean, default: messageDefaults.center }, dangerouslyUseHTMLString: { type: Boolean, default: messageDefaults.dangerouslyUseHTMLString }, duration: { type: Number, default: messageDefaults.duration }, icon: { type: iconPropType, default: messageDefaults.icon }, id: { type: String, default: messageDefaults.id }, message: { type: definePropType([ String, Object, Function ]), default: messageDefaults.message }, onClose: { type: definePropType(Function), required: false }, showClose: { type: Boolean, default: messageDefaults.showClose }, type: { type: String, values: messageTypes, default: messageDefaults.type }, offset: { type: Number, default: messageDefaults.offset }, zIndex: { type: Number, default: messageDefaults.zIndex }, grouping: { type: Boolean, default: messageDefaults.grouping }, repeatNum: { type: Number, default: messageDefaults.repeatNum } }); var messageEmits = { destroy: () => true }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message/src/instance.mjs var instances = shallowReactive([]); var getInstance = (id) => { const idx = instances.findIndex((instance) => instance.id === id); const current = instances[idx]; let prev; if (idx > 0) { prev = instances[idx - 1]; } return { current, prev }; }; var getLastOffset = (id) => { const { prev } = getInstance(id); if (!prev) return 0; return prev.vm.exposed.bottom.value; }; var getOffsetOrSpace = (id, offset2) => { const idx = instances.findIndex((instance) => instance.id === id); return idx > 0 ? 20 : offset2; }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message/src/message2.mjs var _hoisted_170 = ["id"]; var _hoisted_243 = ["innerHTML"]; var __default__102 = defineComponent({ name: "ElMessage" }); var _sfc_main145 = defineComponent({ ...__default__102, props: messageProps, emits: messageEmits, setup(__props, { expose }) { const props = __props; const { Close } = TypeComponents; const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("message"); const { currentZIndex, nextZIndex } = zIndex2; const messageRef = ref(); const visible = ref(false); const height = ref(0); let stopTimer = void 0; const badgeType = computed2(() => props.type ? props.type === "error" ? "danger" : props.type : "info"); const typeClass = computed2(() => { const type4 = props.type; return { [ns.bm("icon", type4)]: type4 && TypeComponentsMap[type4] }; }); const iconComponent = computed2(() => props.icon || TypeComponentsMap[props.type] || ""); const lastOffset = computed2(() => getLastOffset(props.id)); const offset2 = computed2(() => getOffsetOrSpace(props.id, props.offset) + lastOffset.value); const bottom = computed2(() => height.value + offset2.value); const customStyle = computed2(() => ({ top: `${offset2.value}px`, zIndex: currentZIndex.value })); function startTimer() { if (props.duration === 0) return; ({ stop: stopTimer } = useTimeoutFn(() => { close2(); }, props.duration)); } function clearTimer() { stopTimer == null ? void 0 : stopTimer(); } function close2() { visible.value = false; } function keydown({ code }) { if (code === EVENT_CODE.esc) { close2(); } } onMounted(() => { startTimer(); nextZIndex(); visible.value = true; }); watch(() => props.repeatNum, () => { clearTimer(); startTimer(); }); useEventListener(document, "keydown", keydown); useResizeObserver(messageRef, () => { height.value = messageRef.value.getBoundingClientRect().height; }); expose({ visible, bottom, close: close2 }); return (_ctx, _cache) => { return openBlock(), createBlock(Transition, { name: unref(ns).b("fade"), onBeforeLeave: _ctx.onClose, onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")), persisted: "" }, { default: withCtx(() => [ withDirectives(createBaseVNode("div", { id: _ctx.id, ref_key: "messageRef", ref: messageRef, class: normalizeClass([ unref(ns).b(), { [unref(ns).m(_ctx.type)]: _ctx.type && !_ctx.icon }, unref(ns).is("center", _ctx.center), unref(ns).is("closable", _ctx.showClose), _ctx.customClass ]), style: normalizeStyle(unref(customStyle)), role: "alert", onMouseenter: clearTimer, onMouseleave: startTimer }, [ _ctx.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), { key: 0, value: _ctx.repeatNum, type: unref(badgeType), class: normalizeClass(unref(ns).e("badge")) }, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true), unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), { key: 1, class: normalizeClass([unref(ns).e("icon"), unref(typeClass)]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, () => [ !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", { key: 0, class: normalizeClass(unref(ns).e("content")) }, toDisplayString(_ctx.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", { class: normalizeClass(unref(ns).e("content")), innerHTML: _ctx.message }, null, 10, _hoisted_243) ], 2112)) ]), _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), { key: 2, class: normalizeClass(unref(ns).e("closeBtn")), onClick: withModifiers(close2, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Close)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 46, _hoisted_170), [ [vShow, visible.value] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave"]); }; } }); var MessageConstructor = _export_sfc(_sfc_main145, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message/src/method.mjs var seed = 1; var normalizeOptions = (params) => { const options = !params || isString(params) || isVNode(params) || isFunction(params) ? { message: params } : params; const normalized = { ...messageDefaults, ...options }; if (!normalized.appendTo) { normalized.appendTo = document.body; } else if (isString(normalized.appendTo)) { let appendTo = document.querySelector(normalized.appendTo); if (!isElement2(appendTo)) { debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."); appendTo = document.body; } normalized.appendTo = appendTo; } return normalized; }; var closeMessage = (instance) => { const idx = instances.indexOf(instance); if (idx === -1) return; instances.splice(idx, 1); const { handler } = instance; handler.close(); }; var createMessage = ({ appendTo, ...options }, context) => { const id = `message_${seed++}`; const userOnClose = options.onClose; const container = document.createElement("div"); const props = { ...options, id, onClose: () => { userOnClose == null ? void 0 : userOnClose(); closeMessage(instance); }, onDestroy: () => { render(null, container); } }; const vnode = createVNode(MessageConstructor, props, isFunction(props.message) || isVNode(props.message) ? { default: isFunction(props.message) ? props.message : () => props.message } : null); vnode.appContext = context || message._context; render(vnode, container); appendTo.appendChild(container.firstElementChild); const vm = vnode.component; const handler = { close: () => { vm.exposed.visible.value = false; } }; const instance = { id, vnode, vm, handler, props: vnode.component.props }; return instance; }; var message = (options = {}, context) => { if (!isClient) return { close: () => void 0 }; if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) { return { close: () => void 0 }; } const normalized = normalizeOptions(options); if (normalized.grouping && instances.length) { const instance2 = instances.find(({ vnode: vm }) => { var _a2; return ((_a2 = vm.props) == null ? void 0 : _a2.message) === normalized.message; }); if (instance2) { instance2.props.repeatNum += 1; instance2.props.type = normalized.type; return instance2.handler; } } const instance = createMessage(normalized, context); instances.push(instance); return instance.handler; }; messageTypes.forEach((type4) => { message[type4] = (options = {}, appContext) => { const normalized = normalizeOptions(options); return message({ ...normalized, type: type4 }, appContext); }; }); function closeAll(type4) { for (const instance of instances) { if (!type4 || type4 === instance.props.type) { instance.handler.close(); } } } message.closeAll = closeAll; message._context = null; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message/index.mjs var ElMessage = withInstallFunction(message, "$message"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message-box/src/index.mjs var _sfc_main146 = defineComponent({ name: "ElMessageBox", directives: { TrapFocus }, components: { ElButton, ElFocusTrap, ElInput, ElOverlay, ElIcon, ...TypeComponents }, inheritAttrs: false, props: { buttonSize: { type: String, validator: isValidComponentSize }, modal: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, showClose: { type: Boolean, default: true }, closeOnClickModal: { type: Boolean, default: true }, closeOnPressEscape: { type: Boolean, default: true }, closeOnHashChange: { type: Boolean, default: true }, center: Boolean, draggable: Boolean, roundButton: { default: false, type: Boolean }, container: { type: String, default: "body" }, boxType: { type: String, default: "" } }, emits: ["vanish", "action"], setup(props, { emit }) { const { locale, zIndex: zIndex2, ns, size: btnSize } = useGlobalComponentSettings("message-box", computed2(() => props.buttonSize)); const { t } = locale; const { nextZIndex } = zIndex2; const visible = ref(false); const state = reactive({ autofocus: true, beforeClose: null, callback: null, cancelButtonText: "", cancelButtonClass: "", confirmButtonText: "", confirmButtonClass: "", customClass: "", customStyle: {}, dangerouslyUseHTMLString: false, distinguishCancelAndClose: false, icon: "", inputPattern: null, inputPlaceholder: "", inputType: "text", inputValue: null, inputValidator: null, inputErrorMessage: "", message: null, modalFade: true, modalClass: "", showCancelButton: false, showConfirmButton: true, type: "", title: void 0, showInput: false, action: "", confirmButtonLoading: false, cancelButtonLoading: false, confirmButtonDisabled: false, editorErrorMessage: "", validateError: false, zIndex: nextZIndex() }); const typeClass = computed2(() => { const type4 = state.type; return { [ns.bm("icon", type4)]: type4 && TypeComponentsMap[type4] }; }); const contentId = useId(); const inputId = useId(); const iconComponent = computed2(() => state.icon || TypeComponentsMap[state.type] || ""); const hasMessage = computed2(() => !!state.message); const rootRef = ref(); const headerRef = ref(); const focusStartRef = ref(); const inputRef = ref(); const confirmRef = ref(); const confirmButtonClasses = computed2(() => state.confirmButtonClass); watch(() => state.inputValue, async (val) => { await nextTick(); if (props.boxType === "prompt" && val !== null) { validate(); } }, { immediate: true }); watch(() => visible.value, (val) => { var _a2, _b; if (val) { if (props.boxType !== "prompt") { if (state.autofocus) { focusStartRef.value = (_b = (_a2 = confirmRef.value) == null ? void 0 : _a2.$el) != null ? _b : rootRef.value; } else { focusStartRef.value = rootRef.value; } } state.zIndex = nextZIndex(); } if (props.boxType !== "prompt") return; if (val) { nextTick().then(() => { var _a22; if (inputRef.value && inputRef.value.$el) { if (state.autofocus) { focusStartRef.value = (_a22 = getInputElement()) != null ? _a22 : rootRef.value; } else { focusStartRef.value = rootRef.value; } } }); } else { state.editorErrorMessage = ""; state.validateError = false; } }); const draggable2 = computed2(() => props.draggable); useDraggable(rootRef, headerRef, draggable2); onMounted(async () => { await nextTick(); if (props.closeOnHashChange) { window.addEventListener("hashchange", doClose); } }); onBeforeUnmount(() => { if (props.closeOnHashChange) { window.removeEventListener("hashchange", doClose); } }); function doClose() { if (!visible.value) return; visible.value = false; nextTick(() => { if (state.action) emit("action", state.action); }); } const handleWrapperClick = () => { if (props.closeOnClickModal) { handleAction(state.distinguishCancelAndClose ? "close" : "cancel"); } }; const overlayEvent = useSameTarget(handleWrapperClick); const handleInputEnter = (e) => { if (state.inputType !== "textarea") { e.preventDefault(); return handleAction("confirm"); } }; const handleAction = (action) => { var _a2; if (props.boxType === "prompt" && action === "confirm" && !validate()) { return; } state.action = action; if (state.beforeClose) { (_a2 = state.beforeClose) == null ? void 0 : _a2.call(state, action, state, doClose); } else { doClose(); } }; const validate = () => { if (props.boxType === "prompt") { const inputPattern = state.inputPattern; if (inputPattern && !inputPattern.test(state.inputValue || "")) { state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error"); state.validateError = true; return false; } const inputValidator = state.inputValidator; if (typeof inputValidator === "function") { const validateResult = inputValidator(state.inputValue); if (validateResult === false) { state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error"); state.validateError = true; return false; } if (typeof validateResult === "string") { state.editorErrorMessage = validateResult; state.validateError = true; return false; } } } state.editorErrorMessage = ""; state.validateError = false; return true; }; const getInputElement = () => { const inputRefs = inputRef.value.$refs; return inputRefs.input || inputRefs.textarea; }; const handleClose = () => { handleAction("close"); }; const onCloseRequested = () => { if (props.closeOnPressEscape) { handleClose(); } }; if (props.lockScroll) { useLockscreen(visible); } useRestoreActive(visible); return { ...toRefs(state), ns, overlayEvent, visible, hasMessage, typeClass, contentId, inputId, btnSize, iconComponent, confirmButtonClasses, rootRef, focusStartRef, headerRef, inputRef, confirmRef, doClose, handleClose, onCloseRequested, handleWrapperClick, handleInputEnter, handleAction, t }; } }); var _hoisted_171 = ["aria-label", "aria-describedby"]; var _hoisted_244 = ["aria-label"]; var _hoisted_321 = ["id"]; function _sfc_render32(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_icon = resolveComponent("el-icon"); const _component_close = resolveComponent("close"); const _component_el_input = resolveComponent("el-input"); const _component_el_button = resolveComponent("el-button"); const _component_el_focus_trap = resolveComponent("el-focus-trap"); const _component_el_overlay = resolveComponent("el-overlay"); return openBlock(), createBlock(Transition, { name: "fade-in-linear", onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish")), persisted: "" }, { default: withCtx(() => [ withDirectives(createVNode(_component_el_overlay, { "z-index": _ctx.zIndex, "overlay-class": [_ctx.ns.is("message-box"), _ctx.modalClass], mask: _ctx.modal }, { default: withCtx(() => [ createBaseVNode("div", { role: "dialog", "aria-label": _ctx.title, "aria-modal": "true", "aria-describedby": !_ctx.showInput ? _ctx.contentId : void 0, class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`), onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)), onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)), onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args)) }, [ createVNode(_component_el_focus_trap, { loop: "", trapped: _ctx.visible, "focus-trap-el": _ctx.rootRef, "focus-start-el": _ctx.focusStartRef, onReleaseRequested: _ctx.onCloseRequested }, { default: withCtx(() => [ createBaseVNode("div", { ref: "rootRef", class: normalizeClass([ _ctx.ns.b(), _ctx.customClass, _ctx.ns.is("draggable", _ctx.draggable), { [_ctx.ns.m("center")]: _ctx.center } ]), style: normalizeStyle(_ctx.customStyle), tabindex: "-1", onClick: _cache[7] || (_cache[7] = withModifiers(() => { }, ["stop"])) }, [ _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", { key: 0, ref: "headerRef", class: normalizeClass(_ctx.ns.e("header")) }, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("title")) }, [ _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, { key: 0, class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("span", null, toDisplayString(_ctx.title), 1) ], 2), _ctx.showClose ? (openBlock(), createElementBlock("button", { key: 0, type: "button", class: normalizeClass(_ctx.ns.e("headerbtn")), "aria-label": _ctx.t("el.messagebox.close"), onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")), onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])) }, [ createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("close")) }, { default: withCtx(() => [ createVNode(_component_close) ]), _: 1 }, 8, ["class"]) ], 42, _hoisted_244)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { id: _ctx.contentId, class: normalizeClass(_ctx.ns.e("content")) }, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("container")) }, [ _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, { key: 0, class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.hasMessage ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(_ctx.ns.e("message")) }, [ renderSlot(_ctx.$slots, "default", {}, () => [ !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), { key: 0, for: _ctx.showInput ? _ctx.inputId : void 0 }, { default: withCtx(() => [ createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : ""), 1) ]), _: 1 }, 8, ["for"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), { key: 1, for: _ctx.showInput ? _ctx.inputId : void 0, innerHTML: _ctx.message }, null, 8, ["for", "innerHTML"])) ]) ], 2)) : createCommentVNode("v-if", true) ], 2), withDirectives(createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("input")) }, [ createVNode(_component_el_input, { id: _ctx.inputId, ref: "inputRef", modelValue: _ctx.inputValue, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event), type: _ctx.inputType, placeholder: _ctx.inputPlaceholder, "aria-invalid": _ctx.validateError, class: normalizeClass({ invalid: _ctx.validateError }), onKeydown: withKeys(_ctx.handleInputEnter, ["enter"]) }, null, 8, ["id", "modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("errormsg")), style: normalizeStyle({ visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden" }) }, toDisplayString(_ctx.editorErrorMessage), 7) ], 2), [ [vShow, _ctx.showInput] ]) ], 10, _hoisted_321), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("btns")) }, [ _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, { key: 0, loading: _ctx.cancelButtonLoading, class: normalizeClass([_ctx.cancelButtonClass]), round: _ctx.roundButton, size: _ctx.btnSize, onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")), onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"])) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1) ]), _: 1 }, 8, ["loading", "class", "round", "size"])) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_el_button, { ref: "confirmRef", type: "primary", loading: _ctx.confirmButtonLoading, class: normalizeClass([_ctx.confirmButtonClasses]), round: _ctx.roundButton, disabled: _ctx.confirmButtonDisabled, size: _ctx.btnSize, onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")), onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"])) }, { default: withCtx(() => [ createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1) ]), _: 1 }, 8, ["loading", "class", "round", "disabled", "size"]), [ [vShow, _ctx.showConfirmButton] ]) ], 2) ], 6) ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"]) ], 42, _hoisted_171) ]), _: 3 }, 8, ["z-index", "overlay-class", "mask"]), [ [vShow, _ctx.visible] ]) ]), _: 3 }); } var MessageBoxConstructor = _export_sfc(_sfc_main146, [["render", _sfc_render32], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message-box/src/messageBox.mjs var messageInstance = /* @__PURE__ */ new Map(); var getAppendToElement = (props) => { let appendTo = document.body; if (props.appendTo) { if (isString(props.appendTo)) { appendTo = document.querySelector(props.appendTo); } if (isElement2(props.appendTo)) { appendTo = props.appendTo; } if (!isElement2(appendTo)) { debugWarn("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."); appendTo = document.body; } } return appendTo; }; var initInstance = (props, container, appContext = null) => { const vnode = createVNode(MessageBoxConstructor, props, isFunction(props.message) || isVNode(props.message) ? { default: isFunction(props.message) ? props.message : () => props.message } : null); vnode.appContext = appContext; render(vnode, container); getAppendToElement(props).appendChild(container.firstElementChild); return vnode.component; }; var genContainer = () => { return document.createElement("div"); }; var showMessage = (options, appContext) => { const container = genContainer(); options.onVanish = () => { render(null, container); messageInstance.delete(vm); }; options.onAction = (action) => { const currentMsg = messageInstance.get(vm); let resolve; if (options.showInput) { resolve = { value: vm.inputValue, action }; } else { resolve = action; } if (options.callback) { options.callback(resolve, instance.proxy); } else { if (action === "cancel" || action === "close") { if (options.distinguishCancelAndClose && action !== "cancel") { currentMsg.reject("close"); } else { currentMsg.reject("cancel"); } } else { currentMsg.resolve(resolve); } } }; const instance = initInstance(options, container, appContext); const vm = instance.proxy; for (const prop in options) { if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) { vm[prop] = options[prop]; } } vm.visible = true; return vm; }; function MessageBox(options, appContext = null) { if (!isClient) return Promise.reject(); let callback; if (isString(options) || isVNode(options)) { options = { message: options }; } else { callback = options.callback; } return new Promise((resolve, reject2) => { const vm = showMessage(options, appContext != null ? appContext : MessageBox._context); messageInstance.set(vm, { options, callback, resolve, reject: reject2 }); }); } var MESSAGE_BOX_VARIANTS = ["alert", "confirm", "prompt"]; var MESSAGE_BOX_DEFAULT_OPTS = { alert: { closeOnPressEscape: false, closeOnClickModal: false }, confirm: { showCancelButton: true }, prompt: { showCancelButton: true, showInput: true } }; MESSAGE_BOX_VARIANTS.forEach((boxType) => { ; MessageBox[boxType] = messageBoxFactory(boxType); }); function messageBoxFactory(boxType) { return (message2, title, options, appContext) => { let titleOrOpts = ""; if (isObject(title)) { options = title; titleOrOpts = ""; } else if (isUndefined2(title)) { titleOrOpts = ""; } else { titleOrOpts = title; } return MessageBox(Object.assign({ title: titleOrOpts, message: message2, type: "", ...MESSAGE_BOX_DEFAULT_OPTS[boxType] }, options, { boxType }), appContext); }; } MessageBox.close = () => { messageInstance.forEach((_2, vm) => { vm.doClose(); }); messageInstance.clear(); }; MessageBox._context = null; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/message-box/index.mjs var _MessageBox = MessageBox; _MessageBox.install = (app) => { _MessageBox._context = app._context; app.config.globalProperties.$msgbox = _MessageBox; app.config.globalProperties.$messageBox = _MessageBox; app.config.globalProperties.$alert = _MessageBox.alert; app.config.globalProperties.$confirm = _MessageBox.confirm; app.config.globalProperties.$prompt = _MessageBox.prompt; }; var ElMessageBox = _MessageBox; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/notification/src/notification.mjs var notificationTypes = [ "success", "info", "warning", "error" ]; var notificationProps = buildProps({ customClass: { type: String, default: "" }, dangerouslyUseHTMLString: { type: Boolean, default: false }, duration: { type: Number, default: 4500 }, icon: { type: iconPropType }, id: { type: String, default: "" }, message: { type: definePropType([String, Object]), default: "" }, offset: { type: Number, default: 0 }, onClick: { type: definePropType(Function), default: () => void 0 }, onClose: { type: definePropType(Function), required: true }, position: { type: String, values: ["top-right", "top-left", "bottom-right", "bottom-left"], default: "top-right" }, showClose: { type: Boolean, default: true }, title: { type: String, default: "" }, type: { type: String, values: [...notificationTypes, ""], default: "" }, zIndex: { type: Number, default: 0 } }); var notificationEmits = { destroy: () => true }; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/notification/src/notification2.mjs var _hoisted_173 = ["id"]; var _hoisted_245 = ["textContent"]; var _hoisted_322 = { key: 0 }; var _hoisted_412 = ["innerHTML"]; var __default__103 = defineComponent({ name: "ElNotification" }); var _sfc_main147 = defineComponent({ ...__default__103, props: notificationProps, emits: notificationEmits, setup(__props, { expose }) { const props = __props; const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("notification"); const { nextZIndex, currentZIndex } = zIndex2; const { Close } = CloseComponents; const visible = ref(false); let timer = void 0; const typeClass = computed2(() => { const type4 = props.type; return type4 && TypeComponentsMap[props.type] ? ns.m(type4) : ""; }); const iconComponent = computed2(() => { if (!props.type) return props.icon; return TypeComponentsMap[props.type] || props.icon; }); const horizontalClass = computed2(() => props.position.endsWith("right") ? "right" : "left"); const verticalProperty = computed2(() => props.position.startsWith("top") ? "top" : "bottom"); const positionStyle = computed2(() => { return { [verticalProperty.value]: `${props.offset}px`, zIndex: currentZIndex.value }; }); function startTimer() { if (props.duration > 0) { ; ({ stop: timer } = useTimeoutFn(() => { if (visible.value) close2(); }, props.duration)); } } function clearTimer() { timer == null ? void 0 : timer(); } function close2() { visible.value = false; } function onKeydown({ code }) { if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) { clearTimer(); } else if (code === EVENT_CODE.esc) { if (visible.value) { close2(); } } else { startTimer(); } } onMounted(() => { startTimer(); nextZIndex(); visible.value = true; }); useEventListener(document, "keydown", onKeydown); expose({ visible, close: close2 }); return (_ctx, _cache) => { return openBlock(), createBlock(Transition, { name: unref(ns).b("fade"), onBeforeLeave: _ctx.onClose, onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")), persisted: "" }, { default: withCtx(() => [ withDirectives(createBaseVNode("div", { id: _ctx.id, class: normalizeClass([unref(ns).b(), _ctx.customClass, unref(horizontalClass)]), style: normalizeStyle(unref(positionStyle)), role: "alert", onMouseenter: clearTimer, onMouseleave: startTimer, onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)) }, [ unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass([unref(ns).e("icon"), unref(typeClass)]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("group")) }, [ createBaseVNode("h2", { class: normalizeClass(unref(ns).e("title")), textContent: toDisplayString(_ctx.title) }, null, 10, _hoisted_245), withDirectives(createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")), style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 }) }, [ renderSlot(_ctx.$slots, "default", {}, () => [ !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_322, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_412) ], 2112)) ]) ], 6), [ [vShow, _ctx.message] ]), _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns).e("closeBtn")), onClick: withModifiers(close2, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Close)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 2) ], 46, _hoisted_173), [ [vShow, visible.value] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave"]); }; } }); var NotificationConstructor = _export_sfc(_sfc_main147, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/notification/src/notify.mjs var notifications = { "top-left": [], "top-right": [], "bottom-left": [], "bottom-right": [] }; var GAP_SIZE = 16; var seed2 = 1; var notify = function(options = {}, context = null) { if (!isClient) return { close: () => void 0 }; if (typeof options === "string" || isVNode(options)) { options = { message: options }; } const position = options.position || "top-right"; let verticalOffset = options.offset || 0; notifications[position].forEach(({ vm: vm2 }) => { var _a2; verticalOffset += (((_a2 = vm2.el) == null ? void 0 : _a2.offsetHeight) || 0) + GAP_SIZE; }); verticalOffset += GAP_SIZE; const id = `notification_${seed2++}`; const userOnClose = options.onClose; const props = { ...options, offset: verticalOffset, id, onClose: () => { close(id, position, userOnClose); } }; let appendTo = document.body; if (isElement2(options.appendTo)) { appendTo = options.appendTo; } else if (isString(options.appendTo)) { appendTo = document.querySelector(options.appendTo); } if (!isElement2(appendTo)) { debugWarn("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body."); appendTo = document.body; } const container = document.createElement("div"); const vm = createVNode(NotificationConstructor, props, isVNode(props.message) ? { default: () => props.message } : null); vm.appContext = context != null ? context : notify._context; vm.props.onDestroy = () => { render(null, container); }; render(vm, container); notifications[position].push({ vm }); appendTo.appendChild(container.firstElementChild); return { close: () => { ; vm.component.exposed.visible.value = false; } }; }; notificationTypes.forEach((type4) => { notify[type4] = (options = {}) => { if (typeof options === "string" || isVNode(options)) { options = { message: options }; } return notify({ ...options, type: type4 }); }; }); function close(id, position, userOnClose) { const orientedNotifications = notifications[position]; const idx = orientedNotifications.findIndex(({ vm: vm2 }) => { var _a2; return ((_a2 = vm2.component) == null ? void 0 : _a2.props.id) === id; }); if (idx === -1) return; const { vm } = orientedNotifications[idx]; if (!vm) return; userOnClose == null ? void 0 : userOnClose(vm); const removedHeight = vm.el.offsetHeight; const verticalPos = position.split("-")[0]; orientedNotifications.splice(idx, 1); const len = orientedNotifications.length; if (len < 1) return; for (let i = idx; i < len; i++) { const { el, component: component2 } = orientedNotifications[i].vm; const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE; component2.props.offset = pos; } } function closeAll2() { for (const orientedNotifications of Object.values(notifications)) { orientedNotifications.forEach(({ vm }) => { ; vm.component.exposed.visible.value = false; }); } } notify.closeAll = closeAll2; notify._context = null; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/components/notification/index.mjs var ElNotification = withInstallFunction(notify, "$notify"); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/plugin.mjs var Plugins = [ ElInfiniteScroll, ElLoading, ElMessage, ElMessageBox, ElNotification, ElPopoverDirective ]; // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/defaults.mjs var installer = makeInstaller([...Components, ...Plugins]); // node_modules/.pnpm/registry.npmmirror.com+element-plus@2.3.2_vue@3.2.47/node_modules/element-plus/es/index.mjs var import_dayjs17 = __toESM(require_dayjs_min(), 1); var install = installer.install; var version3 = installer.version; var export_dayjs = import_dayjs17.default; export { BAR_MAP, CASCADER_PANEL_INJECTION_KEY, CHANGE_EVENT, ClickOutside, CommonPicker, CommonProps, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, COLLECTION_INJECTION_KEY2 as DROPDOWN_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY2 as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, DROPDOWN_INJECTION_KEY, DefaultProps, DynamicSizeGrid, DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElCollection2 as ElCollection, ElCollectionItem2 as ElCollectionItem, ElColorPicker, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElLink, ElLoading, vLoading as ElLoadingDirective, Loading as ElLoadingService, ElMain, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, ElPopperArrow, ElPopperContent, ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn2 as ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid, FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, Mousewheel, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_PICKER_INJECTION_KEY, RowAlign, RowJustify, SIZE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, affixEmits, affixProps, alertEffects, alertEmits, alertProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderProps, checkTagEmits, checkTagProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerContextKey, colorPickerEmits, colorPickerProps, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, export_dayjs as dayjs, installer as default, defaultInitialZIndex, defaultNamespace, descriptionProps, dialogEmits, dialogInjectionKey, dialogProps, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, install, linkEmits, linkProps, localeContextKey, makeInstaller, makeList, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messageProps, messageTypes, namespaceContextKey, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popperArrowProps, popperContentEmits, popperContentProps, popperCoreConfigProps, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioProps, radioPropsBase, rangeArr, rateEmits, rateProps, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, selectGroupKey, selectKey, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timeUnits, timelineItemProps, tooltipEmits, transferCheckedChangeFn, transferEmits, transferProps, translate, uploadBaseProps, uploadContentProps, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, useAttrs2 as useAttrs, useCascaderConfig, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDeprecated, useDialog, useDisabled, useDraggable, useEscapeKeydown, useFloating, useFloatingProps, useFocus, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useForwardRef, useForwardRefDirective, useGetDerivedNamespace, useGlobalComponentSettings, useGlobalConfig, useGlobalSize, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useRestoreActive, useSameTarget, useSize, useSizeProp, useSizeProps, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vLoading, vRepeatClick, valueEquals, version3 as version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, zIndexContextKey }; /*! Bundled license information: escape-html/index.js: (*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed *) lodash-es/lodash.default.js: (** * @license * Lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) lodash-es/lodash.js: (** * @license * Lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) normalize-wheel-es/dist/index.mjs: (** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT *) */ //# sourceMappingURL=element-plus.js.map 修改描述字体input为textarea · 4983a32b13 - Nuosi Git Service
Просмотр исходного кода

修改描述字体input为textarea

guohh лет назад: 4
Родитель
Сommit
4983a32b13
2 измененных файлов с 7 добавлено и 2 удалено
  1. 6 1
      2020/x-3/biz/css/base-ghh.css
  2. 1 1
      2020/x-3/group-add.html

+ 6 - 1
2020/x-3/biz/css/base-ghh.css

@ -1652,6 +1652,11 @@ a.common-color-red,
1652 1652
  color: rgba(0, 0, 0, 1);
1653 1653
}
1654 1654
1655
.form-block .ipu-list-item-textarea {
1656
  resize: none;
1657
  height: .44rem;
1658
}
1659
1655 1660
.schedule-type {
1656 1661
  width: 0.08rem;
1657 1662
  height: 0.08rem;
@ -4491,7 +4496,7 @@ body.date-picked .list-item-pickered {
4491 4496
  color: #FFFFFF;
4492 4497
}
4493 4498
4494
.group-detail-quit-btn{
4499
.group-detail-quit-btn {
4495 4500
  margin: .8rem .2rem .1rem;
4496 4501
  font-weight: 600;
4497 4502
  font-size: .16rem;

+ 1 - 1
2020/x-3/group-add.html

@ -146,7 +146,7 @@
146 146
              群组描述
147 147
            </div>
148 148
            <div class="ipu-list-item-input-wrap">
149
              <input class="ipu-list-item-input" type="text" placeholder="填写群组描述" value="">
149
              <textarea class="ipu-list-item-textarea" placeholder="填写群组描述" value=""></textarea>
150 150
            </div>
151 151
          </div>
152 152
        </li>